diff --git a/crates/icrate-generated/Cargo.toml b/crates/icrate-generated/Cargo.toml new file mode 100644 index 000000000..28b8726ac --- /dev/null +++ b/crates/icrate-generated/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"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2?/std"] +alloc = ["objc2?/alloc"] + +# Expose features that requires Objective-C. +objective-c = ["objc2"] + +# Expose features that requires creating blocks. +blocks = ["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", "CoreData"] +# AppleScriptKit = [] +# AppleScriptObjC = [] +# ApplicationServices = [] +# AppTrackingTransparency = [] +# ARKit = [] +# AssetsLibrary = [] # iOS +# AudioToolbox = [] +# AudioUnit = [] +# AudioDriverKit = [] +# AudioVideoBridging = [] +AuthenticationServices = ["Foundation"] +# 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 = ["Foundation"] +# 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 = ["objective-c", "blocks", "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-generated/README.md b/crates/icrate-generated/README.md new file mode 100644 index 000000000..3b5632360 --- /dev/null +++ b/crates/icrate-generated/README.md @@ -0,0 +1,19 @@ +# `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. + +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-generated/src/AppKit/generated/mod.rs b/crates/icrate-generated/src/AppKit/generated/mod.rs new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/crates/icrate-generated/src/AppKit/generated/mod.rs @@ -0,0 +1 @@ + diff --git a/crates/icrate-generated/src/AppKit/mod.rs b/crates/icrate-generated/src/AppKit/mod.rs new file mode 100644 index 000000000..dca5b4f98 --- /dev/null +++ b/crates/icrate-generated/src/AppKit/mod.rs @@ -0,0 +1,4 @@ +#[allow(unused_imports)] +mod generated; + +pub use self::generated::*; diff --git a/crates/icrate-generated/src/AppKit/translation-config.toml b/crates/icrate-generated/src/AppKit/translation-config.toml new file mode 100644 index 000000000..249980b16 --- /dev/null +++ b/crates/icrate-generated/src/AppKit/translation-config.toml @@ -0,0 +1,189 @@ +imports = ["AppKit", "CoreData", "Foundation"] + +# These return `oneway void`, which is a bit tricky to handle. +[class.NSPasteboard.methods.releaseGlobally] +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 + +# 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 +[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 + +# 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 + +# Different definitions depending on target +[enum.NSImageResizingMode] +skipped = true +[enum.NSTextAlignment] +skipped = true + +# Different definitions depending on deplyment target +[class.NSLayoutAnchor] +skipped = true +[class.NSPopover] +skipped = true diff --git a/crates/icrate-generated/src/AuthenticationServices/fixes/mod.rs b/crates/icrate-generated/src/AuthenticationServices/fixes/mod.rs new file mode 100644 index 000000000..a7a41b048 --- /dev/null +++ b/crates/icrate-generated/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-generated/src/AuthenticationServices/generated/ASAccountAuthenticationModificationController.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASAccountAuthenticationModificationController.rs new file mode 100644 index 000000000..31032a76f --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASAccountAuthenticationModificationExtensionContext.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASAccountAuthenticationModificationExtensionContext.rs new file mode 100644 index 000000000..1946781ec --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASAccountAuthenticationModificationReplacePasswordWithSignInWithAppleRequest.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASAccountAuthenticationModificationReplacePasswordWithSignInWithAppleRequest.rs new file mode 100644 index 000000000..88453596b --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASAccountAuthenticationModificationRequest.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASAccountAuthenticationModificationRequest.rs new file mode 100644 index 000000000..93508f6ad --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASAccountAuthenticationModificationUpgradePasswordToStrongPasswordRequest.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASAccountAuthenticationModificationUpgradePasswordToStrongPasswordRequest.rs new file mode 100644 index 000000000..572a20816 --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASAccountAuthenticationModificationViewController.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASAccountAuthenticationModificationViewController.rs new file mode 100644 index 000000000..c78a0f383 --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASAuthorization.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASAuthorization.rs new file mode 100644 index 000000000..4d6e1f4dd --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASAuthorizationAppleIDButton.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASAuthorizationAppleIDButton.rs new file mode 100644 index 000000000..296ea137d --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASAuthorizationAppleIDCredential.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASAuthorizationAppleIDCredential.rs new file mode 100644 index 000000000..9f55537a8 --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASAuthorizationAppleIDProvider.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASAuthorizationAppleIDProvider.rs new file mode 100644 index 000000000..4823c960a --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASAuthorizationAppleIDRequest.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASAuthorizationAppleIDRequest.rs new file mode 100644 index 000000000..67d38b40b --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASAuthorizationController.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASAuthorizationController.rs new file mode 100644 index 000000000..d0b8d1bbb --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/ASAuthorizationController.rs @@ -0,0 +1,127 @@ +//! 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; + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum ASAuthorizationControllerRequestOptions { + ASAuthorizationControllerRequestOptionPreferImmediatelyAvailableCredentials = 1 << 0, + } +); + +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(performAutoFillAssistedRequests)] + pub unsafe fn performAutoFillAssistedRequests(&self); + + #[method(performRequestsWithOptions:)] + pub unsafe fn performRequestsWithOptions( + &self, + options: ASAuthorizationControllerRequestOptions, + ); + + #[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; + } +); diff --git a/crates/icrate-generated/src/AuthenticationServices/generated/ASAuthorizationCredential.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASAuthorizationCredential.rs new file mode 100644 index 000000000..3d5b5fde2 --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASAuthorizationCustomMethod.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASAuthorizationCustomMethod.rs new file mode 100644 index 000000000..e940e81a5 --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASAuthorizationError.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASAuthorizationError.rs new file mode 100644 index 000000000..9666b3d24 --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASAuthorizationOpenIDRequest.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASAuthorizationOpenIDRequest.rs new file mode 100644 index 000000000..de5f37cc7 --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASAuthorizationPasswordProvider.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASAuthorizationPasswordProvider.rs new file mode 100644 index 000000000..9304710ce --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASAuthorizationPasswordRequest.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASAuthorizationPasswordRequest.rs new file mode 100644 index 000000000..85188c110 --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASAuthorizationPlatformPublicKeyCredentialAssertion.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASAuthorizationPlatformPublicKeyCredentialAssertion.rs new file mode 100644 index 000000000..78b1c65f0 --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASAuthorizationPlatformPublicKeyCredentialAssertionRequest.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASAuthorizationPlatformPublicKeyCredentialAssertionRequest.rs new file mode 100644 index 000000000..6a91930f8 --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASAuthorizationPlatformPublicKeyCredentialDescriptor.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASAuthorizationPlatformPublicKeyCredentialDescriptor.rs new file mode 100644 index 000000000..ee159e199 --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASAuthorizationPlatformPublicKeyCredentialProvider.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASAuthorizationPlatformPublicKeyCredentialProvider.rs new file mode 100644 index 000000000..da2428577 --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASAuthorizationPlatformPublicKeyCredentialRegistration.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASAuthorizationPlatformPublicKeyCredentialRegistration.rs new file mode 100644 index 000000000..284f9d989 --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASAuthorizationPlatformPublicKeyCredentialRegistrationRequest.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASAuthorizationPlatformPublicKeyCredentialRegistrationRequest.rs new file mode 100644 index 000000000..8b133f923 --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASAuthorizationProvider.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASAuthorizationProvider.rs new file mode 100644 index 000000000..fcee83286 --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASAuthorizationProviderExtensionAuthorizationRequest.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASAuthorizationProviderExtensionAuthorizationRequest.rs new file mode 100644 index 000000000..b80469357 --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/ASAuthorizationProviderExtensionAuthorizationRequest.rs @@ -0,0 +1,124 @@ +//! 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_static!( + ASAuthorizationProviderAuthorizationOperationDirectRequest: + &'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-generated/src/AuthenticationServices/generated/ASAuthorizationProviderExtensionAuthorizationResult.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASAuthorizationProviderExtensionAuthorizationResult.rs new file mode 100644 index 000000000..15e7ba0ce --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASAuthorizationPublicKeyCredentialAssertion.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASAuthorizationPublicKeyCredentialAssertion.rs new file mode 100644 index 000000000..c9432a36d --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASAuthorizationPublicKeyCredentialAssertionRequest.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASAuthorizationPublicKeyCredentialAssertionRequest.rs new file mode 100644 index 000000000..df37957d9 --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASAuthorizationPublicKeyCredentialConstants.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASAuthorizationPublicKeyCredentialConstants.rs new file mode 100644 index 000000000..39bbadd63 --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASAuthorizationPublicKeyCredentialDescriptor.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASAuthorizationPublicKeyCredentialDescriptor.rs new file mode 100644 index 000000000..347d8e57d --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASAuthorizationPublicKeyCredentialParameters.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASAuthorizationPublicKeyCredentialParameters.rs new file mode 100644 index 000000000..33c638e1f --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASAuthorizationPublicKeyCredentialRegistration.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASAuthorizationPublicKeyCredentialRegistration.rs new file mode 100644 index 000000000..418a81256 --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASAuthorizationPublicKeyCredentialRegistrationRequest.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASAuthorizationPublicKeyCredentialRegistrationRequest.rs new file mode 100644 index 000000000..d6676f129 --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASAuthorizationRequest.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASAuthorizationRequest.rs new file mode 100644 index 000000000..3b45581ca --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASAuthorizationSecurityKeyPublicKeyCredentialAssertion.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASAuthorizationSecurityKeyPublicKeyCredentialAssertion.rs new file mode 100644 index 000000000..39773924c --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASAuthorizationSecurityKeyPublicKeyCredentialAssertionRequest.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASAuthorizationSecurityKeyPublicKeyCredentialAssertionRequest.rs new file mode 100644 index 000000000..66a2dc2fe --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASAuthorizationSecurityKeyPublicKeyCredentialDescriptor.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASAuthorizationSecurityKeyPublicKeyCredentialDescriptor.rs new file mode 100644 index 000000000..5cab21995 --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASAuthorizationSecurityKeyPublicKeyCredentialProvider.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASAuthorizationSecurityKeyPublicKeyCredentialProvider.rs new file mode 100644 index 000000000..6227b1233 --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASAuthorizationSecurityKeyPublicKeyCredentialRegistration.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASAuthorizationSecurityKeyPublicKeyCredentialRegistration.rs new file mode 100644 index 000000000..213e7462c --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASAuthorizationSecurityKeyPublicKeyCredentialRegistrationRequest.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASAuthorizationSecurityKeyPublicKeyCredentialRegistrationRequest.rs new file mode 100644 index 000000000..1abbffaf5 --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASAuthorizationSingleSignOnCredential.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASAuthorizationSingleSignOnCredential.rs new file mode 100644 index 000000000..fb9ef22fa --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASAuthorizationSingleSignOnProvider.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASAuthorizationSingleSignOnProvider.rs new file mode 100644 index 000000000..19eec85ad --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASAuthorizationSingleSignOnRequest.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASAuthorizationSingleSignOnRequest.rs new file mode 100644 index 000000000..551afded9 --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASCOSEConstants.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASCOSEConstants.rs new file mode 100644 index 000000000..a2a8a2eef --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASCredentialIdentityStore.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASCredentialIdentityStore.rs new file mode 100644 index 000000000..bea058d50 --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASCredentialIdentityStoreState.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASCredentialIdentityStoreState.rs new file mode 100644 index 000000000..662441f23 --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASCredentialProviderExtensionContext.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASCredentialProviderExtensionContext.rs new file mode 100644 index 000000000..8b0ef0f5f --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASCredentialProviderViewController.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASCredentialProviderViewController.rs new file mode 100644 index 000000000..fc48fa9f5 --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASCredentialServiceIdentifier.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASCredentialServiceIdentifier.rs new file mode 100644 index 000000000..0c276217c --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASExtensionErrors.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASExtensionErrors.rs new file mode 100644 index 000000000..744f634c7 --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASFoundation.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASFoundation.rs new file mode 100644 index 000000000..d378a60b0 --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASPasswordCredential.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASPasswordCredential.rs new file mode 100644 index 000000000..c6478e37d --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASPasswordCredentialIdentity.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASPasswordCredentialIdentity.rs new file mode 100644 index 000000000..27191748e --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASPublicKeyCredential.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASPublicKeyCredential.rs new file mode 100644 index 000000000..d5e05029a --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASWebAuthenticationSession.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASWebAuthenticationSession.rs new file mode 100644 index 000000000..e0b0af9b9 --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASWebAuthenticationSessionRequest.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASWebAuthenticationSessionRequest.rs new file mode 100644 index 000000000..63b75bfcc --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASWebAuthenticationSessionWebBrowserSessionHandling.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASWebAuthenticationSessionWebBrowserSessionHandling.rs new file mode 100644 index 000000000..8a48a14f7 --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/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-generated/src/AuthenticationServices/generated/ASWebAuthenticationSessionWebBrowserSessionManager.rs b/crates/icrate-generated/src/AuthenticationServices/generated/ASWebAuthenticationSessionWebBrowserSessionManager.rs new file mode 100644 index 000000000..5e80fd9da --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/ASWebAuthenticationSessionWebBrowserSessionManager.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::*; + +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; + } +); diff --git a/crates/icrate-generated/src/AuthenticationServices/generated/mod.rs b/crates/icrate-generated/src/AuthenticationServices/generated/mod.rs new file mode 100644 index 000000000..1355e1723 --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/generated/mod.rs @@ -0,0 +1,266 @@ +#[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, + ASAuthorizationControllerRequestOptionPreferImmediatelyAvailableCredentials, + ASAuthorizationControllerRequestOptions, +}; +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, + ASAuthorizationProviderAuthorizationOperationDirectRequest, + 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-generated/src/AuthenticationServices/mod.rs b/crates/icrate-generated/src/AuthenticationServices/mod.rs new file mode 100644 index 000000000..4cb4b83d1 --- /dev/null +++ b/crates/icrate-generated/src/AuthenticationServices/mod.rs @@ -0,0 +1,6 @@ +mod fixes; +#[allow(unused_imports)] +mod generated; + +pub use self::fixes::*; +pub use self::generated::*; diff --git a/crates/icrate-generated/src/AuthenticationServices/translation-config.toml b/crates/icrate-generated/src/AuthenticationServices/translation-config.toml new file mode 100644 index 000000000..0aa61f27f --- /dev/null +++ b/crates/icrate-generated/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-generated/src/CoreData/generated/CoreDataDefines.rs b/crates/icrate-generated/src/CoreData/generated/CoreDataDefines.rs new file mode 100644 index 000000000..cacfdc74b --- /dev/null +++ b/crates/icrate-generated/src/CoreData/generated/CoreDataDefines.rs @@ -0,0 +1,7 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +extern_static!(NSCoreDataVersionNumber: c_double); diff --git a/crates/icrate-generated/src/CoreData/generated/CoreDataErrors.rs b/crates/icrate-generated/src/CoreData/generated/CoreDataErrors.rs new file mode 100644 index 000000000..cddf0c517 --- /dev/null +++ b/crates/icrate-generated/src/CoreData/generated/CoreDataErrors.rs @@ -0,0 +1,75 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +extern_static!(NSDetailedErrorsKey: &'static NSString); + +extern_static!(NSValidationObjectErrorKey: &'static NSString); + +extern_static!(NSValidationKeyErrorKey: &'static NSString); + +extern_static!(NSValidationPredicateErrorKey: &'static NSString); + +extern_static!(NSValidationValueErrorKey: &'static NSString); + +extern_static!(NSAffectedStoresErrorKey: &'static NSString); + +extern_static!(NSAffectedObjectsErrorKey: &'static NSString); + +extern_static!(NSPersistentStoreSaveConflictsErrorKey: &'static NSString); + +extern_static!(NSSQLiteErrorDomain: &'static NSString); + +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-generated/src/CoreData/generated/NSAtomicStore.rs b/crates/icrate-generated/src/CoreData/generated/NSAtomicStore.rs new file mode 100644 index 000000000..6973abd7a --- /dev/null +++ b/crates/icrate-generated/src/CoreData/generated/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) -> Result<(), Id>; + + #[method(save:)] + pub unsafe fn save(&self) -> Result<(), Id>; + + #[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-generated/src/CoreData/generated/NSAtomicStoreCacheNode.rs b/crates/icrate-generated/src/CoreData/generated/NSAtomicStoreCacheNode.rs new file mode 100644 index 000000000..0cc5b65c7 --- /dev/null +++ b/crates/icrate-generated/src/CoreData/generated/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-generated/src/CoreData/generated/NSAttributeDescription.rs b/crates/icrate-generated/src/CoreData/generated/NSAttributeDescription.rs new file mode 100644 index 000000000..e568fc59b --- /dev/null +++ b/crates/icrate-generated/src/CoreData/generated/NSAttributeDescription.rs @@ -0,0 +1,90 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +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)] + 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-generated/src/CoreData/generated/NSBatchDeleteRequest.rs b/crates/icrate-generated/src/CoreData/generated/NSBatchDeleteRequest.rs new file mode 100644 index 000000000..c506ed766 --- /dev/null +++ b/crates/icrate-generated/src/CoreData/generated/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-generated/src/CoreData/generated/NSBatchInsertRequest.rs b/crates/icrate-generated/src/CoreData/generated/NSBatchInsertRequest.rs new file mode 100644 index 000000000..ef755587d --- /dev/null +++ b/crates/icrate-generated/src/CoreData/generated/NSBatchInsertRequest.rs @@ -0,0 +1,126 @@ +//! 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, + ) -> *mut Block<(NonNull>,), Bool>; + + #[method(setDictionaryHandler:)] + pub unsafe fn setDictionaryHandler( + &self, + dictionaryHandler: Option< + &Block<(NonNull>,), Bool>, + >, + ); + + #[method(managedObjectHandler)] + pub unsafe fn managedObjectHandler(&self) -> *mut Block<(NonNull,), Bool>; + + #[method(setManagedObjectHandler:)] + pub unsafe fn setManagedObjectHandler( + &self, + managedObjectHandler: Option<&Block<(NonNull,), Bool>>, + ); + + #[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: &Block<(NonNull>,), Bool>, + ) -> Id; + + #[method_id(@__retain_semantics Other batchInsertRequestWithEntityName:managedObjectHandler:)] + pub unsafe fn batchInsertRequestWithEntityName_managedObjectHandler( + entityName: &NSString, + handler: &Block<(NonNull,), Bool>, + ) -> 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: &Block<(NonNull>,), Bool>, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithEntity:managedObjectHandler:)] + pub unsafe fn initWithEntity_managedObjectHandler( + this: Option>, + entity: &NSEntityDescription, + handler: &Block<(NonNull,), Bool>, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithEntityName:dictionaryHandler:)] + pub unsafe fn initWithEntityName_dictionaryHandler( + this: Option>, + entityName: &NSString, + handler: &Block<(NonNull>,), Bool>, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithEntityName:managedObjectHandler:)] + pub unsafe fn initWithEntityName_managedObjectHandler( + this: Option>, + entityName: &NSString, + handler: &Block<(NonNull,), Bool>, + ) -> Id; + } +); diff --git a/crates/icrate-generated/src/CoreData/generated/NSBatchUpdateRequest.rs b/crates/icrate-generated/src/CoreData/generated/NSBatchUpdateRequest.rs new file mode 100644 index 000000000..5d5289187 --- /dev/null +++ b/crates/icrate-generated/src/CoreData/generated/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-generated/src/CoreData/generated/NSCoreDataCoreSpotlightDelegate.rs b/crates/icrate-generated/src/CoreData/generated/NSCoreDataCoreSpotlightDelegate.rs new file mode 100644 index 000000000..d56370c23 --- /dev/null +++ b/crates/icrate-generated/src/CoreData/generated/NSCoreDataCoreSpotlightDelegate.rs @@ -0,0 +1,60 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +extern_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: &Block<(*mut NSError,), ()>, + ); + } +); diff --git a/crates/icrate-generated/src/CoreData/generated/NSDerivedAttributeDescription.rs b/crates/icrate-generated/src/CoreData/generated/NSDerivedAttributeDescription.rs new file mode 100644 index 000000000..54a6e6174 --- /dev/null +++ b/crates/icrate-generated/src/CoreData/generated/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-generated/src/CoreData/generated/NSEntityDescription.rs b/crates/icrate-generated/src/CoreData/generated/NSEntityDescription.rs new file mode 100644 index 000000000..33c824460 --- /dev/null +++ b/crates/icrate-generated/src/CoreData/generated/NSEntityDescription.rs @@ -0,0 +1,146 @@ +//! 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-generated/src/CoreData/generated/NSEntityMapping.rs b/crates/icrate-generated/src/CoreData/generated/NSEntityMapping.rs new file mode 100644 index 000000000..05e8fe5fa --- /dev/null +++ b/crates/icrate-generated/src/CoreData/generated/NSEntityMapping.rs @@ -0,0 +1,109 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSEntityMappingType { + NSUndefinedEntityMappingType = 0x00, + NSCustomEntityMappingType = 0x01, + NSAddEntityMappingType = 0x02, + NSRemoveEntityMappingType = 0x03, + NSCopyEntityMappingType = 0x04, + NSTransformEntityMappingType = 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-generated/src/CoreData/generated/NSEntityMigrationPolicy.rs b/crates/icrate-generated/src/CoreData/generated/NSEntityMigrationPolicy.rs new file mode 100644 index 000000000..2adf9aa76 --- /dev/null +++ b/crates/icrate-generated/src/CoreData/generated/NSEntityMigrationPolicy.rs @@ -0,0 +1,81 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +extern_static!(NSMigrationManagerKey: &'static NSString); + +extern_static!(NSMigrationSourceObjectKey: &'static NSString); + +extern_static!(NSMigrationDestinationObjectKey: &'static NSString); + +extern_static!(NSMigrationEntityMappingKey: &'static NSString); + +extern_static!(NSMigrationPropertyMappingKey: &'static NSString); + +extern_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-generated/src/CoreData/generated/NSExpressionDescription.rs b/crates/icrate-generated/src/CoreData/generated/NSExpressionDescription.rs new file mode 100644 index 000000000..de7ee2785 --- /dev/null +++ b/crates/icrate-generated/src/CoreData/generated/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-generated/src/CoreData/generated/NSFetchIndexDescription.rs b/crates/icrate-generated/src/CoreData/generated/NSFetchIndexDescription.rs new file mode 100644 index 000000000..b3a703859 --- /dev/null +++ b/crates/icrate-generated/src/CoreData/generated/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-generated/src/CoreData/generated/NSFetchIndexElementDescription.rs b/crates/icrate-generated/src/CoreData/generated/NSFetchIndexElementDescription.rs new file mode 100644 index 000000000..9aa6bade5 --- /dev/null +++ b/crates/icrate-generated/src/CoreData/generated/NSFetchIndexElementDescription.rs @@ -0,0 +1,54 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSFetchIndexElementType { + NSFetchIndexElementTypeBinary = 0, + NSFetchIndexElementTypeRTree = 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-generated/src/CoreData/generated/NSFetchRequest.rs b/crates/icrate-generated/src/CoreData/generated/NSFetchRequest.rs new file mode 100644 index 000000000..a1f072d78 --- /dev/null +++ b/crates/icrate-generated/src/CoreData/generated/NSFetchRequest.rs @@ -0,0 +1,231 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSFetchRequestResultType { + NSManagedObjectResultType = 0x00, + NSManagedObjectIDResultType = 0x01, + NSDictionaryResultType = 0x02, + NSCountResultType = 0x04, + } +); + +extern_protocol!( + pub struct NSFetchRequestResult; + + unsafe impl NSFetchRequestResult {} +); + +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, + ) -> Result, Shared>, Id>; + + #[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 = + *mut Block<(NonNull,), ()>; + +__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: Option<&Block<(NonNull>,), ()>>, + ) -> Id; + } +); diff --git a/crates/icrate-generated/src/CoreData/generated/NSFetchRequestExpression.rs b/crates/icrate-generated/src/CoreData/generated/NSFetchRequestExpression.rs new file mode 100644 index 000000000..42d4a6488 --- /dev/null +++ b/crates/icrate-generated/src/CoreData/generated/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::*; + +extern_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-generated/src/CoreData/generated/NSFetchedPropertyDescription.rs b/crates/icrate-generated/src/CoreData/generated/NSFetchedPropertyDescription.rs new file mode 100644 index 000000000..82b8eacb1 --- /dev/null +++ b/crates/icrate-generated/src/CoreData/generated/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-generated/src/CoreData/generated/NSFetchedResultsController.rs b/crates/icrate-generated/src/CoreData/generated/NSFetchedResultsController.rs new file mode 100644 index 000000000..443f53abf --- /dev/null +++ b/crates/icrate-generated/src/CoreData/generated/NSFetchedResultsController.rs @@ -0,0 +1,171 @@ +//! 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) -> Result<(), Id>; + + #[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; + } +); + +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)] + pub enum NSFetchedResultsChangeType { + NSFetchedResultsChangeInsert = 1, + NSFetchedResultsChangeDelete = 2, + NSFetchedResultsChangeMove = 3, + NSFetchedResultsChangeUpdate = 4, + } +); + +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-generated/src/CoreData/generated/NSIncrementalStore.rs b/crates/icrate-generated/src/CoreData/generated/NSIncrementalStore.rs new file mode 100644 index 000000000..3adeecb15 --- /dev/null +++ b/crates/icrate-generated/src/CoreData/generated/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) -> Result<(), Id>; + + #[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-generated/src/CoreData/generated/NSIncrementalStoreNode.rs b/crates/icrate-generated/src/CoreData/generated/NSIncrementalStoreNode.rs new file mode 100644 index 000000000..d58e8b5f3 --- /dev/null +++ b/crates/icrate-generated/src/CoreData/generated/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-generated/src/CoreData/generated/NSManagedObject.rs b/crates/icrate-generated/src/CoreData/generated/NSManagedObject.rs new file mode 100644 index 000000000..0d10d047f --- /dev/null +++ b/crates/icrate-generated/src/CoreData/generated/NSManagedObject.rs @@ -0,0 +1,182 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +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)] + 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 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) -> Result<(), Id>; + + #[method(validateForInsert:)] + pub unsafe fn validateForInsert(&self) -> Result<(), Id>; + + #[method(validateForUpdate:)] + pub unsafe fn validateForUpdate(&self) -> Result<(), Id>; + } +); diff --git a/crates/icrate-generated/src/CoreData/generated/NSManagedObjectContext.rs b/crates/icrate-generated/src/CoreData/generated/NSManagedObjectContext.rs new file mode 100644 index 000000000..2e7d1f3b2 --- /dev/null +++ b/crates/icrate-generated/src/CoreData/generated/NSManagedObjectContext.rs @@ -0,0 +1,300 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +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); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSManagedObjectContextConcurrencyType { + NSConfinementConcurrencyType = 0x00, + NSPrivateQueueConcurrencyType = 0x01, + NSMainQueueConcurrencyType = 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: &Block<(), ()>); + + #[method(performBlockAndWait:)] + pub unsafe fn performBlockAndWait(&self, block: &Block<(), ()>); + + #[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) -> Result<(), Id>; + + #[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-generated/src/CoreData/generated/NSManagedObjectID.rs b/crates/icrate-generated/src/CoreData/generated/NSManagedObjectID.rs new file mode 100644 index 000000000..62b171570 --- /dev/null +++ b/crates/icrate-generated/src/CoreData/generated/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-generated/src/CoreData/generated/NSManagedObjectModel.rs b/crates/icrate-generated/src/CoreData/generated/NSManagedObjectModel.rs new file mode 100644 index 000000000..0b2673546 --- /dev/null +++ b/crates/icrate-generated/src/CoreData/generated/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-generated/src/CoreData/generated/NSMappingModel.rs b/crates/icrate-generated/src/CoreData/generated/NSMappingModel.rs new file mode 100644 index 000000000..358e16d3d --- /dev/null +++ b/crates/icrate-generated/src/CoreData/generated/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-generated/src/CoreData/generated/NSMergePolicy.rs b/crates/icrate-generated/src/CoreData/generated/NSMergePolicy.rs new file mode 100644 index 000000000..3e228063e --- /dev/null +++ b/crates/icrate-generated/src/CoreData/generated/NSMergePolicy.rs @@ -0,0 +1,162 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSMergePolicyType { + NSErrorMergePolicyType = 0x00, + NSMergeByPropertyStoreTrumpMergePolicyType = 0x01, + NSMergeByPropertyObjectTrumpMergePolicyType = 0x02, + NSOverwriteMergePolicyType = 0x03, + NSRollbackMergePolicyType = 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-generated/src/CoreData/generated/NSMigrationManager.rs b/crates/icrate-generated/src/CoreData/generated/NSMigrationManager.rs new file mode 100644 index 000000000..f4c497e8c --- /dev/null +++ b/crates/icrate-generated/src/CoreData/generated/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-generated/src/CoreData/generated/NSPersistentCloudKitContainer.rs b/crates/icrate-generated/src/CoreData/generated/NSPersistentCloudKitContainer.rs new file mode 100644 index 000000000..41ece3901 --- /dev/null +++ b/crates/icrate-generated/src/CoreData/generated/NSPersistentCloudKitContainer.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::*; + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSPersistentCloudKitContainerSchemaInitializationOptions { + NSPersistentCloudKitContainerSchemaInitializationOptionsNone = 0, + NSPersistentCloudKitContainerSchemaInitializationOptionsDryRun = 1 << 1, + NSPersistentCloudKitContainerSchemaInitializationOptionsPrintSchema = 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(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-generated/src/CoreData/generated/NSPersistentCloudKitContainerEvent.rs b/crates/icrate-generated/src/CoreData/generated/NSPersistentCloudKitContainerEvent.rs new file mode 100644 index 000000000..529c0c0f1 --- /dev/null +++ b/crates/icrate-generated/src/CoreData/generated/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::*; + +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)] + 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-generated/src/CoreData/generated/NSPersistentCloudKitContainerEventRequest.rs b/crates/icrate-generated/src/CoreData/generated/NSPersistentCloudKitContainerEventRequest.rs new file mode 100644 index 000000000..fe1add1d4 --- /dev/null +++ b/crates/icrate-generated/src/CoreData/generated/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-generated/src/CoreData/generated/NSPersistentCloudKitContainerOptions.rs b/crates/icrate-generated/src/CoreData/generated/NSPersistentCloudKitContainerOptions.rs new file mode 100644 index 000000000..78f2d5a68 --- /dev/null +++ b/crates/icrate-generated/src/CoreData/generated/NSPersistentCloudKitContainerOptions.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 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_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-generated/src/CoreData/generated/NSPersistentContainer.rs b/crates/icrate-generated/src/CoreData/generated/NSPersistentContainer.rs new file mode 100644 index 000000000..f6196b4d9 --- /dev/null +++ b/crates/icrate-generated/src/CoreData/generated/NSPersistentContainer.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_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: &Block<(NonNull, *mut NSError), ()>, + ); + + #[method_id(@__retain_semantics New newBackgroundContext)] + pub unsafe fn newBackgroundContext(&self) -> Id; + + #[method(performBackgroundTask:)] + pub unsafe fn performBackgroundTask( + &self, + block: &Block<(NonNull,), ()>, + ); + } +); diff --git a/crates/icrate-generated/src/CoreData/generated/NSPersistentHistoryChange.rs b/crates/icrate-generated/src/CoreData/generated/NSPersistentHistoryChange.rs new file mode 100644 index 000000000..1e635d1fd --- /dev/null +++ b/crates/icrate-generated/src/CoreData/generated/NSPersistentHistoryChange.rs @@ -0,0 +1,56 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSPersistentHistoryChangeType { + NSPersistentHistoryChangeTypeInsert = 0, + NSPersistentHistoryChangeTypeUpdate = 1, + NSPersistentHistoryChangeTypeDelete = 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-generated/src/CoreData/generated/NSPersistentHistoryChangeRequest.rs b/crates/icrate-generated/src/CoreData/generated/NSPersistentHistoryChangeRequest.rs new file mode 100644 index 000000000..4f1107926 --- /dev/null +++ b/crates/icrate-generated/src/CoreData/generated/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-generated/src/CoreData/generated/NSPersistentHistoryToken.rs b/crates/icrate-generated/src/CoreData/generated/NSPersistentHistoryToken.rs new file mode 100644 index 000000000..fbdabcab1 --- /dev/null +++ b/crates/icrate-generated/src/CoreData/generated/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-generated/src/CoreData/generated/NSPersistentHistoryTransaction.rs b/crates/icrate-generated/src/CoreData/generated/NSPersistentHistoryTransaction.rs new file mode 100644 index 000000000..546f70976 --- /dev/null +++ b/crates/icrate-generated/src/CoreData/generated/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-generated/src/CoreData/generated/NSPersistentStore.rs b/crates/icrate-generated/src/CoreData/generated/NSPersistentStore.rs new file mode 100644 index 000000000..f6202602f --- /dev/null +++ b/crates/icrate-generated/src/CoreData/generated/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) -> Result<(), Id>; + + #[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-generated/src/CoreData/generated/NSPersistentStoreCoordinator.rs b/crates/icrate-generated/src/CoreData/generated/NSPersistentStoreCoordinator.rs new file mode 100644 index 000000000..7fbe39112 --- /dev/null +++ b/crates/icrate-generated/src/CoreData/generated/NSPersistentStoreCoordinator.rs @@ -0,0 +1,287 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +extern_static!(NSSQLiteStoreType: &'static NSString); + +extern_static!(NSXMLStoreType: &'static NSString); + +extern_static!(NSBinaryStoreType: &'static NSString); + +extern_static!(NSInMemoryStoreType: &'static NSString); + +extern_static!(NSStoreTypeKey: &'static NSString); + +extern_static!(NSStoreUUIDKey: &'static NSString); + +extern_static!(NSPersistentStoreCoordinatorStoresWillChangeNotification: &'static NSString); + +extern_static!(NSPersistentStoreCoordinatorStoresDidChangeNotification: &'static NSString); + +extern_static!(NSPersistentStoreCoordinatorWillRemoveStoreNotification: &'static NSString); + +extern_static!(NSAddedPersistentStoresKey: &'static NSString); + +extern_static!(NSRemovedPersistentStoresKey: &'static NSString); + +extern_static!(NSUUIDChangedPersistentStoresKey: &'static NSString); + +extern_static!(NSReadOnlyPersistentStoreOption: &'static NSString); + +extern_static!(NSValidateXMLStoreOption: &'static NSString); + +extern_static!(NSPersistentStoreTimeoutOption: &'static NSString); + +extern_static!(NSSQLitePragmasOption: &'static NSString); + +extern_static!(NSSQLiteAnalyzeOption: &'static NSString); + +extern_static!(NSSQLiteManualVacuumOption: &'static NSString); + +extern_static!(NSIgnorePersistentStoreVersioningOption: &'static NSString); + +extern_static!(NSMigratePersistentStoresAutomaticallyOption: &'static NSString); + +extern_static!(NSInferMappingModelAutomaticallyOption: &'static NSString); + +extern_static!(NSStoreModelVersionHashesKey: &'static NSString); + +extern_static!(NSStoreModelVersionIdentifiersKey: &'static NSString); + +extern_static!(NSPersistentStoreOSCompatibility: &'static NSString); + +extern_static!(NSPersistentStoreConnectionPoolMaxSizeKey: &'static NSString); + +extern_static!(NSCoreDataCoreSpotlightExporter: &'static NSString); + +extern_static!(NSPersistentStoreForceDestroyOption: &'static NSString); + +extern_static!(NSPersistentStoreFileProtectionKey: &'static NSString); + +extern_static!(NSPersistentHistoryTrackingKey: &'static NSString); + +extern_static!(NSBinaryStoreSecureDecodingClasses: &'static NSString); + +extern_static!(NSBinaryStoreInsecureDecodingCompatibilityOption: &'static NSString); + +extern_static!(NSPersistentStoreRemoteChangeNotificationPostOptionKey: &'static NSString); + +extern_static!(NSPersistentStoreRemoteChangeNotification: &'static NSString); + +extern_static!(NSPersistentStoreURLKey: &'static NSString); + +extern_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: &Block<(NonNull, *mut NSError), ()>, + ); + + #[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 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: &Block<(), ()>); + + #[method(performBlockAndWait:)] + pub unsafe fn performBlockAndWait(&self, block: &Block<(), ()>); + + #[method_id(@__retain_semantics Other currentPersistentHistoryTokenFromStores:)] + pub unsafe fn currentPersistentHistoryTokenFromStores( + &self, + stores: Option<&NSArray>, + ) -> Option>; + + #[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>; + } +); + +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-generated/src/CoreData/generated/NSPersistentStoreDescription.rs b/crates/icrate-generated/src/CoreData/generated/NSPersistentStoreDescription.rs new file mode 100644 index 000000000..c271e0eea --- /dev/null +++ b/crates/icrate-generated/src/CoreData/generated/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-generated/src/CoreData/generated/NSPersistentStoreRequest.rs b/crates/icrate-generated/src/CoreData/generated/NSPersistentStoreRequest.rs new file mode 100644 index 000000000..84711a576 --- /dev/null +++ b/crates/icrate-generated/src/CoreData/generated/NSPersistentStoreRequest.rs @@ -0,0 +1,38 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSPersistentStoreRequestType { + NSFetchRequestType = 1, + NSSaveRequestType = 2, + NSBatchInsertRequestType = 5, + NSBatchUpdateRequestType = 6, + NSBatchDeleteRequestType = 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-generated/src/CoreData/generated/NSPersistentStoreResult.rs b/crates/icrate-generated/src/CoreData/generated/NSPersistentStoreResult.rs new file mode 100644 index 000000000..980786b68 --- /dev/null +++ b/crates/icrate-generated/src/CoreData/generated/NSPersistentStoreResult.rs @@ -0,0 +1,212 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +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)] + 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; + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSPersistentCloudKitContainerEventResultType { + NSPersistentCloudKitContainerEventResultTypeEvents = 0, + NSPersistentCloudKitContainerEventResultTypeCountEvents = 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-generated/src/CoreData/generated/NSPropertyDescription.rs b/crates/icrate-generated/src/CoreData/generated/NSPropertyDescription.rs new file mode 100644 index 000000000..d43dcb671 --- /dev/null +++ b/crates/icrate-generated/src/CoreData/generated/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-generated/src/CoreData/generated/NSPropertyMapping.rs b/crates/icrate-generated/src/CoreData/generated/NSPropertyMapping.rs new file mode 100644 index 000000000..8633f9aae --- /dev/null +++ b/crates/icrate-generated/src/CoreData/generated/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-generated/src/CoreData/generated/NSQueryGenerationToken.rs b/crates/icrate-generated/src/CoreData/generated/NSQueryGenerationToken.rs new file mode 100644 index 000000000..c9449570a --- /dev/null +++ b/crates/icrate-generated/src/CoreData/generated/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-generated/src/CoreData/generated/NSRelationshipDescription.rs b/crates/icrate-generated/src/CoreData/generated/NSRelationshipDescription.rs new file mode 100644 index 000000000..b2719e072 --- /dev/null +++ b/crates/icrate-generated/src/CoreData/generated/NSRelationshipDescription.rs @@ -0,0 +1,73 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSDeleteRule { + NSNoActionDeleteRule = 0, + NSNullifyDeleteRule = 1, + NSCascadeDeleteRule = 2, + NSDenyDeleteRule = 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-generated/src/CoreData/generated/NSSaveChangesRequest.rs b/crates/icrate-generated/src/CoreData/generated/NSSaveChangesRequest.rs new file mode 100644 index 000000000..ec77bddb9 --- /dev/null +++ b/crates/icrate-generated/src/CoreData/generated/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-generated/src/CoreData/generated/mod.rs b/crates/icrate-generated/src/CoreData/generated/mod.rs new file mode 100644 index 000000000..d69d696ce --- /dev/null +++ b/crates/icrate-generated/src/CoreData/generated/mod.rs @@ -0,0 +1,279 @@ +#[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; + +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, + NSInsertedObjectIDsKey, NSInsertedObjectsKey, NSInvalidatedAllObjectsKey, + NSInvalidatedObjectIDsKey, NSInvalidatedObjectsKey, NSMainQueueConcurrencyType, + NSManagedObjectContext, NSManagedObjectContextConcurrencyType, + NSManagedObjectContextDidMergeChangesObjectIDsNotification, + NSManagedObjectContextDidSaveNotification, NSManagedObjectContextDidSaveObjectIDsNotification, + NSManagedObjectContextObjectsDidChangeNotification, NSManagedObjectContextQueryGenerationKey, + 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, NSErrorMergePolicyType, NSMergeByPropertyObjectTrumpMergePolicyType, + NSMergeByPropertyStoreTrumpMergePolicyType, NSMergeConflict, NSMergePolicy, NSMergePolicyType, + NSOverwriteMergePolicyType, 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, NSBinaryStoreInsecureDecodingCompatibilityOption, + NSBinaryStoreSecureDecodingClasses, NSBinaryStoreType, NSCoreDataCoreSpotlightExporter, + NSIgnorePersistentStoreVersioningOption, NSInMemoryStoreType, + NSInferMappingModelAutomaticallyOption, NSMigratePersistentStoresAutomaticallyOption, + 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, NSStoreTypeKey, NSStoreUUIDKey, + NSUUIDChangedPersistentStoresKey, NSValidateXMLStoreOption, 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-generated/src/CoreData/mod.rs b/crates/icrate-generated/src/CoreData/mod.rs new file mode 100644 index 000000000..dca5b4f98 --- /dev/null +++ b/crates/icrate-generated/src/CoreData/mod.rs @@ -0,0 +1,4 @@ +#[allow(unused_imports)] +mod generated; + +pub use self::generated::*; diff --git a/crates/icrate-generated/src/CoreData/translation-config.toml b/crates/icrate-generated/src/CoreData/translation-config.toml new file mode 100644 index 000000000..72e235c2d --- /dev/null +++ b/crates/icrate-generated/src/CoreData/translation-config.toml @@ -0,0 +1,34 @@ +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-generated/src/Foundation/generated/FoundationErrors.rs b/crates/icrate-generated/src/Foundation/generated/FoundationErrors.rs new file mode 100644 index 000000000..cd5849ff6 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/FoundationErrors.rs @@ -0,0 +1,94 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +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, + NSXPCConnectionCodeSigningRequirementFailure = 4102, + 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-generated/src/Foundation/generated/FoundationLegacySwiftCompatibility.rs b/crates/icrate-generated/src/Foundation/generated/FoundationLegacySwiftCompatibility.rs new file mode 100644 index 000000000..bbc1e79ac --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/FoundationLegacySwiftCompatibility.rs @@ -0,0 +1,4 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; diff --git a/crates/icrate-generated/src/Foundation/generated/NSArray.rs b/crates/icrate-generated/src/Foundation/generated/NSArray.rs new file mode 100644 index 000000000..2ff4e4607 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSArray.rs @@ -0,0 +1,589 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +__inner_extern_class!( + #[derive(Debug)] + pub struct NSArray { + _inner0: PhantomData<*mut ObjectType>, + } + + unsafe impl ClassType for NSArray { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSArray { + #[method(count)] + pub unsafe fn count(&self) -> NSUInteger; + + #[method_id(@__retain_semantics Other objectAtIndex:)] + pub unsafe fn objectAtIndex(&self, index: NSUInteger) -> Id; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method_id(@__retain_semantics Init initWithObjects:count:)] + pub unsafe fn initWithObjects_count( + this: Option>, + objects: *mut NonNull, + cnt: NSUInteger, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSBinarySearchingOptions { + NSBinarySearchingFirstEqual = 1 << 8, + NSBinarySearchingLastEqual = 1 << 9, + NSBinarySearchingInsertionIndex = 1 << 10, + } +); + +extern_methods!( + /// NSExtendedArray + unsafe impl NSArray { + #[method_id(@__retain_semantics Other arrayByAddingObject:)] + pub unsafe fn arrayByAddingObject( + &self, + anObject: &ObjectType, + ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other arrayByAddingObjectsFromArray:)] + pub unsafe fn arrayByAddingObjectsFromArray( + &self, + otherArray: &NSArray, + ) -> Id, Shared>; + + #[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(@__retain_semantics Other description)] + pub unsafe fn description(&self) -> Id; + + #[method_id(@__retain_semantics Other descriptionWithLocale:)] + pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) + -> Id; + + #[method_id(@__retain_semantics Other descriptionWithLocale:indent:)] + pub unsafe fn descriptionWithLocale_indent( + &self, + locale: Option<&Object>, + level: NSUInteger, + ) -> Id; + + #[method_id(@__retain_semantics Other firstObjectCommonWithArray:)] + pub unsafe fn firstObjectCommonWithArray( + &self, + otherArray: &NSArray, + ) -> Option>; + + #[method(getObjects:range:)] + pub unsafe fn getObjects_range( + &self, + objects: NonNull>, + 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(@__retain_semantics Other firstObject)] + pub unsafe fn firstObject(&self) -> Option>; + + #[method_id(@__retain_semantics Other lastObject)] + pub unsafe fn lastObject(&self) -> Option>; + + #[method_id(@__retain_semantics Other objectEnumerator)] + pub unsafe fn objectEnumerator(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other reverseObjectEnumerator)] + pub unsafe fn reverseObjectEnumerator(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other sortedArrayHint)] + pub unsafe fn sortedArrayHint(&self) -> Id; + + #[method_id(@__retain_semantics Other sortedArrayUsingFunction:context:)] + pub unsafe fn sortedArrayUsingFunction_context( + &self, + 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: unsafe extern "C" fn( + NonNull, + NonNull, + *mut c_void, + ) -> NSInteger, + context: *mut c_void, + hint: Option<&NSData>, + ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other sortedArrayUsingSelector:)] + pub unsafe fn sortedArrayUsingSelector( + &self, + comparator: Sel, + ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other objectsAtIndexes:)] + pub unsafe fn objectsAtIndexes( + &self, + indexes: &NSIndexSet, + ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other objectAtIndexedSubscript:)] + pub unsafe fn objectAtIndexedSubscript(&self, idx: NSUInteger) -> Id; + + #[method(enumerateObjectsUsingBlock:)] + pub unsafe fn enumerateObjectsUsingBlock( + &self, + block: &Block<(NonNull, NSUInteger, NonNull), ()>, + ); + + #[method(enumerateObjectsWithOptions:usingBlock:)] + pub unsafe fn enumerateObjectsWithOptions_usingBlock( + &self, + opts: NSEnumerationOptions, + block: &Block<(NonNull, NSUInteger, NonNull), ()>, + ); + + #[method(enumerateObjectsAtIndexes:options:usingBlock:)] + pub unsafe fn enumerateObjectsAtIndexes_options_usingBlock( + &self, + s: &NSIndexSet, + opts: NSEnumerationOptions, + block: &Block<(NonNull, NSUInteger, NonNull), ()>, + ); + + #[method(indexOfObjectPassingTest:)] + pub unsafe fn indexOfObjectPassingTest( + &self, + predicate: &Block<(NonNull, NSUInteger, NonNull), Bool>, + ) -> NSUInteger; + + #[method(indexOfObjectWithOptions:passingTest:)] + pub unsafe fn indexOfObjectWithOptions_passingTest( + &self, + opts: NSEnumerationOptions, + predicate: &Block<(NonNull, NSUInteger, NonNull), Bool>, + ) -> NSUInteger; + + #[method(indexOfObjectAtIndexes:options:passingTest:)] + pub unsafe fn indexOfObjectAtIndexes_options_passingTest( + &self, + s: &NSIndexSet, + opts: NSEnumerationOptions, + predicate: &Block<(NonNull, NSUInteger, NonNull), Bool>, + ) -> NSUInteger; + + #[method_id(@__retain_semantics Other indexesOfObjectsPassingTest:)] + pub unsafe fn indexesOfObjectsPassingTest( + &self, + predicate: &Block<(NonNull, NSUInteger, NonNull), Bool>, + ) -> Id; + + #[method_id(@__retain_semantics Other indexesOfObjectsWithOptions:passingTest:)] + pub unsafe fn indexesOfObjectsWithOptions_passingTest( + &self, + opts: NSEnumerationOptions, + predicate: &Block<(NonNull, NSUInteger, NonNull), Bool>, + ) -> Id; + + #[method_id(@__retain_semantics Other indexesOfObjectsAtIndexes:options:passingTest:)] + pub unsafe fn indexesOfObjectsAtIndexes_options_passingTest( + &self, + s: &NSIndexSet, + opts: NSEnumerationOptions, + predicate: &Block<(NonNull, NSUInteger, NonNull), Bool>, + ) -> Id; + + #[method_id(@__retain_semantics Other sortedArrayUsingComparator:)] + pub unsafe fn sortedArrayUsingComparator( + &self, + cmptr: NSComparator, + ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other 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, + obj: &ObjectType, + r: NSRange, + opts: NSBinarySearchingOptions, + cmp: NSComparator, + ) -> NSUInteger; + } +); + +extern_methods!( + /// NSArrayCreation + unsafe impl NSArray { + #[method_id(@__retain_semantics Other array)] + pub unsafe fn array() -> Id; + + #[method_id(@__retain_semantics Other arrayWithObject:)] + pub unsafe fn arrayWithObject(anObject: &ObjectType) -> Id; + + #[method_id(@__retain_semantics Other arrayWithObjects:count:)] + pub unsafe fn arrayWithObjects_count( + objects: NonNull>, + cnt: NSUInteger, + ) -> Id; + + #[method_id(@__retain_semantics Other arrayWithArray:)] + pub unsafe fn arrayWithArray(array: &NSArray) -> Id; + + #[method_id(@__retain_semantics Init initWithArray:)] + pub unsafe fn initWithArray( + this: Option>, + array: &NSArray, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithArray:copyItems:)] + pub unsafe fn initWithArray_copyItems( + this: Option>, + array: &NSArray, + flag: bool, + ) -> 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 arrayWithContentsOfURL:error:)] + pub unsafe fn arrayWithContentsOfURL_error( + url: &NSURL, + ) -> Result, Shared>, Id>; + } +); + +extern_methods!( + /// NSArrayDiffing + unsafe impl NSArray { + #[method_id(@__retain_semantics Other differenceFromArray:withOptions:usingEquivalenceTest:)] + pub unsafe fn differenceFromArray_withOptions_usingEquivalenceTest( + &self, + other: &NSArray, + options: NSOrderedCollectionDifferenceCalculationOptions, + block: &Block<(NonNull, NonNull), Bool>, + ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other differenceFromArray:withOptions:)] + pub unsafe fn differenceFromArray_withOptions( + &self, + other: &NSArray, + options: NSOrderedCollectionDifferenceCalculationOptions, + ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other differenceFromArray:)] + pub unsafe fn differenceFromArray( + &self, + other: &NSArray, + ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other arrayByApplyingDifference:)] + pub unsafe fn arrayByApplyingDifference( + &self, + difference: &NSOrderedCollectionDifference, + ) -> Option, Shared>>; + } +); + +extern_methods!( + /// NSDeprecated + unsafe impl NSArray { + #[method(getObjects:)] + pub unsafe fn getObjects(&self, objects: NonNull>); + + #[method_id(@__retain_semantics Other arrayWithContentsOfFile:)] + pub unsafe fn arrayWithContentsOfFile( + path: &NSString, + ) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other arrayWithContentsOfURL:)] + pub unsafe fn arrayWithContentsOfURL( + url: &NSURL, + ) -> Option, Shared>>; + + #[method_id(@__retain_semantics Init initWithContentsOfFile:)] + pub unsafe fn initWithContentsOfFile( + this: Option>, + path: &NSString, + ) -> Option, Shared>>; + + #[method_id(@__retain_semantics Init initWithContentsOfURL:)] + pub unsafe fn initWithContentsOfURL( + this: Option>, + 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 { + _inner0: PhantomData<*mut ObjectType>, + } + + 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(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method_id(@__retain_semantics Init initWithCapacity:)] + pub unsafe fn initWithCapacity( + this: Option>, + numItems: NSUInteger, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; + } +); + +extern_methods!( + /// 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, + range: NSRange, + 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: unsafe extern "C" fn( + NonNull, + NonNull, + *mut c_void, + ) -> NSInteger, + 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, + opts: NSSortOptions, + cmptr: NSComparator, + ); + } +); + +extern_methods!( + /// NSMutableArrayCreation + unsafe impl NSMutableArray { + #[method_id(@__retain_semantics Other arrayWithCapacity:)] + pub unsafe fn arrayWithCapacity(numItems: NSUInteger) -> Id; + + #[method_id(@__retain_semantics Other arrayWithContentsOfFile:)] + pub unsafe fn arrayWithContentsOfFile( + path: &NSString, + ) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other arrayWithContentsOfURL:)] + pub unsafe fn arrayWithContentsOfURL( + url: &NSURL, + ) -> Option, Shared>>; + + #[method_id(@__retain_semantics Init initWithContentsOfFile:)] + pub unsafe fn initWithContentsOfFile( + this: Option>, + path: &NSString, + ) -> Option, Shared>>; + + #[method_id(@__retain_semantics Init initWithContentsOfURL:)] + pub unsafe fn initWithContentsOfURL( + this: Option>, + url: &NSURL, + ) -> Option, Shared>>; + } +); + +extern_methods!( + /// NSMutableArrayDiffing + unsafe impl NSMutableArray { + #[method(applyDifference:)] + pub unsafe fn applyDifference( + &self, + difference: &NSOrderedCollectionDifference, + ); + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSAttributedString.rs b/crates/icrate-generated/src/Foundation/generated/NSAttributedString.rs new file mode 100644 index 000000000..5a726f788 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSAttributedString.rs @@ -0,0 +1,557 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +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(@__retain_semantics Other string)] + pub unsafe fn string(&self) -> Id; + + #[method_id(@__retain_semantics Other attributesAtIndex:effectiveRange:)] + pub unsafe fn attributesAtIndex_effectiveRange( + &self, + location: NSUInteger, + range: NSRangePointer, + ) -> Id, Shared>; + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSAttributedStringEnumerationOptions { + NSAttributedStringEnumerationReverse = 1 << 1, + NSAttributedStringEnumerationLongestEffectiveRangeNotRequired = 1 << 20, + } +); + +extern_methods!( + /// NSExtendedAttributedString + unsafe impl NSAttributedString { + #[method(length)] + pub unsafe fn length(&self) -> NSUInteger; + + #[method_id(@__retain_semantics Other attribute:atIndex:effectiveRange:)] + pub unsafe fn attribute_atIndex_effectiveRange( + &self, + attrName: &NSAttributedStringKey, + location: NSUInteger, + range: NSRangePointer, + ) -> Option>; + + #[method_id(@__retain_semantics Other attributedSubstringFromRange:)] + pub unsafe fn attributedSubstringFromRange( + &self, + range: NSRange, + ) -> Id; + + #[method_id(@__retain_semantics Other attributesAtIndex:longestEffectiveRange:inRange:)] + pub unsafe fn attributesAtIndex_longestEffectiveRange_inRange( + &self, + location: NSUInteger, + range: NSRangePointer, + rangeLimit: NSRange, + ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other attribute:atIndex:longestEffectiveRange:inRange:)] + pub unsafe fn attribute_atIndex_longestEffectiveRange_inRange( + &self, + attrName: &NSAttributedStringKey, + location: NSUInteger, + range: NSRangePointer, + rangeLimit: NSRange, + ) -> Option>; + + #[method(isEqualToAttributedString:)] + pub unsafe fn isEqualToAttributedString(&self, other: &NSAttributedString) -> bool; + + #[method_id(@__retain_semantics Init initWithString:)] + pub unsafe fn initWithString( + this: Option>, + str: &NSString, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithString:attributes:)] + pub unsafe fn initWithString_attributes( + this: Option>, + str: &NSString, + attrs: Option<&NSDictionary>, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithAttributedString:)] + pub unsafe fn initWithAttributedString( + this: Option>, + attrStr: &NSAttributedString, + ) -> Id; + + #[method(enumerateAttributesInRange:options:usingBlock:)] + pub unsafe fn enumerateAttributesInRange_options_usingBlock( + &self, + enumerationRange: NSRange, + opts: NSAttributedStringEnumerationOptions, + block: &Block< + ( + NonNull>, + NSRange, + NonNull, + ), + (), + >, + ); + + #[method(enumerateAttribute:inRange:options:usingBlock:)] + pub unsafe fn enumerateAttribute_inRange_options_usingBlock( + &self, + attrName: &NSAttributedStringKey, + enumerationRange: NSRange, + opts: NSAttributedStringEnumerationOptions, + block: &Block<(*mut Object, NSRange, NonNull), ()>, + ); + } +); + +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, + attrs: Option<&NSDictionary>, + range: NSRange, + ); + } +); + +extern_methods!( + /// NSExtendedMutableAttributedString + unsafe impl NSMutableAttributedString { + #[method_id(@__retain_semantics Other mutableString)] + pub unsafe fn mutableString(&self) -> Id; + + #[method(addAttribute:value:range:)] + pub unsafe fn addAttribute_value_range( + &self, + name: &NSAttributedStringKey, + 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); + } +); + +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); + +extern_static!(NSMarkdownSourcePositionAttributeName: &'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)] + pub struct NSAttributedStringMarkdownSourcePosition; + + unsafe impl ClassType for NSAttributedStringMarkdownSourcePosition { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSAttributedStringMarkdownSourcePosition { + #[method(startLine)] + pub unsafe fn startLine(&self) -> NSInteger; + + #[method(startColumn)] + pub unsafe fn startColumn(&self) -> NSInteger; + + #[method(endLine)] + pub unsafe fn endLine(&self) -> NSInteger; + + #[method(endColumn)] + pub unsafe fn endColumn(&self) -> NSInteger; + + #[method_id(@__retain_semantics Init initWithStartLine:startColumn:endLine:endColumn:)] + pub unsafe fn initWithStartLine_startColumn_endLine_endColumn( + this: Option>, + startLine: NSInteger, + startColumn: NSInteger, + endLine: NSInteger, + endColumn: NSInteger, + ) -> Id; + + #[method(rangeInString:)] + pub unsafe fn rangeInString(&self, string: &NSString) -> NSRange; + } +); + +extern_class!( + #[derive(Debug)] + pub struct NSAttributedStringMarkdownParsingOptions; + + unsafe impl ClassType for NSAttributedStringMarkdownParsingOptions { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSAttributedStringMarkdownParsingOptions { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> 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(@__retain_semantics Other languageCode)] + pub unsafe fn languageCode(&self) -> Option>; + + #[method(setLanguageCode:)] + pub unsafe fn setLanguageCode(&self, languageCode: Option<&NSString>); + + #[method(appliesSourcePositionAttributes)] + pub unsafe fn appliesSourcePositionAttributes(&self) -> bool; + + #[method(setAppliesSourcePositionAttributes:)] + pub unsafe fn setAppliesSourcePositionAttributes( + &self, + appliesSourcePositionAttributes: bool, + ); + } +); + +extern_methods!( + /// NSAttributedStringCreateFromMarkdown + unsafe impl NSAttributedString { + #[method_id(@__retain_semantics Init initWithContentsOfMarkdownFileAtURL:options:baseURL:error:)] + pub unsafe fn initWithContentsOfMarkdownFileAtURL_options_baseURL_error( + this: Option>, + markdownFile: &NSURL, + options: Option<&NSAttributedStringMarkdownParsingOptions>, + baseURL: Option<&NSURL>, + ) -> Result, Id>; + + #[method_id(@__retain_semantics Init initWithMarkdown:options:baseURL:error:)] + pub unsafe fn initWithMarkdown_options_baseURL_error( + this: Option>, + markdown: &NSData, + options: Option<&NSAttributedStringMarkdownParsingOptions>, + baseURL: Option<&NSURL>, + ) -> Result, Id>; + + #[method_id(@__retain_semantics Init initWithMarkdownString:options:baseURL:error:)] + pub unsafe fn initWithMarkdownString_options_baseURL_error( + this: Option>, + markdownString: &NSString, + options: Option<&NSAttributedStringMarkdownParsingOptions>, + baseURL: Option<&NSURL>, + ) -> Result, Id>; + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSAttributedStringFormattingOptions { + NSAttributedStringFormattingInsertArgumentAttributesWithoutMerging = 1 << 0, + NSAttributedStringFormattingApplyReplacementIndexAttribute = 1 << 1, + } +); + +extern_methods!( + /// NSAttributedStringFormatting + unsafe impl NSAttributedString {} +); + +extern_methods!( + /// NSMutableAttributedStringFormatting + unsafe impl NSMutableAttributedString {} +); + +extern_static!(NSReplacementIndexAttributeName: &'static NSAttributedStringKey); + +extern_methods!( + /// NSMorphology + unsafe impl NSAttributedString { + #[method_id(@__retain_semantics Other attributedStringByInflectingString)] + pub unsafe fn attributedStringByInflectingString(&self) -> Id; + } +); + +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)] + 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(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method_id(@__retain_semantics Other parentIntent)] + pub unsafe fn parentIntent(&self) -> Option>; + + #[method_id(@__retain_semantics Other paragraphIntentWithIdentity:nestedInsideIntent:)] + pub unsafe fn paragraphIntentWithIdentity_nestedInsideIntent( + identity: NSInteger, + parent: Option<&NSPresentationIntent>, + ) -> Id; + + #[method_id(@__retain_semantics Other headerIntentWithIdentity:level:nestedInsideIntent:)] + pub unsafe fn headerIntentWithIdentity_level_nestedInsideIntent( + identity: NSInteger, + level: NSInteger, + parent: Option<&NSPresentationIntent>, + ) -> Id; + + #[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(@__retain_semantics Other thematicBreakIntentWithIdentity:nestedInsideIntent:)] + pub unsafe fn thematicBreakIntentWithIdentity_nestedInsideIntent( + identity: NSInteger, + parent: Option<&NSPresentationIntent>, + ) -> Id; + + #[method_id(@__retain_semantics Other orderedListIntentWithIdentity:nestedInsideIntent:)] + pub unsafe fn orderedListIntentWithIdentity_nestedInsideIntent( + identity: NSInteger, + parent: Option<&NSPresentationIntent>, + ) -> Id; + + #[method_id(@__retain_semantics Other unorderedListIntentWithIdentity:nestedInsideIntent:)] + pub unsafe fn unorderedListIntentWithIdentity_nestedInsideIntent( + identity: NSInteger, + parent: Option<&NSPresentationIntent>, + ) -> Id; + + #[method_id(@__retain_semantics Other listItemIntentWithIdentity:ordinal:nestedInsideIntent:)] + pub unsafe fn listItemIntentWithIdentity_ordinal_nestedInsideIntent( + identity: NSInteger, + ordinal: NSInteger, + parent: Option<&NSPresentationIntent>, + ) -> Id; + + #[method_id(@__retain_semantics Other blockQuoteIntentWithIdentity:nestedInsideIntent:)] + pub unsafe fn blockQuoteIntentWithIdentity_nestedInsideIntent( + identity: NSInteger, + parent: Option<&NSPresentationIntent>, + ) -> Id; + + #[method_id(@__retain_semantics Other tableIntentWithIdentity:columnCount:alignments:nestedInsideIntent:)] + pub unsafe fn tableIntentWithIdentity_columnCount_alignments_nestedInsideIntent( + identity: NSInteger, + columnCount: NSInteger, + alignments: &NSArray, + parent: Option<&NSPresentationIntent>, + ) -> Id; + + #[method_id(@__retain_semantics Other tableHeaderRowIntentWithIdentity:nestedInsideIntent:)] + pub unsafe fn tableHeaderRowIntentWithIdentity_nestedInsideIntent( + identity: NSInteger, + parent: Option<&NSPresentationIntent>, + ) -> Id; + + #[method_id(@__retain_semantics Other tableRowIntentWithIdentity:row:nestedInsideIntent:)] + pub unsafe fn tableRowIntentWithIdentity_row_nestedInsideIntent( + identity: NSInteger, + row: NSInteger, + parent: Option<&NSPresentationIntent>, + ) -> Id; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other 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(@__retain_semantics Other 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-generated/src/Foundation/generated/NSAutoreleasePool.rs b/crates/icrate-generated/src/Foundation/generated/NSAutoreleasePool.rs new file mode 100644 index 000000000..f6a8ec6aa --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSAutoreleasePool.rs @@ -0,0 +1,20 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSAutoreleasePool; + + unsafe impl ClassType for NSAutoreleasePool { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSAutoreleasePool { + #[method(drain)] + pub unsafe fn drain(&self); + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSBundle.rs b/crates/icrate-generated/src/Foundation/generated/NSBundle.rs new file mode 100644 index 000000000..45464fe36 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSBundle.rs @@ -0,0 +1,358 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +extern_enum!( + #[underlying(c_uint)] + pub enum { + NSBundleExecutableArchitectureI386 = 0x00000007, + NSBundleExecutableArchitecturePPC = 0x00000012, + NSBundleExecutableArchitectureX86_64 = 0x01000007, + NSBundleExecutableArchitecturePPC64 = 0x01000012, + NSBundleExecutableArchitectureARM64 = 0x0100000c, + } +); + +extern_class!( + #[derive(Debug)] + pub struct NSBundle; + + unsafe impl ClassType for NSBundle { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSBundle { + #[method_id(@__retain_semantics Other mainBundle)] + pub unsafe fn mainBundle() -> Id; + + #[method_id(@__retain_semantics Other bundleWithPath:)] + pub unsafe fn bundleWithPath(path: &NSString) -> Option>; + + #[method_id(@__retain_semantics Init initWithPath:)] + pub unsafe fn initWithPath( + this: Option>, + path: &NSString, + ) -> Option>; + + #[method_id(@__retain_semantics Other bundleWithURL:)] + pub unsafe fn bundleWithURL(url: &NSURL) -> Option>; + + #[method_id(@__retain_semantics Init initWithURL:)] + pub unsafe fn initWithURL( + this: Option>, + url: &NSURL, + ) -> Option>; + + #[method_id(@__retain_semantics Other bundleForClass:)] + pub unsafe fn bundleForClass(aClass: &Class) -> Id; + + #[method_id(@__retain_semantics Other bundleWithIdentifier:)] + pub unsafe fn bundleWithIdentifier(identifier: &NSString) -> Option>; + + #[method_id(@__retain_semantics Other allBundles)] + pub unsafe fn allBundles() -> Id, Shared>; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other bundleURL)] + pub unsafe fn bundleURL(&self) -> Id; + + #[method_id(@__retain_semantics Other resourceURL)] + pub unsafe fn resourceURL(&self) -> Option>; + + #[method_id(@__retain_semantics Other executableURL)] + pub unsafe fn executableURL(&self) -> Option>; + + #[method_id(@__retain_semantics Other URLForAuxiliaryExecutable:)] + pub unsafe fn URLForAuxiliaryExecutable( + &self, + executableName: &NSString, + ) -> Option>; + + #[method_id(@__retain_semantics Other privateFrameworksURL)] + pub unsafe fn privateFrameworksURL(&self) -> Option>; + + #[method_id(@__retain_semantics Other sharedFrameworksURL)] + pub unsafe fn sharedFrameworksURL(&self) -> Option>; + + #[method_id(@__retain_semantics Other sharedSupportURL)] + pub unsafe fn sharedSupportURL(&self) -> Option>; + + #[method_id(@__retain_semantics Other builtInPlugInsURL)] + pub unsafe fn builtInPlugInsURL(&self) -> Option>; + + #[method_id(@__retain_semantics Other appStoreReceiptURL)] + pub unsafe fn appStoreReceiptURL(&self) -> Option>; + + #[method_id(@__retain_semantics Other bundlePath)] + pub unsafe fn bundlePath(&self) -> Id; + + #[method_id(@__retain_semantics Other resourcePath)] + pub unsafe fn resourcePath(&self) -> Option>; + + #[method_id(@__retain_semantics Other executablePath)] + pub unsafe fn executablePath(&self) -> Option>; + + #[method_id(@__retain_semantics Other pathForAuxiliaryExecutable:)] + pub unsafe fn pathForAuxiliaryExecutable( + &self, + executableName: &NSString, + ) -> Option>; + + #[method_id(@__retain_semantics Other privateFrameworksPath)] + pub unsafe fn privateFrameworksPath(&self) -> Option>; + + #[method_id(@__retain_semantics Other sharedFrameworksPath)] + pub unsafe fn sharedFrameworksPath(&self) -> Option>; + + #[method_id(@__retain_semantics Other sharedSupportPath)] + pub unsafe fn sharedSupportPath(&self) -> Option>; + + #[method_id(@__retain_semantics Other builtInPlugInsPath)] + pub unsafe fn builtInPlugInsPath(&self) -> Option>; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other URLsForResourcesWithExtension:subdirectory:inBundleWithURL:)] + pub unsafe fn URLsForResourcesWithExtension_subdirectory_inBundleWithURL( + ext: Option<&NSString>, + subpath: Option<&NSString>, + bundleURL: &NSURL, + ) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other URLForResource:withExtension:)] + pub unsafe fn URLForResource_withExtension( + &self, + name: Option<&NSString>, + ext: Option<&NSString>, + ) -> Option>; + + #[method_id(@__retain_semantics Other URLForResource:withExtension:subdirectory:)] + pub unsafe fn URLForResource_withExtension_subdirectory( + &self, + name: Option<&NSString>, + ext: Option<&NSString>, + subpath: Option<&NSString>, + ) -> Option>; + + #[method_id(@__retain_semantics Other 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>; + + #[method_id(@__retain_semantics Other URLsForResourcesWithExtension:subdirectory:)] + pub unsafe fn URLsForResourcesWithExtension_subdirectory( + &self, + ext: Option<&NSString>, + subpath: Option<&NSString>, + ) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other URLsForResourcesWithExtension:subdirectory:localization:)] + pub unsafe fn URLsForResourcesWithExtension_subdirectory_localization( + &self, + ext: Option<&NSString>, + subpath: Option<&NSString>, + localizationName: Option<&NSString>, + ) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other pathForResource:ofType:)] + pub unsafe fn pathForResource_ofType( + &self, + name: Option<&NSString>, + ext: Option<&NSString>, + ) -> Option>; + + #[method_id(@__retain_semantics Other 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>; + + #[method_id(@__retain_semantics Other pathsForResourcesOfType:inDirectory:forLocalization:)] + pub unsafe fn pathsForResourcesOfType_inDirectory_forLocalization( + &self, + ext: Option<&NSString>, + subpath: Option<&NSString>, + localizationName: Option<&NSString>, + ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other localizedStringForKey:value:table:)] + pub unsafe fn localizedStringForKey_value_table( + &self, + key: &NSString, + value: Option<&NSString>, + tableName: Option<&NSString>, + ) -> Id; + + #[method_id(@__retain_semantics Other bundleIdentifier)] + pub unsafe fn bundleIdentifier(&self) -> Option>; + + #[method_id(@__retain_semantics Other infoDictionary)] + pub unsafe fn infoDictionary(&self) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other localizedInfoDictionary)] + pub unsafe fn localizedInfoDictionary( + &self, + ) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other objectForInfoDictionaryKey:)] + pub unsafe fn objectForInfoDictionaryKey( + &self, + key: &NSString, + ) -> Option>; + + #[method(classNamed:)] + pub unsafe fn classNamed(&self, className: &NSString) -> Option<&'static Class>; + + #[method(principalClass)] + pub unsafe fn principalClass(&self) -> Option<&'static Class>; + + #[method_id(@__retain_semantics Other preferredLocalizations)] + pub unsafe fn preferredLocalizations(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other localizations)] + pub unsafe fn localizations(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other developmentLocalization)] + pub unsafe fn developmentLocalization(&self) -> Option>; + + #[method_id(@__retain_semantics Other preferredLocalizationsFromArray:)] + pub unsafe fn preferredLocalizationsFromArray( + localizationsArray: &NSArray, + ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other preferredLocalizationsFromArray:forPreferences:)] + pub unsafe fn preferredLocalizationsFromArray_forPreferences( + localizationsArray: &NSArray, + preferencesArray: Option<&NSArray>, + ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other executableArchitectures)] + pub unsafe fn executableArchitectures(&self) -> Option, Shared>>; + } +); + +extern_methods!( + /// NSBundleExtensionMethods + unsafe impl NSString { + #[method_id(@__retain_semantics Other variantFittingPresentationWidth:)] + pub unsafe fn variantFittingPresentationWidth( + &self, + width: NSInteger, + ) -> Id; + } +); + +extern_static!(NSBundleDidLoadNotification: &'static NSNotificationName); + +extern_static!(NSLoadedClasses: &'static NSString); + +extern_class!( + #[derive(Debug)] + pub struct NSBundleResourceRequest; + + unsafe impl ClassType for NSBundleResourceRequest { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSBundleResourceRequest { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method_id(@__retain_semantics Init initWithTags:)] + pub unsafe fn initWithTags( + this: Option>, + tags: &NSSet, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithTags:bundle:)] + pub unsafe fn initWithTags_bundle( + this: Option>, + 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(@__retain_semantics Other tags)] + pub unsafe fn tags(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other bundle)] + pub unsafe fn bundle(&self) -> Id; + + #[method(beginAccessingResourcesWithCompletionHandler:)] + pub unsafe fn beginAccessingResourcesWithCompletionHandler( + &self, + completionHandler: &Block<(*mut NSError,), ()>, + ); + + #[method(conditionallyBeginAccessingResourcesWithCompletionHandler:)] + pub unsafe fn conditionallyBeginAccessingResourcesWithCompletionHandler( + &self, + completionHandler: &Block<(Bool,), ()>, + ); + + #[method(endAccessingResources)] + pub unsafe fn endAccessingResources(&self); + + #[method_id(@__retain_semantics Other progress)] + pub unsafe fn progress(&self) -> Id; + } +); + +extern_methods!( + /// NSBundleResourceRequestAdditions + unsafe impl NSBundle { + #[method(setPreservationPriority:forTags:)] + pub unsafe fn setPreservationPriority_forTags( + &self, + priority: c_double, + tags: &NSSet, + ); + + #[method(preservationPriorityForTag:)] + pub unsafe fn preservationPriorityForTag(&self, tag: &NSString) -> c_double; + } +); + +extern_static!(NSBundleResourceRequestLowDiskSpaceNotification: &'static NSNotificationName); + +extern_static!(NSBundleResourceRequestLoadingPriorityUrgent: c_double); diff --git a/crates/icrate-generated/src/Foundation/generated/NSByteCountFormatter.rs b/crates/icrate-generated/src/Foundation/generated/NSByteCountFormatter.rs new file mode 100644 index 000000000..5cb4eb185 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSByteCountFormatter.rs @@ -0,0 +1,125 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +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)] + pub struct NSByteCountFormatter; + + unsafe impl ClassType for NSByteCountFormatter { + type Super = NSFormatter; + } +); + +extern_methods!( + unsafe impl NSByteCountFormatter { + #[method_id(@__retain_semantics Other stringFromByteCount:countStyle:)] + pub unsafe fn stringFromByteCount_countStyle( + byteCount: c_longlong, + countStyle: NSByteCountFormatterCountStyle, + ) -> Id; + + #[method_id(@__retain_semantics Other stringFromByteCount:)] + pub unsafe fn stringFromByteCount(&self, byteCount: c_longlong) -> Id; + + #[method_id(@__retain_semantics Other stringFromMeasurement:countStyle:)] + pub unsafe fn stringFromMeasurement_countStyle( + measurement: &NSMeasurement, + countStyle: NSByteCountFormatterCountStyle, + ) -> Id; + + #[method_id(@__retain_semantics Other stringFromMeasurement:)] + pub unsafe fn stringFromMeasurement( + &self, + measurement: &NSMeasurement, + ) -> Id; + + #[method_id(@__retain_semantics Other 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-generated/src/Foundation/generated/NSByteOrder.rs b/crates/icrate-generated/src/Foundation/generated/NSByteOrder.rs new file mode 100644 index 000000000..c0f5ecf18 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSByteOrder.rs @@ -0,0 +1,232 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +extern_enum!( + #[underlying(c_uint)] + pub 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, + } +); + +extern_struct!( + pub struct NSSwappedDouble { + 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-generated/src/Foundation/generated/NSCache.rs b/crates/icrate-generated/src/Foundation/generated/NSCache.rs new file mode 100644 index 000000000..f5a17279a --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSCache.rs @@ -0,0 +1,78 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +__inner_extern_class!( + #[derive(Debug)] + pub struct NSCache { + _inner0: PhantomData<*mut KeyType>, + _inner1: PhantomData<*mut ObjectType>, + } + + unsafe impl ClassType for NSCache { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSCache { + #[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 delegate)] + pub unsafe fn delegate(&self) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSCacheDelegate>); + + #[method_id(@__retain_semantics Other 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, + ); + } +); + +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-generated/src/Foundation/generated/NSCalendar.rs b/crates/icrate-generated/src/Foundation/generated/NSCalendar.rs new file mode 100644 index 000000000..dfeeaff96 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSCalendar.rs @@ -0,0 +1,620 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +pub type NSCalendarIdentifier = NSString; + +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)] + pub struct NSCalendar; + + unsafe impl ClassType for NSCalendar { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSCalendar { + #[method_id(@__retain_semantics Other currentCalendar)] + pub unsafe fn currentCalendar() -> Id; + + #[method_id(@__retain_semantics Other autoupdatingCurrentCalendar)] + pub unsafe fn autoupdatingCurrentCalendar() -> Id; + + #[method_id(@__retain_semantics Other calendarWithIdentifier:)] + pub unsafe fn calendarWithIdentifier( + calendarIdentifierConstant: &NSCalendarIdentifier, + ) -> Option>; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method_id(@__retain_semantics Init initWithCalendarIdentifier:)] + pub unsafe fn initWithCalendarIdentifier( + this: Option>, + ident: &NSCalendarIdentifier, + ) -> Option>; + + #[method_id(@__retain_semantics Other calendarIdentifier)] + pub unsafe fn calendarIdentifier(&self) -> Id; + + #[method_id(@__retain_semantics Other locale)] + pub unsafe fn locale(&self) -> Option>; + + #[method(setLocale:)] + pub unsafe fn setLocale(&self, locale: Option<&NSLocale>); + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other eraSymbols)] + pub unsafe fn eraSymbols(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other longEraSymbols)] + pub unsafe fn longEraSymbols(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other monthSymbols)] + pub unsafe fn monthSymbols(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other shortMonthSymbols)] + pub unsafe fn shortMonthSymbols(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other veryShortMonthSymbols)] + pub unsafe fn veryShortMonthSymbols(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other standaloneMonthSymbols)] + pub unsafe fn standaloneMonthSymbols(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other shortStandaloneMonthSymbols)] + pub unsafe fn shortStandaloneMonthSymbols(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other veryShortStandaloneMonthSymbols)] + pub unsafe fn veryShortStandaloneMonthSymbols(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other weekdaySymbols)] + pub unsafe fn weekdaySymbols(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other shortWeekdaySymbols)] + pub unsafe fn shortWeekdaySymbols(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other veryShortWeekdaySymbols)] + pub unsafe fn veryShortWeekdaySymbols(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other standaloneWeekdaySymbols)] + pub unsafe fn standaloneWeekdaySymbols(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other shortStandaloneWeekdaySymbols)] + pub unsafe fn shortStandaloneWeekdaySymbols(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other veryShortStandaloneWeekdaySymbols)] + pub unsafe fn veryShortStandaloneWeekdaySymbols(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other quarterSymbols)] + pub unsafe fn quarterSymbols(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other shortQuarterSymbols)] + pub unsafe fn shortQuarterSymbols(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other standaloneQuarterSymbols)] + pub unsafe fn standaloneQuarterSymbols(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other shortStandaloneQuarterSymbols)] + pub unsafe fn shortStandaloneQuarterSymbols(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other AMSymbol)] + pub unsafe fn AMSymbol(&self) -> Id; + + #[method_id(@__retain_semantics Other 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; + + #[method(ordinalityOfUnit:inUnit:forDate:)] + pub unsafe fn ordinalityOfUnit_inUnit_forDate( + &self, + smaller: NSCalendarUnit, + larger: NSCalendarUnit, + date: &NSDate, + ) -> NSUInteger; + + #[method(rangeOfUnit:startDate:interval:forDate:)] + pub unsafe fn rangeOfUnit_startDate_interval_forDate( + &self, + unit: NSCalendarUnit, + datep: *mut *mut NSDate, + tip: *mut NSTimeInterval, + date: &NSDate, + ) -> bool; + + #[method_id(@__retain_semantics Other dateFromComponents:)] + pub unsafe fn dateFromComponents( + &self, + comps: &NSDateComponents, + ) -> Option>; + + #[method_id(@__retain_semantics Other components:fromDate:)] + pub unsafe fn components_fromDate( + &self, + unitFlags: NSCalendarUnit, + date: &NSDate, + ) -> Id; + + #[method_id(@__retain_semantics Other dateByAddingComponents:toDate:options:)] + pub unsafe fn dateByAddingComponents_toDate_options( + &self, + comps: &NSDateComponents, + date: &NSDate, + opts: NSCalendarOptions, + ) -> Option>; + + #[method_id(@__retain_semantics Other components:fromDate:toDate:options:)] + pub unsafe fn components_fromDate_toDate_options( + &self, + unitFlags: NSCalendarUnit, + startingDate: &NSDate, + resultDate: &NSDate, + opts: NSCalendarOptions, + ) -> Id; + + #[method(getEra:year:month:day:fromDate:)] + pub unsafe fn getEra_year_month_day_fromDate( + &self, + eraValuePointer: *mut NSInteger, + yearValuePointer: *mut NSInteger, + monthValuePointer: *mut NSInteger, + dayValuePointer: *mut NSInteger, + date: &NSDate, + ); + + #[method(getEra:yearForWeekOfYear:weekOfYear:weekday:fromDate:)] + pub unsafe fn getEra_yearForWeekOfYear_weekOfYear_weekday_fromDate( + &self, + eraValuePointer: *mut NSInteger, + yearValuePointer: *mut NSInteger, + weekValuePointer: *mut NSInteger, + weekdayValuePointer: *mut NSInteger, + date: &NSDate, + ); + + #[method(getHour:minute:second:nanosecond:fromDate:)] + pub unsafe fn getHour_minute_second_nanosecond_fromDate( + &self, + hourValuePointer: *mut NSInteger, + minuteValuePointer: *mut NSInteger, + secondValuePointer: *mut NSInteger, + nanosecondValuePointer: *mut NSInteger, + date: &NSDate, + ); + + #[method(component:fromDate:)] + pub unsafe fn component_fromDate(&self, unit: NSCalendarUnit, date: &NSDate) -> NSInteger; + + #[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, + yearValue: NSInteger, + monthValue: NSInteger, + dayValue: NSInteger, + hourValue: NSInteger, + minuteValue: NSInteger, + secondValue: NSInteger, + nanosecondValue: NSInteger, + ) -> Option>; + + #[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, + yearValue: NSInteger, + weekValue: NSInteger, + weekdayValue: NSInteger, + hourValue: NSInteger, + minuteValue: NSInteger, + secondValue: NSInteger, + nanosecondValue: NSInteger, + ) -> Option>; + + #[method_id(@__retain_semantics Other startOfDayForDate:)] + pub unsafe fn startOfDayForDate(&self, date: &NSDate) -> Id; + + #[method_id(@__retain_semantics Other componentsInTimeZone:fromDate:)] + pub unsafe fn componentsInTimeZone_fromDate( + &self, + timezone: &NSTimeZone, + date: &NSDate, + ) -> Id; + + #[method(compareDate:toDate:toUnitGranularity:)] + pub unsafe fn compareDate_toDate_toUnitGranularity( + &self, + date1: &NSDate, + date2: &NSDate, + unit: NSCalendarUnit, + ) -> NSComparisonResult; + + #[method(isDate:equalToDate:toUnitGranularity:)] + pub unsafe fn isDate_equalToDate_toUnitGranularity( + &self, + date1: &NSDate, + 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, + datep: *mut *mut NSDate, + tip: *mut NSTimeInterval, + date: &NSDate, + ) -> bool; + + #[method(nextWeekendStartDate:interval:options:afterDate:)] + pub unsafe fn nextWeekendStartDate_interval_options_afterDate( + &self, + datep: *mut *mut NSDate, + tip: *mut NSTimeInterval, + options: NSCalendarOptions, + date: &NSDate, + ) -> bool; + + #[method_id(@__retain_semantics Other components:fromDateComponents:toDateComponents:options:)] + pub unsafe fn components_fromDateComponents_toDateComponents_options( + &self, + unitFlags: NSCalendarUnit, + startingDateComp: &NSDateComponents, + resultDateComp: &NSDateComponents, + options: NSCalendarOptions, + ) -> Id; + + #[method_id(@__retain_semantics Other dateByAddingUnit:value:toDate:options:)] + pub unsafe fn dateByAddingUnit_value_toDate_options( + &self, + unit: NSCalendarUnit, + value: NSInteger, + date: &NSDate, + options: NSCalendarOptions, + ) -> Option>; + + #[method(enumerateDatesStartingAfterDate:matchingComponents:options:usingBlock:)] + pub unsafe fn enumerateDatesStartingAfterDate_matchingComponents_options_usingBlock( + &self, + start: &NSDate, + comps: &NSDateComponents, + opts: NSCalendarOptions, + block: &Block<(*mut NSDate, Bool, NonNull), ()>, + ); + + #[method_id(@__retain_semantics Other nextDateAfterDate:matchingComponents:options:)] + pub unsafe fn nextDateAfterDate_matchingComponents_options( + &self, + date: &NSDate, + comps: &NSDateComponents, + options: NSCalendarOptions, + ) -> Option>; + + #[method_id(@__retain_semantics Other nextDateAfterDate:matchingUnit:value:options:)] + pub unsafe fn nextDateAfterDate_matchingUnit_value_options( + &self, + date: &NSDate, + unit: NSCalendarUnit, + value: NSInteger, + options: NSCalendarOptions, + ) -> Option>; + + #[method_id(@__retain_semantics Other nextDateAfterDate:matchingHour:minute:second:options:)] + pub unsafe fn nextDateAfterDate_matchingHour_minute_second_options( + &self, + date: &NSDate, + hourValue: NSInteger, + minuteValue: NSInteger, + secondValue: NSInteger, + options: NSCalendarOptions, + ) -> Option>; + + #[method_id(@__retain_semantics Other dateBySettingUnit:value:ofDate:options:)] + pub unsafe fn dateBySettingUnit_value_ofDate_options( + &self, + unit: NSCalendarUnit, + v: NSInteger, + date: &NSDate, + opts: NSCalendarOptions, + ) -> Option>; + + #[method_id(@__retain_semantics Other dateBySettingHour:minute:second:ofDate:options:)] + pub unsafe fn dateBySettingHour_minute_second_ofDate_options( + &self, + h: NSInteger, + m: NSInteger, + s: NSInteger, + date: &NSDate, + opts: NSCalendarOptions, + ) -> Option>; + + #[method(date:matchesComponents:)] + pub unsafe fn date_matchesComponents( + &self, + date: &NSDate, + components: &NSDateComponents, + ) -> bool; + } +); + +extern_static!(NSCalendarDayChangedNotification: &'static NSNotificationName); + +ns_enum!( + #[underlying(NSInteger)] + pub enum { + NSDateComponentUndefined = 9223372036854775807, + NSUndefinedDateComponent = NSDateComponentUndefined, + } +); + +extern_class!( + #[derive(Debug)] + pub struct NSDateComponents; + + unsafe impl ClassType for NSDateComponents { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSDateComponents { + #[method_id(@__retain_semantics Other calendar)] + pub unsafe fn calendar(&self) -> Option>; + + #[method(setCalendar:)] + pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>); + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other 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-generated/src/Foundation/generated/NSCharacterSet.rs b/crates/icrate-generated/src/Foundation/generated/NSCharacterSet.rs new file mode 100644 index 000000000..c40fe4c10 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSCharacterSet.rs @@ -0,0 +1,208 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +extern_enum!( + #[underlying(c_uint)] + pub enum { + NSOpenStepUnicodeReservedBase = 0xF400, + } +); + +extern_class!( + #[derive(Debug)] + pub struct NSCharacterSet; + + unsafe impl ClassType for NSCharacterSet { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSCharacterSet { + #[method_id(@__retain_semantics Other controlCharacterSet)] + pub unsafe fn controlCharacterSet() -> Id; + + #[method_id(@__retain_semantics Other whitespaceCharacterSet)] + pub unsafe fn whitespaceCharacterSet() -> Id; + + #[method_id(@__retain_semantics Other whitespaceAndNewlineCharacterSet)] + pub unsafe fn whitespaceAndNewlineCharacterSet() -> Id; + + #[method_id(@__retain_semantics Other decimalDigitCharacterSet)] + pub unsafe fn decimalDigitCharacterSet() -> Id; + + #[method_id(@__retain_semantics Other letterCharacterSet)] + pub unsafe fn letterCharacterSet() -> Id; + + #[method_id(@__retain_semantics Other lowercaseLetterCharacterSet)] + pub unsafe fn lowercaseLetterCharacterSet() -> Id; + + #[method_id(@__retain_semantics Other uppercaseLetterCharacterSet)] + pub unsafe fn uppercaseLetterCharacterSet() -> Id; + + #[method_id(@__retain_semantics Other nonBaseCharacterSet)] + pub unsafe fn nonBaseCharacterSet() -> Id; + + #[method_id(@__retain_semantics Other alphanumericCharacterSet)] + pub unsafe fn alphanumericCharacterSet() -> Id; + + #[method_id(@__retain_semantics Other decomposableCharacterSet)] + pub unsafe fn decomposableCharacterSet() -> Id; + + #[method_id(@__retain_semantics Other illegalCharacterSet)] + pub unsafe fn illegalCharacterSet() -> Id; + + #[method_id(@__retain_semantics Other punctuationCharacterSet)] + pub unsafe fn punctuationCharacterSet() -> Id; + + #[method_id(@__retain_semantics Other capitalizedLetterCharacterSet)] + pub unsafe fn capitalizedLetterCharacterSet() -> Id; + + #[method_id(@__retain_semantics Other symbolCharacterSet)] + pub unsafe fn symbolCharacterSet() -> Id; + + #[method_id(@__retain_semantics Other newlineCharacterSet)] + pub unsafe fn newlineCharacterSet() -> Id; + + #[method_id(@__retain_semantics Other characterSetWithRange:)] + pub unsafe fn characterSetWithRange(aRange: NSRange) -> Id; + + #[method_id(@__retain_semantics Other characterSetWithCharactersInString:)] + pub unsafe fn characterSetWithCharactersInString( + aString: &NSString, + ) -> Id; + + #[method_id(@__retain_semantics Other characterSetWithBitmapRepresentation:)] + pub unsafe fn characterSetWithBitmapRepresentation( + data: &NSData, + ) -> Id; + + #[method_id(@__retain_semantics Other characterSetWithContentsOfFile:)] + pub unsafe fn characterSetWithContentsOfFile( + fName: &NSString, + ) -> Option>; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Id; + + #[method(characterIsMember:)] + pub unsafe fn characterIsMember(&self, aCharacter: unichar) -> bool; + + #[method_id(@__retain_semantics Other bitmapRepresentation)] + pub unsafe fn bitmapRepresentation(&self) -> Id; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other controlCharacterSet)] + pub unsafe fn controlCharacterSet() -> Id; + + #[method_id(@__retain_semantics Other whitespaceCharacterSet)] + pub unsafe fn whitespaceCharacterSet() -> Id; + + #[method_id(@__retain_semantics Other whitespaceAndNewlineCharacterSet)] + pub unsafe fn whitespaceAndNewlineCharacterSet() -> Id; + + #[method_id(@__retain_semantics Other decimalDigitCharacterSet)] + pub unsafe fn decimalDigitCharacterSet() -> Id; + + #[method_id(@__retain_semantics Other letterCharacterSet)] + pub unsafe fn letterCharacterSet() -> Id; + + #[method_id(@__retain_semantics Other lowercaseLetterCharacterSet)] + pub unsafe fn lowercaseLetterCharacterSet() -> Id; + + #[method_id(@__retain_semantics Other uppercaseLetterCharacterSet)] + pub unsafe fn uppercaseLetterCharacterSet() -> Id; + + #[method_id(@__retain_semantics Other nonBaseCharacterSet)] + pub unsafe fn nonBaseCharacterSet() -> Id; + + #[method_id(@__retain_semantics Other alphanumericCharacterSet)] + pub unsafe fn alphanumericCharacterSet() -> Id; + + #[method_id(@__retain_semantics Other decomposableCharacterSet)] + pub unsafe fn decomposableCharacterSet() -> Id; + + #[method_id(@__retain_semantics Other illegalCharacterSet)] + pub unsafe fn illegalCharacterSet() -> Id; + + #[method_id(@__retain_semantics Other punctuationCharacterSet)] + pub unsafe fn punctuationCharacterSet() -> Id; + + #[method_id(@__retain_semantics Other capitalizedLetterCharacterSet)] + pub unsafe fn capitalizedLetterCharacterSet() -> Id; + + #[method_id(@__retain_semantics Other symbolCharacterSet)] + pub unsafe fn symbolCharacterSet() -> Id; + + #[method_id(@__retain_semantics Other newlineCharacterSet)] + pub unsafe fn newlineCharacterSet() -> Id; + + #[method_id(@__retain_semantics Other characterSetWithRange:)] + pub unsafe fn characterSetWithRange(aRange: NSRange) -> Id; + + #[method_id(@__retain_semantics Other characterSetWithCharactersInString:)] + pub unsafe fn characterSetWithCharactersInString( + aString: &NSString, + ) -> Id; + + #[method_id(@__retain_semantics Other characterSetWithBitmapRepresentation:)] + pub unsafe fn characterSetWithBitmapRepresentation( + data: &NSData, + ) -> Id; + + #[method_id(@__retain_semantics Other characterSetWithContentsOfFile:)] + pub unsafe fn characterSetWithContentsOfFile( + fName: &NSString, + ) -> Option>; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSCoder.rs b/crates/icrate-generated/src/Foundation/generated/NSCoder.rs new file mode 100644 index 000000000..90a807fb6 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSCoder.rs @@ -0,0 +1,282 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSDecodingFailurePolicy { + NSDecodingFailurePolicyRaiseException = 0, + NSDecodingFailurePolicySetErrorAndReturn = 1, + } +); + +extern_class!( + #[derive(Debug)] + pub struct NSCoder; + + unsafe impl ClassType for NSCoder { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSCoder { + #[method(encodeValueOfObjCType:at:)] + pub unsafe fn encodeValueOfObjCType_at( + &self, + type_: NonNull, + addr: NonNull, + ); + + #[method(encodeDataObject:)] + pub unsafe fn encodeDataObject(&self, data: &NSData); + + #[method_id(@__retain_semantics Other decodeDataObject)] + pub unsafe fn decodeDataObject(&self) -> Option>; + + #[method(decodeValueOfObjCType:at:size:)] + pub unsafe fn decodeValueOfObjCType_at_size( + &self, + type_: NonNull, + data: NonNull, + size: NSUInteger, + ); + + #[method(versionForClassName:)] + pub unsafe fn versionForClassName(&self, className: &NSString) -> NSInteger; + } +); + +extern_methods!( + /// 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, + type_: NonNull, + count: NSUInteger, + array: NonNull, + ); + + #[method(encodeBytes:length:)] + pub unsafe fn encodeBytes_length(&self, byteaddr: *mut c_void, length: NSUInteger); + + #[method_id(@__retain_semantics Other decodeObject)] + pub unsafe fn decodeObject(&self) -> Option>; + + #[method_id(@__retain_semantics Other decodeTopLevelObjectAndReturnError:)] + pub unsafe fn decodeTopLevelObjectAndReturnError( + &self, + ) -> Result, Id>; + + #[method(decodeArrayOfObjCType:count:at:)] + pub unsafe fn decodeArrayOfObjCType_count_at( + &self, + itemType: NonNull, + count: NSUInteger, + array: NonNull, + ); + + #[method(decodeBytesWithReturnedLength:)] + pub unsafe fn decodeBytesWithReturnedLength( + &self, + lengthp: NonNull, + ) -> *mut c_void; + + #[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: i64, 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, + ); + + #[method(containsValueForKey:)] + pub unsafe fn containsValueForKey(&self, key: &NSString) -> bool; + + #[method_id(@__retain_semantics Other decodeObjectForKey:)] + pub unsafe fn decodeObjectForKey(&self, key: &NSString) -> Option>; + + #[method_id(@__retain_semantics Other 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) -> i64; + + #[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(@__retain_semantics Other decodeObjectOfClass:forKey:)] + pub unsafe fn decodeObjectOfClass_forKey( + &self, + aClass: &Class, + key: &NSString, + ) -> Option>; + + #[method_id(@__retain_semantics Other decodeTopLevelObjectOfClass:forKey:error:)] + pub unsafe fn decodeTopLevelObjectOfClass_forKey_error( + &self, + aClass: &Class, + key: &NSString, + ) -> Result, Id>; + + #[method_id(@__retain_semantics Other decodeArrayOfObjectsOfClass:forKey:)] + pub unsafe fn decodeArrayOfObjectsOfClass_forKey( + &self, + cls: &Class, + key: &NSString, + ) -> Option>; + + #[method_id(@__retain_semantics Other decodeDictionaryWithKeysOfClass:objectsOfClass:forKey:)] + pub unsafe fn decodeDictionaryWithKeysOfClass_objectsOfClass_forKey( + &self, + keyCls: &Class, + objectCls: &Class, + key: &NSString, + ) -> Option>; + + #[method_id(@__retain_semantics Other decodeObjectOfClasses:forKey:)] + pub unsafe fn decodeObjectOfClasses_forKey( + &self, + classes: Option<&NSSet>, + key: &NSString, + ) -> Option>; + + #[method_id(@__retain_semantics Other decodeTopLevelObjectOfClasses:forKey:error:)] + pub unsafe fn decodeTopLevelObjectOfClasses_forKey_error( + &self, + classes: Option<&NSSet>, + key: &NSString, + ) -> Result, Id>; + + #[method_id(@__retain_semantics Other decodeArrayOfObjectsOfClasses:forKey:)] + pub unsafe fn decodeArrayOfObjectsOfClasses_forKey( + &self, + classes: &NSSet, + key: &NSString, + ) -> Option>; + + #[method_id(@__retain_semantics Other decodeDictionaryWithKeysOfClasses:objectsOfClasses:forKey:)] + pub unsafe fn decodeDictionaryWithKeysOfClasses_objectsOfClasses_forKey( + &self, + keyClasses: &NSSet, + objectClasses: &NSSet, + key: &NSString, + ) -> Option>; + + #[method_id(@__retain_semantics Other decodePropertyListForKey:)] + pub unsafe fn decodePropertyListForKey(&self, key: &NSString) + -> Option>; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other error)] + pub unsafe fn error(&self) -> Option>; + } +); + +extern_methods!( + /// NSDeprecated + unsafe impl NSCoder { + #[method(decodeValueOfObjCType:at:)] + pub unsafe fn decodeValueOfObjCType_at( + &self, + type_: NonNull, + data: NonNull, + ); + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSComparisonPredicate.rs b/crates/icrate-generated/src/Foundation/generated/NSComparisonPredicate.rs new file mode 100644 index 000000000..5b4d010e3 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSComparisonPredicate.rs @@ -0,0 +1,113 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +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)] + pub struct NSComparisonPredicate; + + unsafe impl ClassType for NSComparisonPredicate { + type Super = NSPredicate; + } +); + +extern_methods!( + unsafe impl NSComparisonPredicate { + #[method_id(@__retain_semantics Other predicateWithLeftExpression:rightExpression:modifier:type:options:)] + pub unsafe fn predicateWithLeftExpression_rightExpression_modifier_type_options( + lhs: &NSExpression, + rhs: &NSExpression, + modifier: NSComparisonPredicateModifier, + type_: NSPredicateOperatorType, + options: NSComparisonPredicateOptions, + ) -> Id; + + #[method_id(@__retain_semantics Other predicateWithLeftExpression:rightExpression:customSelector:)] + pub unsafe fn predicateWithLeftExpression_rightExpression_customSelector( + lhs: &NSExpression, + rhs: &NSExpression, + selector: Sel, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithLeftExpression:rightExpression:modifier:type:options:)] + pub unsafe fn initWithLeftExpression_rightExpression_modifier_type_options( + this: Option>, + lhs: &NSExpression, + rhs: &NSExpression, + modifier: NSComparisonPredicateModifier, + type_: NSPredicateOperatorType, + options: NSComparisonPredicateOptions, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithLeftExpression:rightExpression:customSelector:)] + pub unsafe fn initWithLeftExpression_rightExpression_customSelector( + this: Option>, + lhs: &NSExpression, + rhs: &NSExpression, + selector: Sel, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; + + #[method(predicateOperatorType)] + pub unsafe fn predicateOperatorType(&self) -> NSPredicateOperatorType; + + #[method(comparisonPredicateModifier)] + pub unsafe fn comparisonPredicateModifier(&self) -> NSComparisonPredicateModifier; + + #[method_id(@__retain_semantics Other leftExpression)] + pub unsafe fn leftExpression(&self) -> Id; + + #[method_id(@__retain_semantics Other rightExpression)] + pub unsafe fn rightExpression(&self) -> Id; + + #[method(customSelector)] + pub unsafe fn customSelector(&self) -> OptionSel; + + #[method(options)] + pub unsafe fn options(&self) -> NSComparisonPredicateOptions; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSCompoundPredicate.rs b/crates/icrate-generated/src/Foundation/generated/NSCompoundPredicate.rs new file mode 100644 index 000000000..1ce1606f0 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSCompoundPredicate.rs @@ -0,0 +1,60 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSCompoundPredicateType { + NSNotPredicateType = 0, + NSAndPredicateType = 1, + NSOrPredicateType = 2, + } +); + +extern_class!( + #[derive(Debug)] + pub struct NSCompoundPredicate; + + unsafe impl ClassType for NSCompoundPredicate { + type Super = NSPredicate; + } +); + +extern_methods!( + unsafe impl NSCompoundPredicate { + #[method_id(@__retain_semantics Init initWithType:subpredicates:)] + pub unsafe fn initWithType_subpredicates( + this: Option>, + type_: NSCompoundPredicateType, + subpredicates: &NSArray, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; + + #[method(compoundPredicateType)] + pub unsafe fn compoundPredicateType(&self) -> NSCompoundPredicateType; + + #[method_id(@__retain_semantics Other subpredicates)] + pub unsafe fn subpredicates(&self) -> Id; + + #[method_id(@__retain_semantics Other andPredicateWithSubpredicates:)] + pub unsafe fn andPredicateWithSubpredicates( + subpredicates: &NSArray, + ) -> Id; + + #[method_id(@__retain_semantics Other orPredicateWithSubpredicates:)] + pub unsafe fn orPredicateWithSubpredicates( + subpredicates: &NSArray, + ) -> Id; + + #[method_id(@__retain_semantics Other notPredicateWithSubpredicate:)] + pub unsafe fn notPredicateWithSubpredicate( + predicate: &NSPredicate, + ) -> Id; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSData.rs b/crates/icrate-generated/src/Foundation/generated/NSData.rs new file mode 100644 index 000000000..b398b2e40 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSData.rs @@ -0,0 +1,432 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +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)] + 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!( + /// NSExtendedData + unsafe impl NSData { + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other 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, + dataToFind: &NSData, + mask: NSDataSearchOptions, + searchRange: NSRange, + ) -> NSRange; + + #[method(enumerateByteRangesUsingBlock:)] + pub unsafe fn enumerateByteRangesUsingBlock( + &self, + block: &Block<(NonNull, NSRange, NonNull), ()>, + ); + } +); + +extern_methods!( + /// NSDataCreation + unsafe impl NSData { + #[method_id(@__retain_semantics Other data)] + pub unsafe fn data() -> Id; + + #[method_id(@__retain_semantics Other dataWithBytes:length:)] + pub unsafe fn dataWithBytes_length( + bytes: *mut c_void, + length: NSUInteger, + ) -> Id; + + #[method_id(@__retain_semantics Other dataWithBytesNoCopy:length:)] + pub unsafe fn dataWithBytesNoCopy_length( + bytes: NonNull, + length: NSUInteger, + ) -> Id; + + #[method_id(@__retain_semantics Other dataWithBytesNoCopy:length:freeWhenDone:)] + pub unsafe fn dataWithBytesNoCopy_length_freeWhenDone( + bytes: NonNull, + length: NSUInteger, + b: bool, + ) -> Id; + + #[method_id(@__retain_semantics Other dataWithContentsOfFile:options:error:)] + pub unsafe fn dataWithContentsOfFile_options_error( + path: &NSString, + readOptionsMask: NSDataReadingOptions, + ) -> Result, Id>; + + #[method_id(@__retain_semantics Other dataWithContentsOfURL:options:error:)] + pub unsafe fn dataWithContentsOfURL_options_error( + url: &NSURL, + readOptionsMask: NSDataReadingOptions, + ) -> Result, Id>; + + #[method_id(@__retain_semantics Other dataWithContentsOfFile:)] + pub unsafe fn dataWithContentsOfFile(path: &NSString) -> Option>; + + #[method_id(@__retain_semantics Other dataWithContentsOfURL:)] + pub unsafe fn dataWithContentsOfURL(url: &NSURL) -> Option>; + + #[method_id(@__retain_semantics Init initWithBytes:length:)] + pub unsafe fn initWithBytes_length( + this: Option>, + bytes: *mut c_void, + length: NSUInteger, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithBytesNoCopy:length:)] + pub unsafe fn initWithBytesNoCopy_length( + this: Option>, + bytes: NonNull, + length: NSUInteger, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithBytesNoCopy:length:freeWhenDone:)] + pub unsafe fn initWithBytesNoCopy_length_freeWhenDone( + this: Option>, + bytes: NonNull, + length: NSUInteger, + b: bool, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithBytesNoCopy:length:deallocator:)] + pub unsafe fn initWithBytesNoCopy_length_deallocator( + this: Option>, + bytes: NonNull, + length: NSUInteger, + deallocator: Option<&Block<(NonNull, NSUInteger), ()>>, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithContentsOfFile:options:error:)] + pub unsafe fn initWithContentsOfFile_options_error( + this: Option>, + path: &NSString, + readOptionsMask: NSDataReadingOptions, + ) -> Result, Id>; + + #[method_id(@__retain_semantics Init initWithContentsOfURL:options:error:)] + pub unsafe fn initWithContentsOfURL_options_error( + this: Option>, + url: &NSURL, + readOptionsMask: NSDataReadingOptions, + ) -> Result, Id>; + + #[method_id(@__retain_semantics Init initWithContentsOfFile:)] + pub unsafe fn initWithContentsOfFile( + this: Option>, + path: &NSString, + ) -> Option>; + + #[method_id(@__retain_semantics Init initWithContentsOfURL:)] + pub unsafe fn initWithContentsOfURL( + this: Option>, + url: &NSURL, + ) -> Option>; + + #[method_id(@__retain_semantics Init initWithData:)] + pub unsafe fn initWithData( + this: Option>, + data: &NSData, + ) -> Id; + + #[method_id(@__retain_semantics Other dataWithData:)] + pub unsafe fn dataWithData(data: &NSData) -> Id; + } +); + +extern_methods!( + /// NSDataBase64Encoding + unsafe impl NSData { + #[method_id(@__retain_semantics Init initWithBase64EncodedString:options:)] + pub unsafe fn initWithBase64EncodedString_options( + this: Option>, + base64String: &NSString, + options: NSDataBase64DecodingOptions, + ) -> Option>; + + #[method_id(@__retain_semantics Other base64EncodedStringWithOptions:)] + pub unsafe fn base64EncodedStringWithOptions( + &self, + options: NSDataBase64EncodingOptions, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithBase64EncodedData:options:)] + pub unsafe fn initWithBase64EncodedData_options( + this: Option>, + base64Data: &NSData, + options: NSDataBase64DecodingOptions, + ) -> Option>; + + #[method_id(@__retain_semantics Other base64EncodedDataWithOptions:)] + pub unsafe fn base64EncodedDataWithOptions( + &self, + options: NSDataBase64EncodingOptions, + ) -> Id; + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSDataCompressionAlgorithm { + NSDataCompressionAlgorithmLZFSE = 0, + NSDataCompressionAlgorithmLZ4 = 1, + NSDataCompressionAlgorithmLZMA = 2, + NSDataCompressionAlgorithmZlib = 3, + } +); + +extern_methods!( + /// NSDataCompression + unsafe impl NSData { + #[method_id(@__retain_semantics Other decompressedDataUsingAlgorithm:error:)] + pub unsafe fn decompressedDataUsingAlgorithm_error( + &self, + algorithm: NSDataCompressionAlgorithm, + ) -> Result, Id>; + + #[method_id(@__retain_semantics Other compressedDataUsingAlgorithm:error:)] + pub unsafe fn compressedDataUsingAlgorithm_error( + &self, + algorithm: NSDataCompressionAlgorithm, + ) -> Result, Id>; + } +); + +extern_methods!( + /// NSDeprecated + unsafe impl NSData { + #[method(getBytes:)] + pub unsafe fn getBytes(&self, buffer: NonNull); + + #[method_id(@__retain_semantics Other dataWithContentsOfMappedFile:)] + pub unsafe fn dataWithContentsOfMappedFile(path: &NSString) -> Option>; + + #[method_id(@__retain_semantics Init initWithContentsOfMappedFile:)] + pub unsafe fn initWithContentsOfMappedFile( + this: Option>, + path: &NSString, + ) -> Option>; + + #[method_id(@__retain_semantics Init initWithBase64Encoding:)] + pub unsafe fn initWithBase64Encoding( + this: Option>, + base64String: &NSString, + ) -> Option>; + + #[method_id(@__retain_semantics Other 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!( + /// 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, + range: NSRange, + replacementBytes: *mut c_void, + replacementLength: NSUInteger, + ); + } +); + +extern_methods!( + /// NSMutableDataCreation + unsafe impl NSMutableData { + #[method_id(@__retain_semantics Other dataWithCapacity:)] + pub unsafe fn dataWithCapacity(aNumItems: NSUInteger) -> Option>; + + #[method_id(@__retain_semantics Other dataWithLength:)] + pub unsafe fn dataWithLength(length: NSUInteger) -> Option>; + + #[method_id(@__retain_semantics Init initWithCapacity:)] + pub unsafe fn initWithCapacity( + this: Option>, + capacity: NSUInteger, + ) -> Option>; + + #[method_id(@__retain_semantics Init initWithLength:)] + pub unsafe fn initWithLength( + this: Option>, + length: NSUInteger, + ) -> Option>; + } +); + +extern_methods!( + /// 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, + algorithm: NSDataCompressionAlgorithm, + ) -> 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-generated/src/Foundation/generated/NSDate.rs b/crates/icrate-generated/src/Foundation/generated/NSDate.rs new file mode 100644 index 000000000..e4c7444a0 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSDate.rs @@ -0,0 +1,128 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +extern_static!(NSSystemClockDidChangeNotification: &'static NSNotificationName); + +pub type NSTimeInterval = c_double; + +extern_class!( + #[derive(Debug)] + pub struct NSDate; + + unsafe impl ClassType for NSDate { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSDate { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method_id(@__retain_semantics Init initWithTimeIntervalSinceReferenceDate:)] + pub unsafe fn initWithTimeIntervalSinceReferenceDate( + this: Option>, + ti: NSTimeInterval, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; + } +); + +extern_methods!( + /// 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(@__retain_semantics Other addTimeInterval:)] + pub unsafe fn addTimeInterval(&self, seconds: NSTimeInterval) -> Id; + + #[method_id(@__retain_semantics Other dateByAddingTimeInterval:)] + pub unsafe fn dateByAddingTimeInterval(&self, ti: NSTimeInterval) -> Id; + + #[method_id(@__retain_semantics Other earlierDate:)] + pub unsafe fn earlierDate(&self, anotherDate: &NSDate) -> Id; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other description)] + pub unsafe fn description(&self) -> Id; + + #[method_id(@__retain_semantics Other descriptionWithLocale:)] + pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) + -> Id; + } +); + +extern_methods!( + /// NSDateCreation + unsafe impl NSDate { + #[method_id(@__retain_semantics Other date)] + pub unsafe fn date() -> Id; + + #[method_id(@__retain_semantics Other dateWithTimeIntervalSinceNow:)] + pub unsafe fn dateWithTimeIntervalSinceNow(secs: NSTimeInterval) -> Id; + + #[method_id(@__retain_semantics Other dateWithTimeIntervalSinceReferenceDate:)] + pub unsafe fn dateWithTimeIntervalSinceReferenceDate( + ti: NSTimeInterval, + ) -> Id; + + #[method_id(@__retain_semantics Other dateWithTimeIntervalSince1970:)] + pub unsafe fn dateWithTimeIntervalSince1970(secs: NSTimeInterval) -> Id; + + #[method_id(@__retain_semantics Other dateWithTimeInterval:sinceDate:)] + pub unsafe fn dateWithTimeInterval_sinceDate( + secsToBeAdded: NSTimeInterval, + date: &NSDate, + ) -> Id; + + #[method_id(@__retain_semantics Other distantFuture)] + pub unsafe fn distantFuture() -> Id; + + #[method_id(@__retain_semantics Other distantPast)] + pub unsafe fn distantPast() -> Id; + + #[method_id(@__retain_semantics Other now)] + pub unsafe fn now() -> Id; + + #[method_id(@__retain_semantics Init initWithTimeIntervalSinceNow:)] + pub unsafe fn initWithTimeIntervalSinceNow( + this: Option>, + secs: NSTimeInterval, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithTimeIntervalSince1970:)] + pub unsafe fn initWithTimeIntervalSince1970( + this: Option>, + secs: NSTimeInterval, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithTimeInterval:sinceDate:)] + pub unsafe fn initWithTimeInterval_sinceDate( + this: Option>, + secsToBeAdded: NSTimeInterval, + date: &NSDate, + ) -> Id; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSDateComponentsFormatter.rs b/crates/icrate-generated/src/Foundation/generated/NSDateComponentsFormatter.rs new file mode 100644 index 000000000..14575838d --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSDateComponentsFormatter.rs @@ -0,0 +1,155 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +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)] + pub struct NSDateComponentsFormatter; + + unsafe impl ClassType for NSDateComponentsFormatter { + type Super = NSFormatter; + } +); + +extern_methods!( + unsafe impl NSDateComponentsFormatter { + #[method_id(@__retain_semantics Other stringForObjectValue:)] + pub unsafe fn stringForObjectValue( + &self, + obj: Option<&Object>, + ) -> Option>; + + #[method_id(@__retain_semantics Other stringFromDateComponents:)] + pub unsafe fn stringFromDateComponents( + &self, + components: &NSDateComponents, + ) -> Option>; + + #[method_id(@__retain_semantics Other stringFromDate:toDate:)] + pub unsafe fn stringFromDate_toDate( + &self, + startDate: &NSDate, + endDate: &NSDate, + ) -> Option>; + + #[method_id(@__retain_semantics Other stringFromTimeInterval:)] + pub unsafe fn stringFromTimeInterval( + &self, + ti: NSTimeInterval, + ) -> Option>; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other calendar)] + pub unsafe fn calendar(&self) -> Option>; + + #[method(setCalendar:)] + pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>); + + #[method_id(@__retain_semantics Other 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: *mut *mut Object, + string: &NSString, + error: *mut *mut NSString, + ) -> bool; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSDateFormatter.rs b/crates/icrate-generated/src/Foundation/generated/NSDateFormatter.rs new file mode 100644 index 000000000..227ea05ee --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSDateFormatter.rs @@ -0,0 +1,315 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +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_4 = 1040, + } +); + +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, + obj: *mut *mut Object, + string: &NSString, + rangep: *mut NSRange, + ) -> Result<(), Id>; + + #[method_id(@__retain_semantics Other stringFromDate:)] + pub unsafe fn stringFromDate(&self, date: &NSDate) -> Id; + + #[method_id(@__retain_semantics Other dateFromString:)] + pub unsafe fn dateFromString(&self, string: &NSString) -> Option>; + + #[method_id(@__retain_semantics Other localizedStringFromDate:dateStyle:timeStyle:)] + pub unsafe fn localizedStringFromDate_dateStyle_timeStyle( + date: &NSDate, + dstyle: NSDateFormatterStyle, + tstyle: NSDateFormatterStyle, + ) -> Id; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other 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(@__retain_semantics Other 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(@__retain_semantics Other timeZone)] + pub unsafe fn timeZone(&self) -> Id; + + #[method(setTimeZone:)] + pub unsafe fn setTimeZone(&self, timeZone: Option<&NSTimeZone>); + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other twoDigitStartDate)] + pub unsafe fn twoDigitStartDate(&self) -> Option>; + + #[method(setTwoDigitStartDate:)] + pub unsafe fn setTwoDigitStartDate(&self, twoDigitStartDate: Option<&NSDate>); + + #[method_id(@__retain_semantics Other defaultDate)] + pub unsafe fn defaultDate(&self) -> Option>; + + #[method(setDefaultDate:)] + pub unsafe fn setDefaultDate(&self, defaultDate: Option<&NSDate>); + + #[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(@__retain_semantics Other monthSymbols)] + pub unsafe fn monthSymbols(&self) -> Id, Shared>; + + #[method(setMonthSymbols:)] + pub unsafe fn setMonthSymbols(&self, monthSymbols: Option<&NSArray>); + + #[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(@__retain_semantics Other weekdaySymbols)] + pub unsafe fn weekdaySymbols(&self) -> Id, Shared>; + + #[method(setWeekdaySymbols:)] + pub unsafe fn setWeekdaySymbols(&self, weekdaySymbols: Option<&NSArray>); + + #[method_id(@__retain_semantics Other shortWeekdaySymbols)] + pub unsafe fn shortWeekdaySymbols(&self) -> Id, Shared>; + + #[method(setShortWeekdaySymbols:)] + pub unsafe fn setShortWeekdaySymbols( + &self, + shortWeekdaySymbols: Option<&NSArray>, + ); + + #[method_id(@__retain_semantics Other AMSymbol)] + pub unsafe fn AMSymbol(&self) -> Id; + + #[method(setAMSymbol:)] + pub unsafe fn setAMSymbol(&self, AMSymbol: Option<&NSString>); + + #[method_id(@__retain_semantics Other PMSymbol)] + pub unsafe fn PMSymbol(&self) -> Id; + + #[method(setPMSymbol:)] + pub unsafe fn setPMSymbol(&self, PMSymbol: Option<&NSString>); + + #[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(@__retain_semantics Other veryShortMonthSymbols)] + pub unsafe fn veryShortMonthSymbols(&self) -> Id, Shared>; + + #[method(setVeryShortMonthSymbols:)] + pub unsafe fn setVeryShortMonthSymbols( + &self, + veryShortMonthSymbols: Option<&NSArray>, + ); + + #[method_id(@__retain_semantics Other standaloneMonthSymbols)] + pub unsafe fn standaloneMonthSymbols(&self) -> Id, Shared>; + + #[method(setStandaloneMonthSymbols:)] + pub unsafe fn setStandaloneMonthSymbols( + &self, + standaloneMonthSymbols: Option<&NSArray>, + ); + + #[method_id(@__retain_semantics Other shortStandaloneMonthSymbols)] + pub unsafe fn shortStandaloneMonthSymbols(&self) -> Id, Shared>; + + #[method(setShortStandaloneMonthSymbols:)] + pub unsafe fn setShortStandaloneMonthSymbols( + &self, + shortStandaloneMonthSymbols: Option<&NSArray>, + ); + + #[method_id(@__retain_semantics Other veryShortStandaloneMonthSymbols)] + pub unsafe fn veryShortStandaloneMonthSymbols(&self) -> Id, Shared>; + + #[method(setVeryShortStandaloneMonthSymbols:)] + pub unsafe fn setVeryShortStandaloneMonthSymbols( + &self, + veryShortStandaloneMonthSymbols: Option<&NSArray>, + ); + + #[method_id(@__retain_semantics Other veryShortWeekdaySymbols)] + pub unsafe fn veryShortWeekdaySymbols(&self) -> Id, Shared>; + + #[method(setVeryShortWeekdaySymbols:)] + pub unsafe fn setVeryShortWeekdaySymbols( + &self, + veryShortWeekdaySymbols: Option<&NSArray>, + ); + + #[method_id(@__retain_semantics Other standaloneWeekdaySymbols)] + pub unsafe fn standaloneWeekdaySymbols(&self) -> Id, Shared>; + + #[method(setStandaloneWeekdaySymbols:)] + pub unsafe fn setStandaloneWeekdaySymbols( + &self, + standaloneWeekdaySymbols: Option<&NSArray>, + ); + + #[method_id(@__retain_semantics Other shortStandaloneWeekdaySymbols)] + pub unsafe fn shortStandaloneWeekdaySymbols(&self) -> Id, Shared>; + + #[method(setShortStandaloneWeekdaySymbols:)] + pub unsafe fn setShortStandaloneWeekdaySymbols( + &self, + shortStandaloneWeekdaySymbols: Option<&NSArray>, + ); + + #[method_id(@__retain_semantics Other veryShortStandaloneWeekdaySymbols)] + pub unsafe fn veryShortStandaloneWeekdaySymbols(&self) -> Id, Shared>; + + #[method(setVeryShortStandaloneWeekdaySymbols:)] + pub unsafe fn setVeryShortStandaloneWeekdaySymbols( + &self, + veryShortStandaloneWeekdaySymbols: Option<&NSArray>, + ); + + #[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(@__retain_semantics Other shortQuarterSymbols)] + pub unsafe fn shortQuarterSymbols(&self) -> Id, Shared>; + + #[method(setShortQuarterSymbols:)] + pub unsafe fn setShortQuarterSymbols( + &self, + shortQuarterSymbols: Option<&NSArray>, + ); + + #[method_id(@__retain_semantics Other standaloneQuarterSymbols)] + pub unsafe fn standaloneQuarterSymbols(&self) -> Id, Shared>; + + #[method(setStandaloneQuarterSymbols:)] + pub unsafe fn setStandaloneQuarterSymbols( + &self, + standaloneQuarterSymbols: Option<&NSArray>, + ); + + #[method_id(@__retain_semantics Other shortStandaloneQuarterSymbols)] + pub unsafe fn shortStandaloneQuarterSymbols(&self) -> Id, Shared>; + + #[method(setShortStandaloneQuarterSymbols:)] + pub unsafe fn setShortStandaloneQuarterSymbols( + &self, + shortStandaloneQuarterSymbols: Option<&NSArray>, + ); + + #[method_id(@__retain_semantics Other 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); + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSDateInterval.rs b/crates/icrate-generated/src/Foundation/generated/NSDateInterval.rs new file mode 100644 index 000000000..da55513a2 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSDateInterval.rs @@ -0,0 +1,67 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSDateInterval; + + unsafe impl ClassType for NSDateInterval { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSDateInterval { + #[method_id(@__retain_semantics Other startDate)] + pub unsafe fn startDate(&self) -> Id; + + #[method_id(@__retain_semantics Other endDate)] + pub unsafe fn endDate(&self) -> Id; + + #[method(duration)] + pub unsafe fn duration(&self) -> NSTimeInterval; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithStartDate:duration:)] + pub unsafe fn initWithStartDate_duration( + this: Option>, + startDate: &NSDate, + duration: NSTimeInterval, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithStartDate:endDate:)] + pub unsafe fn initWithStartDate_endDate( + this: Option>, + 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(@__retain_semantics Other intersectionWithDateInterval:)] + pub unsafe fn intersectionWithDateInterval( + &self, + dateInterval: &NSDateInterval, + ) -> Option>; + + #[method(containsDate:)] + pub unsafe fn containsDate(&self, date: &NSDate) -> bool; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSDateIntervalFormatter.rs b/crates/icrate-generated/src/Foundation/generated/NSDateIntervalFormatter.rs new file mode 100644 index 000000000..8cd1f58f8 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSDateIntervalFormatter.rs @@ -0,0 +1,77 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSDateIntervalFormatterStyle { + NSDateIntervalFormatterNoStyle = 0, + NSDateIntervalFormatterShortStyle = 1, + NSDateIntervalFormatterMediumStyle = 2, + NSDateIntervalFormatterLongStyle = 3, + NSDateIntervalFormatterFullStyle = 4, + } +); + +extern_class!( + #[derive(Debug)] + pub struct NSDateIntervalFormatter; + + unsafe impl ClassType for NSDateIntervalFormatter { + type Super = NSFormatter; + } +); + +extern_methods!( + unsafe impl NSDateIntervalFormatter { + #[method_id(@__retain_semantics Other locale)] + pub unsafe fn locale(&self) -> Id; + + #[method(setLocale:)] + pub unsafe fn setLocale(&self, locale: Option<&NSLocale>); + + #[method_id(@__retain_semantics Other calendar)] + pub unsafe fn calendar(&self) -> Id; + + #[method(setCalendar:)] + pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>); + + #[method_id(@__retain_semantics Other timeZone)] + pub unsafe fn timeZone(&self) -> Id; + + #[method(setTimeZone:)] + pub unsafe fn setTimeZone(&self, timeZone: Option<&NSTimeZone>); + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other stringFromDate:toDate:)] + pub unsafe fn stringFromDate_toDate( + &self, + fromDate: &NSDate, + toDate: &NSDate, + ) -> Id; + + #[method_id(@__retain_semantics Other stringFromDateInterval:)] + pub unsafe fn stringFromDateInterval( + &self, + dateInterval: &NSDateInterval, + ) -> Option>; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSDecimal.rs b/crates/icrate-generated/src/Foundation/generated/NSDecimal.rs new file mode 100644 index 000000000..9c1b9ae88 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSDecimal.rs @@ -0,0 +1,124 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSRoundingMode { + NSRoundPlain = 0, + NSRoundDown = 1, + NSRoundUp = 2, + NSRoundBankers = 3, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSCalculationError { + NSCalculationNoError = 0, + NSCalculationLossOfPrecision = 1, + NSCalculationUnderflow = 2, + NSCalculationOverflow = 3, + 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-generated/src/Foundation/generated/NSDecimalNumber.rs b/crates/icrate-generated/src/Foundation/generated/NSDecimalNumber.rs new file mode 100644 index 000000000..828e84bcb --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSDecimalNumber.rs @@ -0,0 +1,268 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +extern_static!(NSDecimalNumberExactnessException: &'static NSExceptionName); + +extern_static!(NSDecimalNumberOverflowException: &'static NSExceptionName); + +extern_static!(NSDecimalNumberUnderflowException: &'static NSExceptionName); + +extern_static!(NSDecimalNumberDivideByZeroException: &'static NSExceptionName); + +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)] + pub struct NSDecimalNumber; + + unsafe impl ClassType for NSDecimalNumber { + type Super = NSNumber; + } +); + +extern_methods!( + unsafe impl NSDecimalNumber { + #[method_id(@__retain_semantics Init initWithMantissa:exponent:isNegative:)] + pub unsafe fn initWithMantissa_exponent_isNegative( + this: Option>, + mantissa: c_ulonglong, + exponent: c_short, + flag: bool, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithDecimal:)] + pub unsafe fn initWithDecimal( + this: Option>, + dcm: NSDecimal, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithString:)] + pub unsafe fn initWithString( + this: Option>, + numberValue: Option<&NSString>, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithString:locale:)] + pub unsafe fn initWithString_locale( + this: Option>, + numberValue: Option<&NSString>, + locale: Option<&Object>, + ) -> Id; + + #[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(@__retain_semantics Other decimalNumberWithMantissa:exponent:isNegative:)] + pub unsafe fn decimalNumberWithMantissa_exponent_isNegative( + mantissa: c_ulonglong, + exponent: c_short, + flag: bool, + ) -> Id; + + #[method_id(@__retain_semantics Other decimalNumberWithDecimal:)] + pub unsafe fn decimalNumberWithDecimal(dcm: NSDecimal) -> Id; + + #[method_id(@__retain_semantics Other decimalNumberWithString:)] + pub unsafe fn decimalNumberWithString( + numberValue: Option<&NSString>, + ) -> Id; + + #[method_id(@__retain_semantics Other decimalNumberWithString:locale:)] + pub unsafe fn decimalNumberWithString_locale( + numberValue: Option<&NSString>, + locale: Option<&Object>, + ) -> Id; + + #[method_id(@__retain_semantics Other zero)] + pub unsafe fn zero() -> Id; + + #[method_id(@__retain_semantics Other one)] + pub unsafe fn one() -> Id; + + #[method_id(@__retain_semantics Other minimumDecimalNumber)] + pub unsafe fn minimumDecimalNumber() -> Id; + + #[method_id(@__retain_semantics Other maximumDecimalNumber)] + pub unsafe fn maximumDecimalNumber() -> Id; + + #[method_id(@__retain_semantics Other notANumber)] + pub unsafe fn notANumber() -> Id; + + #[method_id(@__retain_semantics Other decimalNumberByAdding:)] + pub unsafe fn decimalNumberByAdding( + &self, + decimalNumber: &NSDecimalNumber, + ) -> Id; + + #[method_id(@__retain_semantics Other decimalNumberByAdding:withBehavior:)] + pub unsafe fn decimalNumberByAdding_withBehavior( + &self, + decimalNumber: &NSDecimalNumber, + behavior: Option<&NSDecimalNumberBehaviors>, + ) -> Id; + + #[method_id(@__retain_semantics Other decimalNumberBySubtracting:)] + pub unsafe fn decimalNumberBySubtracting( + &self, + decimalNumber: &NSDecimalNumber, + ) -> Id; + + #[method_id(@__retain_semantics Other decimalNumberBySubtracting:withBehavior:)] + pub unsafe fn decimalNumberBySubtracting_withBehavior( + &self, + decimalNumber: &NSDecimalNumber, + behavior: Option<&NSDecimalNumberBehaviors>, + ) -> Id; + + #[method_id(@__retain_semantics Other decimalNumberByMultiplyingBy:)] + pub unsafe fn decimalNumberByMultiplyingBy( + &self, + decimalNumber: &NSDecimalNumber, + ) -> Id; + + #[method_id(@__retain_semantics Other decimalNumberByMultiplyingBy:withBehavior:)] + pub unsafe fn decimalNumberByMultiplyingBy_withBehavior( + &self, + decimalNumber: &NSDecimalNumber, + behavior: Option<&NSDecimalNumberBehaviors>, + ) -> Id; + + #[method_id(@__retain_semantics Other decimalNumberByDividingBy:)] + pub unsafe fn decimalNumberByDividingBy( + &self, + decimalNumber: &NSDecimalNumber, + ) -> Id; + + #[method_id(@__retain_semantics Other decimalNumberByDividingBy:withBehavior:)] + pub unsafe fn decimalNumberByDividingBy_withBehavior( + &self, + decimalNumber: &NSDecimalNumber, + behavior: Option<&NSDecimalNumberBehaviors>, + ) -> Id; + + #[method_id(@__retain_semantics Other decimalNumberByRaisingToPower:)] + pub unsafe fn decimalNumberByRaisingToPower( + &self, + power: NSUInteger, + ) -> Id; + + #[method_id(@__retain_semantics Other decimalNumberByRaisingToPower:withBehavior:)] + pub unsafe fn decimalNumberByRaisingToPower_withBehavior( + &self, + power: NSUInteger, + behavior: Option<&NSDecimalNumberBehaviors>, + ) -> Id; + + #[method_id(@__retain_semantics Other decimalNumberByMultiplyingByPowerOf10:)] + pub unsafe fn decimalNumberByMultiplyingByPowerOf10( + &self, + power: c_short, + ) -> Id; + + #[method_id(@__retain_semantics Other decimalNumberByMultiplyingByPowerOf10:withBehavior:)] + pub unsafe fn decimalNumberByMultiplyingByPowerOf10_withBehavior( + &self, + power: c_short, + behavior: Option<&NSDecimalNumberBehaviors>, + ) -> Id; + + #[method_id(@__retain_semantics Other decimalNumberByRoundingAccordingToBehavior:)] + pub unsafe fn decimalNumberByRoundingAccordingToBehavior( + &self, + behavior: Option<&NSDecimalNumberBehaviors>, + ) -> Id; + + #[method(compare:)] + pub unsafe fn compare(&self, decimalNumber: &NSNumber) -> NSComparisonResult; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other defaultDecimalNumberHandler)] + pub unsafe fn defaultDecimalNumberHandler() -> Id; + + #[method_id(@__retain_semantics Init initWithRoundingMode:scale:raiseOnExactness:raiseOnOverflow:raiseOnUnderflow:raiseOnDivideByZero:)] + pub unsafe fn initWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero( + this: Option>, + roundingMode: NSRoundingMode, + scale: c_short, + exact: bool, + overflow: bool, + underflow: bool, + divideByZero: bool, + ) -> Id; + + #[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, + exact: bool, + overflow: bool, + underflow: bool, + divideByZero: bool, + ) -> Id; + } +); + +extern_methods!( + /// NSDecimalNumberExtensions + unsafe impl NSNumber { + #[method(decimalValue)] + pub unsafe fn decimalValue(&self) -> NSDecimal; + } +); + +extern_methods!( + /// NSDecimalNumberScanning + unsafe impl NSScanner { + #[method(scanDecimal:)] + pub unsafe fn scanDecimal(&self, dcm: *mut NSDecimal) -> bool; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSDictionary.rs b/crates/icrate-generated/src/Foundation/generated/NSDictionary.rs new file mode 100644 index 000000000..bb95feca6 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSDictionary.rs @@ -0,0 +1,377 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +__inner_extern_class!( + #[derive(Debug)] + pub struct NSDictionary { + _inner0: PhantomData<*mut KeyType>, + _inner1: PhantomData<*mut ObjectType>, + } + + unsafe impl ClassType for NSDictionary { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSDictionary { + #[method(count)] + pub unsafe fn count(&self) -> NSUInteger; + + #[method_id(@__retain_semantics Other objectForKey:)] + pub unsafe fn objectForKey(&self, aKey: &KeyType) -> Option>; + + #[method_id(@__retain_semantics Other keyEnumerator)] + pub unsafe fn keyEnumerator(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method_id(@__retain_semantics Init initWithObjects:forKeys:count:)] + pub unsafe fn initWithObjects_forKeys_count( + this: Option>, + objects: *mut NonNull, + keys: *mut NonNull, + cnt: NSUInteger, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; + } +); + +extern_methods!( + /// NSExtendedDictionary + unsafe impl NSDictionary { + #[method_id(@__retain_semantics Other allKeys)] + pub unsafe fn allKeys(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other allKeysForObject:)] + pub unsafe fn allKeysForObject( + &self, + anObject: &ObjectType, + ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other allValues)] + pub unsafe fn allValues(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other description)] + pub unsafe fn description(&self) -> Id; + + #[method_id(@__retain_semantics Other descriptionInStringsFileFormat)] + pub unsafe fn descriptionInStringsFileFormat(&self) -> Id; + + #[method_id(@__retain_semantics Other descriptionWithLocale:)] + pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) + -> Id; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other objectEnumerator)] + pub unsafe fn objectEnumerator(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other keysSortedByValueUsingSelector:)] + pub unsafe fn keysSortedByValueUsingSelector( + &self, + comparator: Sel, + ) -> Id, Shared>; + + #[method(getObjects:andKeys:count:)] + pub unsafe fn getObjects_andKeys_count( + &self, + objects: *mut NonNull, + keys: *mut NonNull, + count: NSUInteger, + ); + + #[method_id(@__retain_semantics Other objectForKeyedSubscript:)] + pub unsafe fn objectForKeyedSubscript( + &self, + key: &KeyType, + ) -> Option>; + + #[method(enumerateKeysAndObjectsUsingBlock:)] + pub unsafe fn enumerateKeysAndObjectsUsingBlock( + &self, + block: &Block<(NonNull, NonNull, NonNull), ()>, + ); + + #[method(enumerateKeysAndObjectsWithOptions:usingBlock:)] + pub unsafe fn enumerateKeysAndObjectsWithOptions_usingBlock( + &self, + opts: NSEnumerationOptions, + block: &Block<(NonNull, NonNull, NonNull), ()>, + ); + + #[method_id(@__retain_semantics Other keysSortedByValueUsingComparator:)] + pub unsafe fn keysSortedByValueUsingComparator( + &self, + cmptr: NSComparator, + ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other keysSortedByValueWithOptions:usingComparator:)] + pub unsafe fn keysSortedByValueWithOptions_usingComparator( + &self, + opts: NSSortOptions, + cmptr: NSComparator, + ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other keysOfEntriesPassingTest:)] + pub unsafe fn keysOfEntriesPassingTest( + &self, + predicate: &Block<(NonNull, NonNull, NonNull), Bool>, + ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other keysOfEntriesWithOptions:passingTest:)] + pub unsafe fn keysOfEntriesWithOptions_passingTest( + &self, + opts: NSEnumerationOptions, + predicate: &Block<(NonNull, NonNull, NonNull), Bool>, + ) -> Id, Shared>; + } +); + +extern_methods!( + /// NSDeprecated + unsafe impl NSDictionary { + #[method(getObjects:andKeys:)] + pub unsafe fn getObjects_andKeys( + &self, + objects: *mut NonNull, + keys: *mut NonNull, + ); + + #[method_id(@__retain_semantics Other dictionaryWithContentsOfFile:)] + pub unsafe fn dictionaryWithContentsOfFile( + path: &NSString, + ) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other dictionaryWithContentsOfURL:)] + pub unsafe fn dictionaryWithContentsOfURL( + url: &NSURL, + ) -> Option, Shared>>; + + #[method_id(@__retain_semantics Init initWithContentsOfFile:)] + pub unsafe fn initWithContentsOfFile( + this: Option>, + path: &NSString, + ) -> Option, Shared>>; + + #[method_id(@__retain_semantics Init initWithContentsOfURL:)] + pub unsafe fn initWithContentsOfURL( + this: Option>, + 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!( + /// NSDictionaryCreation + unsafe impl NSDictionary { + #[method_id(@__retain_semantics Other dictionary)] + pub unsafe fn dictionary() -> Id; + + #[method_id(@__retain_semantics Other dictionaryWithObject:forKey:)] + pub unsafe fn dictionaryWithObject_forKey( + object: &ObjectType, + key: &NSCopying, + ) -> Id; + + #[method_id(@__retain_semantics Other dictionaryWithObjects:forKeys:count:)] + pub unsafe fn dictionaryWithObjects_forKeys_count( + objects: *mut NonNull, + keys: *mut NonNull, + cnt: NSUInteger, + ) -> Id; + + #[method_id(@__retain_semantics Other dictionaryWithDictionary:)] + pub unsafe fn dictionaryWithDictionary( + dict: &NSDictionary, + ) -> Id; + + #[method_id(@__retain_semantics Other dictionaryWithObjects:forKeys:)] + pub unsafe fn dictionaryWithObjects_forKeys( + objects: &NSArray, + keys: &NSArray, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithDictionary:)] + pub unsafe fn initWithDictionary( + this: Option>, + otherDictionary: &NSDictionary, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithDictionary:copyItems:)] + pub unsafe fn initWithDictionary_copyItems( + this: Option>, + otherDictionary: &NSDictionary, + flag: bool, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithObjects:forKeys:)] + pub unsafe fn initWithObjects_forKeys( + this: Option>, + objects: &NSArray, + keys: &NSArray, + ) -> Id; + } +); + +__inner_extern_class!( + #[derive(Debug)] + pub struct NSMutableDictionary { + _inner0: PhantomData<*mut KeyType>, + _inner1: PhantomData<*mut ObjectType>, + } + + 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(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method_id(@__retain_semantics Init initWithCapacity:)] + pub unsafe fn initWithCapacity( + this: Option>, + numItems: NSUInteger, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; + } +); + +extern_methods!( + /// 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!( + /// NSMutableDictionaryCreation + unsafe impl NSMutableDictionary { + #[method_id(@__retain_semantics Other dictionaryWithCapacity:)] + pub unsafe fn dictionaryWithCapacity(numItems: NSUInteger) -> Id; + + #[method_id(@__retain_semantics Other dictionaryWithContentsOfFile:)] + pub unsafe fn dictionaryWithContentsOfFile( + path: &NSString, + ) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other dictionaryWithContentsOfURL:)] + pub unsafe fn dictionaryWithContentsOfURL( + url: &NSURL, + ) -> Option, Shared>>; + + #[method_id(@__retain_semantics Init initWithContentsOfFile:)] + pub unsafe fn initWithContentsOfFile( + this: Option>, + path: &NSString, + ) -> Option, Shared>>; + + #[method_id(@__retain_semantics Init initWithContentsOfURL:)] + pub unsafe fn initWithContentsOfURL( + this: Option>, + url: &NSURL, + ) -> Option, Shared>>; + } +); + +extern_methods!( + /// NSSharedKeySetDictionary + unsafe impl NSDictionary { + #[method_id(@__retain_semantics Other sharedKeySetForKeys:)] + pub unsafe fn sharedKeySetForKeys(keys: &NSArray) -> Id; + } +); + +extern_methods!( + /// NSSharedKeySetDictionary + unsafe impl NSMutableDictionary { + #[method_id(@__retain_semantics Other dictionaryWithSharedKeySet:)] + pub unsafe fn dictionaryWithSharedKeySet( + keyset: &Object, + ) -> Id, Shared>; + } +); + +extern_methods!( + /// NSGenericFastEnumeration + unsafe impl NSDictionary { + #[method(countByEnumeratingWithState:objects:count:)] + pub unsafe fn countByEnumeratingWithState_objects_count( + &self, + state: NonNull, + buffer: NonNull<*mut K>, + len: NSUInteger, + ) -> NSUInteger; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSEnergyFormatter.rs b/crates/icrate-generated/src/Foundation/generated/NSEnergyFormatter.rs new file mode 100644 index 000000000..35d49affc --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSEnergyFormatter.rs @@ -0,0 +1,77 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSEnergyFormatterUnit { + NSEnergyFormatterUnitJoule = 11, + NSEnergyFormatterUnitKilojoule = 14, + NSEnergyFormatterUnitCalorie = (7 << 8) + 1, + NSEnergyFormatterUnitKilocalorie = (7 << 8) + 2, + } +); + +extern_class!( + #[derive(Debug)] + pub struct NSEnergyFormatter; + + unsafe impl ClassType for NSEnergyFormatter { + type Super = NSFormatter; + } +); + +extern_methods!( + unsafe impl NSEnergyFormatter { + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other stringFromValue:unit:)] + pub unsafe fn stringFromValue_unit( + &self, + value: c_double, + unit: NSEnergyFormatterUnit, + ) -> Id; + + #[method_id(@__retain_semantics Other stringFromJoules:)] + pub unsafe fn stringFromJoules(&self, numberInJoules: c_double) -> Id; + + #[method_id(@__retain_semantics Other unitStringFromValue:unit:)] + pub unsafe fn unitStringFromValue_unit( + &self, + value: c_double, + unit: NSEnergyFormatterUnit, + ) -> Id; + + #[method_id(@__retain_semantics Other 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, + obj: *mut *mut Object, + string: &NSString, + error: *mut *mut NSString, + ) -> bool; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSEnumerator.rs b/crates/icrate-generated/src/Foundation/generated/NSEnumerator.rs new file mode 100644 index 000000000..70bf3d636 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSEnumerator.rs @@ -0,0 +1,53 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +extern_struct!( + pub struct NSFastEnumerationState { + pub state: c_ulong, + pub itemsPtr: *mut *mut Object, + pub mutationsPtr: *mut c_ulong, + pub extra: [c_ulong; 5], + } +); + +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)] + pub struct NSEnumerator { + _inner0: PhantomData<*mut ObjectType>, + } + + unsafe impl ClassType for NSEnumerator { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSEnumerator { + #[method_id(@__retain_semantics Other nextObject)] + pub unsafe fn nextObject(&self) -> Option>; + } +); + +extern_methods!( + /// NSExtendedEnumerator + unsafe impl NSEnumerator { + #[method_id(@__retain_semantics Other allObjects)] + pub unsafe fn allObjects(&self) -> Id, Shared>; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSError.rs b/crates/icrate-generated/src/Foundation/generated/NSError.rs new file mode 100644 index 000000000..d352509c2 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSError.rs @@ -0,0 +1,133 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +pub type NSErrorDomain = NSString; + +extern_static!(NSCocoaErrorDomain: &'static NSErrorDomain); + +extern_static!(NSPOSIXErrorDomain: &'static NSErrorDomain); + +extern_static!(NSOSStatusErrorDomain: &'static NSErrorDomain); + +extern_static!(NSMachErrorDomain: &'static NSErrorDomain); + +pub type NSErrorUserInfoKey = NSString; + +extern_static!(NSUnderlyingErrorKey: &'static NSErrorUserInfoKey); + +extern_static!(NSMultipleUnderlyingErrorsKey: &'static NSErrorUserInfoKey); + +extern_static!(NSLocalizedDescriptionKey: &'static NSErrorUserInfoKey); + +extern_static!(NSLocalizedFailureReasonErrorKey: &'static NSErrorUserInfoKey); + +extern_static!(NSLocalizedRecoverySuggestionErrorKey: &'static NSErrorUserInfoKey); + +extern_static!(NSLocalizedRecoveryOptionsErrorKey: &'static NSErrorUserInfoKey); + +extern_static!(NSRecoveryAttempterErrorKey: &'static NSErrorUserInfoKey); + +extern_static!(NSHelpAnchorErrorKey: &'static NSErrorUserInfoKey); + +extern_static!(NSDebugDescriptionErrorKey: &'static NSErrorUserInfoKey); + +extern_static!(NSLocalizedFailureErrorKey: &'static NSErrorUserInfoKey); + +extern_static!(NSStringEncodingErrorKey: &'static NSErrorUserInfoKey); + +extern_static!(NSURLErrorKey: &'static NSErrorUserInfoKey); + +extern_static!(NSFilePathErrorKey: &'static NSErrorUserInfoKey); + +extern_class!( + #[derive(Debug)] + pub struct NSError; + + unsafe impl ClassType for NSError { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSError { + #[method_id(@__retain_semantics Init initWithDomain:code:userInfo:)] + pub unsafe fn initWithDomain_code_userInfo( + this: Option>, + domain: &NSErrorDomain, + code: NSInteger, + dict: Option<&NSDictionary>, + ) -> Id; + + #[method_id(@__retain_semantics Other errorWithDomain:code:userInfo:)] + pub unsafe fn errorWithDomain_code_userInfo( + domain: &NSErrorDomain, + code: NSInteger, + dict: Option<&NSDictionary>, + ) -> Id; + + #[method_id(@__retain_semantics Other domain)] + pub unsafe fn domain(&self) -> Id; + + #[method(code)] + pub unsafe fn code(&self) -> NSInteger; + + #[method_id(@__retain_semantics Other userInfo)] + pub unsafe fn userInfo(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other localizedDescription)] + pub unsafe fn localizedDescription(&self) -> Id; + + #[method_id(@__retain_semantics Other localizedFailureReason)] + pub unsafe fn localizedFailureReason(&self) -> Option>; + + #[method_id(@__retain_semantics Other localizedRecoverySuggestion)] + pub unsafe fn localizedRecoverySuggestion(&self) -> Option>; + + #[method_id(@__retain_semantics Other localizedRecoveryOptions)] + pub unsafe fn localizedRecoveryOptions(&self) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other recoveryAttempter)] + pub unsafe fn recoveryAttempter(&self) -> Option>; + + #[method_id(@__retain_semantics Other helpAnchor)] + pub unsafe fn helpAnchor(&self) -> Option>; + + #[method_id(@__retain_semantics Other underlyingErrors)] + pub unsafe fn underlyingErrors(&self) -> Id, Shared>; + + #[method(setUserInfoValueProviderForDomain:provider:)] + pub unsafe fn setUserInfoValueProviderForDomain_provider( + errorDomain: &NSErrorDomain, + provider: Option<&Block<(NonNull, NonNull), *mut Object>>, + ); + + #[method(userInfoValueProviderForDomain:)] + pub unsafe fn userInfoValueProviderForDomain( + errorDomain: &NSErrorDomain, + ) -> *mut Block<(NonNull, NonNull), *mut Object>; + } +); + +extern_methods!( + /// NSErrorRecoveryAttempting + unsafe impl NSObject { + #[method(attemptRecoveryFromError:optionIndex:delegate:didRecoverSelector:contextInfo:)] + pub unsafe fn attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo( + &self, + error: &NSError, + recoveryOptionIndex: NSUInteger, + delegate: Option<&Object>, + didRecoverSelector: OptionSel, + contextInfo: *mut c_void, + ); + + #[method(attemptRecoveryFromError:optionIndex:)] + pub unsafe fn attemptRecoveryFromError_optionIndex( + &self, + error: &NSError, + recoveryOptionIndex: NSUInteger, + ) -> bool; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSException.rs b/crates/icrate-generated/src/Foundation/generated/NSException.rs new file mode 100644 index 000000000..cc61104b3 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSException.rs @@ -0,0 +1,113 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +extern_static!(NSGenericException: &'static NSExceptionName); + +extern_static!(NSRangeException: &'static NSExceptionName); + +extern_static!(NSInvalidArgumentException: &'static NSExceptionName); + +extern_static!(NSInternalInconsistencyException: &'static NSExceptionName); + +extern_static!(NSMallocException: &'static NSExceptionName); + +extern_static!(NSObjectInaccessibleException: &'static NSExceptionName); + +extern_static!(NSObjectNotAvailableException: &'static NSExceptionName); + +extern_static!(NSDestinationInvalidException: &'static NSExceptionName); + +extern_static!(NSPortTimeoutException: &'static NSExceptionName); + +extern_static!(NSInvalidSendPortException: &'static NSExceptionName); + +extern_static!(NSInvalidReceivePortException: &'static NSExceptionName); + +extern_static!(NSPortSendException: &'static NSExceptionName); + +extern_static!(NSPortReceiveException: &'static NSExceptionName); + +extern_static!(NSOldStyleException: &'static NSExceptionName); + +extern_static!(NSInconsistentArchiveException: &'static NSExceptionName); + +extern_class!( + #[derive(Debug)] + pub struct NSException; + + unsafe impl ClassType for NSException { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSException { + #[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(@__retain_semantics Init initWithName:reason:userInfo:)] + pub unsafe fn initWithName_reason_userInfo( + this: Option>, + aName: &NSExceptionName, + aReason: Option<&NSString>, + aUserInfo: Option<&NSDictionary>, + ) -> Id; + + #[method_id(@__retain_semantics Other name)] + pub unsafe fn name(&self) -> Id; + + #[method_id(@__retain_semantics Other reason)] + pub unsafe fn reason(&self) -> Option>; + + #[method_id(@__retain_semantics Other userInfo)] + pub unsafe fn userInfo(&self) -> Option>; + + #[method_id(@__retain_semantics Other callStackReturnAddresses)] + pub unsafe fn callStackReturnAddresses(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other callStackSymbols)] + pub unsafe fn callStackSymbols(&self) -> Id, Shared>; + + #[method(raise)] + pub unsafe fn raise(&self); + } +); + +extern_methods!( + /// NSExceptionRaisingConveniences + unsafe impl NSException {} +); + +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!( + #[derive(Debug)] + pub struct NSAssertionHandler; + + unsafe impl ClassType for NSAssertionHandler { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSAssertionHandler { + #[method_id(@__retain_semantics Other currentHandler)] + pub unsafe fn currentHandler() -> Id; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSExpression.rs b/crates/icrate-generated/src/Foundation/generated/NSExpression.rs new file mode 100644 index 000000000..7e9b215ee --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSExpression.rs @@ -0,0 +1,195 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +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)] + pub struct NSExpression; + + unsafe impl ClassType for NSExpression { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSExpression { + #[method_id(@__retain_semantics Other expressionWithFormat:argumentArray:)] + pub unsafe fn expressionWithFormat_argumentArray( + expressionFormat: &NSString, + arguments: &NSArray, + ) -> Id; + + #[method_id(@__retain_semantics Other expressionForConstantValue:)] + pub unsafe fn expressionForConstantValue(obj: Option<&Object>) -> Id; + + #[method_id(@__retain_semantics Other expressionForEvaluatedObject)] + pub unsafe fn expressionForEvaluatedObject() -> Id; + + #[method_id(@__retain_semantics Other expressionForVariable:)] + pub unsafe fn expressionForVariable(string: &NSString) -> Id; + + #[method_id(@__retain_semantics Other expressionForKeyPath:)] + pub unsafe fn expressionForKeyPath(keyPath: &NSString) -> Id; + + #[method_id(@__retain_semantics Other expressionForFunction:arguments:)] + pub unsafe fn expressionForFunction_arguments( + name: &NSString, + parameters: &NSArray, + ) -> Id; + + #[method_id(@__retain_semantics Other expressionForAggregate:)] + pub unsafe fn expressionForAggregate( + subexpressions: &NSArray, + ) -> Id; + + #[method_id(@__retain_semantics Other expressionForUnionSet:with:)] + pub unsafe fn expressionForUnionSet_with( + left: &NSExpression, + right: &NSExpression, + ) -> Id; + + #[method_id(@__retain_semantics Other expressionForIntersectSet:with:)] + pub unsafe fn expressionForIntersectSet_with( + left: &NSExpression, + right: &NSExpression, + ) -> Id; + + #[method_id(@__retain_semantics Other expressionForMinusSet:with:)] + pub unsafe fn expressionForMinusSet_with( + left: &NSExpression, + right: &NSExpression, + ) -> Id; + + #[method_id(@__retain_semantics Other expressionForSubquery:usingIteratorVariable:predicate:)] + pub unsafe fn expressionForSubquery_usingIteratorVariable_predicate( + expression: &NSExpression, + variable: &NSString, + predicate: &NSPredicate, + ) -> Id; + + #[method_id(@__retain_semantics Other expressionForFunction:selectorName:arguments:)] + pub unsafe fn expressionForFunction_selectorName_arguments( + target: &NSExpression, + name: &NSString, + parameters: Option<&NSArray>, + ) -> Id; + + #[method_id(@__retain_semantics Other expressionForAnyKey)] + pub unsafe fn expressionForAnyKey() -> Id; + + #[method_id(@__retain_semantics Other expressionForBlock:arguments:)] + pub unsafe fn expressionForBlock_arguments( + block: &Block< + ( + *mut Object, + NonNull>, + *mut NSMutableDictionary, + ), + NonNull, + >, + arguments: Option<&NSArray>, + ) -> Id; + + #[method_id(@__retain_semantics Other expressionForConditional:trueExpression:falseExpression:)] + pub unsafe fn expressionForConditional_trueExpression_falseExpression( + predicate: &NSPredicate, + trueExpression: &NSExpression, + falseExpression: &NSExpression, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithExpressionType:)] + pub unsafe fn initWithExpressionType( + this: Option>, + type_: NSExpressionType, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; + + #[method(expressionType)] + pub unsafe fn expressionType(&self) -> NSExpressionType; + + #[method_id(@__retain_semantics Other constantValue)] + pub unsafe fn constantValue(&self) -> Option>; + + #[method_id(@__retain_semantics Other keyPath)] + pub unsafe fn keyPath(&self) -> Id; + + #[method_id(@__retain_semantics Other function)] + pub unsafe fn function(&self) -> Id; + + #[method_id(@__retain_semantics Other variable)] + pub unsafe fn variable(&self) -> Id; + + #[method_id(@__retain_semantics Other operand)] + pub unsafe fn operand(&self) -> Id; + + #[method_id(@__retain_semantics Other arguments)] + pub unsafe fn arguments(&self) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other collection)] + pub unsafe fn collection(&self) -> Id; + + #[method_id(@__retain_semantics Other predicate)] + pub unsafe fn predicate(&self) -> Id; + + #[method_id(@__retain_semantics Other leftExpression)] + pub unsafe fn leftExpression(&self) -> Id; + + #[method_id(@__retain_semantics Other rightExpression)] + pub unsafe fn rightExpression(&self) -> Id; + + #[method_id(@__retain_semantics Other trueExpression)] + pub unsafe fn trueExpression(&self) -> Id; + + #[method_id(@__retain_semantics Other falseExpression)] + pub unsafe fn falseExpression(&self) -> Id; + + #[method(expressionBlock)] + 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( + &self, + object: Option<&Object>, + context: Option<&NSMutableDictionary>, + ) -> Option>; + + #[method(allowEvaluation)] + pub unsafe fn allowEvaluation(&self); + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSExtensionContext.rs b/crates/icrate-generated/src/Foundation/generated/NSExtensionContext.rs new file mode 100644 index 000000000..d7eb76c8e --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSExtensionContext.rs @@ -0,0 +1,47 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSExtensionContext; + + unsafe impl ClassType for NSExtensionContext { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSExtensionContext { + #[method_id(@__retain_semantics Other inputItems)] + pub unsafe fn inputItems(&self) -> Id; + + #[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); + + #[method(openURL:completionHandler:)] + pub unsafe fn openURL_completionHandler( + &self, + URL: &NSURL, + completionHandler: Option<&Block<(Bool,), ()>>, + ); + } +); + +extern_static!(NSExtensionItemsAndErrorsKey: Option<&'static NSString>); + +extern_static!(NSExtensionHostWillEnterForegroundNotification: Option<&'static NSString>); + +extern_static!(NSExtensionHostDidEnterBackgroundNotification: Option<&'static NSString>); + +extern_static!(NSExtensionHostWillResignActiveNotification: Option<&'static NSString>); + +extern_static!(NSExtensionHostDidBecomeActiveNotification: Option<&'static NSString>); diff --git a/crates/icrate-generated/src/Foundation/generated/NSExtensionItem.rs b/crates/icrate-generated/src/Foundation/generated/NSExtensionItem.rs new file mode 100644 index 000000000..820cbac22 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSExtensionItem.rs @@ -0,0 +1,50 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSExtensionItem; + + unsafe impl ClassType for NSExtensionItem { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSExtensionItem { + #[method_id(@__retain_semantics Other attributedTitle)] + pub unsafe fn attributedTitle(&self) -> Option>; + + #[method(setAttributedTitle:)] + pub unsafe fn setAttributedTitle(&self, attributedTitle: Option<&NSAttributedString>); + + #[method_id(@__retain_semantics Other attributedContentText)] + pub unsafe fn attributedContentText(&self) -> Option>; + + #[method(setAttributedContentText:)] + pub unsafe fn setAttributedContentText( + &self, + attributedContentText: Option<&NSAttributedString>, + ); + + #[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(@__retain_semantics Other userInfo)] + pub unsafe fn userInfo(&self) -> Option>; + + #[method(setUserInfo:)] + pub unsafe fn setUserInfo(&self, userInfo: Option<&NSDictionary>); + } +); + +extern_static!(NSExtensionItemAttributedTitleKey: Option<&'static NSString>); + +extern_static!(NSExtensionItemAttributedContentTextKey: Option<&'static NSString>); + +extern_static!(NSExtensionItemAttachmentsKey: Option<&'static NSString>); diff --git a/crates/icrate-generated/src/Foundation/generated/NSExtensionRequestHandling.rs b/crates/icrate-generated/src/Foundation/generated/NSExtensionRequestHandling.rs new file mode 100644 index 000000000..2efdff0b6 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSExtensionRequestHandling.rs @@ -0,0 +1,13 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +extern_protocol!( + pub struct NSExtensionRequestHandling; + + unsafe impl NSExtensionRequestHandling { + #[method(beginRequestWithExtensionContext:)] + pub unsafe fn beginRequestWithExtensionContext(&self, context: &NSExtensionContext); + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSFileCoordinator.rs b/crates/icrate-generated/src/Foundation/generated/NSFileCoordinator.rs new file mode 100644 index 000000000..005a49170 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSFileCoordinator.rs @@ -0,0 +1,162 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +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)] + pub struct NSFileAccessIntent; + + unsafe impl ClassType for NSFileAccessIntent { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSFileAccessIntent { + #[method_id(@__retain_semantics Other readingIntentWithURL:options:)] + pub unsafe fn readingIntentWithURL_options( + url: &NSURL, + options: NSFileCoordinatorReadingOptions, + ) -> Id; + + #[method_id(@__retain_semantics Other writingIntentWithURL:options:)] + pub unsafe fn writingIntentWithURL_options( + url: &NSURL, + options: NSFileCoordinatorWritingOptions, + ) -> Id; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other filePresenters)] + pub unsafe fn filePresenters() -> Id, Shared>; + + #[method_id(@__retain_semantics Init initWithFilePresenter:)] + pub unsafe fn initWithFilePresenter( + this: Option>, + filePresenterOrNil: Option<&NSFilePresenter>, + ) -> Id; + + #[method_id(@__retain_semantics Other 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: &Block<(*mut NSError,), ()>, + ); + + #[method(coordinateReadingItemAtURL:options:error:byAccessor:)] + pub unsafe fn coordinateReadingItemAtURL_options_error_byAccessor( + &self, + url: &NSURL, + options: NSFileCoordinatorReadingOptions, + outError: *mut *mut NSError, + reader: &Block<(NonNull,), ()>, + ); + + #[method(coordinateWritingItemAtURL:options:error:byAccessor:)] + pub unsafe fn coordinateWritingItemAtURL_options_error_byAccessor( + &self, + url: &NSURL, + options: NSFileCoordinatorWritingOptions, + outError: *mut *mut NSError, + writer: &Block<(NonNull,), ()>, + ); + + #[method(coordinateReadingItemAtURL:options:writingItemAtURL:options:error:byAccessor:)] + pub unsafe fn coordinateReadingItemAtURL_options_writingItemAtURL_options_error_byAccessor( + &self, + readingURL: &NSURL, + readingOptions: NSFileCoordinatorReadingOptions, + writingURL: &NSURL, + writingOptions: NSFileCoordinatorWritingOptions, + outError: *mut *mut NSError, + readerWriter: &Block<(NonNull, NonNull), ()>, + ); + + #[method(coordinateWritingItemAtURL:options:writingItemAtURL:options:error:byAccessor:)] + pub unsafe fn coordinateWritingItemAtURL_options_writingItemAtURL_options_error_byAccessor( + &self, + url1: &NSURL, + options1: NSFileCoordinatorWritingOptions, + url2: &NSURL, + options2: NSFileCoordinatorWritingOptions, + outError: *mut *mut NSError, + writer: &Block<(NonNull, NonNull), ()>, + ); + + #[method(prepareForReadingItemsAtURLs:options:writingItemsAtURLs:options:error:byAccessor:)] + pub unsafe fn prepareForReadingItemsAtURLs_options_writingItemsAtURLs_options_error_byAccessor( + &self, + readingURLs: &NSArray, + readingOptions: NSFileCoordinatorReadingOptions, + writingURLs: &NSArray, + writingOptions: NSFileCoordinatorWritingOptions, + outError: *mut *mut NSError, + batchAccessor: &Block<(NonNull>,), ()>, + ); + + #[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-generated/src/Foundation/generated/NSFileHandle.rs b/crates/icrate-generated/src/Foundation/generated/NSFileHandle.rs new file mode 100644 index 000000000..55661d793 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSFileHandle.rs @@ -0,0 +1,260 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSFileHandle; + + unsafe impl ClassType for NSFileHandle { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSFileHandle { + #[method_id(@__retain_semantics Other availableData)] + pub unsafe fn availableData(&self) -> Id; + + #[method_id(@__retain_semantics Init initWithFileDescriptor:closeOnDealloc:)] + pub unsafe fn initWithFileDescriptor_closeOnDealloc( + this: Option>, + fd: c_int, + closeopt: bool, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; + + #[method_id(@__retain_semantics Other readDataToEndOfFileAndReturnError:)] + pub unsafe fn readDataToEndOfFileAndReturnError( + &self, + ) -> Result, Id>; + + #[method_id(@__retain_semantics Other 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!( + /// NSFileHandleCreation + unsafe impl NSFileHandle { + #[method_id(@__retain_semantics Other fileHandleWithStandardInput)] + pub unsafe fn fileHandleWithStandardInput() -> Id; + + #[method_id(@__retain_semantics Other fileHandleWithStandardOutput)] + pub unsafe fn fileHandleWithStandardOutput() -> Id; + + #[method_id(@__retain_semantics Other fileHandleWithStandardError)] + pub unsafe fn fileHandleWithStandardError() -> Id; + + #[method_id(@__retain_semantics Other fileHandleWithNullDevice)] + pub unsafe fn fileHandleWithNullDevice() -> Id; + + #[method_id(@__retain_semantics Other fileHandleForReadingAtPath:)] + pub unsafe fn fileHandleForReadingAtPath(path: &NSString) -> Option>; + + #[method_id(@__retain_semantics Other fileHandleForWritingAtPath:)] + pub unsafe fn fileHandleForWritingAtPath(path: &NSString) -> Option>; + + #[method_id(@__retain_semantics Other fileHandleForUpdatingAtPath:)] + pub unsafe fn fileHandleForUpdatingAtPath(path: &NSString) -> Option>; + + #[method_id(@__retain_semantics Other fileHandleForReadingFromURL:error:)] + pub unsafe fn fileHandleForReadingFromURL_error( + url: &NSURL, + ) -> Result, Id>; + + #[method_id(@__retain_semantics Other fileHandleForWritingToURL:error:)] + pub unsafe fn fileHandleForWritingToURL_error( + url: &NSURL, + ) -> Result, Id>; + + #[method_id(@__retain_semantics Other fileHandleForUpdatingURL:error:)] + pub unsafe fn fileHandleForUpdatingURL_error( + url: &NSURL, + ) -> Result, Id>; + } +); + +extern_static!(NSFileHandleOperationException: &'static NSExceptionName); + +extern_static!(NSFileHandleReadCompletionNotification: &'static NSNotificationName); + +extern_static!(NSFileHandleReadToEndOfFileCompletionNotification: &'static NSNotificationName); + +extern_static!(NSFileHandleConnectionAcceptedNotification: &'static NSNotificationName); + +extern_static!(NSFileHandleDataAvailableNotification: &'static NSNotificationName); + +extern_static!(NSFileHandleNotificationDataItem: &'static NSString); + +extern_static!(NSFileHandleNotificationFileHandleItem: &'static NSString); + +extern_static!(NSFileHandleNotificationMonitorModes: &'static NSString); + +extern_methods!( + /// 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) -> *mut Block<(NonNull,), ()>; + + #[method(setReadabilityHandler:)] + pub unsafe fn setReadabilityHandler( + &self, + readabilityHandler: Option<&Block<(NonNull,), ()>>, + ); + + #[method(writeabilityHandler)] + pub unsafe fn writeabilityHandler(&self) -> *mut Block<(NonNull,), ()>; + + #[method(setWriteabilityHandler:)] + pub unsafe fn setWriteabilityHandler( + &self, + writeabilityHandler: Option<&Block<(NonNull,), ()>>, + ); + } +); + +extern_methods!( + /// NSFileHandlePlatformSpecific + unsafe impl NSFileHandle { + #[method_id(@__retain_semantics Init initWithFileDescriptor:)] + pub unsafe fn initWithFileDescriptor( + this: Option>, + fd: c_int, + ) -> Id; + + #[method(fileDescriptor)] + pub unsafe fn fileDescriptor(&self) -> c_int; + } +); + +extern_methods!( + unsafe impl NSFileHandle { + #[method_id(@__retain_semantics Other readDataToEndOfFile)] + pub unsafe fn readDataToEndOfFile(&self) -> Id; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other fileHandleForReading)] + pub unsafe fn fileHandleForReading(&self) -> Id; + + #[method_id(@__retain_semantics Other fileHandleForWriting)] + pub unsafe fn fileHandleForWriting(&self) -> Id; + + #[method_id(@__retain_semantics Other pipe)] + pub unsafe fn pipe() -> Id; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSFileManager.rs b/crates/icrate-generated/src/Foundation/generated/NSFileManager.rs new file mode 100644 index 000000000..25747648c --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSFileManager.rs @@ -0,0 +1,829 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +pub type NSFileAttributeKey = NSString; + +pub type NSFileAttributeType = NSString; + +pub type NSFileProtectionType = NSString; + +pub type NSFileProviderServiceName = NSString; + +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)] + pub struct NSFileManager; + + unsafe impl ClassType for NSFileManager { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSFileManager { + #[method_id(@__retain_semantics Other defaultManager)] + pub unsafe fn defaultManager() -> Id; + + #[method_id(@__retain_semantics Other 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, + url: &NSURL, + mask: NSFileManagerUnmountOptions, + completionHandler: &Block<(*mut NSError,), ()>, + ); + + #[method_id(@__retain_semantics Other contentsOfDirectoryAtURL:includingPropertiesForKeys:options:error:)] + pub unsafe fn contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error( + &self, + url: &NSURL, + keys: Option<&NSArray>, + mask: NSDirectoryEnumerationOptions, + ) -> Result, Shared>, Id>; + + #[method_id(@__retain_semantics Other URLsForDirectory:inDomains:)] + pub unsafe fn URLsForDirectory_inDomains( + &self, + directory: NSSearchPathDirectory, + domainMask: NSSearchPathDomainMask, + ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other 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>; + + #[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:)] + pub unsafe fn getRelationship_ofDirectory_inDomain_toItemAtURL_error( + &self, + outRelationship: NonNull, + directory: NSSearchPathDirectory, + domainMask: NSSearchPathDomainMask, + url: &NSURL, + ) -> Result<(), Id>; + + #[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:)] + pub unsafe fn createSymbolicLinkAtURL_withDestinationURL_error( + &self, + url: &NSURL, + destURL: &NSURL, + ) -> Result<(), Id>; + + #[method_id(@__retain_semantics Other 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, + path: &NSString, + createIntermediates: bool, + attributes: Option<&NSDictionary>, + ) -> Result<(), Id>; + + #[method_id(@__retain_semantics Other contentsOfDirectoryAtPath:error:)] + pub unsafe fn contentsOfDirectoryAtPath_error( + &self, + path: &NSString, + ) -> Result, Shared>, Id>; + + #[method_id(@__retain_semantics Other subpathsOfDirectoryAtPath:error:)] + pub unsafe fn subpathsOfDirectoryAtPath_error( + &self, + path: &NSString, + ) -> Result, Shared>, Id>; + + #[method_id(@__retain_semantics Other attributesOfItemAtPath:error:)] + pub unsafe fn attributesOfItemAtPath_error( + &self, + path: &NSString, + ) -> Result, Shared>, Id>; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other 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: *mut *mut NSURL, + ) -> Result<(), Id>; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other directoryContentsAtPath:)] + pub unsafe fn directoryContentsAtPath( + &self, + path: &NSString, + ) -> Option>; + + #[method_id(@__retain_semantics Other fileSystemAttributesAtPath:)] + pub unsafe fn fileSystemAttributesAtPath( + &self, + path: &NSString, + ) -> Option>; + + #[method_id(@__retain_semantics Other 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_id(@__retain_semantics Other 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(@__retain_semantics Other displayNameAtPath:)] + pub unsafe fn displayNameAtPath(&self, path: &NSString) -> Id; + + #[method_id(@__retain_semantics Other componentsToDisplayForPath:)] + pub unsafe fn componentsToDisplayForPath( + &self, + path: &NSString, + ) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other enumeratorAtPath:)] + pub unsafe fn enumeratorAtPath( + &self, + path: &NSString, + ) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other enumeratorAtURL:includingPropertiesForKeys:options:errorHandler:)] + pub unsafe fn enumeratorAtURL_includingPropertiesForKeys_options_errorHandler( + &self, + url: &NSURL, + keys: Option<&NSArray>, + mask: NSDirectoryEnumerationOptions, + handler: Option<&Block<(NonNull, NonNull), Bool>>, + ) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other subpathsAtPath:)] + pub unsafe fn subpathsAtPath( + &self, + path: &NSString, + ) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other 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; + + #[method(fileSystemRepresentationWithPath:)] + pub unsafe fn fileSystemRepresentationWithPath(&self, path: &NSString) -> NonNull; + + #[method_id(@__retain_semantics Other 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, + originalItemURL: &NSURL, + newItemURL: &NSURL, + backupItemName: Option<&NSString>, + options: NSFileManagerItemReplacementOptions, + resultingURL: *mut *mut NSURL, + ) -> Result<(), Id>; + + #[method(setUbiquitous:itemAtURL:destinationURL:error:)] + pub unsafe fn setUbiquitous_itemAtURL_destinationURL_error( + &self, + flag: bool, + 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(@__retain_semantics Other URLForUbiquityContainerIdentifier:)] + pub unsafe fn URLForUbiquityContainerIdentifier( + &self, + containerIdentifier: Option<&NSString>, + ) -> Option>; + + #[method_id(@__retain_semantics Other URLForPublishingUbiquitousItemAtURL:expirationDate:error:)] + pub unsafe fn URLForPublishingUbiquitousItemAtURL_expirationDate_error( + &self, + url: &NSURL, + outDate: *mut *mut NSDate, + ) -> Result, Id>; + + #[method_id(@__retain_semantics Other ubiquityIdentityToken)] + pub unsafe fn ubiquityIdentityToken(&self) -> Option>; + + #[method(getFileProviderServicesForItemAtURL:completionHandler:)] + pub unsafe fn getFileProviderServicesForItemAtURL_completionHandler( + &self, + url: &NSURL, + completionHandler: &Block< + ( + *mut NSDictionary, + *mut NSError, + ), + (), + >, + ); + + #[method_id(@__retain_semantics Other containerURLForSecurityApplicationGroupIdentifier:)] + pub unsafe fn containerURLForSecurityApplicationGroupIdentifier( + &self, + groupIdentifier: &NSString, + ) -> Option>; + } +); + +extern_methods!( + /// NSUserInformation + unsafe impl NSFileManager { + #[method_id(@__retain_semantics Other homeDirectoryForCurrentUser)] + pub unsafe fn homeDirectoryForCurrentUser(&self) -> Id; + + #[method_id(@__retain_semantics Other temporaryDirectory)] + pub unsafe fn temporaryDirectory(&self) -> Id; + + #[method_id(@__retain_semantics Other homeDirectoryForUser:)] + pub unsafe fn homeDirectoryForUser(&self, userName: &NSString) + -> Option>; + } +); + +extern_methods!( + /// NSCopyLinkMoveHandler + unsafe impl NSObject { + #[method(fileManager:shouldProceedAfterError:)] + pub unsafe fn fileManager_shouldProceedAfterError( + &self, + fm: &NSFileManager, + errorInfo: &NSDictionary, + ) -> bool; + + #[method(fileManager:willProcessPath:)] + pub unsafe fn fileManager_willProcessPath(&self, fm: &NSFileManager, path: &NSString); + } +); + +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)] + pub struct NSDirectoryEnumerator { + _inner0: PhantomData<*mut ObjectType>, + } + + unsafe impl ClassType for NSDirectoryEnumerator { + type Super = NSEnumerator; + } +); + +extern_methods!( + unsafe impl NSDirectoryEnumerator { + #[method_id(@__retain_semantics Other fileAttributes)] + pub unsafe fn fileAttributes( + &self, + ) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other 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:)] + pub unsafe fn getFileProviderConnectionWithCompletionHandler( + &self, + completionHandler: &Block<(*mut NSXPCConnection, *mut NSError), ()>, + ); + + #[method_id(@__retain_semantics Other name)] + pub unsafe fn name(&self) -> Id; + } +); + +extern_static!(NSFileType: &'static NSFileAttributeKey); + +extern_static!(NSFileTypeDirectory: &'static NSFileAttributeType); + +extern_static!(NSFileTypeRegular: &'static NSFileAttributeType); + +extern_static!(NSFileTypeSymbolicLink: &'static NSFileAttributeType); + +extern_static!(NSFileTypeSocket: &'static NSFileAttributeType); + +extern_static!(NSFileTypeCharacterSpecial: &'static NSFileAttributeType); + +extern_static!(NSFileTypeBlockSpecial: &'static NSFileAttributeType); + +extern_static!(NSFileTypeUnknown: &'static NSFileAttributeType); + +extern_static!(NSFileSize: &'static NSFileAttributeKey); + +extern_static!(NSFileModificationDate: &'static NSFileAttributeKey); + +extern_static!(NSFileReferenceCount: &'static NSFileAttributeKey); + +extern_static!(NSFileDeviceIdentifier: &'static NSFileAttributeKey); + +extern_static!(NSFileOwnerAccountName: &'static NSFileAttributeKey); + +extern_static!(NSFileGroupOwnerAccountName: &'static NSFileAttributeKey); + +extern_static!(NSFilePosixPermissions: &'static NSFileAttributeKey); + +extern_static!(NSFileSystemNumber: &'static NSFileAttributeKey); + +extern_static!(NSFileSystemFileNumber: &'static NSFileAttributeKey); + +extern_static!(NSFileExtensionHidden: &'static NSFileAttributeKey); + +extern_static!(NSFileHFSCreatorCode: &'static NSFileAttributeKey); + +extern_static!(NSFileHFSTypeCode: &'static NSFileAttributeKey); + +extern_static!(NSFileImmutable: &'static NSFileAttributeKey); + +extern_static!(NSFileAppendOnly: &'static NSFileAttributeKey); + +extern_static!(NSFileCreationDate: &'static NSFileAttributeKey); + +extern_static!(NSFileOwnerAccountID: &'static NSFileAttributeKey); + +extern_static!(NSFileGroupOwnerAccountID: &'static NSFileAttributeKey); + +extern_static!(NSFileBusy: &'static NSFileAttributeKey); + +extern_static!(NSFileProtectionKey: &'static NSFileAttributeKey); + +extern_static!(NSFileProtectionNone: &'static NSFileProtectionType); + +extern_static!(NSFileProtectionComplete: &'static NSFileProtectionType); + +extern_static!(NSFileProtectionCompleteUnlessOpen: &'static NSFileProtectionType); + +extern_static!(NSFileProtectionCompleteUntilFirstUserAuthentication: &'static NSFileProtectionType); + +extern_static!(NSFileSystemSize: &'static NSFileAttributeKey); + +extern_static!(NSFileSystemFreeSize: &'static NSFileAttributeKey); + +extern_static!(NSFileSystemNodes: &'static NSFileAttributeKey); + +extern_static!(NSFileSystemFreeNodes: &'static NSFileAttributeKey); + +extern_methods!( + /// NSFileAttributes + unsafe impl NSDictionary { + #[method(fileSize)] + pub unsafe fn fileSize(&self) -> c_ulonglong; + + #[method_id(@__retain_semantics Other fileModificationDate)] + pub unsafe fn fileModificationDate(&self) -> Option>; + + #[method_id(@__retain_semantics Other fileType)] + pub unsafe fn fileType(&self) -> Option>; + + #[method(filePosixPermissions)] + pub unsafe fn filePosixPermissions(&self) -> NSUInteger; + + #[method_id(@__retain_semantics Other fileOwnerAccountName)] + pub unsafe fn fileOwnerAccountName(&self) -> Option>; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other fileCreationDate)] + pub unsafe fn fileCreationDate(&self) -> Option>; + + #[method_id(@__retain_semantics Other fileOwnerAccountID)] + pub unsafe fn fileOwnerAccountID(&self) -> Option>; + + #[method_id(@__retain_semantics Other fileGroupOwnerAccountID)] + pub unsafe fn fileGroupOwnerAccountID(&self) -> Option>; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSFilePresenter.rs b/crates/icrate-generated/src/Foundation/generated/NSFilePresenter.rs new file mode 100644 index 000000000..692cac802 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSFilePresenter.rs @@ -0,0 +1,125 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +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-generated/src/Foundation/generated/NSFileVersion.rs b/crates/icrate-generated/src/Foundation/generated/NSFileVersion.rs new file mode 100644 index 000000000..c0f4be513 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSFileVersion.rs @@ -0,0 +1,123 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSFileVersionAddingOptions { + NSFileVersionAddingByMoving = 1 << 0, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSFileVersionReplacingOptions { + NSFileVersionReplacingByMoving = 1 << 0, + } +); + +extern_class!( + #[derive(Debug)] + pub struct NSFileVersion; + + unsafe impl ClassType for NSFileVersion { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSFileVersion { + #[method_id(@__retain_semantics Other currentVersionOfItemAtURL:)] + pub unsafe fn currentVersionOfItemAtURL(url: &NSURL) -> Option>; + + #[method_id(@__retain_semantics Other otherVersionsOfItemAtURL:)] + pub unsafe fn otherVersionsOfItemAtURL( + url: &NSURL, + ) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other unresolvedConflictVersionsOfItemAtURL:)] + pub unsafe fn unresolvedConflictVersionsOfItemAtURL( + url: &NSURL, + ) -> Option, Shared>>; + + #[method(getNonlocalVersionsOfItemAtURL:completionHandler:)] + pub unsafe fn getNonlocalVersionsOfItemAtURL_completionHandler( + url: &NSURL, + completionHandler: &Block<(*mut NSArray, *mut NSError), ()>, + ); + + #[method_id(@__retain_semantics Other versionOfItemAtURL:forPersistentIdentifier:)] + pub unsafe fn versionOfItemAtURL_forPersistentIdentifier( + url: &NSURL, + persistentIdentifier: &Object, + ) -> Option>; + + #[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(@__retain_semantics Other temporaryDirectoryURLForNewVersionOfItemAtURL:)] + pub unsafe fn temporaryDirectoryURLForNewVersionOfItemAtURL( + url: &NSURL, + ) -> Id; + + #[method_id(@__retain_semantics Other URL)] + pub unsafe fn URL(&self) -> Id; + + #[method_id(@__retain_semantics Other localizedName)] + pub unsafe fn localizedName(&self) -> Option>; + + #[method_id(@__retain_semantics Other localizedNameOfSavingComputer)] + pub unsafe fn localizedNameOfSavingComputer(&self) -> Option>; + + #[method_id(@__retain_semantics Other originatorNameComponents)] + pub unsafe fn originatorNameComponents(&self) + -> Option>; + + #[method_id(@__retain_semantics Other modificationDate)] + pub unsafe fn modificationDate(&self) -> Option>; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other 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, + ) -> Result<(), Id>; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSFileWrapper.rs b/crates/icrate-generated/src/Foundation/generated/NSFileWrapper.rs new file mode 100644 index 000000000..6307af0b4 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSFileWrapper.rs @@ -0,0 +1,148 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSFileWrapperReadingOptions { + NSFileWrapperReadingImmediate = 1 << 0, + NSFileWrapperReadingWithoutMapping = 1 << 1, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSFileWrapperWritingOptions { + NSFileWrapperWritingAtomic = 1 << 0, + NSFileWrapperWritingWithNameUpdating = 1 << 1, + } +); + +extern_class!( + #[derive(Debug)] + pub struct NSFileWrapper; + + unsafe impl ClassType for NSFileWrapper { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSFileWrapper { + #[method_id(@__retain_semantics Init initWithURL:options:error:)] + pub unsafe fn initWithURL_options_error( + this: Option>, + url: &NSURL, + options: NSFileWrapperReadingOptions, + ) -> Result, Id>; + + #[method_id(@__retain_semantics Init initDirectoryWithFileWrappers:)] + pub unsafe fn initDirectoryWithFileWrappers( + this: Option>, + childrenByPreferredName: &NSDictionary, + ) -> Id; + + #[method_id(@__retain_semantics Init initRegularFileWithContents:)] + pub unsafe fn initRegularFileWithContents( + this: Option>, + contents: &NSData, + ) -> Id; + + #[method_id(@__retain_semantics Init initSymbolicLinkWithDestinationURL:)] + pub unsafe fn initSymbolicLinkWithDestinationURL( + this: Option>, + url: &NSURL, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithSerializedRepresentation:)] + pub unsafe fn initWithSerializedRepresentation( + this: Option>, + serializeRepresentation: &NSData, + ) -> Option>; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder( + this: Option>, + 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(@__retain_semantics Other preferredFilename)] + pub unsafe fn preferredFilename(&self) -> Option>; + + #[method(setPreferredFilename:)] + pub unsafe fn setPreferredFilename(&self, preferredFilename: Option<&NSString>); + + #[method_id(@__retain_semantics Other filename)] + pub unsafe fn filename(&self) -> Option>; + + #[method(setFilename:)] + pub unsafe fn setFilename(&self, filename: Option<&NSString>); + + #[method_id(@__retain_semantics Other 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, + url: &NSURL, + options: NSFileWrapperWritingOptions, + originalContentsURL: Option<&NSURL>, + ) -> Result<(), Id>; + + #[method_id(@__retain_semantics Other serializedRepresentation)] + pub unsafe fn serializedRepresentation(&self) -> Option>; + + #[method_id(@__retain_semantics Other addFileWrapper:)] + pub unsafe fn addFileWrapper(&self, child: &NSFileWrapper) -> Id; + + #[method_id(@__retain_semantics Other addRegularFileWithContents:preferredFilename:)] + pub unsafe fn addRegularFileWithContents_preferredFilename( + &self, + data: &NSData, + fileName: &NSString, + ) -> Id; + + #[method(removeFileWrapper:)] + pub unsafe fn removeFileWrapper(&self, child: &NSFileWrapper); + + #[method_id(@__retain_semantics Other fileWrappers)] + pub unsafe fn fileWrappers( + &self, + ) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other keyForFileWrapper:)] + pub unsafe fn keyForFileWrapper( + &self, + child: &NSFileWrapper, + ) -> Option>; + + #[method_id(@__retain_semantics Other regularFileContents)] + pub unsafe fn regularFileContents(&self) -> Option>; + + #[method_id(@__retain_semantics Other symbolicLinkDestinationURL)] + pub unsafe fn symbolicLinkDestinationURL(&self) -> Option>; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSFormatter.rs b/crates/icrate-generated/src/Foundation/generated/NSFormatter.rs new file mode 100644 index 000000000..389d9ee64 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSFormatter.rs @@ -0,0 +1,83 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSFormattingContext { + NSFormattingContextUnknown = 0, + NSFormattingContextDynamic = 1, + NSFormattingContextStandalone = 2, + NSFormattingContextListItem = 3, + NSFormattingContextBeginningOfSentence = 4, + NSFormattingContextMiddleOfSentence = 5, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSFormattingUnitStyle { + NSFormattingUnitStyleShort = 1, + NSFormattingUnitStyleMedium = 2, + NSFormattingUnitStyleLong = 3, + } +); + +extern_class!( + #[derive(Debug)] + pub struct NSFormatter; + + unsafe impl ClassType for NSFormatter { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSFormatter { + #[method_id(@__retain_semantics Other stringForObjectValue:)] + pub unsafe fn stringForObjectValue( + &self, + obj: Option<&Object>, + ) -> Option>; + + #[method_id(@__retain_semantics Other attributedStringForObjectValue:withDefaultAttributes:)] + pub unsafe fn attributedStringForObjectValue_withDefaultAttributes( + &self, + obj: &Object, + attrs: Option<&NSDictionary>, + ) -> Option>; + + #[method_id(@__retain_semantics Other editingStringForObjectValue:)] + pub unsafe fn editingStringForObjectValue( + &self, + obj: &Object, + ) -> Option>; + + #[method(getObjectValue:forString:errorDescription:)] + pub unsafe fn getObjectValue_forString_errorDescription( + &self, + obj: *mut *mut Object, + string: &NSString, + error: *mut *mut NSString, + ) -> bool; + + #[method(isPartialStringValid:newEditingString:errorDescription:)] + pub unsafe fn isPartialStringValid_newEditingString_errorDescription( + &self, + partialString: &NSString, + 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: NonNull>, + proposedSelRangePtr: NSRangePointer, + origString: &NSString, + origSelRange: NSRange, + error: *mut *mut NSString, + ) -> bool; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSHTTPCookie.rs b/crates/icrate-generated/src/Foundation/generated/NSHTTPCookie.rs new file mode 100644 index 000000000..355509633 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSHTTPCookie.rs @@ -0,0 +1,119 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +pub type NSHTTPCookiePropertyKey = NSString; + +pub type NSHTTPCookieStringPolicy = NSString; + +extern_static!(NSHTTPCookieName: &'static NSHTTPCookiePropertyKey); + +extern_static!(NSHTTPCookieValue: &'static NSHTTPCookiePropertyKey); + +extern_static!(NSHTTPCookieOriginURL: &'static NSHTTPCookiePropertyKey); + +extern_static!(NSHTTPCookieVersion: &'static NSHTTPCookiePropertyKey); + +extern_static!(NSHTTPCookieDomain: &'static NSHTTPCookiePropertyKey); + +extern_static!(NSHTTPCookiePath: &'static NSHTTPCookiePropertyKey); + +extern_static!(NSHTTPCookieSecure: &'static NSHTTPCookiePropertyKey); + +extern_static!(NSHTTPCookieExpires: &'static NSHTTPCookiePropertyKey); + +extern_static!(NSHTTPCookieComment: &'static NSHTTPCookiePropertyKey); + +extern_static!(NSHTTPCookieCommentURL: &'static NSHTTPCookiePropertyKey); + +extern_static!(NSHTTPCookieDiscard: &'static NSHTTPCookiePropertyKey); + +extern_static!(NSHTTPCookieMaximumAge: &'static NSHTTPCookiePropertyKey); + +extern_static!(NSHTTPCookiePort: &'static NSHTTPCookiePropertyKey); + +extern_static!(NSHTTPCookieSameSitePolicy: &'static NSHTTPCookiePropertyKey); + +extern_static!(NSHTTPCookieSameSiteLax: &'static NSHTTPCookieStringPolicy); + +extern_static!(NSHTTPCookieSameSiteStrict: &'static NSHTTPCookieStringPolicy); + +extern_class!( + #[derive(Debug)] + pub struct NSHTTPCookie; + + unsafe impl ClassType for NSHTTPCookie { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSHTTPCookie { + #[method_id(@__retain_semantics Init initWithProperties:)] + pub unsafe fn initWithProperties( + this: Option>, + properties: &NSDictionary, + ) -> Option>; + + #[method_id(@__retain_semantics Other cookieWithProperties:)] + pub unsafe fn cookieWithProperties( + properties: &NSDictionary, + ) -> Option>; + + #[method_id(@__retain_semantics Other requestHeaderFieldsWithCookies:)] + pub unsafe fn requestHeaderFieldsWithCookies( + cookies: &NSArray, + ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other cookiesWithResponseHeaderFields:forURL:)] + pub unsafe fn cookiesWithResponseHeaderFields_forURL( + headerFields: &NSDictionary, + URL: &NSURL, + ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other properties)] + pub unsafe fn properties( + &self, + ) -> Option, Shared>>; + + #[method(version)] + pub unsafe fn version(&self) -> NSUInteger; + + #[method_id(@__retain_semantics Other name)] + pub unsafe fn name(&self) -> Id; + + #[method_id(@__retain_semantics Other value)] + pub unsafe fn value(&self) -> Id; + + #[method_id(@__retain_semantics Other expiresDate)] + pub unsafe fn expiresDate(&self) -> Option>; + + #[method(isSessionOnly)] + pub unsafe fn isSessionOnly(&self) -> bool; + + #[method_id(@__retain_semantics Other domain)] + pub unsafe fn domain(&self) -> Id; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other comment)] + pub unsafe fn comment(&self) -> Option>; + + #[method_id(@__retain_semantics Other commentURL)] + pub unsafe fn commentURL(&self) -> Option>; + + #[method_id(@__retain_semantics Other portList)] + pub unsafe fn portList(&self) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other sameSitePolicy)] + pub unsafe fn sameSitePolicy(&self) -> Option>; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSHTTPCookieStorage.rs b/crates/icrate-generated/src/Foundation/generated/NSHTTPCookieStorage.rs new file mode 100644 index 000000000..4535a1971 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSHTTPCookieStorage.rs @@ -0,0 +1,95 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSHTTPCookieAcceptPolicy { + NSHTTPCookieAcceptPolicyAlways = 0, + NSHTTPCookieAcceptPolicyNever = 1, + NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain = 2, + } +); + +extern_class!( + #[derive(Debug)] + pub struct NSHTTPCookieStorage; + + unsafe impl ClassType for NSHTTPCookieStorage { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSHTTPCookieStorage { + #[method_id(@__retain_semantics Other sharedHTTPCookieStorage)] + pub unsafe fn sharedHTTPCookieStorage() -> Id; + + #[method_id(@__retain_semantics Other sharedCookieStorageForGroupContainerIdentifier:)] + pub unsafe fn sharedCookieStorageForGroupContainerIdentifier( + identifier: &NSString, + ) -> Id; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other cookiesForURL:)] + pub unsafe fn cookiesForURL( + &self, + URL: &NSURL, + ) -> Option, Shared>>; + + #[method(setCookies:forURL:mainDocumentURL:)] + pub unsafe fn setCookies_forURL_mainDocumentURL( + &self, + cookies: &NSArray, + 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(@__retain_semantics Other sortedCookiesUsingDescriptors:)] + pub unsafe fn sortedCookiesUsingDescriptors( + &self, + sortOrder: &NSArray, + ) -> Id, Shared>; + } +); + +extern_methods!( + /// NSURLSessionTaskAdditions + unsafe impl NSHTTPCookieStorage { + #[method(storeCookies:forTask:)] + pub unsafe fn storeCookies_forTask( + &self, + cookies: &NSArray, + task: &NSURLSessionTask, + ); + + #[method(getCookiesForTask:completionHandler:)] + pub unsafe fn getCookiesForTask_completionHandler( + &self, + task: &NSURLSessionTask, + completionHandler: &Block<(*mut NSArray,), ()>, + ); + } +); + +extern_static!(NSHTTPCookieManagerAcceptPolicyChangedNotification: &'static NSNotificationName); + +extern_static!(NSHTTPCookieManagerCookiesChangedNotification: &'static NSNotificationName); diff --git a/crates/icrate-generated/src/Foundation/generated/NSHashTable.rs b/crates/icrate-generated/src/Foundation/generated/NSHashTable.rs new file mode 100644 index 000000000..e47065a63 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSHashTable.rs @@ -0,0 +1,227 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +extern_static!(NSHashTableStrongMemory: NSPointerFunctionsOptions = NSPointerFunctionsStrongMemory); + +extern_static!( + NSHashTableZeroingWeakMemory: NSPointerFunctionsOptions = NSPointerFunctionsZeroingWeakMemory +); + +extern_static!(NSHashTableCopyIn: NSPointerFunctionsOptions = NSPointerFunctionsCopyIn); + +extern_static!( + NSHashTableObjectPointerPersonality: NSPointerFunctionsOptions = + NSPointerFunctionsObjectPointerPersonality +); + +extern_static!(NSHashTableWeakMemory: NSPointerFunctionsOptions = NSPointerFunctionsWeakMemory); + +pub type NSHashTableOptions = NSUInteger; + +__inner_extern_class!( + #[derive(Debug)] + pub struct NSHashTable { + _inner0: PhantomData<*mut ObjectType>, + } + + unsafe impl ClassType for NSHashTable { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSHashTable { + #[method_id(@__retain_semantics Init initWithOptions:capacity:)] + pub unsafe fn initWithOptions_capacity( + this: Option>, + options: NSPointerFunctionsOptions, + initialCapacity: NSUInteger, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithPointerFunctions:capacity:)] + pub unsafe fn initWithPointerFunctions_capacity( + this: Option>, + functions: &NSPointerFunctions, + initialCapacity: NSUInteger, + ) -> Id; + + #[method_id(@__retain_semantics Other hashTableWithOptions:)] + pub unsafe fn hashTableWithOptions( + options: NSPointerFunctionsOptions, + ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other hashTableWithWeakObjects)] + pub unsafe fn hashTableWithWeakObjects() -> Id; + + #[method_id(@__retain_semantics Other weakObjectsHashTable)] + pub unsafe fn weakObjectsHashTable() -> Id, Shared>; + + #[method_id(@__retain_semantics Other pointerFunctions)] + pub unsafe fn pointerFunctions(&self) -> Id; + + #[method(count)] + pub unsafe fn count(&self) -> NSUInteger; + + #[method_id(@__retain_semantics Other member:)] + pub unsafe fn member(&self, object: Option<&ObjectType>) -> Option>; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other allObjects)] + pub unsafe fn allObjects(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other setRepresentation)] + pub unsafe fn setRepresentation(&self) -> Id, Shared>; + } +); + +extern_struct!( + pub struct NSHashEnumerator { + _pi: NSUInteger, + _si: NSUInteger, + _bs: *mut c_void, + } +); + +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>, + 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>, + } +); + +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); + +extern_static!(NSNonRetainedObjectHashCallBacks: NSHashTableCallBacks); + +extern_static!(NSObjectHashCallBacks: NSHashTableCallBacks); + +extern_static!(NSOwnedObjectIdentityHashCallBacks: NSHashTableCallBacks); + +extern_static!(NSOwnedPointerHashCallBacks: NSHashTableCallBacks); + +extern_static!(NSPointerToStructHashCallBacks: NSHashTableCallBacks); + +extern_static!(NSIntHashCallBacks: NSHashTableCallBacks); diff --git a/crates/icrate-generated/src/Foundation/generated/NSISO8601DateFormatter.rs b/crates/icrate-generated/src/Foundation/generated/NSISO8601DateFormatter.rs new file mode 100644 index 000000000..6eb915c79 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSISO8601DateFormatter.rs @@ -0,0 +1,65 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +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)] + pub struct NSISO8601DateFormatter; + + unsafe impl ClassType for NSISO8601DateFormatter { + type Super = NSFormatter; + } +); + +extern_methods!( + unsafe impl NSISO8601DateFormatter { + #[method_id(@__retain_semantics Other 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(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method_id(@__retain_semantics Other stringFromDate:)] + pub unsafe fn stringFromDate(&self, date: &NSDate) -> Id; + + #[method_id(@__retain_semantics Other dateFromString:)] + pub unsafe fn dateFromString(&self, string: &NSString) -> Option>; + + #[method_id(@__retain_semantics Other stringFromDate:timeZone:formatOptions:)] + pub unsafe fn stringFromDate_timeZone_formatOptions( + date: &NSDate, + timeZone: &NSTimeZone, + formatOptions: NSISO8601DateFormatOptions, + ) -> Id; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSIndexPath.rs b/crates/icrate-generated/src/Foundation/generated/NSIndexPath.rs new file mode 100644 index 000000000..ef8b1c7bd --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSIndexPath.rs @@ -0,0 +1,65 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSIndexPath; + + unsafe impl ClassType for NSIndexPath { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSIndexPath { + #[method_id(@__retain_semantics Other indexPathWithIndex:)] + pub unsafe fn indexPathWithIndex(index: NSUInteger) -> Id; + + #[method_id(@__retain_semantics Other indexPathWithIndexes:length:)] + pub unsafe fn indexPathWithIndexes_length( + indexes: *mut NSUInteger, + length: NSUInteger, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithIndexes:length:)] + pub unsafe fn initWithIndexes_length( + this: Option>, + indexes: *mut NSUInteger, + length: NSUInteger, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithIndex:)] + pub unsafe fn initWithIndex( + this: Option>, + index: NSUInteger, + ) -> Id; + + #[method_id(@__retain_semantics Other indexPathByAddingIndex:)] + pub unsafe fn indexPathByAddingIndex(&self, index: NSUInteger) -> Id; + + #[method_id(@__retain_semantics Other 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!( + /// NSDeprecated + unsafe impl NSIndexPath { + #[method(getIndexes:)] + pub unsafe fn getIndexes(&self, indexes: NonNull); + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSIndexSet.rs b/crates/icrate-generated/src/Foundation/generated/NSIndexSet.rs new file mode 100644 index 000000000..f1ea134ff --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSIndexSet.rs @@ -0,0 +1,209 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSIndexSet; + + unsafe impl ClassType for NSIndexSet { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSIndexSet { + #[method_id(@__retain_semantics Other indexSet)] + pub unsafe fn indexSet() -> Id; + + #[method_id(@__retain_semantics Other indexSetWithIndex:)] + pub unsafe fn indexSetWithIndex(value: NSUInteger) -> Id; + + #[method_id(@__retain_semantics Other indexSetWithIndexesInRange:)] + pub unsafe fn indexSetWithIndexesInRange(range: NSRange) -> Id; + + #[method_id(@__retain_semantics Init initWithIndexesInRange:)] + pub unsafe fn initWithIndexesInRange( + this: Option>, + range: NSRange, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithIndexSet:)] + pub unsafe fn initWithIndexSet( + this: Option>, + indexSet: &NSIndexSet, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithIndex:)] + pub unsafe fn initWithIndex( + this: Option>, + 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; + + #[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: &Block<(NSUInteger, NonNull), ()>, + ); + + #[method(enumerateIndexesWithOptions:usingBlock:)] + pub unsafe fn enumerateIndexesWithOptions_usingBlock( + &self, + opts: NSEnumerationOptions, + block: &Block<(NSUInteger, NonNull), ()>, + ); + + #[method(enumerateIndexesInRange:options:usingBlock:)] + pub unsafe fn enumerateIndexesInRange_options_usingBlock( + &self, + range: NSRange, + opts: NSEnumerationOptions, + block: &Block<(NSUInteger, NonNull), ()>, + ); + + #[method(indexPassingTest:)] + pub unsafe fn indexPassingTest( + &self, + predicate: &Block<(NSUInteger, NonNull), Bool>, + ) -> NSUInteger; + + #[method(indexWithOptions:passingTest:)] + pub unsafe fn indexWithOptions_passingTest( + &self, + opts: NSEnumerationOptions, + predicate: &Block<(NSUInteger, NonNull), Bool>, + ) -> NSUInteger; + + #[method(indexInRange:options:passingTest:)] + pub unsafe fn indexInRange_options_passingTest( + &self, + range: NSRange, + opts: NSEnumerationOptions, + predicate: &Block<(NSUInteger, NonNull), Bool>, + ) -> NSUInteger; + + #[method_id(@__retain_semantics Other indexesPassingTest:)] + 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: &Block<(NSUInteger, NonNull), Bool>, + ) -> Id; + + #[method_id(@__retain_semantics Other indexesInRange:options:passingTest:)] + pub unsafe fn indexesInRange_options_passingTest( + &self, + range: NSRange, + opts: NSEnumerationOptions, + predicate: &Block<(NSUInteger, NonNull), Bool>, + ) -> Id; + + #[method(enumerateRangesUsingBlock:)] + pub unsafe fn enumerateRangesUsingBlock(&self, block: &Block<(NSRange, NonNull), ()>); + + #[method(enumerateRangesWithOptions:usingBlock:)] + pub unsafe fn enumerateRangesWithOptions_usingBlock( + &self, + opts: NSEnumerationOptions, + block: &Block<(NSRange, NonNull), ()>, + ); + + #[method(enumerateRangesInRange:options:usingBlock:)] + pub unsafe fn enumerateRangesInRange_options_usingBlock( + &self, + range: NSRange, + opts: NSEnumerationOptions, + block: &Block<(NSRange, NonNull), ()>, + ); + } +); + +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-generated/src/Foundation/generated/NSInflectionRule.rs b/crates/icrate-generated/src/Foundation/generated/NSInflectionRule.rs new file mode 100644 index 000000000..b71b5ba6b --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSInflectionRule.rs @@ -0,0 +1,56 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSInflectionRule; + + unsafe impl ClassType for NSInflectionRule { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSInflectionRule { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Init initWithMorphology:)] + pub unsafe fn initWithMorphology( + this: Option>, + morphology: &NSMorphology, + ) -> Id; + + #[method_id(@__retain_semantics Other morphology)] + pub unsafe fn morphology(&self) -> Id; + } +); + +extern_methods!( + /// 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-generated/src/Foundation/generated/NSInvocation.rs b/crates/icrate-generated/src/Foundation/generated/NSInvocation.rs new file mode 100644 index 000000000..b2f37a2bc --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSInvocation.rs @@ -0,0 +1,64 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSInvocation; + + unsafe impl ClassType for NSInvocation { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSInvocation { + #[method_id(@__retain_semantics Other invocationWithMethodSignature:)] + pub unsafe fn invocationWithMethodSignature( + sig: &NSMethodSignature, + ) -> Id; + + #[method_id(@__retain_semantics Other methodSignature)] + pub unsafe fn methodSignature(&self) -> Id; + + #[method(retainArguments)] + pub unsafe fn retainArguments(&self); + + #[method(argumentsRetained)] + pub unsafe fn argumentsRetained(&self) -> bool; + + #[method_id(@__retain_semantics Other 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); + + #[method(invokeUsingIMP:)] + pub unsafe fn invokeUsingIMP(&self, imp: IMP); + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSItemProvider.rs b/crates/icrate-generated/src/Foundation/generated/NSItemProvider.rs new file mode 100644 index 000000000..20d6584b6 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSItemProvider.rs @@ -0,0 +1,244 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSItemProviderRepresentationVisibility { + NSItemProviderRepresentationVisibilityAll = 0, + NSItemProviderRepresentationVisibilityTeam = 1, + NSItemProviderRepresentationVisibilityGroup = 2, + NSItemProviderRepresentationVisibilityOwnProcess = 3, + } +); + +ns_options!( + #[underlying(NSInteger)] + pub enum NSItemProviderFileOptions { + NSItemProviderFileOptionOpenInPlace = 1, + } +); + +extern_protocol!( + pub struct NSItemProviderWriting; + + 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), ()>; + +pub type NSItemProviderLoadHandler = *mut Block< + ( + NSItemProviderCompletionHandler, + *const Class, + *mut NSDictionary, + ), + (), +>; + +extern_class!( + #[derive(Debug)] + pub struct NSItemProvider; + + unsafe impl ClassType for NSItemProvider { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSItemProvider { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method(registerDataRepresentationForTypeIdentifier:visibility:loadHandler:)] + pub unsafe fn registerDataRepresentationForTypeIdentifier_visibility_loadHandler( + &self, + typeIdentifier: &NSString, + visibility: NSItemProviderRepresentationVisibility, + loadHandler: &Block< + (NonNull>,), + *mut NSProgress, + >, + ); + + #[method(registerFileRepresentationForTypeIdentifier:fileOptions:visibility:loadHandler:)] + pub unsafe fn registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler( + &self, + typeIdentifier: &NSString, + fileOptions: NSItemProviderFileOptions, + visibility: NSItemProviderRepresentationVisibility, + loadHandler: &Block< + (NonNull>,), + *mut NSProgress, + >, + ); + + #[method_id(@__retain_semantics Other registeredTypeIdentifiers)] + pub unsafe fn registeredTypeIdentifiers(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other loadDataRepresentationForTypeIdentifier:completionHandler:)] + pub unsafe fn loadDataRepresentationForTypeIdentifier_completionHandler( + &self, + typeIdentifier: &NSString, + completionHandler: &Block<(*mut NSData, *mut NSError), ()>, + ) -> Id; + + #[method_id(@__retain_semantics Other loadFileRepresentationForTypeIdentifier:completionHandler:)] + pub unsafe fn loadFileRepresentationForTypeIdentifier_completionHandler( + &self, + typeIdentifier: &NSString, + completionHandler: &Block<(*mut NSURL, *mut NSError), ()>, + ) -> Id; + + #[method_id(@__retain_semantics Other loadInPlaceFileRepresentationForTypeIdentifier:completionHandler:)] + pub unsafe fn loadInPlaceFileRepresentationForTypeIdentifier_completionHandler( + &self, + typeIdentifier: &NSString, + completionHandler: &Block<(*mut NSURL, Bool, *mut NSError), ()>, + ) -> Id; + + #[method_id(@__retain_semantics Other suggestedName)] + pub unsafe fn suggestedName(&self) -> Option>; + + #[method(setSuggestedName:)] + pub unsafe fn setSuggestedName(&self, suggestedName: Option<&NSString>); + + #[method_id(@__retain_semantics Init initWithObject:)] + pub unsafe fn initWithObject( + this: Option>, + object: &NSItemProviderWriting, + ) -> Id; + + #[method(registerObject:visibility:)] + pub unsafe fn registerObject_visibility( + &self, + object: &NSItemProviderWriting, + visibility: NSItemProviderRepresentationVisibility, + ); + + #[method_id(@__retain_semantics Init initWithItem:typeIdentifier:)] + pub unsafe fn initWithItem_typeIdentifier( + this: Option>, + item: Option<&NSSecureCoding>, + typeIdentifier: Option<&NSString>, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithContentsOfURL:)] + pub unsafe fn initWithContentsOfURL( + this: Option>, + 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, + typeIdentifier: &NSString, + options: Option<&NSDictionary>, + completionHandler: NSItemProviderCompletionHandler, + ); + } +); + +extern_static!(NSItemProviderPreferredImageSizeKey: &'static NSString); + +extern_methods!( + /// 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, + options: Option<&NSDictionary>, + completionHandler: NSItemProviderCompletionHandler, + ); + } +); + +extern_static!(NSExtensionJavaScriptPreprocessingResultsKey: Option<&'static NSString>); + +extern_static!(NSExtensionJavaScriptFinalizeArgumentKey: Option<&'static NSString>); + +extern_static!(NSItemProviderErrorDomain: &'static NSString); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSItemProviderErrorCode { + NSItemProviderUnknownError = -1, + NSItemProviderItemUnavailableError = -1000, + NSItemProviderUnexpectedValueClassError = -1100, + NSItemProviderUnavailableCoercionError = -1200, + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSJSONSerialization.rs b/crates/icrate-generated/src/Foundation/generated/NSJSONSerialization.rs new file mode 100644 index 000000000..a34f2d565 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSJSONSerialization.rs @@ -0,0 +1,60 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +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)] + 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(@__retain_semantics Other dataWithJSONObject:options:error:)] + pub unsafe fn dataWithJSONObject_options_error( + obj: &Object, + opt: NSJSONWritingOptions, + ) -> Result, Id>; + + #[method_id(@__retain_semantics Other JSONObjectWithData:options:error:)] + pub unsafe fn JSONObjectWithData_options_error( + data: &NSData, + opt: NSJSONReadingOptions, + ) -> Result, Id>; + + #[method_id(@__retain_semantics Other JSONObjectWithStream:options:error:)] + pub unsafe fn JSONObjectWithStream_options_error( + stream: &NSInputStream, + opt: NSJSONReadingOptions, + ) -> Result, Id>; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSKeyValueCoding.rs b/crates/icrate-generated/src/Foundation/generated/NSKeyValueCoding.rs new file mode 100644 index 000000000..59ec0f0a9 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSKeyValueCoding.rs @@ -0,0 +1,164 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +extern_static!(NSUndefinedKeyException: &'static NSExceptionName); + +pub type NSKeyValueOperator = NSString; + +extern_static!(NSAverageKeyValueOperator: &'static NSKeyValueOperator); + +extern_static!(NSCountKeyValueOperator: &'static NSKeyValueOperator); + +extern_static!(NSDistinctUnionOfArraysKeyValueOperator: &'static NSKeyValueOperator); + +extern_static!(NSDistinctUnionOfObjectsKeyValueOperator: &'static NSKeyValueOperator); + +extern_static!(NSDistinctUnionOfSetsKeyValueOperator: &'static NSKeyValueOperator); + +extern_static!(NSMaximumKeyValueOperator: &'static NSKeyValueOperator); + +extern_static!(NSMinimumKeyValueOperator: &'static NSKeyValueOperator); + +extern_static!(NSSumKeyValueOperator: &'static NSKeyValueOperator); + +extern_static!(NSUnionOfArraysKeyValueOperator: &'static NSKeyValueOperator); + +extern_static!(NSUnionOfObjectsKeyValueOperator: &'static NSKeyValueOperator); + +extern_static!(NSUnionOfSetsKeyValueOperator: &'static NSKeyValueOperator); + +extern_methods!( + /// NSKeyValueCoding + unsafe impl NSObject { + #[method(accessInstanceVariablesDirectly)] + pub unsafe fn accessInstanceVariablesDirectly() -> bool; + + #[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(validateValue:forKey:error:)] + pub unsafe fn validateValue_forKey_error( + &self, + ioValue: NonNull<*mut Object>, + inKey: &NSString, + ) -> Result<(), Id>; + + #[method_id(@__retain_semantics Other mutableArrayValueForKey:)] + pub unsafe fn mutableArrayValueForKey(&self, key: &NSString) -> Id; + + #[method_id(@__retain_semantics Other mutableOrderedSetValueForKey:)] + pub unsafe fn mutableOrderedSetValueForKey( + &self, + key: &NSString, + ) -> Id; + + #[method_id(@__retain_semantics Other mutableSetValueForKey:)] + pub unsafe fn mutableSetValueForKey(&self, key: &NSString) -> Id; + + #[method_id(@__retain_semantics Other 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: NonNull<*mut Object>, + inKeyPath: &NSString, + ) -> Result<(), Id>; + + #[method_id(@__retain_semantics Other mutableArrayValueForKeyPath:)] + pub unsafe fn mutableArrayValueForKeyPath( + &self, + keyPath: &NSString, + ) -> Id; + + #[method_id(@__retain_semantics Other mutableOrderedSetValueForKeyPath:)] + pub unsafe fn mutableOrderedSetValueForKeyPath( + &self, + keyPath: &NSString, + ) -> Id; + + #[method_id(@__retain_semantics Other mutableSetValueForKeyPath:)] + pub unsafe fn mutableSetValueForKeyPath( + &self, + keyPath: &NSString, + ) -> Id; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other dictionaryWithValuesForKeys:)] + pub unsafe fn dictionaryWithValuesForKeys( + &self, + keys: &NSArray, + ) -> Id, Shared>; + + #[method(setValuesForKeysWithDictionary:)] + pub unsafe fn setValuesForKeysWithDictionary( + &self, + keyedValues: &NSDictionary, + ); + } +); + +extern_methods!( + /// NSKeyValueCoding + unsafe impl NSArray { + #[method_id(@__retain_semantics Other 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!( + /// NSKeyValueCoding + unsafe impl NSDictionary { + #[method_id(@__retain_semantics Other valueForKey:)] + pub unsafe fn valueForKey(&self, key: &NSString) -> Option>; + } +); + +extern_methods!( + /// NSKeyValueCoding + unsafe impl NSMutableDictionary { + #[method(setValue:forKey:)] + pub unsafe fn setValue_forKey(&self, value: Option<&ObjectType>, key: &NSString); + } +); + +extern_methods!( + /// NSKeyValueCoding + unsafe impl NSOrderedSet { + #[method_id(@__retain_semantics Other 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!( + /// NSKeyValueCoding + unsafe impl NSSet { + #[method_id(@__retain_semantics Other valueForKey:)] + pub unsafe fn valueForKey(&self, key: &NSString) -> Id; + + #[method(setValue:forKey:)] + pub unsafe fn setValue_forKey(&self, value: Option<&Object>, key: &NSString); + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSKeyValueObserving.rs b/crates/icrate-generated/src/Foundation/generated/NSKeyValueObserving.rs new file mode 100644 index 000000000..a98e10628 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSKeyValueObserving.rs @@ -0,0 +1,249 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +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_static!(NSKeyValueChangeKindKey: &'static NSKeyValueChangeKey); + +extern_static!(NSKeyValueChangeNewKey: &'static NSKeyValueChangeKey); + +extern_static!(NSKeyValueChangeOldKey: &'static NSKeyValueChangeKey); + +extern_static!(NSKeyValueChangeIndexesKey: &'static NSKeyValueChangeKey); + +extern_static!(NSKeyValueChangeNotificationIsPriorKey: &'static NSKeyValueChangeKey); + +extern_methods!( + /// 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, + ); + } +); + +extern_methods!( + /// 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, + ); + + #[method(removeObserver:forKeyPath:context:)] + pub unsafe fn removeObserver_forKeyPath_context( + &self, + observer: &NSObject, + keyPath: &NSString, + context: *mut c_void, + ); + + #[method(removeObserver:forKeyPath:)] + pub unsafe fn removeObserver_forKeyPath(&self, observer: &NSObject, keyPath: &NSString); + } +); + +extern_methods!( + /// NSKeyValueObserverRegistration + unsafe impl NSArray { + #[method(addObserver:toObjectsAtIndexes:forKeyPath:options:context:)] + pub unsafe fn addObserver_toObjectsAtIndexes_forKeyPath_options_context( + &self, + observer: &NSObject, + indexes: &NSIndexSet, + keyPath: &NSString, + options: NSKeyValueObservingOptions, + context: *mut c_void, + ); + + #[method(removeObserver:fromObjectsAtIndexes:forKeyPath:context:)] + pub unsafe fn removeObserver_fromObjectsAtIndexes_forKeyPath_context( + &self, + observer: &NSObject, + indexes: &NSIndexSet, + keyPath: &NSString, + context: *mut c_void, + ); + + #[method(removeObserver:fromObjectsAtIndexes:forKeyPath:)] + pub unsafe fn removeObserver_fromObjectsAtIndexes_forKeyPath( + &self, + observer: &NSObject, + indexes: &NSIndexSet, + keyPath: &NSString, + ); + + #[method(addObserver:forKeyPath:options:context:)] + pub unsafe fn addObserver_forKeyPath_options_context( + &self, + observer: &NSObject, + keyPath: &NSString, + options: NSKeyValueObservingOptions, + context: *mut c_void, + ); + + #[method(removeObserver:forKeyPath:context:)] + pub unsafe fn removeObserver_forKeyPath_context( + &self, + observer: &NSObject, + keyPath: &NSString, + context: *mut c_void, + ); + + #[method(removeObserver:forKeyPath:)] + pub unsafe fn removeObserver_forKeyPath(&self, observer: &NSObject, keyPath: &NSString); + } +); + +extern_methods!( + /// 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, + ); + + #[method(removeObserver:forKeyPath:context:)] + pub unsafe fn removeObserver_forKeyPath_context( + &self, + observer: &NSObject, + keyPath: &NSString, + context: *mut c_void, + ); + + #[method(removeObserver:forKeyPath:)] + pub unsafe fn removeObserver_forKeyPath(&self, observer: &NSObject, keyPath: &NSString); + } +); + +extern_methods!( + /// 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, + ); + + #[method(removeObserver:forKeyPath:context:)] + pub unsafe fn removeObserver_forKeyPath_context( + &self, + observer: &NSObject, + keyPath: &NSString, + context: *mut c_void, + ); + + #[method(removeObserver:forKeyPath:)] + pub unsafe fn removeObserver_forKeyPath(&self, observer: &NSObject, keyPath: &NSString); + } +); + +extern_methods!( + /// 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, + changeKind: NSKeyValueChange, + indexes: &NSIndexSet, + key: &NSString, + ); + + #[method(didChange:valuesAtIndexes:forKey:)] + pub unsafe fn didChange_valuesAtIndexes_forKey( + &self, + changeKind: NSKeyValueChange, + indexes: &NSIndexSet, + key: &NSString, + ); + + #[method(willChangeValueForKey:withSetMutation:usingObjects:)] + pub unsafe fn willChangeValueForKey_withSetMutation_usingObjects( + &self, + key: &NSString, + mutationKind: NSKeyValueSetMutationKind, + objects: &NSSet, + ); + + #[method(didChangeValueForKey:withSetMutation:usingObjects:)] + pub unsafe fn didChangeValueForKey_withSetMutation_usingObjects( + &self, + key: &NSString, + mutationKind: NSKeyValueSetMutationKind, + objects: &NSSet, + ); + } +); + +extern_methods!( + /// NSKeyValueObservingCustomization + unsafe impl NSObject { + #[method_id(@__retain_semantics Other 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); + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSKeyedArchiver.rs b/crates/icrate-generated/src/Foundation/generated/NSKeyedArchiver.rs new file mode 100644 index 000000000..97eeb3bcf --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSKeyedArchiver.rs @@ -0,0 +1,338 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +extern_static!(NSInvalidArchiveOperationException: &'static NSExceptionName); + +extern_static!(NSInvalidUnarchiveOperationException: &'static NSExceptionName); + +extern_static!(NSKeyedArchiveRootObjectKey: &'static NSString); + +extern_class!( + #[derive(Debug)] + pub struct NSKeyedArchiver; + + unsafe impl ClassType for NSKeyedArchiver { + type Super = NSCoder; + } +); + +extern_methods!( + unsafe impl NSKeyedArchiver { + #[method_id(@__retain_semantics Init initRequiringSecureCoding:)] + pub unsafe fn initRequiringSecureCoding( + this: Option>, + requiresSecureCoding: bool, + ) -> Id; + + #[method_id(@__retain_semantics Other archivedDataWithRootObject:requiringSecureCoding:error:)] + pub unsafe fn archivedDataWithRootObject_requiringSecureCoding_error( + object: &Object, + requiresSecureCoding: bool, + ) -> Result, Id>; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method_id(@__retain_semantics Init initForWritingWithMutableData:)] + pub unsafe fn initForWritingWithMutableData( + this: Option>, + data: &NSMutableData, + ) -> Id; + + #[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(@__retain_semantics Other 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(@__retain_semantics Other encodedData)] + pub unsafe fn encodedData(&self) -> Id; + + #[method(finishEncoding)] + pub unsafe fn finishEncoding(&self); + + #[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: i64, 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, + ); + + #[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(@__retain_semantics Init initForReadingFromData:error:)] + pub unsafe fn initForReadingFromData_error( + this: Option>, + data: &NSData, + ) -> Result, Id>; + + #[method_id(@__retain_semantics Other unarchivedObjectOfClass:fromData:error:)] + pub unsafe fn unarchivedObjectOfClass_fromData_error( + cls: &Class, + data: &NSData, + ) -> Result, Id>; + + #[method_id(@__retain_semantics Other unarchivedArrayOfObjectsOfClass:fromData:error:)] + pub unsafe fn unarchivedArrayOfObjectsOfClass_fromData_error( + cls: &Class, + data: &NSData, + ) -> Result, Id>; + + #[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(@__retain_semantics Other unarchivedObjectOfClasses:fromData:error:)] + pub unsafe fn unarchivedObjectOfClasses_fromData_error( + classes: &NSSet, + data: &NSData, + ) -> Result, Id>; + + #[method_id(@__retain_semantics Other unarchivedArrayOfObjectsOfClasses:fromData:error:)] + pub unsafe fn unarchivedArrayOfObjectsOfClasses_fromData_error( + classes: &NSSet, + data: &NSData, + ) -> Result, Id>; + + #[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(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method_id(@__retain_semantics Init initForReadingWithData:)] + pub unsafe fn initForReadingWithData( + this: Option>, + data: &NSData, + ) -> Id; + + #[method_id(@__retain_semantics Other unarchiveObjectWithData:)] + pub unsafe fn unarchiveObjectWithData(data: &NSData) -> Option>; + + #[method_id(@__retain_semantics Other unarchiveTopLevelObjectWithData:error:)] + pub unsafe fn unarchiveTopLevelObjectWithData_error( + data: &NSData, + ) -> Result, Id>; + + #[method_id(@__retain_semantics Other unarchiveObjectWithFile:)] + pub unsafe fn unarchiveObjectWithFile(path: &NSString) -> Option>; + + #[method_id(@__retain_semantics Other 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(containsValueForKey:)] + pub unsafe fn containsValueForKey(&self, key: &NSString) -> bool; + + #[method_id(@__retain_semantics Other 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) -> i64; + + #[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, + decodingFailurePolicy: NSDecodingFailurePolicy, + ); + } +); + +extern_protocol!( + pub struct NSKeyedArchiverDelegate; + + 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 + unsafe impl NSObject { + #[method(classForKeyedArchiver)] + pub unsafe fn classForKeyedArchiver(&self) -> Option<&'static Class>; + + #[method_id(@__retain_semantics Other replacementObjectForKeyedArchiver:)] + pub unsafe fn replacementObjectForKeyedArchiver( + &self, + archiver: &NSKeyedArchiver, + ) -> Option>; + + #[method_id(@__retain_semantics Other classFallbacksForKeyedArchiver)] + pub unsafe fn classFallbacksForKeyedArchiver() -> Id, Shared>; + } +); + +extern_methods!( + /// NSKeyedUnarchiverObjectSubstitution + unsafe impl NSObject { + #[method(classForKeyedUnarchiver)] + pub unsafe fn classForKeyedUnarchiver() -> &'static Class; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSLengthFormatter.rs b/crates/icrate-generated/src/Foundation/generated/NSLengthFormatter.rs new file mode 100644 index 000000000..9e79a3fbe --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSLengthFormatter.rs @@ -0,0 +1,81 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +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)] + pub struct NSLengthFormatter; + + unsafe impl ClassType for NSLengthFormatter { + type Super = NSFormatter; + } +); + +extern_methods!( + unsafe impl NSLengthFormatter { + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other stringFromValue:unit:)] + pub unsafe fn stringFromValue_unit( + &self, + value: c_double, + unit: NSLengthFormatterUnit, + ) -> Id; + + #[method_id(@__retain_semantics Other stringFromMeters:)] + pub unsafe fn stringFromMeters(&self, numberInMeters: c_double) -> Id; + + #[method_id(@__retain_semantics Other unitStringFromValue:unit:)] + pub unsafe fn unitStringFromValue_unit( + &self, + value: c_double, + unit: NSLengthFormatterUnit, + ) -> Id; + + #[method_id(@__retain_semantics Other 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, + obj: *mut *mut Object, + string: &NSString, + error: *mut *mut NSString, + ) -> bool; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSLinguisticTagger.rs b/crates/icrate-generated/src/Foundation/generated/NSLinguisticTagger.rs new file mode 100644 index 000000000..05b83f1ff --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSLinguisticTagger.rs @@ -0,0 +1,305 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +pub type NSLinguisticTagScheme = NSString; + +extern_static!(NSLinguisticTagSchemeTokenType: &'static NSLinguisticTagScheme); + +extern_static!(NSLinguisticTagSchemeLexicalClass: &'static NSLinguisticTagScheme); + +extern_static!(NSLinguisticTagSchemeNameType: &'static NSLinguisticTagScheme); + +extern_static!(NSLinguisticTagSchemeNameTypeOrLexicalClass: &'static NSLinguisticTagScheme); + +extern_static!(NSLinguisticTagSchemeLemma: &'static NSLinguisticTagScheme); + +extern_static!(NSLinguisticTagSchemeLanguage: &'static NSLinguisticTagScheme); + +extern_static!(NSLinguisticTagSchemeScript: &'static NSLinguisticTagScheme); + +pub type NSLinguisticTag = NSString; + +extern_static!(NSLinguisticTagWord: &'static NSLinguisticTag); + +extern_static!(NSLinguisticTagPunctuation: &'static NSLinguisticTag); + +extern_static!(NSLinguisticTagWhitespace: &'static NSLinguisticTag); + +extern_static!(NSLinguisticTagOther: &'static NSLinguisticTag); + +extern_static!(NSLinguisticTagNoun: &'static NSLinguisticTag); + +extern_static!(NSLinguisticTagVerb: &'static NSLinguisticTag); + +extern_static!(NSLinguisticTagAdjective: &'static NSLinguisticTag); + +extern_static!(NSLinguisticTagAdverb: &'static NSLinguisticTag); + +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)] + pub struct NSLinguisticTagger; + + unsafe impl ClassType for NSLinguisticTagger { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSLinguisticTagger { + #[method_id(@__retain_semantics Init initWithTagSchemes:options:)] + pub unsafe fn initWithTagSchemes_options( + this: Option>, + tagSchemes: &NSArray, + opts: NSUInteger, + ) -> Id; + + #[method_id(@__retain_semantics Other tagSchemes)] + pub unsafe fn tagSchemes(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other string)] + pub unsafe fn string(&self) -> Option>; + + #[method(setString:)] + pub unsafe fn setString(&self, string: Option<&NSString>); + + #[method_id(@__retain_semantics Other availableTagSchemesForUnit:language:)] + pub unsafe fn availableTagSchemesForUnit_language( + unit: NSLinguisticTaggerUnit, + language: &NSString, + ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other 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, + range: NSRange, + unit: NSLinguisticTaggerUnit, + scheme: &NSLinguisticTagScheme, + options: NSLinguisticTaggerOptions, + block: &Block<(*mut NSLinguisticTag, NSRange, NonNull), ()>, + ); + + #[method_id(@__retain_semantics Other tagAtIndex:unit:scheme:tokenRange:)] + pub unsafe fn tagAtIndex_unit_scheme_tokenRange( + &self, + charIndex: NSUInteger, + unit: NSLinguisticTaggerUnit, + scheme: &NSLinguisticTagScheme, + tokenRange: NSRangePointer, + ) -> Option>; + + #[method_id(@__retain_semantics Other tagsInRange:unit:scheme:options:tokenRanges:)] + pub unsafe fn tagsInRange_unit_scheme_options_tokenRanges( + &self, + range: NSRange, + unit: NSLinguisticTaggerUnit, + scheme: &NSLinguisticTagScheme, + options: NSLinguisticTaggerOptions, + tokenRanges: *mut *mut NSArray, + ) -> Id, Shared>; + + #[method(enumerateTagsInRange:scheme:options:usingBlock:)] + pub unsafe fn enumerateTagsInRange_scheme_options_usingBlock( + &self, + range: NSRange, + tagScheme: &NSLinguisticTagScheme, + opts: NSLinguisticTaggerOptions, + block: &Block<(*mut NSLinguisticTag, NSRange, NSRange, NonNull), ()>, + ); + + #[method_id(@__retain_semantics Other tagAtIndex:scheme:tokenRange:sentenceRange:)] + pub unsafe fn tagAtIndex_scheme_tokenRange_sentenceRange( + &self, + charIndex: NSUInteger, + scheme: &NSLinguisticTagScheme, + tokenRange: NSRangePointer, + sentenceRange: NSRangePointer, + ) -> Option>; + + #[method_id(@__retain_semantics Other tagsInRange:scheme:options:tokenRanges:)] + pub unsafe fn tagsInRange_scheme_options_tokenRanges( + &self, + range: NSRange, + tagScheme: &NSString, + opts: NSLinguisticTaggerOptions, + tokenRanges: *mut *mut NSArray, + ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other dominantLanguage)] + pub unsafe fn dominantLanguage(&self) -> Option>; + + #[method_id(@__retain_semantics Other dominantLanguageForString:)] + pub unsafe fn dominantLanguageForString(string: &NSString) -> Option>; + + #[method_id(@__retain_semantics Other tagForString:atIndex:unit:scheme:orthography:tokenRange:)] + pub unsafe fn tagForString_atIndex_unit_scheme_orthography_tokenRange( + string: &NSString, + charIndex: NSUInteger, + unit: NSLinguisticTaggerUnit, + scheme: &NSLinguisticTagScheme, + orthography: Option<&NSOrthography>, + tokenRange: NSRangePointer, + ) -> Option>; + + #[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, + unit: NSLinguisticTaggerUnit, + scheme: &NSLinguisticTagScheme, + options: NSLinguisticTaggerOptions, + orthography: Option<&NSOrthography>, + tokenRanges: *mut *mut NSArray, + ) -> Id, Shared>; + + #[method(enumerateTagsForString:range:unit:scheme:options:orthography:usingBlock:)] + pub unsafe fn enumerateTagsForString_range_unit_scheme_options_orthography_usingBlock( + string: &NSString, + range: NSRange, + unit: NSLinguisticTaggerUnit, + scheme: &NSLinguisticTagScheme, + options: NSLinguisticTaggerOptions, + orthography: Option<&NSOrthography>, + block: &Block<(*mut NSLinguisticTag, NSRange, NonNull), ()>, + ); + + #[method_id(@__retain_semantics Other possibleTagsAtIndex:scheme:tokenRange:sentenceRange:scores:)] + pub unsafe fn possibleTagsAtIndex_scheme_tokenRange_sentenceRange_scores( + &self, + charIndex: NSUInteger, + tagScheme: &NSString, + tokenRange: NSRangePointer, + sentenceRange: NSRangePointer, + scores: *mut *mut NSArray, + ) -> Option, Shared>>; + } +); + +extern_methods!( + /// NSLinguisticAnalysis + unsafe impl NSString { + #[method_id(@__retain_semantics Other linguisticTagsInRange:scheme:options:orthography:tokenRanges:)] + pub unsafe fn linguisticTagsInRange_scheme_options_orthography_tokenRanges( + &self, + range: NSRange, + scheme: &NSLinguisticTagScheme, + options: NSLinguisticTaggerOptions, + orthography: Option<&NSOrthography>, + tokenRanges: *mut *mut NSArray, + ) -> Id, Shared>; + + #[method(enumerateLinguisticTagsInRange:scheme:options:orthography:usingBlock:)] + pub unsafe fn enumerateLinguisticTagsInRange_scheme_options_orthography_usingBlock( + &self, + range: NSRange, + scheme: &NSLinguisticTagScheme, + options: NSLinguisticTaggerOptions, + orthography: Option<&NSOrthography>, + block: &Block<(*mut NSLinguisticTag, NSRange, NSRange, NonNull), ()>, + ); + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSListFormatter.rs b/crates/icrate-generated/src/Foundation/generated/NSListFormatter.rs new file mode 100644 index 000000000..ab79eaa36 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSListFormatter.rs @@ -0,0 +1,43 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSListFormatter; + + unsafe impl ClassType for NSListFormatter { + type Super = NSFormatter; + } +); + +extern_methods!( + unsafe impl NSListFormatter { + #[method_id(@__retain_semantics Other locale)] + pub unsafe fn locale(&self) -> Id; + + #[method(setLocale:)] + pub unsafe fn setLocale(&self, locale: Option<&NSLocale>); + + #[method_id(@__retain_semantics Other itemFormatter)] + pub unsafe fn itemFormatter(&self) -> Option>; + + #[method(setItemFormatter:)] + pub unsafe fn setItemFormatter(&self, itemFormatter: Option<&NSFormatter>); + + #[method_id(@__retain_semantics Other localizedStringByJoiningStrings:)] + pub unsafe fn localizedStringByJoiningStrings( + strings: &NSArray, + ) -> Id; + + #[method_id(@__retain_semantics Other stringFromItems:)] + pub unsafe fn stringFromItems(&self, items: &NSArray) -> Option>; + + #[method_id(@__retain_semantics Other stringForObjectValue:)] + pub unsafe fn stringForObjectValue( + &self, + obj: Option<&Object>, + ) -> Option>; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSLocale.rs b/crates/icrate-generated/src/Foundation/generated/NSLocale.rs new file mode 100644 index 000000000..1ae565a07 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSLocale.rs @@ -0,0 +1,307 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +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(@__retain_semantics Other objectForKey:)] + pub unsafe fn objectForKey(&self, key: &NSLocaleKey) -> Option>; + + #[method_id(@__retain_semantics Other displayNameForKey:value:)] + pub unsafe fn displayNameForKey_value( + &self, + key: &NSLocaleKey, + value: &Object, + ) -> Option>; + + #[method_id(@__retain_semantics Init initWithLocaleIdentifier:)] + pub unsafe fn initWithLocaleIdentifier( + this: Option>, + string: &NSString, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; + } +); + +extern_methods!( + /// NSExtendedLocale + unsafe impl NSLocale { + #[method_id(@__retain_semantics Other localeIdentifier)] + pub unsafe fn localeIdentifier(&self) -> Id; + + #[method_id(@__retain_semantics Other localizedStringForLocaleIdentifier:)] + pub unsafe fn localizedStringForLocaleIdentifier( + &self, + localeIdentifier: &NSString, + ) -> Id; + + #[method_id(@__retain_semantics Other languageCode)] + pub unsafe fn languageCode(&self) -> Id; + + #[method_id(@__retain_semantics Other localizedStringForLanguageCode:)] + pub unsafe fn localizedStringForLanguageCode( + &self, + languageCode: &NSString, + ) -> Option>; + + #[method_id(@__retain_semantics Other countryCode)] + pub unsafe fn countryCode(&self) -> Option>; + + #[method_id(@__retain_semantics Other localizedStringForCountryCode:)] + pub unsafe fn localizedStringForCountryCode( + &self, + countryCode: &NSString, + ) -> Option>; + + #[method_id(@__retain_semantics Other scriptCode)] + pub unsafe fn scriptCode(&self) -> Option>; + + #[method_id(@__retain_semantics Other localizedStringForScriptCode:)] + pub unsafe fn localizedStringForScriptCode( + &self, + scriptCode: &NSString, + ) -> Option>; + + #[method_id(@__retain_semantics Other variantCode)] + pub unsafe fn variantCode(&self) -> Option>; + + #[method_id(@__retain_semantics Other localizedStringForVariantCode:)] + pub unsafe fn localizedStringForVariantCode( + &self, + variantCode: &NSString, + ) -> Option>; + + #[method_id(@__retain_semantics Other exemplarCharacterSet)] + pub unsafe fn exemplarCharacterSet(&self) -> Id; + + #[method_id(@__retain_semantics Other calendarIdentifier)] + pub unsafe fn calendarIdentifier(&self) -> Id; + + #[method_id(@__retain_semantics Other localizedStringForCalendarIdentifier:)] + pub unsafe fn localizedStringForCalendarIdentifier( + &self, + calendarIdentifier: &NSString, + ) -> Option>; + + #[method_id(@__retain_semantics Other collationIdentifier)] + pub unsafe fn collationIdentifier(&self) -> Option>; + + #[method_id(@__retain_semantics Other localizedStringForCollationIdentifier:)] + pub unsafe fn localizedStringForCollationIdentifier( + &self, + collationIdentifier: &NSString, + ) -> Option>; + + #[method(usesMetricSystem)] + pub unsafe fn usesMetricSystem(&self) -> bool; + + #[method_id(@__retain_semantics Other decimalSeparator)] + pub unsafe fn decimalSeparator(&self) -> Id; + + #[method_id(@__retain_semantics Other groupingSeparator)] + pub unsafe fn groupingSeparator(&self) -> Id; + + #[method_id(@__retain_semantics Other currencySymbol)] + pub unsafe fn currencySymbol(&self) -> Id; + + #[method_id(@__retain_semantics Other currencyCode)] + pub unsafe fn currencyCode(&self) -> Option>; + + #[method_id(@__retain_semantics Other localizedStringForCurrencyCode:)] + pub unsafe fn localizedStringForCurrencyCode( + &self, + currencyCode: &NSString, + ) -> Option>; + + #[method_id(@__retain_semantics Other collatorIdentifier)] + pub unsafe fn collatorIdentifier(&self) -> Id; + + #[method_id(@__retain_semantics Other localizedStringForCollatorIdentifier:)] + pub unsafe fn localizedStringForCollatorIdentifier( + &self, + collatorIdentifier: &NSString, + ) -> Option>; + + #[method_id(@__retain_semantics Other quotationBeginDelimiter)] + pub unsafe fn quotationBeginDelimiter(&self) -> Id; + + #[method_id(@__retain_semantics Other quotationEndDelimiter)] + pub unsafe fn quotationEndDelimiter(&self) -> Id; + + #[method_id(@__retain_semantics Other alternateQuotationBeginDelimiter)] + pub unsafe fn alternateQuotationBeginDelimiter(&self) -> Id; + + #[method_id(@__retain_semantics Other alternateQuotationEndDelimiter)] + pub unsafe fn alternateQuotationEndDelimiter(&self) -> Id; + } +); + +extern_methods!( + /// NSLocaleCreation + unsafe impl NSLocale { + #[method_id(@__retain_semantics Other autoupdatingCurrentLocale)] + pub unsafe fn autoupdatingCurrentLocale() -> Id; + + #[method_id(@__retain_semantics Other currentLocale)] + pub unsafe fn currentLocale() -> Id; + + #[method_id(@__retain_semantics Other systemLocale)] + pub unsafe fn systemLocale() -> Id; + + #[method_id(@__retain_semantics Other localeWithLocaleIdentifier:)] + pub unsafe fn localeWithLocaleIdentifier(ident: &NSString) -> Id; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSLocaleLanguageDirection { + NSLocaleLanguageDirectionUnknown = 0, + NSLocaleLanguageDirectionLeftToRight = 1, + NSLocaleLanguageDirectionRightToLeft = 2, + NSLocaleLanguageDirectionTopToBottom = 3, + NSLocaleLanguageDirectionBottomToTop = 4, + } +); + +extern_methods!( + /// NSLocaleGeneralInfo + unsafe impl NSLocale { + #[method_id(@__retain_semantics Other availableLocaleIdentifiers)] + pub unsafe fn availableLocaleIdentifiers() -> Id, Shared>; + + #[method_id(@__retain_semantics Other ISOLanguageCodes)] + pub unsafe fn ISOLanguageCodes() -> Id, Shared>; + + #[method_id(@__retain_semantics Other ISOCountryCodes)] + pub unsafe fn ISOCountryCodes() -> Id, Shared>; + + #[method_id(@__retain_semantics Other ISOCurrencyCodes)] + pub unsafe fn ISOCurrencyCodes() -> Id, Shared>; + + #[method_id(@__retain_semantics Other commonISOCurrencyCodes)] + pub unsafe fn commonISOCurrencyCodes() -> Id, Shared>; + + #[method_id(@__retain_semantics Other preferredLanguages)] + pub unsafe fn preferredLanguages() -> Id, Shared>; + + #[method_id(@__retain_semantics Other componentsFromLocaleIdentifier:)] + pub unsafe fn componentsFromLocaleIdentifier( + string: &NSString, + ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other localeIdentifierFromComponents:)] + pub unsafe fn localeIdentifierFromComponents( + dict: &NSDictionary, + ) -> Id; + + #[method_id(@__retain_semantics Other canonicalLocaleIdentifierFromString:)] + pub unsafe fn canonicalLocaleIdentifierFromString( + string: &NSString, + ) -> Id; + + #[method_id(@__retain_semantics Other canonicalLanguageIdentifierFromString:)] + pub unsafe fn canonicalLanguageIdentifierFromString( + string: &NSString, + ) -> Id; + + #[method_id(@__retain_semantics Other 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; + } +); + +extern_static!(NSCurrentLocaleDidChangeNotification: &'static NSNotificationName); + +extern_static!(NSLocaleIdentifier: &'static NSLocaleKey); + +extern_static!(NSLocaleLanguageCode: &'static NSLocaleKey); + +extern_static!(NSLocaleCountryCode: &'static NSLocaleKey); + +extern_static!(NSLocaleScriptCode: &'static NSLocaleKey); + +extern_static!(NSLocaleVariantCode: &'static NSLocaleKey); + +extern_static!(NSLocaleExemplarCharacterSet: &'static NSLocaleKey); + +extern_static!(NSLocaleCalendar: &'static NSLocaleKey); + +extern_static!(NSLocaleCollationIdentifier: &'static NSLocaleKey); + +extern_static!(NSLocaleUsesMetricSystem: &'static NSLocaleKey); + +extern_static!(NSLocaleMeasurementSystem: &'static NSLocaleKey); + +extern_static!(NSLocaleDecimalSeparator: &'static NSLocaleKey); + +extern_static!(NSLocaleGroupingSeparator: &'static NSLocaleKey); + +extern_static!(NSLocaleCurrencySymbol: &'static NSLocaleKey); + +extern_static!(NSLocaleCurrencyCode: &'static NSLocaleKey); + +extern_static!(NSLocaleCollatorIdentifier: &'static NSLocaleKey); + +extern_static!(NSLocaleQuotationBeginDelimiterKey: &'static NSLocaleKey); + +extern_static!(NSLocaleQuotationEndDelimiterKey: &'static NSLocaleKey); + +extern_static!(NSLocaleAlternateQuotationBeginDelimiterKey: &'static NSLocaleKey); + +extern_static!(NSLocaleAlternateQuotationEndDelimiterKey: &'static NSLocaleKey); + +extern_static!(NSGregorianCalendar: &'static NSString); + +extern_static!(NSBuddhistCalendar: &'static NSString); + +extern_static!(NSChineseCalendar: &'static NSString); + +extern_static!(NSHebrewCalendar: &'static NSString); + +extern_static!(NSIslamicCalendar: &'static NSString); + +extern_static!(NSIslamicCivilCalendar: &'static NSString); + +extern_static!(NSJapaneseCalendar: &'static NSString); + +extern_static!(NSRepublicOfChinaCalendar: &'static NSString); + +extern_static!(NSPersianCalendar: &'static NSString); + +extern_static!(NSIndianCalendar: &'static NSString); + +extern_static!(NSISO8601Calendar: &'static NSString); diff --git a/crates/icrate-generated/src/Foundation/generated/NSLock.rs b/crates/icrate-generated/src/Foundation/generated/NSLock.rs new file mode 100644 index 000000000..53644be43 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSLock.rs @@ -0,0 +1,147 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +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)] + 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(@__retain_semantics Other 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(@__retain_semantics Init initWithCondition:)] + pub unsafe fn initWithCondition( + this: Option>, + 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(@__retain_semantics Other 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(@__retain_semantics Other 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(@__retain_semantics Other name)] + pub unsafe fn name(&self) -> Option>; + + #[method(setName:)] + pub unsafe fn setName(&self, name: Option<&NSString>); + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSMapTable.rs b/crates/icrate-generated/src/Foundation/generated/NSMapTable.rs new file mode 100644 index 000000000..a8c502857 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSMapTable.rs @@ -0,0 +1,278 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +extern_static!(NSMapTableStrongMemory: NSPointerFunctionsOptions = NSPointerFunctionsStrongMemory); + +extern_static!( + NSMapTableZeroingWeakMemory: NSPointerFunctionsOptions = NSPointerFunctionsZeroingWeakMemory +); + +extern_static!(NSMapTableCopyIn: NSPointerFunctionsOptions = NSPointerFunctionsCopyIn); + +extern_static!( + NSMapTableObjectPointerPersonality: NSPointerFunctionsOptions = + NSPointerFunctionsObjectPointerPersonality +); + +extern_static!(NSMapTableWeakMemory: NSPointerFunctionsOptions = NSPointerFunctionsWeakMemory); + +pub type NSMapTableOptions = NSUInteger; + +__inner_extern_class!( + #[derive(Debug)] + pub struct NSMapTable { + _inner0: PhantomData<*mut KeyType>, + _inner1: PhantomData<*mut ObjectType>, + } + + unsafe impl ClassType for NSMapTable { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSMapTable { + #[method_id(@__retain_semantics Init initWithKeyOptions:valueOptions:capacity:)] + pub unsafe fn initWithKeyOptions_valueOptions_capacity( + this: Option>, + keyOptions: NSPointerFunctionsOptions, + valueOptions: NSPointerFunctionsOptions, + initialCapacity: NSUInteger, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithKeyPointerFunctions:valuePointerFunctions:capacity:)] + pub unsafe fn initWithKeyPointerFunctions_valuePointerFunctions_capacity( + this: Option>, + keyFunctions: &NSPointerFunctions, + valueFunctions: &NSPointerFunctions, + initialCapacity: NSUInteger, + ) -> Id; + + #[method_id(@__retain_semantics Other mapTableWithKeyOptions:valueOptions:)] + pub unsafe fn mapTableWithKeyOptions_valueOptions( + keyOptions: NSPointerFunctionsOptions, + valueOptions: NSPointerFunctionsOptions, + ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other mapTableWithStrongToStrongObjects)] + pub unsafe fn mapTableWithStrongToStrongObjects() -> Id; + + #[method_id(@__retain_semantics Other mapTableWithWeakToStrongObjects)] + pub unsafe fn mapTableWithWeakToStrongObjects() -> Id; + + #[method_id(@__retain_semantics Other mapTableWithStrongToWeakObjects)] + pub unsafe fn mapTableWithStrongToWeakObjects() -> Id; + + #[method_id(@__retain_semantics Other mapTableWithWeakToWeakObjects)] + pub unsafe fn mapTableWithWeakToWeakObjects() -> Id; + + #[method_id(@__retain_semantics Other strongToStrongObjectsMapTable)] + pub unsafe fn strongToStrongObjectsMapTable() -> Id, Shared>; + + #[method_id(@__retain_semantics Other weakToStrongObjectsMapTable)] + pub unsafe fn weakToStrongObjectsMapTable() -> Id, Shared>; + + #[method_id(@__retain_semantics Other strongToWeakObjectsMapTable)] + pub unsafe fn strongToWeakObjectsMapTable() -> Id, Shared>; + + #[method_id(@__retain_semantics Other weakToWeakObjectsMapTable)] + pub unsafe fn weakToWeakObjectsMapTable() -> Id, Shared>; + + #[method_id(@__retain_semantics Other keyPointerFunctions)] + pub unsafe fn keyPointerFunctions(&self) -> Id; + + #[method_id(@__retain_semantics Other valuePointerFunctions)] + pub unsafe fn valuePointerFunctions(&self) -> Id; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other keyEnumerator)] + pub unsafe fn keyEnumerator(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other objectEnumerator)] + pub unsafe fn objectEnumerator(&self) -> Option, Shared>>; + + #[method(removeAllObjects)] + pub unsafe fn removeAllObjects(&self); + + #[method_id(@__retain_semantics Other dictionaryRepresentation)] + pub unsafe fn dictionaryRepresentation( + &self, + ) -> Id, Shared>; + } +); + +extern_struct!( + pub struct NSMapEnumerator { + _pi: NSUInteger, + _si: NSUInteger, + _bs: *mut c_void, + } +); + +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>, + 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: Option, NonNull)>, + pub release: Option, NonNull)>, + pub describe: + Option, NonNull) -> *mut NSString>, + } +); + +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); + +extern_static!(NSNonOwnedPointerOrNullMapKeyCallBacks: NSMapTableKeyCallBacks); + +extern_static!(NSNonRetainedObjectMapKeyCallBacks: NSMapTableKeyCallBacks); + +extern_static!(NSObjectMapKeyCallBacks: NSMapTableKeyCallBacks); + +extern_static!(NSOwnedPointerMapKeyCallBacks: NSMapTableKeyCallBacks); + +extern_static!(NSIntMapKeyCallBacks: NSMapTableKeyCallBacks); + +extern_static!(NSIntegerMapValueCallBacks: NSMapTableValueCallBacks); + +extern_static!(NSNonOwnedPointerMapValueCallBacks: NSMapTableValueCallBacks); + +extern_static!(NSObjectMapValueCallBacks: NSMapTableValueCallBacks); + +extern_static!(NSNonRetainedObjectMapValueCallBacks: NSMapTableValueCallBacks); + +extern_static!(NSOwnedPointerMapValueCallBacks: NSMapTableValueCallBacks); + +extern_static!(NSIntMapValueCallBacks: NSMapTableValueCallBacks); diff --git a/crates/icrate-generated/src/Foundation/generated/NSMassFormatter.rs b/crates/icrate-generated/src/Foundation/generated/NSMassFormatter.rs new file mode 100644 index 000000000..cfee0b847 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSMassFormatter.rs @@ -0,0 +1,81 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +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)] + pub struct NSMassFormatter; + + unsafe impl ClassType for NSMassFormatter { + type Super = NSFormatter; + } +); + +extern_methods!( + unsafe impl NSMassFormatter { + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other stringFromValue:unit:)] + pub unsafe fn stringFromValue_unit( + &self, + value: c_double, + unit: NSMassFormatterUnit, + ) -> Id; + + #[method_id(@__retain_semantics Other stringFromKilograms:)] + pub unsafe fn stringFromKilograms( + &self, + numberInKilograms: c_double, + ) -> Id; + + #[method_id(@__retain_semantics Other unitStringFromValue:unit:)] + pub unsafe fn unitStringFromValue_unit( + &self, + value: c_double, + unit: NSMassFormatterUnit, + ) -> Id; + + #[method_id(@__retain_semantics Other 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, + obj: *mut *mut Object, + string: &NSString, + error: *mut *mut NSString, + ) -> bool; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSMeasurement.rs b/crates/icrate-generated/src/Foundation/generated/NSMeasurement.rs new file mode 100644 index 000000000..d7e38bf16 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSMeasurement.rs @@ -0,0 +1,56 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +__inner_extern_class!( + #[derive(Debug)] + pub struct NSMeasurement { + _inner0: PhantomData<*mut UnitType>, + } + + unsafe impl ClassType for NSMeasurement { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSMeasurement { + #[method_id(@__retain_semantics Other unit)] + pub unsafe fn unit(&self) -> Id; + + #[method(doubleValue)] + pub unsafe fn doubleValue(&self) -> c_double; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method_id(@__retain_semantics Init initWithDoubleValue:unit:)] + pub unsafe fn initWithDoubleValue_unit( + this: Option>, + doubleValue: c_double, + unit: &UnitType, + ) -> Id; + + #[method(canBeConvertedToUnit:)] + pub unsafe fn canBeConvertedToUnit(&self, unit: &NSUnit) -> bool; + + #[method_id(@__retain_semantics Other measurementByConvertingToUnit:)] + pub unsafe fn measurementByConvertingToUnit( + &self, + unit: &NSUnit, + ) -> Id; + + #[method_id(@__retain_semantics Other measurementByAddingMeasurement:)] + pub unsafe fn measurementByAddingMeasurement( + &self, + measurement: &NSMeasurement, + ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other measurementBySubtractingMeasurement:)] + pub unsafe fn measurementBySubtractingMeasurement( + &self, + measurement: &NSMeasurement, + ) -> Id, Shared>; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSMeasurementFormatter.rs b/crates/icrate-generated/src/Foundation/generated/NSMeasurementFormatter.rs new file mode 100644 index 000000000..e7c4eeb2e --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSMeasurementFormatter.rs @@ -0,0 +1,59 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSMeasurementFormatterUnitOptions { + NSMeasurementFormatterUnitOptionsProvidedUnit = 1 << 0, + NSMeasurementFormatterUnitOptionsNaturalScale = 1 << 1, + NSMeasurementFormatterUnitOptionsTemperatureWithoutUnit = 1 << 2, + } +); + +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(@__retain_semantics Other locale)] + pub unsafe fn locale(&self) -> Id; + + #[method(setLocale:)] + pub unsafe fn setLocale(&self, locale: Option<&NSLocale>); + + #[method_id(@__retain_semantics Other numberFormatter)] + pub unsafe fn numberFormatter(&self) -> Id; + + #[method(setNumberFormatter:)] + pub unsafe fn setNumberFormatter(&self, numberFormatter: Option<&NSNumberFormatter>); + + #[method_id(@__retain_semantics Other stringFromMeasurement:)] + pub unsafe fn stringFromMeasurement( + &self, + measurement: &NSMeasurement, + ) -> Id; + + #[method_id(@__retain_semantics Other stringFromUnit:)] + pub unsafe fn stringFromUnit(&self, unit: &NSUnit) -> Id; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSMetadata.rs b/crates/icrate-generated/src/Foundation/generated/NSMetadata.rs new file mode 100644 index 000000000..358d1022c --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSMetadata.rs @@ -0,0 +1,274 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSMetadataQuery; + + unsafe impl ClassType for NSMetadataQuery { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSMetadataQuery { + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSMetadataQueryDelegate>); + + #[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) -> Id, Shared>; + + #[method(setSortDescriptors:)] + pub unsafe fn setSortDescriptors(&self, sortDescriptors: &NSArray); + + #[method_id(@__retain_semantics Other valueListAttributes)] + pub unsafe fn valueListAttributes(&self) -> Id, Shared>; + + #[method(setValueListAttributes:)] + pub unsafe fn setValueListAttributes(&self, valueListAttributes: &NSArray); + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other searchScopes)] + pub unsafe fn searchScopes(&self) -> Id; + + #[method(setSearchScopes:)] + pub unsafe fn setSearchScopes(&self, searchScopes: &NSArray); + + #[method_id(@__retain_semantics Other searchItems)] + pub unsafe fn searchItems(&self) -> Option>; + + #[method(setSearchItems:)] + pub unsafe fn setSearchItems(&self, searchItems: Option<&NSArray>); + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other resultAtIndex:)] + pub unsafe fn resultAtIndex(&self, idx: NSUInteger) -> Id; + + #[method(enumerateResultsUsingBlock:)] + pub unsafe fn enumerateResultsUsingBlock( + &self, + block: &Block<(NonNull, NSUInteger, NonNull), ()>, + ); + + #[method(enumerateResultsWithOptions:usingBlock:)] + pub unsafe fn enumerateResultsWithOptions_usingBlock( + &self, + opts: NSEnumerationOptions, + block: &Block<(NonNull, NSUInteger, NonNull), ()>, + ); + + #[method_id(@__retain_semantics Other results)] + pub unsafe fn results(&self) -> Id; + + #[method(indexOfResult:)] + pub unsafe fn indexOfResult(&self, result: &Object) -> NSUInteger; + + #[method_id(@__retain_semantics Other valueLists)] + pub unsafe fn valueLists( + &self, + ) -> Id>, Shared>; + + #[method_id(@__retain_semantics Other groupedResults)] + pub unsafe fn groupedResults(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other valueOfAttribute:forResultAtIndex:)] + pub unsafe fn valueOfAttribute_forResultAtIndex( + &self, + attrName: &NSString, + idx: NSUInteger, + ) -> Option>; + } +); + +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); + +extern_static!(NSMetadataQueryGatheringProgressNotification: &'static NSNotificationName); + +extern_static!(NSMetadataQueryDidFinishGatheringNotification: &'static NSNotificationName); + +extern_static!(NSMetadataQueryDidUpdateNotification: &'static NSNotificationName); + +extern_static!(NSMetadataQueryUpdateAddedItemsKey: &'static NSString); + +extern_static!(NSMetadataQueryUpdateChangedItemsKey: &'static NSString); + +extern_static!(NSMetadataQueryUpdateRemovedItemsKey: &'static NSString); + +extern_static!(NSMetadataQueryResultContentRelevanceAttribute: &'static NSString); + +extern_static!(NSMetadataQueryUserHomeScope: &'static NSString); + +extern_static!(NSMetadataQueryLocalComputerScope: &'static NSString); + +extern_static!(NSMetadataQueryNetworkScope: &'static NSString); + +extern_static!(NSMetadataQueryIndexedLocalComputerScope: &'static NSString); + +extern_static!(NSMetadataQueryIndexedNetworkScope: &'static NSString); + +extern_static!(NSMetadataQueryUbiquitousDocumentsScope: &'static NSString); + +extern_static!(NSMetadataQueryUbiquitousDataScope: &'static NSString); + +extern_static!(NSMetadataQueryAccessibleUbiquitousExternalDocumentsScope: &'static NSString); + +extern_class!( + #[derive(Debug)] + pub struct NSMetadataItem; + + unsafe impl ClassType for NSMetadataItem { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSMetadataItem { + #[method_id(@__retain_semantics Init initWithURL:)] + pub unsafe fn initWithURL( + this: Option>, + url: &NSURL, + ) -> Option>; + + #[method_id(@__retain_semantics Other valueForAttribute:)] + pub unsafe fn valueForAttribute(&self, key: &NSString) -> Option>; + + #[method_id(@__retain_semantics Other valuesForAttributes:)] + pub unsafe fn valuesForAttributes( + &self, + keys: &NSArray, + ) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other attribute)] + pub unsafe fn attribute(&self) -> Id; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other attribute)] + pub unsafe fn attribute(&self) -> Id; + + #[method_id(@__retain_semantics Other value)] + pub unsafe fn value(&self) -> Id; + + #[method_id(@__retain_semantics Other subgroups)] + pub unsafe fn subgroups(&self) -> Option, Shared>>; + + #[method(resultCount)] + pub unsafe fn resultCount(&self) -> NSUInteger; + + #[method_id(@__retain_semantics Other resultAtIndex:)] + pub unsafe fn resultAtIndex(&self, idx: NSUInteger) -> Id; + + #[method_id(@__retain_semantics Other results)] + pub unsafe fn results(&self) -> Id; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSMetadataAttributes.rs b/crates/icrate-generated/src/Foundation/generated/NSMetadataAttributes.rs new file mode 100644 index 000000000..cc1a2c95e --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSMetadataAttributes.rs @@ -0,0 +1,366 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +extern_static!(NSMetadataItemFSNameKey: &'static NSString); + +extern_static!(NSMetadataItemDisplayNameKey: &'static NSString); + +extern_static!(NSMetadataItemURLKey: &'static NSString); + +extern_static!(NSMetadataItemPathKey: &'static NSString); + +extern_static!(NSMetadataItemFSSizeKey: &'static NSString); + +extern_static!(NSMetadataItemFSCreationDateKey: &'static NSString); + +extern_static!(NSMetadataItemFSContentChangeDateKey: &'static NSString); + +extern_static!(NSMetadataItemContentTypeKey: &'static NSString); + +extern_static!(NSMetadataItemContentTypeTreeKey: &'static NSString); + +extern_static!(NSMetadataItemIsUbiquitousKey: &'static NSString); + +extern_static!(NSMetadataUbiquitousItemHasUnresolvedConflictsKey: &'static NSString); + +extern_static!(NSMetadataUbiquitousItemIsDownloadedKey: &'static NSString); + +extern_static!(NSMetadataUbiquitousItemDownloadingStatusKey: &'static NSString); + +extern_static!(NSMetadataUbiquitousItemDownloadingStatusNotDownloaded: &'static NSString); + +extern_static!(NSMetadataUbiquitousItemDownloadingStatusDownloaded: &'static NSString); + +extern_static!(NSMetadataUbiquitousItemDownloadingStatusCurrent: &'static NSString); + +extern_static!(NSMetadataUbiquitousItemIsDownloadingKey: &'static NSString); + +extern_static!(NSMetadataUbiquitousItemIsUploadedKey: &'static NSString); + +extern_static!(NSMetadataUbiquitousItemIsUploadingKey: &'static NSString); + +extern_static!(NSMetadataUbiquitousItemPercentDownloadedKey: &'static NSString); + +extern_static!(NSMetadataUbiquitousItemPercentUploadedKey: &'static NSString); + +extern_static!(NSMetadataUbiquitousItemDownloadingErrorKey: &'static NSString); + +extern_static!(NSMetadataUbiquitousItemUploadingErrorKey: &'static NSString); + +extern_static!(NSMetadataUbiquitousItemDownloadRequestedKey: &'static NSString); + +extern_static!(NSMetadataUbiquitousItemIsExternalDocumentKey: &'static NSString); + +extern_static!(NSMetadataUbiquitousItemContainerDisplayNameKey: &'static NSString); + +extern_static!(NSMetadataUbiquitousItemURLInLocalContainerKey: &'static NSString); + +extern_static!(NSMetadataUbiquitousItemIsSharedKey: &'static NSString); + +extern_static!(NSMetadataUbiquitousSharedItemCurrentUserRoleKey: &'static NSString); + +extern_static!(NSMetadataUbiquitousSharedItemCurrentUserPermissionsKey: &'static NSString); + +extern_static!(NSMetadataUbiquitousSharedItemOwnerNameComponentsKey: &'static NSString); + +extern_static!(NSMetadataUbiquitousSharedItemMostRecentEditorNameComponentsKey: &'static NSString); + +extern_static!(NSMetadataUbiquitousSharedItemRoleOwner: &'static NSString); + +extern_static!(NSMetadataUbiquitousSharedItemRoleParticipant: &'static NSString); + +extern_static!(NSMetadataUbiquitousSharedItemPermissionsReadOnly: &'static NSString); + +extern_static!(NSMetadataUbiquitousSharedItemPermissionsReadWrite: &'static NSString); + +extern_static!(NSMetadataItemAttributeChangeDateKey: &'static NSString); + +extern_static!(NSMetadataItemKeywordsKey: &'static NSString); + +extern_static!(NSMetadataItemTitleKey: &'static NSString); + +extern_static!(NSMetadataItemAuthorsKey: &'static NSString); + +extern_static!(NSMetadataItemEditorsKey: &'static NSString); + +extern_static!(NSMetadataItemParticipantsKey: &'static NSString); + +extern_static!(NSMetadataItemProjectsKey: &'static NSString); + +extern_static!(NSMetadataItemDownloadedDateKey: &'static NSString); + +extern_static!(NSMetadataItemWhereFromsKey: &'static NSString); + +extern_static!(NSMetadataItemCommentKey: &'static NSString); + +extern_static!(NSMetadataItemCopyrightKey: &'static NSString); + +extern_static!(NSMetadataItemLastUsedDateKey: &'static NSString); + +extern_static!(NSMetadataItemContentCreationDateKey: &'static NSString); + +extern_static!(NSMetadataItemContentModificationDateKey: &'static NSString); + +extern_static!(NSMetadataItemDateAddedKey: &'static NSString); + +extern_static!(NSMetadataItemDurationSecondsKey: &'static NSString); + +extern_static!(NSMetadataItemContactKeywordsKey: &'static NSString); + +extern_static!(NSMetadataItemVersionKey: &'static NSString); + +extern_static!(NSMetadataItemPixelHeightKey: &'static NSString); + +extern_static!(NSMetadataItemPixelWidthKey: &'static NSString); + +extern_static!(NSMetadataItemPixelCountKey: &'static NSString); + +extern_static!(NSMetadataItemColorSpaceKey: &'static NSString); + +extern_static!(NSMetadataItemBitsPerSampleKey: &'static NSString); + +extern_static!(NSMetadataItemFlashOnOffKey: &'static NSString); + +extern_static!(NSMetadataItemFocalLengthKey: &'static NSString); + +extern_static!(NSMetadataItemAcquisitionMakeKey: &'static NSString); + +extern_static!(NSMetadataItemAcquisitionModelKey: &'static NSString); + +extern_static!(NSMetadataItemISOSpeedKey: &'static NSString); + +extern_static!(NSMetadataItemOrientationKey: &'static NSString); + +extern_static!(NSMetadataItemLayerNamesKey: &'static NSString); + +extern_static!(NSMetadataItemWhiteBalanceKey: &'static NSString); + +extern_static!(NSMetadataItemApertureKey: &'static NSString); + +extern_static!(NSMetadataItemProfileNameKey: &'static NSString); + +extern_static!(NSMetadataItemResolutionWidthDPIKey: &'static NSString); + +extern_static!(NSMetadataItemResolutionHeightDPIKey: &'static NSString); + +extern_static!(NSMetadataItemExposureModeKey: &'static NSString); + +extern_static!(NSMetadataItemExposureTimeSecondsKey: &'static NSString); + +extern_static!(NSMetadataItemEXIFVersionKey: &'static NSString); + +extern_static!(NSMetadataItemCameraOwnerKey: &'static NSString); + +extern_static!(NSMetadataItemFocalLength35mmKey: &'static NSString); + +extern_static!(NSMetadataItemLensModelKey: &'static NSString); + +extern_static!(NSMetadataItemEXIFGPSVersionKey: &'static NSString); + +extern_static!(NSMetadataItemAltitudeKey: &'static NSString); + +extern_static!(NSMetadataItemLatitudeKey: &'static NSString); + +extern_static!(NSMetadataItemLongitudeKey: &'static NSString); + +extern_static!(NSMetadataItemSpeedKey: &'static NSString); + +extern_static!(NSMetadataItemTimestampKey: &'static NSString); + +extern_static!(NSMetadataItemGPSTrackKey: &'static NSString); + +extern_static!(NSMetadataItemImageDirectionKey: &'static NSString); + +extern_static!(NSMetadataItemNamedLocationKey: &'static NSString); + +extern_static!(NSMetadataItemGPSStatusKey: &'static NSString); + +extern_static!(NSMetadataItemGPSMeasureModeKey: &'static NSString); + +extern_static!(NSMetadataItemGPSDOPKey: &'static NSString); + +extern_static!(NSMetadataItemGPSMapDatumKey: &'static NSString); + +extern_static!(NSMetadataItemGPSDestLatitudeKey: &'static NSString); + +extern_static!(NSMetadataItemGPSDestLongitudeKey: &'static NSString); + +extern_static!(NSMetadataItemGPSDestBearingKey: &'static NSString); + +extern_static!(NSMetadataItemGPSDestDistanceKey: &'static NSString); + +extern_static!(NSMetadataItemGPSProcessingMethodKey: &'static NSString); + +extern_static!(NSMetadataItemGPSAreaInformationKey: &'static NSString); + +extern_static!(NSMetadataItemGPSDateStampKey: &'static NSString); + +extern_static!(NSMetadataItemGPSDifferentalKey: &'static NSString); + +extern_static!(NSMetadataItemCodecsKey: &'static NSString); + +extern_static!(NSMetadataItemMediaTypesKey: &'static NSString); + +extern_static!(NSMetadataItemStreamableKey: &'static NSString); + +extern_static!(NSMetadataItemTotalBitRateKey: &'static NSString); + +extern_static!(NSMetadataItemVideoBitRateKey: &'static NSString); + +extern_static!(NSMetadataItemAudioBitRateKey: &'static NSString); + +extern_static!(NSMetadataItemDeliveryTypeKey: &'static NSString); + +extern_static!(NSMetadataItemAlbumKey: &'static NSString); + +extern_static!(NSMetadataItemHasAlphaChannelKey: &'static NSString); + +extern_static!(NSMetadataItemRedEyeOnOffKey: &'static NSString); + +extern_static!(NSMetadataItemMeteringModeKey: &'static NSString); + +extern_static!(NSMetadataItemMaxApertureKey: &'static NSString); + +extern_static!(NSMetadataItemFNumberKey: &'static NSString); + +extern_static!(NSMetadataItemExposureProgramKey: &'static NSString); + +extern_static!(NSMetadataItemExposureTimeStringKey: &'static NSString); + +extern_static!(NSMetadataItemHeadlineKey: &'static NSString); + +extern_static!(NSMetadataItemInstructionsKey: &'static NSString); + +extern_static!(NSMetadataItemCityKey: &'static NSString); + +extern_static!(NSMetadataItemStateOrProvinceKey: &'static NSString); + +extern_static!(NSMetadataItemCountryKey: &'static NSString); + +extern_static!(NSMetadataItemTextContentKey: &'static NSString); + +extern_static!(NSMetadataItemAudioSampleRateKey: &'static NSString); + +extern_static!(NSMetadataItemAudioChannelCountKey: &'static NSString); + +extern_static!(NSMetadataItemTempoKey: &'static NSString); + +extern_static!(NSMetadataItemKeySignatureKey: &'static NSString); + +extern_static!(NSMetadataItemTimeSignatureKey: &'static NSString); + +extern_static!(NSMetadataItemAudioEncodingApplicationKey: &'static NSString); + +extern_static!(NSMetadataItemComposerKey: &'static NSString); + +extern_static!(NSMetadataItemLyricistKey: &'static NSString); + +extern_static!(NSMetadataItemAudioTrackNumberKey: &'static NSString); + +extern_static!(NSMetadataItemRecordingDateKey: &'static NSString); + +extern_static!(NSMetadataItemMusicalGenreKey: &'static NSString); + +extern_static!(NSMetadataItemIsGeneralMIDISequenceKey: &'static NSString); + +extern_static!(NSMetadataItemRecordingYearKey: &'static NSString); + +extern_static!(NSMetadataItemOrganizationsKey: &'static NSString); + +extern_static!(NSMetadataItemLanguagesKey: &'static NSString); + +extern_static!(NSMetadataItemRightsKey: &'static NSString); + +extern_static!(NSMetadataItemPublishersKey: &'static NSString); + +extern_static!(NSMetadataItemContributorsKey: &'static NSString); + +extern_static!(NSMetadataItemCoverageKey: &'static NSString); + +extern_static!(NSMetadataItemSubjectKey: &'static NSString); + +extern_static!(NSMetadataItemThemeKey: &'static NSString); + +extern_static!(NSMetadataItemDescriptionKey: &'static NSString); + +extern_static!(NSMetadataItemIdentifierKey: &'static NSString); + +extern_static!(NSMetadataItemAudiencesKey: &'static NSString); + +extern_static!(NSMetadataItemNumberOfPagesKey: &'static NSString); + +extern_static!(NSMetadataItemPageWidthKey: &'static NSString); + +extern_static!(NSMetadataItemPageHeightKey: &'static NSString); + +extern_static!(NSMetadataItemSecurityMethodKey: &'static NSString); + +extern_static!(NSMetadataItemCreatorKey: &'static NSString); + +extern_static!(NSMetadataItemEncodingApplicationsKey: &'static NSString); + +extern_static!(NSMetadataItemDueDateKey: &'static NSString); + +extern_static!(NSMetadataItemStarRatingKey: &'static NSString); + +extern_static!(NSMetadataItemPhoneNumbersKey: &'static NSString); + +extern_static!(NSMetadataItemEmailAddressesKey: &'static NSString); + +extern_static!(NSMetadataItemInstantMessageAddressesKey: &'static NSString); + +extern_static!(NSMetadataItemKindKey: &'static NSString); + +extern_static!(NSMetadataItemRecipientsKey: &'static NSString); + +extern_static!(NSMetadataItemFinderCommentKey: &'static NSString); + +extern_static!(NSMetadataItemFontsKey: &'static NSString); + +extern_static!(NSMetadataItemAppleLoopsRootKeyKey: &'static NSString); + +extern_static!(NSMetadataItemAppleLoopsKeyFilterTypeKey: &'static NSString); + +extern_static!(NSMetadataItemAppleLoopsLoopModeKey: &'static NSString); + +extern_static!(NSMetadataItemAppleLoopDescriptorsKey: &'static NSString); + +extern_static!(NSMetadataItemMusicalInstrumentCategoryKey: &'static NSString); + +extern_static!(NSMetadataItemMusicalInstrumentNameKey: &'static NSString); + +extern_static!(NSMetadataItemCFBundleIdentifierKey: &'static NSString); + +extern_static!(NSMetadataItemInformationKey: &'static NSString); + +extern_static!(NSMetadataItemDirectorKey: &'static NSString); + +extern_static!(NSMetadataItemProducerKey: &'static NSString); + +extern_static!(NSMetadataItemGenreKey: &'static NSString); + +extern_static!(NSMetadataItemPerformersKey: &'static NSString); + +extern_static!(NSMetadataItemOriginalFormatKey: &'static NSString); + +extern_static!(NSMetadataItemOriginalSourceKey: &'static NSString); + +extern_static!(NSMetadataItemAuthorEmailAddressesKey: &'static NSString); + +extern_static!(NSMetadataItemRecipientEmailAddressesKey: &'static NSString); + +extern_static!(NSMetadataItemAuthorAddressesKey: &'static NSString); + +extern_static!(NSMetadataItemRecipientAddressesKey: &'static NSString); + +extern_static!(NSMetadataItemIsLikelyJunkKey: &'static NSString); + +extern_static!(NSMetadataItemExecutableArchitecturesKey: &'static NSString); + +extern_static!(NSMetadataItemExecutablePlatformKey: &'static NSString); + +extern_static!(NSMetadataItemApplicationCategoriesKey: &'static NSString); + +extern_static!(NSMetadataItemIsApplicationManagedKey: &'static NSString); diff --git a/crates/icrate-generated/src/Foundation/generated/NSMethodSignature.rs b/crates/icrate-generated/src/Foundation/generated/NSMethodSignature.rs new file mode 100644 index 000000000..921ab735c --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSMethodSignature.rs @@ -0,0 +1,40 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSMethodSignature; + + unsafe impl ClassType for NSMethodSignature { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSMethodSignature { + #[method_id(@__retain_semantics Other 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-generated/src/Foundation/generated/NSMorphology.rs b/crates/icrate-generated/src/Foundation/generated/NSMorphology.rs new file mode 100644 index 000000000..e9b547e28 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSMorphology.rs @@ -0,0 +1,158 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +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)] + 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!( + /// NSCustomPronouns + unsafe impl NSMorphology { + #[method_id(@__retain_semantics Other customPronounForLanguage:)] + pub unsafe fn customPronounForLanguage( + &self, + language: &NSString, + ) -> Option>; + + #[method(setCustomPronoun:forLanguage:error:)] + pub unsafe fn setCustomPronoun_forLanguage_error( + &self, + features: Option<&NSMorphologyCustomPronoun>, + language: &NSString, + ) -> 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(@__retain_semantics Other requiredKeysForLanguage:)] + pub unsafe fn requiredKeysForLanguage(language: &NSString) + -> Id, Shared>; + + #[method_id(@__retain_semantics Other subjectForm)] + pub unsafe fn subjectForm(&self) -> Option>; + + #[method(setSubjectForm:)] + pub unsafe fn setSubjectForm(&self, subjectForm: Option<&NSString>); + + #[method_id(@__retain_semantics Other objectForm)] + pub unsafe fn objectForm(&self) -> Option>; + + #[method(setObjectForm:)] + pub unsafe fn setObjectForm(&self, objectForm: Option<&NSString>); + + #[method_id(@__retain_semantics Other possessiveForm)] + pub unsafe fn possessiveForm(&self) -> Option>; + + #[method(setPossessiveForm:)] + pub unsafe fn setPossessiveForm(&self, possessiveForm: Option<&NSString>); + + #[method_id(@__retain_semantics Other possessiveAdjectiveForm)] + pub unsafe fn possessiveAdjectiveForm(&self) -> Option>; + + #[method(setPossessiveAdjectiveForm:)] + pub unsafe fn setPossessiveAdjectiveForm(&self, possessiveAdjectiveForm: Option<&NSString>); + + #[method_id(@__retain_semantics Other reflexiveForm)] + pub unsafe fn reflexiveForm(&self) -> Option>; + + #[method(setReflexiveForm:)] + pub unsafe fn setReflexiveForm(&self, reflexiveForm: Option<&NSString>); + } +); + +extern_methods!( + /// NSMorphologyUserSettings + unsafe impl NSMorphology { + #[method(isUnspecified)] + pub unsafe fn isUnspecified(&self) -> bool; + + #[method_id(@__retain_semantics Other userMorphology)] + pub unsafe fn userMorphology() -> Id; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSNetServices.rs b/crates/icrate-generated/src/Foundation/generated/NSNetServices.rs new file mode 100644 index 000000000..73027c999 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSNetServices.rs @@ -0,0 +1,301 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +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)] + pub struct NSNetService; + + unsafe impl ClassType for NSNetService { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSNetService { + #[method_id(@__retain_semantics Init initWithDomain:type:name:port:)] + pub unsafe fn initWithDomain_type_name_port( + this: Option>, + domain: &NSString, + type_: &NSString, + name: &NSString, + port: c_int, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithDomain:type:name:)] + pub unsafe fn initWithDomain_type_name( + this: Option>, + domain: &NSString, + 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(@__retain_semantics Other 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(@__retain_semantics Other name)] + pub unsafe fn name(&self) -> Id; + + #[method_id(@__retain_semantics Other type)] + pub unsafe fn type_(&self) -> Id; + + #[method_id(@__retain_semantics Other domain)] + pub unsafe fn domain(&self) -> Id; + + #[method_id(@__retain_semantics Other hostName)] + pub unsafe fn hostName(&self) -> Option>; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other dictionaryFromTXTRecordData:)] + pub unsafe fn dictionaryFromTXTRecordData( + txtData: &NSData, + ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other 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(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method_id(@__retain_semantics Other 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); + } +); + +extern_protocol!( + pub struct NSNetServiceDelegate; + + 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-generated/src/Foundation/generated/NSNotification.rs b/crates/icrate-generated/src/Foundation/generated/NSNotification.rs new file mode 100644 index 000000000..727cf4e89 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSNotification.rs @@ -0,0 +1,126 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +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(@__retain_semantics Other name)] + pub unsafe fn name(&self) -> Id; + + #[method_id(@__retain_semantics Other object)] + pub unsafe fn object(&self) -> Option>; + + #[method_id(@__retain_semantics Other userInfo)] + pub unsafe fn userInfo(&self) -> Option>; + + #[method_id(@__retain_semantics Init initWithName:object:userInfo:)] + pub unsafe fn initWithName_object_userInfo( + this: Option>, + name: &NSNotificationName, + object: Option<&Object>, + userInfo: Option<&NSDictionary>, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; + } +); + +extern_methods!( + /// NSNotificationCreation + unsafe impl NSNotification { + #[method_id(@__retain_semantics Other notificationWithName:object:)] + pub unsafe fn notificationWithName_object( + aName: &NSNotificationName, + anObject: Option<&Object>, + ) -> Id; + + #[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(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + } +); + +extern_class!( + #[derive(Debug)] + pub struct NSNotificationCenter; + + unsafe impl ClassType for NSNotificationCenter { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSNotificationCenter { + #[method_id(@__retain_semantics Other 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>, + ); + + #[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, + aName: &NSNotificationName, + 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, + observer: &Object, + aName: Option<&NSNotificationName>, + anObject: Option<&Object>, + ); + + #[method_id(@__retain_semantics Other addObserverForName:object:queue:usingBlock:)] + pub unsafe fn addObserverForName_object_queue_usingBlock( + &self, + name: Option<&NSNotificationName>, + obj: Option<&Object>, + queue: Option<&NSOperationQueue>, + block: &Block<(NonNull,), ()>, + ) -> Id; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSNotificationQueue.rs b/crates/icrate-generated/src/Foundation/generated/NSNotificationQueue.rs new file mode 100644 index 000000000..9e953e3d7 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSNotificationQueue.rs @@ -0,0 +1,67 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +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)] + pub struct NSNotificationQueue; + + unsafe impl ClassType for NSNotificationQueue { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSNotificationQueue { + #[method_id(@__retain_semantics Other defaultQueue)] + pub unsafe fn defaultQueue() -> Id; + + #[method_id(@__retain_semantics Init initWithNotificationCenter:)] + pub unsafe fn initWithNotificationCenter( + this: Option>, + 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, + notification: &NSNotification, + postingStyle: NSPostingStyle, + coalesceMask: NSNotificationCoalescing, + modes: Option<&NSArray>, + ); + + #[method(dequeueNotificationsMatching:coalesceMask:)] + pub unsafe fn dequeueNotificationsMatching_coalesceMask( + &self, + notification: &NSNotification, + coalesceMask: NSUInteger, + ); + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSNull.rs b/crates/icrate-generated/src/Foundation/generated/NSNull.rs new file mode 100644 index 000000000..4fe215944 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSNull.rs @@ -0,0 +1,20 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSNull; + + unsafe impl ClassType for NSNull { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSNull { + #[method_id(@__retain_semantics Other null)] + pub unsafe fn null() -> Id; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSNumberFormatter.rs b/crates/icrate-generated/src/Foundation/generated/NSNumberFormatter.rs new file mode 100644 index 000000000..eaf85aaf4 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSNumberFormatter.rs @@ -0,0 +1,479 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSNumberFormatterBehavior { + NSNumberFormatterBehaviorDefault = 0, + 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)] + 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, + obj: *mut *mut Object, + string: &NSString, + rangep: *mut NSRange, + ) -> Result<(), Id>; + + #[method_id(@__retain_semantics Other stringFromNumber:)] + pub unsafe fn stringFromNumber(&self, number: &NSNumber) -> Option>; + + #[method_id(@__retain_semantics Other numberFromString:)] + pub unsafe fn numberFromString(&self, string: &NSString) -> Option>; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other 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(@__retain_semantics Other negativeFormat)] + pub unsafe fn negativeFormat(&self) -> Id; + + #[method(setNegativeFormat:)] + pub unsafe fn setNegativeFormat(&self, negativeFormat: Option<&NSString>); + + #[method_id(@__retain_semantics Other textAttributesForNegativeValues)] + pub unsafe fn textAttributesForNegativeValues( + &self, + ) -> Option, Shared>>; + + #[method(setTextAttributesForNegativeValues:)] + pub unsafe fn setTextAttributesForNegativeValues( + &self, + textAttributesForNegativeValues: Option<&NSDictionary>, + ); + + #[method_id(@__retain_semantics Other positiveFormat)] + pub unsafe fn positiveFormat(&self) -> Id; + + #[method(setPositiveFormat:)] + pub unsafe fn setPositiveFormat(&self, positiveFormat: Option<&NSString>); + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other 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(@__retain_semantics Other 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(@__retain_semantics Other groupingSeparator)] + pub unsafe fn groupingSeparator(&self) -> Id; + + #[method(setGroupingSeparator:)] + pub unsafe fn setGroupingSeparator(&self, groupingSeparator: Option<&NSString>); + + #[method_id(@__retain_semantics Other zeroSymbol)] + pub unsafe fn zeroSymbol(&self) -> Option>; + + #[method(setZeroSymbol:)] + pub unsafe fn setZeroSymbol(&self, zeroSymbol: Option<&NSString>); + + #[method_id(@__retain_semantics Other textAttributesForZero)] + pub unsafe fn textAttributesForZero( + &self, + ) -> Option, Shared>>; + + #[method(setTextAttributesForZero:)] + pub unsafe fn setTextAttributesForZero( + &self, + textAttributesForZero: Option<&NSDictionary>, + ); + + #[method_id(@__retain_semantics Other nilSymbol)] + pub unsafe fn nilSymbol(&self) -> Id; + + #[method(setNilSymbol:)] + pub unsafe fn setNilSymbol(&self, nilSymbol: &NSString); + + #[method_id(@__retain_semantics Other textAttributesForNil)] + pub unsafe fn textAttributesForNil( + &self, + ) -> Option, Shared>>; + + #[method(setTextAttributesForNil:)] + pub unsafe fn setTextAttributesForNil( + &self, + textAttributesForNil: Option<&NSDictionary>, + ); + + #[method_id(@__retain_semantics Other notANumberSymbol)] + pub unsafe fn notANumberSymbol(&self) -> Id; + + #[method(setNotANumberSymbol:)] + pub unsafe fn setNotANumberSymbol(&self, notANumberSymbol: Option<&NSString>); + + #[method_id(@__retain_semantics Other textAttributesForNotANumber)] + pub unsafe fn textAttributesForNotANumber( + &self, + ) -> Option, Shared>>; + + #[method(setTextAttributesForNotANumber:)] + pub unsafe fn setTextAttributesForNotANumber( + &self, + textAttributesForNotANumber: Option<&NSDictionary>, + ); + + #[method_id(@__retain_semantics Other positiveInfinitySymbol)] + pub unsafe fn positiveInfinitySymbol(&self) -> Id; + + #[method(setPositiveInfinitySymbol:)] + pub unsafe fn setPositiveInfinitySymbol(&self, positiveInfinitySymbol: &NSString); + + #[method_id(@__retain_semantics Other textAttributesForPositiveInfinity)] + pub unsafe fn textAttributesForPositiveInfinity( + &self, + ) -> Option, Shared>>; + + #[method(setTextAttributesForPositiveInfinity:)] + pub unsafe fn setTextAttributesForPositiveInfinity( + &self, + textAttributesForPositiveInfinity: Option<&NSDictionary>, + ); + + #[method_id(@__retain_semantics Other negativeInfinitySymbol)] + pub unsafe fn negativeInfinitySymbol(&self) -> Id; + + #[method(setNegativeInfinitySymbol:)] + pub unsafe fn setNegativeInfinitySymbol(&self, negativeInfinitySymbol: &NSString); + + #[method_id(@__retain_semantics Other textAttributesForNegativeInfinity)] + pub unsafe fn textAttributesForNegativeInfinity( + &self, + ) -> Option, Shared>>; + + #[method(setTextAttributesForNegativeInfinity:)] + pub unsafe fn setTextAttributesForNegativeInfinity( + &self, + textAttributesForNegativeInfinity: Option<&NSDictionary>, + ); + + #[method_id(@__retain_semantics Other positivePrefix)] + pub unsafe fn positivePrefix(&self) -> Id; + + #[method(setPositivePrefix:)] + pub unsafe fn setPositivePrefix(&self, positivePrefix: Option<&NSString>); + + #[method_id(@__retain_semantics Other positiveSuffix)] + pub unsafe fn positiveSuffix(&self) -> Id; + + #[method(setPositiveSuffix:)] + pub unsafe fn setPositiveSuffix(&self, positiveSuffix: Option<&NSString>); + + #[method_id(@__retain_semantics Other negativePrefix)] + pub unsafe fn negativePrefix(&self) -> Id; + + #[method(setNegativePrefix:)] + pub unsafe fn setNegativePrefix(&self, negativePrefix: Option<&NSString>); + + #[method_id(@__retain_semantics Other negativeSuffix)] + pub unsafe fn negativeSuffix(&self) -> Id; + + #[method(setNegativeSuffix:)] + pub unsafe fn setNegativeSuffix(&self, negativeSuffix: Option<&NSString>); + + #[method_id(@__retain_semantics Other currencyCode)] + pub unsafe fn currencyCode(&self) -> Id; + + #[method(setCurrencyCode:)] + pub unsafe fn setCurrencyCode(&self, currencyCode: Option<&NSString>); + + #[method_id(@__retain_semantics Other currencySymbol)] + pub unsafe fn currencySymbol(&self) -> Id; + + #[method(setCurrencySymbol:)] + pub unsafe fn setCurrencySymbol(&self, currencySymbol: Option<&NSString>); + + #[method_id(@__retain_semantics Other internationalCurrencySymbol)] + pub unsafe fn internationalCurrencySymbol(&self) -> Id; + + #[method(setInternationalCurrencySymbol:)] + pub unsafe fn setInternationalCurrencySymbol( + &self, + internationalCurrencySymbol: Option<&NSString>, + ); + + #[method_id(@__retain_semantics Other percentSymbol)] + pub unsafe fn percentSymbol(&self) -> Id; + + #[method(setPercentSymbol:)] + pub unsafe fn setPercentSymbol(&self, percentSymbol: Option<&NSString>); + + #[method_id(@__retain_semantics Other perMillSymbol)] + pub unsafe fn perMillSymbol(&self) -> Id; + + #[method(setPerMillSymbol:)] + pub unsafe fn setPerMillSymbol(&self, perMillSymbol: Option<&NSString>); + + #[method_id(@__retain_semantics Other minusSign)] + pub unsafe fn minusSign(&self) -> Id; + + #[method(setMinusSign:)] + pub unsafe fn setMinusSign(&self, minusSign: Option<&NSString>); + + #[method_id(@__retain_semantics Other plusSign)] + pub unsafe fn plusSign(&self) -> Id; + + #[method(setPlusSign:)] + pub unsafe fn setPlusSign(&self, plusSign: Option<&NSString>); + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other 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(@__retain_semantics Other 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(@__retain_semantics Other 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(@__retain_semantics Other minimum)] + pub unsafe fn minimum(&self) -> Option>; + + #[method(setMinimum:)] + pub unsafe fn setMinimum(&self, minimum: Option<&NSNumber>); + + #[method_id(@__retain_semantics Other maximum)] + pub unsafe fn maximum(&self) -> Option>; + + #[method(setMaximum:)] + pub unsafe fn setMaximum(&self, maximum: Option<&NSNumber>); + + #[method_id(@__retain_semantics Other 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, + partialStringValidationEnabled: bool, + ); + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSObjCRuntime.rs b/crates/icrate-generated/src/Foundation/generated/NSObjCRuntime.rs new file mode 100644 index 000000000..4a235cac6 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSObjCRuntime.rs @@ -0,0 +1,80 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +extern_static!(NSFoundationVersionNumber: c_double); + +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 { + NSOrderedAscending = -1, + NSOrderedSame = 0, + NSOrderedDescending = 1, + } +); + +pub type NSComparator = *mut Block<(NonNull, NonNull), NSComparisonResult>; + +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-generated/src/Foundation/generated/NSObject.rs b/crates/icrate-generated/src/Foundation/generated/NSObject.rs new file mode 100644 index 000000000..2dd41f73a --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSObject.rs @@ -0,0 +1,140 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +extern_protocol!( + pub struct NSCopying; + + 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>; + } +); + +extern_protocol!( + pub struct NSSecureCoding; + + unsafe impl NSSecureCoding { + #[method(supportsSecureCoding)] + pub unsafe fn supportsSecureCoding() -> bool; + } +); + +extern_methods!( + /// 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) -> &'static Class; + + #[method_id(@__retain_semantics Other replacementObjectForCoder:)] + pub unsafe fn replacementObjectForCoder( + &self, + coder: &NSCoder, + ) -> Option>; + } +); + +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 + unsafe impl NSObject { + #[method_id(@__retain_semantics Other autoContentAccessingProxy)] + 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-generated/src/Foundation/generated/NSOperation.rs b/crates/icrate-generated/src/Foundation/generated/NSOperation.rs new file mode 100644 index 000000000..db1294609 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSOperation.rs @@ -0,0 +1,234 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSOperationQueuePriority { + NSOperationQueuePriorityVeryLow = -8, + NSOperationQueuePriorityLow = -4, + NSOperationQueuePriorityNormal = 0, + NSOperationQueuePriorityHigh = 4, + NSOperationQueuePriorityVeryHigh = 8, + } +); + +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(@__retain_semantics Other 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) -> *mut Block<(), ()>; + + #[method(setCompletionBlock:)] + pub unsafe fn setCompletionBlock(&self, completionBlock: Option<&Block<(), ()>>); + + #[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(@__retain_semantics Other 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(@__retain_semantics Other blockOperationWithBlock:)] + pub unsafe fn blockOperationWithBlock(block: &Block<(), ()>) -> Id; + + #[method(addExecutionBlock:)] + pub unsafe fn addExecutionBlock(&self, block: &Block<(), ()>); + } +); + +extern_class!( + #[derive(Debug)] + pub struct NSInvocationOperation; + + unsafe impl ClassType for NSInvocationOperation { + type Super = NSOperation; + } +); + +extern_methods!( + unsafe impl NSInvocationOperation { + #[method_id(@__retain_semantics Init initWithTarget:selector:object:)] + pub unsafe fn initWithTarget_selector_object( + this: Option>, + target: &Object, + sel: Sel, + arg: Option<&Object>, + ) -> Option>; + + #[method_id(@__retain_semantics Init initWithInvocation:)] + pub unsafe fn initWithInvocation( + this: Option>, + inv: &NSInvocation, + ) -> Id; + + #[method_id(@__retain_semantics Other invocation)] + pub unsafe fn invocation(&self) -> Id; + + #[method_id(@__retain_semantics Other result)] + pub unsafe fn result(&self) -> Option>; + } +); + +extern_static!(NSInvocationOperationVoidResultException: &'static NSExceptionName); + +extern_static!(NSInvocationOperationCancelledException: &'static NSExceptionName); + +extern_static!(NSOperationQueueDefaultMaxConcurrentOperationCount: NSInteger = -1); + +extern_class!( + #[derive(Debug)] + pub struct NSOperationQueue; + + unsafe impl ClassType for NSOperationQueue { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSOperationQueue { + #[method_id(@__retain_semantics Other 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: &Block<(), ()>); + + #[method(addBarrierBlock:)] + pub unsafe fn addBarrierBlock(&self, barrier: &Block<(), ()>); + + #[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(@__retain_semantics Other 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(cancelAllOperations)] + pub unsafe fn cancelAllOperations(&self); + + #[method(waitUntilAllOperationsAreFinished)] + pub unsafe fn waitUntilAllOperationsAreFinished(&self); + + #[method_id(@__retain_semantics Other currentQueue)] + pub unsafe fn currentQueue() -> Option>; + + #[method_id(@__retain_semantics Other mainQueue)] + pub unsafe fn mainQueue() -> Id; + } +); + +extern_methods!( + /// NSDeprecated + unsafe impl NSOperationQueue { + #[method_id(@__retain_semantics Other operations)] + pub unsafe fn operations(&self) -> Id, Shared>; + + #[method(operationCount)] + pub unsafe fn operationCount(&self) -> NSUInteger; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSOrderedCollectionChange.rs b/crates/icrate-generated/src/Foundation/generated/NSOrderedCollectionChange.rs new file mode 100644 index 000000000..f44091090 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSOrderedCollectionChange.rs @@ -0,0 +1,74 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSCollectionChangeType { + NSCollectionChangeInsert = 0, + NSCollectionChangeRemove = 1, + } +); + +__inner_extern_class!( + #[derive(Debug)] + pub struct NSOrderedCollectionChange { + _inner0: PhantomData<*mut ObjectType>, + } + + unsafe impl ClassType for NSOrderedCollectionChange { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSOrderedCollectionChange { + #[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(@__retain_semantics Other changeWithObject:type:index:associatedIndex:)] + pub unsafe fn changeWithObject_type_index_associatedIndex( + anObject: Option<&ObjectType>, + type_: NSCollectionChangeType, + index: NSUInteger, + associatedIndex: NSUInteger, + ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method_id(@__retain_semantics Init initWithObject:type:index:)] + pub unsafe fn initWithObject_type_index( + this: Option>, + anObject: Option<&ObjectType>, + type_: NSCollectionChangeType, + index: NSUInteger, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithObject:type:index:associatedIndex:)] + pub unsafe fn initWithObject_type_index_associatedIndex( + this: Option>, + anObject: Option<&ObjectType>, + type_: NSCollectionChangeType, + index: NSUInteger, + associatedIndex: NSUInteger, + ) -> Id; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSOrderedCollectionDifference.rs b/crates/icrate-generated/src/Foundation/generated/NSOrderedCollectionDifference.rs new file mode 100644 index 000000000..b5345764a --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSOrderedCollectionDifference.rs @@ -0,0 +1,77 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSOrderedCollectionDifferenceCalculationOptions { + NSOrderedCollectionDifferenceCalculationOmitInsertedObjects = 1 << 0, + NSOrderedCollectionDifferenceCalculationOmitRemovedObjects = 1 << 1, + NSOrderedCollectionDifferenceCalculationInferMoves = 1 << 2, + } +); + +__inner_extern_class!( + #[derive(Debug)] + pub struct NSOrderedCollectionDifference { + _inner0: PhantomData<*mut ObjectType>, + } + + unsafe impl ClassType for NSOrderedCollectionDifference { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSOrderedCollectionDifference { + #[method_id(@__retain_semantics Init initWithChanges:)] + pub unsafe fn initWithChanges( + this: Option>, + changes: &NSArray>, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithInsertIndexes:insertedObjects:removeIndexes:removedObjects:additionalChanges:)] + pub unsafe fn initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_additionalChanges( + this: Option>, + inserts: &NSIndexSet, + insertedObjects: Option<&NSArray>, + removes: &NSIndexSet, + removedObjects: Option<&NSArray>, + changes: &NSArray>, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithInsertIndexes:insertedObjects:removeIndexes:removedObjects:)] + pub unsafe fn initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects( + this: Option>, + inserts: &NSIndexSet, + insertedObjects: Option<&NSArray>, + removes: &NSIndexSet, + removedObjects: Option<&NSArray>, + ) -> Id; + + #[method_id(@__retain_semantics Other insertions)] + pub unsafe fn insertions( + &self, + ) -> Id>, Shared>; + + #[method_id(@__retain_semantics Other removals)] + pub unsafe fn removals(&self) + -> Id>, Shared>; + + #[method(hasChanges)] + pub unsafe fn hasChanges(&self) -> bool; + + #[method_id(@__retain_semantics Other differenceByTransformingChangesWithBlock:)] + pub unsafe fn differenceByTransformingChangesWithBlock( + &self, + block: &Block< + (NonNull>,), + NonNull>, + >, + ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other inverseDifference)] + pub unsafe fn inverseDifference(&self) -> Id; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSOrderedSet.rs b/crates/icrate-generated/src/Foundation/generated/NSOrderedSet.rs new file mode 100644 index 000000000..101409162 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSOrderedSet.rs @@ -0,0 +1,499 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +__inner_extern_class!( + #[derive(Debug)] + pub struct NSOrderedSet { + _inner0: PhantomData<*mut ObjectType>, + } + + unsafe impl ClassType for NSOrderedSet { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSOrderedSet { + #[method(count)] + pub unsafe fn count(&self) -> NSUInteger; + + #[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(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method_id(@__retain_semantics Init initWithObjects:count:)] + pub unsafe fn initWithObjects_count( + this: Option>, + objects: *mut NonNull, + cnt: NSUInteger, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; + } +); + +extern_methods!( + /// NSExtendedOrderedSet + unsafe impl NSOrderedSet { + #[method(getObjects:range:)] + pub unsafe fn getObjects_range(&self, objects: *mut NonNull, range: NSRange); + + #[method_id(@__retain_semantics Other objectsAtIndexes:)] + pub unsafe fn objectsAtIndexes( + &self, + indexes: &NSIndexSet, + ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other firstObject)] + pub unsafe fn firstObject(&self) -> Option>; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other objectAtIndexedSubscript:)] + pub unsafe fn objectAtIndexedSubscript(&self, idx: NSUInteger) -> Id; + + #[method_id(@__retain_semantics Other objectEnumerator)] + pub unsafe fn objectEnumerator(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other reverseObjectEnumerator)] + pub unsafe fn reverseObjectEnumerator(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other reversedOrderedSet)] + pub unsafe fn reversedOrderedSet(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other array)] + pub unsafe fn array(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other set)] + pub unsafe fn set(&self) -> Id, Shared>; + + #[method(enumerateObjectsUsingBlock:)] + pub unsafe fn enumerateObjectsUsingBlock( + &self, + block: &Block<(NonNull, NSUInteger, NonNull), ()>, + ); + + #[method(enumerateObjectsWithOptions:usingBlock:)] + pub unsafe fn enumerateObjectsWithOptions_usingBlock( + &self, + opts: NSEnumerationOptions, + block: &Block<(NonNull, NSUInteger, NonNull), ()>, + ); + + #[method(enumerateObjectsAtIndexes:options:usingBlock:)] + pub unsafe fn enumerateObjectsAtIndexes_options_usingBlock( + &self, + s: &NSIndexSet, + opts: NSEnumerationOptions, + block: &Block<(NonNull, NSUInteger, NonNull), ()>, + ); + + #[method(indexOfObjectPassingTest:)] + pub unsafe fn indexOfObjectPassingTest( + &self, + predicate: &Block<(NonNull, NSUInteger, NonNull), Bool>, + ) -> NSUInteger; + + #[method(indexOfObjectWithOptions:passingTest:)] + pub unsafe fn indexOfObjectWithOptions_passingTest( + &self, + opts: NSEnumerationOptions, + predicate: &Block<(NonNull, NSUInteger, NonNull), Bool>, + ) -> NSUInteger; + + #[method(indexOfObjectAtIndexes:options:passingTest:)] + pub unsafe fn indexOfObjectAtIndexes_options_passingTest( + &self, + s: &NSIndexSet, + opts: NSEnumerationOptions, + predicate: &Block<(NonNull, NSUInteger, NonNull), Bool>, + ) -> NSUInteger; + + #[method_id(@__retain_semantics Other indexesOfObjectsPassingTest:)] + pub unsafe fn indexesOfObjectsPassingTest( + &self, + predicate: &Block<(NonNull, NSUInteger, NonNull), Bool>, + ) -> Id; + + #[method_id(@__retain_semantics Other indexesOfObjectsWithOptions:passingTest:)] + pub unsafe fn indexesOfObjectsWithOptions_passingTest( + &self, + opts: NSEnumerationOptions, + predicate: &Block<(NonNull, NSUInteger, NonNull), Bool>, + ) -> Id; + + #[method_id(@__retain_semantics Other indexesOfObjectsAtIndexes:options:passingTest:)] + pub unsafe fn indexesOfObjectsAtIndexes_options_passingTest( + &self, + s: &NSIndexSet, + opts: NSEnumerationOptions, + predicate: &Block<(NonNull, NSUInteger, NonNull), Bool>, + ) -> Id; + + #[method(indexOfObject:inSortedRange:options:usingComparator:)] + pub unsafe fn indexOfObject_inSortedRange_options_usingComparator( + &self, + object: &ObjectType, + range: NSRange, + opts: NSBinarySearchingOptions, + cmp: NSComparator, + ) -> NSUInteger; + + #[method_id(@__retain_semantics Other sortedArrayUsingComparator:)] + pub unsafe fn sortedArrayUsingComparator( + &self, + cmptr: NSComparator, + ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other sortedArrayWithOptions:usingComparator:)] + pub unsafe fn sortedArrayWithOptions_usingComparator( + &self, + opts: NSSortOptions, + cmptr: NSComparator, + ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other description)] + pub unsafe fn description(&self) -> Id; + + #[method_id(@__retain_semantics Other descriptionWithLocale:)] + pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) + -> Id; + + #[method_id(@__retain_semantics Other descriptionWithLocale:indent:)] + pub unsafe fn descriptionWithLocale_indent( + &self, + locale: Option<&Object>, + level: NSUInteger, + ) -> Id; + } +); + +extern_methods!( + /// NSOrderedSetCreation + unsafe impl NSOrderedSet { + #[method_id(@__retain_semantics Other orderedSet)] + pub unsafe fn orderedSet() -> Id; + + #[method_id(@__retain_semantics Other orderedSetWithObject:)] + pub unsafe fn orderedSetWithObject(object: &ObjectType) -> Id; + + #[method_id(@__retain_semantics Other orderedSetWithObjects:count:)] + pub unsafe fn orderedSetWithObjects_count( + objects: NonNull>, + cnt: NSUInteger, + ) -> Id; + + #[method_id(@__retain_semantics Other orderedSetWithOrderedSet:)] + pub unsafe fn orderedSetWithOrderedSet(set: &NSOrderedSet) -> Id; + + #[method_id(@__retain_semantics Other orderedSetWithOrderedSet:range:copyItems:)] + pub unsafe fn orderedSetWithOrderedSet_range_copyItems( + set: &NSOrderedSet, + range: NSRange, + flag: bool, + ) -> Id; + + #[method_id(@__retain_semantics Other orderedSetWithArray:)] + pub unsafe fn orderedSetWithArray(array: &NSArray) -> Id; + + #[method_id(@__retain_semantics Other orderedSetWithArray:range:copyItems:)] + pub unsafe fn orderedSetWithArray_range_copyItems( + array: &NSArray, + range: NSRange, + flag: bool, + ) -> Id; + + #[method_id(@__retain_semantics Other orderedSetWithSet:)] + pub unsafe fn orderedSetWithSet(set: &NSSet) -> Id; + + #[method_id(@__retain_semantics Other orderedSetWithSet:copyItems:)] + pub unsafe fn orderedSetWithSet_copyItems( + set: &NSSet, + flag: bool, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithObject:)] + pub unsafe fn initWithObject( + this: Option>, + object: &ObjectType, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithOrderedSet:)] + pub unsafe fn initWithOrderedSet( + this: Option>, + set: &NSOrderedSet, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithOrderedSet:copyItems:)] + pub unsafe fn initWithOrderedSet_copyItems( + this: Option>, + set: &NSOrderedSet, + flag: bool, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithOrderedSet:range:copyItems:)] + pub unsafe fn initWithOrderedSet_range_copyItems( + this: Option>, + set: &NSOrderedSet, + range: NSRange, + flag: bool, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithArray:)] + pub unsafe fn initWithArray( + this: Option>, + array: &NSArray, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithArray:copyItems:)] + pub unsafe fn initWithArray_copyItems( + this: Option>, + set: &NSArray, + flag: bool, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithArray:range:copyItems:)] + pub unsafe fn initWithArray_range_copyItems( + this: Option>, + set: &NSArray, + range: NSRange, + flag: bool, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithSet:)] + pub unsafe fn initWithSet( + this: Option>, + set: &NSSet, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithSet:copyItems:)] + pub unsafe fn initWithSet_copyItems( + this: Option>, + set: &NSSet, + flag: bool, + ) -> Id; + } +); + +extern_methods!( + /// NSOrderedSetDiffing + unsafe impl NSOrderedSet { + #[method_id(@__retain_semantics Other differenceFromOrderedSet:withOptions:usingEquivalenceTest:)] + pub unsafe fn differenceFromOrderedSet_withOptions_usingEquivalenceTest( + &self, + other: &NSOrderedSet, + options: NSOrderedCollectionDifferenceCalculationOptions, + block: &Block<(NonNull, NonNull), Bool>, + ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other differenceFromOrderedSet:withOptions:)] + pub unsafe fn differenceFromOrderedSet_withOptions( + &self, + other: &NSOrderedSet, + options: NSOrderedCollectionDifferenceCalculationOptions, + ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other differenceFromOrderedSet:)] + pub unsafe fn differenceFromOrderedSet( + &self, + other: &NSOrderedSet, + ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other orderedSetByApplyingDifference:)] + pub unsafe fn orderedSetByApplyingDifference( + &self, + difference: &NSOrderedCollectionDifference, + ) -> Option, Shared>>; + } +); + +__inner_extern_class!( + #[derive(Debug)] + pub struct NSMutableOrderedSet { + _inner0: PhantomData<*mut ObjectType>, + } + + 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(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method_id(@__retain_semantics Init initWithCapacity:)] + pub unsafe fn initWithCapacity( + this: Option>, + numItems: NSUInteger, + ) -> Id; + } +); + +extern_methods!( + /// NSExtendedMutableOrderedSet + unsafe impl NSMutableOrderedSet { + #[method(addObject:)] + pub unsafe fn addObject(&self, object: &ObjectType); + + #[method(addObjects:count:)] + pub unsafe fn addObjects_count(&self, objects: *mut NonNull, 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, + range: NSRange, + objects: *mut NonNull, + 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, + range: NSRange, + opts: NSSortOptions, + cmptr: NSComparator, + ); + } +); + +extern_methods!( + /// NSMutableOrderedSetCreation + unsafe impl NSMutableOrderedSet { + #[method_id(@__retain_semantics Other orderedSetWithCapacity:)] + pub unsafe fn orderedSetWithCapacity(numItems: NSUInteger) -> Id; + } +); + +extern_methods!( + /// NSMutableOrderedSetDiffing + unsafe impl NSMutableOrderedSet { + #[method(applyDifference:)] + pub unsafe fn applyDifference( + &self, + difference: &NSOrderedCollectionDifference, + ); + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSOrthography.rs b/crates/icrate-generated/src/Foundation/generated/NSOrthography.rs new file mode 100644 index 000000000..6e7d25562 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSOrthography.rs @@ -0,0 +1,76 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSOrthography; + + unsafe impl ClassType for NSOrthography { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSOrthography { + #[method_id(@__retain_semantics Other dominantScript)] + pub unsafe fn dominantScript(&self) -> Id; + + #[method_id(@__retain_semantics Other languageMap)] + pub unsafe fn languageMap(&self) -> Id>, Shared>; + + #[method_id(@__retain_semantics Init initWithDominantScript:languageMap:)] + pub unsafe fn initWithDominantScript_languageMap( + this: Option>, + script: &NSString, + map: &NSDictionary>, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; + } +); + +extern_methods!( + /// NSOrthographyExtended + unsafe impl NSOrthography { + #[method_id(@__retain_semantics Other languagesForScript:)] + pub unsafe fn languagesForScript( + &self, + script: &NSString, + ) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other dominantLanguageForScript:)] + pub unsafe fn dominantLanguageForScript( + &self, + script: &NSString, + ) -> Option>; + + #[method_id(@__retain_semantics Other dominantLanguage)] + pub unsafe fn dominantLanguage(&self) -> Id; + + #[method_id(@__retain_semantics Other allScripts)] + pub unsafe fn allScripts(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other allLanguages)] + pub unsafe fn allLanguages(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other defaultOrthographyForLanguage:)] + pub unsafe fn defaultOrthographyForLanguage(language: &NSString) -> Id; + } +); + +extern_methods!( + /// NSOrthographyCreation + unsafe impl NSOrthography { + #[method_id(@__retain_semantics Other orthographyWithDominantScript:languageMap:)] + pub unsafe fn orthographyWithDominantScript_languageMap( + script: &NSString, + map: &NSDictionary>, + ) -> Id; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSPathUtilities.rs b/crates/icrate-generated/src/Foundation/generated/NSPathUtilities.rs new file mode 100644 index 000000000..909bd0bf4 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSPathUtilities.rs @@ -0,0 +1,163 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +extern_methods!( + /// NSStringPathExtensions + unsafe impl NSString { + #[method_id(@__retain_semantics Other pathWithComponents:)] + pub unsafe fn pathWithComponents(components: &NSArray) -> Id; + + #[method_id(@__retain_semantics Other pathComponents)] + pub unsafe fn pathComponents(&self) -> Id, Shared>; + + #[method(isAbsolutePath)] + pub unsafe fn isAbsolutePath(&self) -> bool; + + #[method_id(@__retain_semantics Other lastPathComponent)] + pub unsafe fn lastPathComponent(&self) -> Id; + + #[method_id(@__retain_semantics Other stringByDeletingLastPathComponent)] + pub unsafe fn stringByDeletingLastPathComponent(&self) -> Id; + + #[method_id(@__retain_semantics Other stringByAppendingPathComponent:)] + pub fn stringByAppendingPathComponent(&self, str: &NSString) -> Id; + + #[method_id(@__retain_semantics Other pathExtension)] + pub unsafe fn pathExtension(&self) -> Id; + + #[method_id(@__retain_semantics Other stringByDeletingPathExtension)] + pub unsafe fn stringByDeletingPathExtension(&self) -> Id; + + #[method_id(@__retain_semantics Other stringByAppendingPathExtension:)] + pub unsafe fn stringByAppendingPathExtension( + &self, + str: &NSString, + ) -> Option>; + + #[method_id(@__retain_semantics Other stringByAbbreviatingWithTildeInPath)] + pub unsafe fn stringByAbbreviatingWithTildeInPath(&self) -> Id; + + #[method_id(@__retain_semantics Other stringByExpandingTildeInPath)] + pub unsafe fn stringByExpandingTildeInPath(&self) -> Id; + + #[method_id(@__retain_semantics Other stringByStandardizingPath)] + pub unsafe fn stringByStandardizingPath(&self) -> Id; + + #[method_id(@__retain_semantics Other stringByResolvingSymlinksInPath)] + pub unsafe fn stringByResolvingSymlinksInPath(&self) -> Id; + + #[method_id(@__retain_semantics Other stringsByAppendingPaths:)] + pub unsafe fn stringsByAppendingPaths( + &self, + paths: &NSArray, + ) -> Id, Shared>; + + #[method(completePathIntoString:caseSensitive:matchesIntoArray:filterTypes:)] + pub unsafe fn completePathIntoString_caseSensitive_matchesIntoArray_filterTypes( + &self, + outputName: *mut *mut NSString, + flag: bool, + outputArray: *mut *mut NSArray, + filterTypes: Option<&NSArray>, + ) -> NSUInteger; + + #[method(fileSystemRepresentation)] + pub unsafe fn fileSystemRepresentation(&self) -> NonNull; + + #[method(getFileSystemRepresentation:maxLength:)] + pub unsafe fn getFileSystemRepresentation_maxLength( + &self, + cname: NonNull, + max: NSUInteger, + ) -> bool; + } +); + +extern_methods!( + /// NSArrayPathExtensions + unsafe impl NSArray { + #[method_id(@__retain_semantics Other pathsMatchingExtensions:)] + pub unsafe fn pathsMatchingExtensions( + &self, + filterTypes: &NSArray, + ) -> Id, Shared>; + } +); + +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 { + 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, + } +); + +extern_fn!( + pub unsafe fn NSSearchPathForDirectoriesInDomains( + directory: NSSearchPathDirectory, + domainMask: NSSearchPathDomainMask, + expandTilde: Bool, + ) -> NonNull>; +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSPersonNameComponents.rs b/crates/icrate-generated/src/Foundation/generated/NSPersonNameComponents.rs new file mode 100644 index 000000000..c5e94da2d --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSPersonNameComponents.rs @@ -0,0 +1,62 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSPersonNameComponents; + + unsafe impl ClassType for NSPersonNameComponents { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSPersonNameComponents { + #[method_id(@__retain_semantics Other namePrefix)] + pub unsafe fn namePrefix(&self) -> Option>; + + #[method(setNamePrefix:)] + pub unsafe fn setNamePrefix(&self, namePrefix: Option<&NSString>); + + #[method_id(@__retain_semantics Other givenName)] + pub unsafe fn givenName(&self) -> Option>; + + #[method(setGivenName:)] + pub unsafe fn setGivenName(&self, givenName: Option<&NSString>); + + #[method_id(@__retain_semantics Other middleName)] + pub unsafe fn middleName(&self) -> Option>; + + #[method(setMiddleName:)] + pub unsafe fn setMiddleName(&self, middleName: Option<&NSString>); + + #[method_id(@__retain_semantics Other familyName)] + pub unsafe fn familyName(&self) -> Option>; + + #[method(setFamilyName:)] + pub unsafe fn setFamilyName(&self, familyName: Option<&NSString>); + + #[method_id(@__retain_semantics Other nameSuffix)] + pub unsafe fn nameSuffix(&self) -> Option>; + + #[method(setNameSuffix:)] + pub unsafe fn setNameSuffix(&self, nameSuffix: Option<&NSString>); + + #[method_id(@__retain_semantics Other nickname)] + pub unsafe fn nickname(&self) -> Option>; + + #[method(setNickname:)] + pub unsafe fn setNickname(&self, nickname: Option<&NSString>); + + #[method_id(@__retain_semantics Other phoneticRepresentation)] + pub unsafe fn phoneticRepresentation(&self) -> Option>; + + #[method(setPhoneticRepresentation:)] + pub unsafe fn setPhoneticRepresentation( + &self, + phoneticRepresentation: Option<&NSPersonNameComponents>, + ); + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSPersonNameComponentsFormatter.rs b/crates/icrate-generated/src/Foundation/generated/NSPersonNameComponentsFormatter.rs new file mode 100644 index 000000000..4895bc125 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSPersonNameComponentsFormatter.rs @@ -0,0 +1,102 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSPersonNameComponentsFormatterStyle { + NSPersonNameComponentsFormatterStyleDefault = 0, + NSPersonNameComponentsFormatterStyleShort = 1, + NSPersonNameComponentsFormatterStyleMedium = 2, + NSPersonNameComponentsFormatterStyleLong = 3, + NSPersonNameComponentsFormatterStyleAbbreviated = 4, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSPersonNameComponentsFormatterOptions { + NSPersonNameComponentsFormatterPhonetic = 1 << 1, + } +); + +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(@__retain_semantics Other locale)] + pub unsafe fn locale(&self) -> Id; + + #[method(setLocale:)] + pub unsafe fn setLocale(&self, locale: Option<&NSLocale>); + + #[method_id(@__retain_semantics Other localizedStringFromPersonNameComponents:style:options:)] + pub unsafe fn localizedStringFromPersonNameComponents_style_options( + components: &NSPersonNameComponents, + nameFormatStyle: NSPersonNameComponentsFormatterStyle, + nameOptions: NSPersonNameComponentsFormatterOptions, + ) -> Id; + + #[method_id(@__retain_semantics Other stringFromPersonNameComponents:)] + pub unsafe fn stringFromPersonNameComponents( + &self, + components: &NSPersonNameComponents, + ) -> Id; + + #[method_id(@__retain_semantics Other annotatedStringFromPersonNameComponents:)] + pub unsafe fn annotatedStringFromPersonNameComponents( + &self, + components: &NSPersonNameComponents, + ) -> Id; + + #[method_id(@__retain_semantics Other personNameComponentsFromString:)] + pub unsafe fn personNameComponentsFromString( + &self, + string: &NSString, + ) -> Option>; + + #[method(getObjectValue:forString:errorDescription:)] + pub unsafe fn getObjectValue_forString_errorDescription( + &self, + obj: *mut *mut Object, + string: &NSString, + error: *mut *mut NSString, + ) -> bool; + } +); + +extern_static!(NSPersonNameComponentKey: &'static NSString); + +extern_static!(NSPersonNameComponentGivenName: &'static NSString); + +extern_static!(NSPersonNameComponentFamilyName: &'static NSString); + +extern_static!(NSPersonNameComponentMiddleName: &'static NSString); + +extern_static!(NSPersonNameComponentPrefix: &'static NSString); + +extern_static!(NSPersonNameComponentSuffix: &'static NSString); + +extern_static!(NSPersonNameComponentNickname: &'static NSString); + +extern_static!(NSPersonNameComponentDelimiter: &'static NSString); diff --git a/crates/icrate-generated/src/Foundation/generated/NSPointerArray.rs b/crates/icrate-generated/src/Foundation/generated/NSPointerArray.rs new file mode 100644 index 000000000..249244ddc --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSPointerArray.rs @@ -0,0 +1,84 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSPointerArray; + + unsafe impl ClassType for NSPointerArray { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSPointerArray { + #[method_id(@__retain_semantics Init initWithOptions:)] + pub unsafe fn initWithOptions( + this: Option>, + options: NSPointerFunctionsOptions, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithPointerFunctions:)] + pub unsafe fn initWithPointerFunctions( + this: Option>, + functions: &NSPointerFunctions, + ) -> Id; + + #[method_id(@__retain_semantics Other pointerArrayWithOptions:)] + pub unsafe fn pointerArrayWithOptions( + options: NSPointerFunctionsOptions, + ) -> Id; + + #[method_id(@__retain_semantics Other pointerArrayWithPointerFunctions:)] + pub unsafe fn pointerArrayWithPointerFunctions( + functions: &NSPointerFunctions, + ) -> Id; + + #[method_id(@__retain_semantics Other 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!( + /// NSPointerArrayConveniences + unsafe impl NSPointerArray { + #[method_id(@__retain_semantics Other strongObjectsPointerArray)] + pub unsafe fn strongObjectsPointerArray() -> Id; + + #[method_id(@__retain_semantics Other weakObjectsPointerArray)] + pub unsafe fn weakObjectsPointerArray() -> Id; + + #[method_id(@__retain_semantics Other allObjects)] + pub unsafe fn allObjects(&self) -> Id; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSPointerFunctions.rs b/crates/icrate-generated/src/Foundation/generated/NSPointerFunctions.rs new file mode 100644 index 000000000..7d675f0c2 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSPointerFunctions.rs @@ -0,0 +1,169 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +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)] + pub struct NSPointerFunctions; + + unsafe impl ClassType for NSPointerFunctions { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSPointerFunctions { + #[method_id(@__retain_semantics Init initWithOptions:)] + pub unsafe fn initWithOptions( + this: Option>, + options: NSPointerFunctionsOptions, + ) -> Id; + + #[method_id(@__retain_semantics Other pointerFunctionsWithOptions:)] + pub unsafe fn pointerFunctionsWithOptions( + options: NSPointerFunctionsOptions, + ) -> Id; + + #[method(hashFunction)] + pub unsafe fn hashFunction( + &self, + ) -> Option< + unsafe extern "C" fn( + NonNull, + Option) -> NSUInteger>, + ) -> NSUInteger, + >; + + #[method(setHashFunction:)] + pub unsafe fn setHashFunction( + &self, + hashFunction: Option< + unsafe extern "C" fn( + NonNull, + Option) -> NSUInteger>, + ) -> NSUInteger, + >, + ); + + #[method(isEqualFunction)] + pub unsafe fn isEqualFunction( + &self, + ) -> Option< + unsafe extern "C" fn( + NonNull, + NonNull, + Option) -> NSUInteger>, + ) -> Bool, + >; + + #[method(setIsEqualFunction:)] + pub unsafe fn setIsEqualFunction( + &self, + isEqualFunction: Option< + unsafe extern "C" fn( + NonNull, + NonNull, + Option) -> NSUInteger>, + ) -> Bool, + >, + ); + + #[method(sizeFunction)] + pub unsafe fn sizeFunction( + &self, + ) -> Option) -> NSUInteger>; + + #[method(setSizeFunction:)] + pub unsafe fn setSizeFunction( + &self, + sizeFunction: Option) -> NSUInteger>, + ); + + #[method(descriptionFunction)] + pub unsafe fn descriptionFunction( + &self, + ) -> Option) -> *mut NSString>; + + #[method(setDescriptionFunction:)] + pub unsafe fn setDescriptionFunction( + &self, + descriptionFunction: Option) -> *mut NSString>, + ); + + #[method(relinquishFunction)] + pub unsafe fn relinquishFunction( + &self, + ) -> Option< + unsafe extern "C" fn( + NonNull, + Option) -> NSUInteger>, + ), + >; + + #[method(setRelinquishFunction:)] + pub unsafe fn setRelinquishFunction( + &self, + relinquishFunction: Option< + unsafe extern "C" fn( + NonNull, + Option) -> NSUInteger>, + ), + >, + ); + + #[method(acquireFunction)] + pub unsafe fn acquireFunction( + &self, + ) -> Option< + unsafe extern "C" fn( + NonNull, + Option) -> NSUInteger>, + Bool, + ) -> NonNull, + >; + + #[method(setAcquireFunction:)] + pub unsafe fn setAcquireFunction( + &self, + acquireFunction: Option< + unsafe extern "C" fn( + NonNull, + Option) -> NSUInteger>, + Bool, + ) -> NonNull, + >, + ); + + #[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-generated/src/Foundation/generated/NSPort.rs b/crates/icrate-generated/src/Foundation/generated/NSPort.rs new file mode 100644 index 000000000..078466827 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSPort.rs @@ -0,0 +1,156 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +pub type NSSocketNativeHandle = c_int; + +extern_static!(NSPortDidBecomeInvalidNotification: &'static NSNotificationName); + +extern_class!( + #[derive(Debug)] + pub struct NSPort; + + unsafe impl ClassType for NSPort { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSPort { + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other 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; + + #[method(sendBeforeDate:msgid:components:from:reserved:)] + pub unsafe fn sendBeforeDate_msgid_components_from_reserved( + &self, + limitDate: &NSDate, + msgID: NSUInteger, + components: Option<&NSMutableArray>, + receivePort: Option<&NSPort>, + headerSpaceReserved: NSUInteger, + ) -> bool; + } +); + +extern_protocol!( + pub struct NSPortDelegate; + + unsafe impl NSPortDelegate { + #[optional] + #[method(handlePortMessage:)] + pub unsafe fn handlePortMessage(&self, message: &NSPortMessage); + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSMachPortOptions { + NSMachPortDeallocateNone = 0, + NSMachPortDeallocateSendRight = 1 << 0, + NSMachPortDeallocateReceiveRight = 1 << 1, + } +); + +extern_class!( + #[derive(Debug)] + pub struct NSMachPort; + + unsafe impl ClassType for NSMachPort { + type Super = NSPort; + } +); + +extern_methods!( + unsafe impl NSMachPort { + #[method_id(@__retain_semantics Other portWithMachPort:)] + pub unsafe fn portWithMachPort(machPort: u32) -> Id; + + #[method_id(@__retain_semantics Init initWithMachPort:)] + pub unsafe fn initWithMachPort( + this: Option>, + machPort: u32, + ) -> Id; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, anObject: Option<&NSMachPortDelegate>); + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self) -> Option>; + + #[method_id(@__retain_semantics Other portWithMachPort:options:)] + pub unsafe fn portWithMachPort_options( + machPort: u32, + f: NSMachPortOptions, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithMachPort:options:)] + pub unsafe fn initWithMachPort_options( + this: Option>, + 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); + } +); + +extern_protocol!( + pub struct NSMachPortDelegate; + + unsafe impl NSMachPortDelegate { + #[optional] + #[method(handleMachMessage:)] + pub unsafe fn handleMachMessage(&self, msg: NonNull); + } +); + +extern_class!( + #[derive(Debug)] + pub struct NSMessagePort; + + unsafe impl ClassType for NSMessagePort { + type Super = NSPort; + } +); + +extern_methods!( + unsafe impl NSMessagePort {} +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSPredicate.rs b/crates/icrate-generated/src/Foundation/generated/NSPredicate.rs new file mode 100644 index 000000000..7e9cccf79 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSPredicate.rs @@ -0,0 +1,115 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSPredicate; + + unsafe impl ClassType for NSPredicate { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSPredicate { + #[method_id(@__retain_semantics Other predicateWithFormat:argumentArray:)] + pub unsafe fn predicateWithFormat_argumentArray( + predicateFormat: &NSString, + arguments: Option<&NSArray>, + ) -> Id; + + #[method_id(@__retain_semantics Other predicateFromMetadataQueryString:)] + pub unsafe fn predicateFromMetadataQueryString( + queryString: &NSString, + ) -> Option>; + + #[method_id(@__retain_semantics Other predicateWithValue:)] + pub unsafe fn predicateWithValue(value: bool) -> Id; + + #[method_id(@__retain_semantics Other predicateWithBlock:)] + pub unsafe fn predicateWithBlock( + block: &Block<(*mut Object, *mut NSDictionary), Bool>, + ) -> Id; + + #[method_id(@__retain_semantics Other predicateFormat)] + pub unsafe fn predicateFormat(&self) -> Id; + + #[method_id(@__retain_semantics Other 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!( + /// NSPredicateSupport + unsafe impl NSArray { + #[method_id(@__retain_semantics Other filteredArrayUsingPredicate:)] + pub unsafe fn filteredArrayUsingPredicate( + &self, + predicate: &NSPredicate, + ) -> Id, Shared>; + } +); + +extern_methods!( + /// NSPredicateSupport + unsafe impl NSMutableArray { + #[method(filterUsingPredicate:)] + pub unsafe fn filterUsingPredicate(&self, predicate: &NSPredicate); + } +); + +extern_methods!( + /// NSPredicateSupport + unsafe impl NSSet { + #[method_id(@__retain_semantics Other filteredSetUsingPredicate:)] + pub unsafe fn filteredSetUsingPredicate( + &self, + predicate: &NSPredicate, + ) -> Id, Shared>; + } +); + +extern_methods!( + /// NSPredicateSupport + unsafe impl NSMutableSet { + #[method(filterUsingPredicate:)] + pub unsafe fn filterUsingPredicate(&self, predicate: &NSPredicate); + } +); + +extern_methods!( + /// NSPredicateSupport + unsafe impl NSOrderedSet { + #[method_id(@__retain_semantics Other filteredOrderedSetUsingPredicate:)] + pub unsafe fn filteredOrderedSetUsingPredicate( + &self, + p: &NSPredicate, + ) -> Id, Shared>; + } +); + +extern_methods!( + /// NSPredicateSupport + unsafe impl NSMutableOrderedSet { + #[method(filterUsingPredicate:)] + pub unsafe fn filterUsingPredicate(&self, p: &NSPredicate); + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSProcessInfo.rs b/crates/icrate-generated/src/Foundation/generated/NSProcessInfo.rs new file mode 100644 index 000000000..f3a98188b --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSProcessInfo.rs @@ -0,0 +1,213 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +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, + pub patchVersion: NSInteger, + } +); + +extern_class!( + #[derive(Debug)] + pub struct NSProcessInfo; + + unsafe impl ClassType for NSProcessInfo { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSProcessInfo { + #[method_id(@__retain_semantics Other processInfo)] + pub unsafe fn processInfo() -> Id; + + #[method_id(@__retain_semantics Other environment)] + pub unsafe fn environment(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other arguments)] + pub unsafe fn arguments(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other hostName)] + pub unsafe fn hostName(&self) -> Id; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other globallyUniqueString)] + pub unsafe fn globallyUniqueString(&self) -> Id; + + #[method(operatingSystem)] + pub unsafe fn operatingSystem(&self) -> NSUInteger; + + #[method_id(@__retain_semantics Other operatingSystemName)] + pub unsafe fn operatingSystemName(&self) -> Id; + + #[method_id(@__retain_semantics Other 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, + automaticTerminationSupportEnabled: bool, + ); + } +); + +ns_options!( + #[underlying(u64)] + pub enum NSActivityOptions { + NSActivityIdleDisplaySleepDisabled = 1 << 40, + NSActivityIdleSystemSleepDisabled = 1 << 20, + NSActivitySuddenTerminationDisabled = 1 << 14, + NSActivityAutomaticTerminationDisabled = 1 << 15, + NSActivityAnimationTrackingEnabled = 1 << 45, + NSActivityTrackingEnabled = 1 << 46, + NSActivityUserInitiated = 0x00FFFFFF | NSActivityIdleSystemSleepDisabled, + NSActivityUserInitiatedAllowingIdleSystemSleep = + NSActivityUserInitiated & !NSActivityIdleSystemSleepDisabled, + NSActivityBackground = 0x000000FF, + NSActivityLatencyCritical = 0xFF00000000, + NSActivityUserInteractive = NSActivityUserInitiated | NSActivityLatencyCritical, + } +); + +extern_methods!( + /// NSProcessInfoActivity + unsafe impl NSProcessInfo { + #[method_id(@__retain_semantics Other beginActivityWithOptions:reason:)] + pub unsafe fn beginActivityWithOptions_reason( + &self, + 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, + options: NSActivityOptions, + reason: &NSString, + block: &Block<(), ()>, + ); + + #[method(performExpiringActivityWithReason:usingBlock:)] + pub unsafe fn performExpiringActivityWithReason_usingBlock( + &self, + reason: &NSString, + block: &Block<(Bool,), ()>, + ); + } +); + +extern_methods!( + /// NSUserInformation + unsafe impl NSProcessInfo { + #[method_id(@__retain_semantics Other userName)] + pub unsafe fn userName(&self) -> Id; + + #[method_id(@__retain_semantics Other fullUserName)] + pub unsafe fn fullUserName(&self) -> Id; + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSProcessInfoThermalState { + NSProcessInfoThermalStateNominal = 0, + NSProcessInfoThermalStateFair = 1, + NSProcessInfoThermalStateSerious = 2, + NSProcessInfoThermalStateCritical = 3, + } +); + +extern_methods!( + /// NSProcessInfoThermalState + unsafe impl NSProcessInfo { + #[method(thermalState)] + pub unsafe fn thermalState(&self) -> NSProcessInfoThermalState; + } +); + +extern_methods!( + /// NSProcessInfoPowerState + unsafe impl NSProcessInfo { + #[method(isLowPowerModeEnabled)] + pub unsafe fn isLowPowerModeEnabled(&self) -> bool; + } +); + +extern_static!(NSProcessInfoThermalStateDidChangeNotification: &'static NSNotificationName); + +extern_static!(NSProcessInfoPowerStateDidChangeNotification: &'static NSNotificationName); + +extern_methods!( + /// 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-generated/src/Foundation/generated/NSProgress.rs b/crates/icrate-generated/src/Foundation/generated/NSProgress.rs new file mode 100644 index 000000000..6fe8835f9 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSProgress.rs @@ -0,0 +1,264 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +pub type NSProgressKind = NSString; + +pub type NSProgressUserInfoKey = NSString; + +pub type NSProgressFileOperationKind = NSString; + +pub type NSProgressUnpublishingHandler = *mut Block<(), ()>; + +pub type NSProgressPublishingHandler = + *mut Block<(NonNull,), NSProgressUnpublishingHandler>; + +extern_class!( + #[derive(Debug)] + pub struct NSProgress; + + unsafe impl ClassType for NSProgress { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSProgress { + #[method_id(@__retain_semantics Other currentProgress)] + pub unsafe fn currentProgress() -> Option>; + + #[method_id(@__retain_semantics Other progressWithTotalUnitCount:)] + pub unsafe fn progressWithTotalUnitCount(unitCount: i64) -> Id; + + #[method_id(@__retain_semantics Other discreteProgressWithTotalUnitCount:)] + pub unsafe fn discreteProgressWithTotalUnitCount(unitCount: i64) -> Id; + + #[method_id(@__retain_semantics Other progressWithTotalUnitCount:parent:pendingUnitCount:)] + pub unsafe fn progressWithTotalUnitCount_parent_pendingUnitCount( + unitCount: i64, + parent: &NSProgress, + portionOfParentTotalUnitCount: i64, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithParent:userInfo:)] + pub unsafe fn initWithParent_userInfo( + this: Option>, + parentProgressOrNil: Option<&NSProgress>, + userInfoOrNil: Option<&NSDictionary>, + ) -> Id; + + #[method(becomeCurrentWithPendingUnitCount:)] + pub unsafe fn becomeCurrentWithPendingUnitCount(&self, unitCount: i64); + + #[method(performAsCurrentWithPendingUnitCount:usingBlock:)] + pub unsafe fn performAsCurrentWithPendingUnitCount_usingBlock( + &self, + unitCount: i64, + work: &Block<(), ()>, + ); + + #[method(resignCurrent)] + pub unsafe fn resignCurrent(&self); + + #[method(addChild:withPendingUnitCount:)] + pub unsafe fn addChild_withPendingUnitCount(&self, child: &NSProgress, inUnitCount: i64); + + #[method(totalUnitCount)] + pub unsafe fn totalUnitCount(&self) -> i64; + + #[method(setTotalUnitCount:)] + pub unsafe fn setTotalUnitCount(&self, totalUnitCount: i64); + + #[method(completedUnitCount)] + pub unsafe fn completedUnitCount(&self) -> i64; + + #[method(setCompletedUnitCount:)] + pub unsafe fn setCompletedUnitCount(&self, completedUnitCount: i64); + + #[method_id(@__retain_semantics Other localizedDescription)] + pub unsafe fn localizedDescription(&self) -> Id; + + #[method(setLocalizedDescription:)] + pub unsafe fn setLocalizedDescription(&self, localizedDescription: Option<&NSString>); + + #[method_id(@__retain_semantics Other 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) -> *mut Block<(), ()>; + + #[method(setCancellationHandler:)] + pub unsafe fn setCancellationHandler(&self, cancellationHandler: Option<&Block<(), ()>>); + + #[method(pausingHandler)] + pub unsafe fn pausingHandler(&self) -> *mut Block<(), ()>; + + #[method(setPausingHandler:)] + pub unsafe fn setPausingHandler(&self, pausingHandler: Option<&Block<(), ()>>); + + #[method(resumingHandler)] + pub unsafe fn resumingHandler(&self) -> *mut Block<(), ()>; + + #[method(setResumingHandler:)] + pub unsafe fn setResumingHandler(&self, resumingHandler: Option<&Block<(), ()>>); + + #[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(@__retain_semantics Other userInfo)] + pub unsafe fn userInfo(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other kind)] + pub unsafe fn kind(&self) -> Option>; + + #[method(setKind:)] + pub unsafe fn setKind(&self, kind: Option<&NSProgressKind>); + + #[method_id(@__retain_semantics Other estimatedTimeRemaining)] + pub unsafe fn estimatedTimeRemaining(&self) -> Option>; + + #[method(setEstimatedTimeRemaining:)] + pub unsafe fn setEstimatedTimeRemaining(&self, estimatedTimeRemaining: Option<&NSNumber>); + + #[method_id(@__retain_semantics Other throughput)] + pub unsafe fn throughput(&self) -> Option>; + + #[method(setThroughput:)] + pub unsafe fn setThroughput(&self, throughput: Option<&NSNumber>); + + #[method_id(@__retain_semantics Other fileOperationKind)] + pub unsafe fn fileOperationKind(&self) -> Option>; + + #[method(setFileOperationKind:)] + pub unsafe fn setFileOperationKind( + &self, + fileOperationKind: Option<&NSProgressFileOperationKind>, + ); + + #[method_id(@__retain_semantics Other fileURL)] + pub unsafe fn fileURL(&self) -> Option>; + + #[method(setFileURL:)] + pub unsafe fn setFileURL(&self, fileURL: Option<&NSURL>); + + #[method_id(@__retain_semantics Other fileTotalCount)] + pub unsafe fn fileTotalCount(&self) -> Option>; + + #[method(setFileTotalCount:)] + pub unsafe fn setFileTotalCount(&self, fileTotalCount: Option<&NSNumber>); + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other 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; + } +); + +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); + +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-generated/src/Foundation/generated/NSPropertyList.rs b/crates/icrate-generated/src/Foundation/generated/NSPropertyList.rs new file mode 100644 index 000000000..3970b29c4 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSPropertyList.rs @@ -0,0 +1,66 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +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; + +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:)] + pub unsafe fn propertyList_isValidForFormat( + plist: &Object, + format: NSPropertyListFormat, + ) -> bool; + + #[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(@__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(@__retain_semantics Other propertyListWithStream:options:format:error:)] + pub unsafe fn propertyListWithStream_options_format_error( + stream: &NSInputStream, + opt: NSPropertyListReadOptions, + format: *mut NSPropertyListFormat, + ) -> Result, Id>; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSProxy.rs b/crates/icrate-generated/src/Foundation/generated/NSProxy.rs new file mode 100644 index 000000000..bbc1e79ac --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSProxy.rs @@ -0,0 +1,4 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; diff --git a/crates/icrate-generated/src/Foundation/generated/NSRange.rs b/crates/icrate-generated/src/Foundation/generated/NSRange.rs new file mode 100644 index 000000000..bfc77ba3f --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSRange.rs @@ -0,0 +1,64 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +extern_struct!( + pub struct NSRange { + pub location: NSUInteger, + pub length: NSUInteger, + } +); + +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 { + #[method_id(@__retain_semantics Other valueWithRange:)] + pub unsafe fn valueWithRange(range: NSRange) -> Id; + + #[method(rangeValue)] + pub unsafe fn rangeValue(&self) -> NSRange; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSRegularExpression.rs b/crates/icrate-generated/src/Foundation/generated/NSRegularExpression.rs new file mode 100644 index 000000000..a51085f85 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSRegularExpression.rs @@ -0,0 +1,185 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +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)] + pub struct NSRegularExpression; + + unsafe impl ClassType for NSRegularExpression { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSRegularExpression { + #[method_id(@__retain_semantics Other regularExpressionWithPattern:options:error:)] + pub unsafe fn regularExpressionWithPattern_options_error( + pattern: &NSString, + options: NSRegularExpressionOptions, + ) -> Result, Id>; + + #[method_id(@__retain_semantics Init initWithPattern:options:error:)] + pub unsafe fn initWithPattern_options_error( + this: Option>, + pattern: &NSString, + options: NSRegularExpressionOptions, + ) -> Result, Id>; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other escapedPatternForString:)] + pub unsafe fn escapedPatternForString(string: &NSString) -> Id; + } +); + +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 + unsafe impl NSRegularExpression { + #[method(enumerateMatchesInString:options:range:usingBlock:)] + pub unsafe fn enumerateMatchesInString_options_range_usingBlock( + &self, + string: &NSString, + options: NSMatchingOptions, + range: NSRange, + block: &Block<(*mut NSTextCheckingResult, NSMatchingFlags, NonNull), ()>, + ); + + #[method_id(@__retain_semantics Other matchesInString:options:range:)] + pub unsafe fn matchesInString_options_range( + &self, + string: &NSString, + options: NSMatchingOptions, + range: NSRange, + ) -> Id, Shared>; + + #[method(numberOfMatchesInString:options:range:)] + pub unsafe fn numberOfMatchesInString_options_range( + &self, + string: &NSString, + options: NSMatchingOptions, + range: NSRange, + ) -> NSUInteger; + + #[method_id(@__retain_semantics Other firstMatchInString:options:range:)] + pub unsafe fn firstMatchInString_options_range( + &self, + string: &NSString, + options: NSMatchingOptions, + range: NSRange, + ) -> Option>; + + #[method(rangeOfFirstMatchInString:options:range:)] + pub unsafe fn rangeOfFirstMatchInString_options_range( + &self, + string: &NSString, + options: NSMatchingOptions, + range: NSRange, + ) -> NSRange; + } +); + +extern_methods!( + /// NSReplacement + unsafe impl NSRegularExpression { + #[method_id(@__retain_semantics Other stringByReplacingMatchesInString:options:range:withTemplate:)] + pub unsafe fn stringByReplacingMatchesInString_options_range_withTemplate( + &self, + string: &NSString, + options: NSMatchingOptions, + range: NSRange, + templ: &NSString, + ) -> Id; + + #[method(replaceMatchesInString:options:range:withTemplate:)] + pub unsafe fn replaceMatchesInString_options_range_withTemplate( + &self, + string: &NSMutableString, + options: NSMatchingOptions, + range: NSRange, + templ: &NSString, + ) -> NSUInteger; + + #[method_id(@__retain_semantics Other replacementStringForResult:inString:offset:template:)] + pub unsafe fn replacementStringForResult_inString_offset_template( + &self, + result: &NSTextCheckingResult, + string: &NSString, + offset: NSInteger, + templ: &NSString, + ) -> Id; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other dataDetectorWithTypes:error:)] + pub unsafe fn dataDetectorWithTypes_error( + checkingTypes: NSTextCheckingTypes, + ) -> Result, Id>; + + #[method_id(@__retain_semantics Init initWithTypes:error:)] + pub unsafe fn initWithTypes_error( + this: Option>, + checkingTypes: NSTextCheckingTypes, + ) -> Result, Id>; + + #[method(checkingTypes)] + pub unsafe fn checkingTypes(&self) -> NSTextCheckingTypes; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSRelativeDateTimeFormatter.rs b/crates/icrate-generated/src/Foundation/generated/NSRelativeDateTimeFormatter.rs new file mode 100644 index 000000000..eea5cfe05 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSRelativeDateTimeFormatter.rs @@ -0,0 +1,90 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +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)] + 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(@__retain_semantics Other calendar)] + pub unsafe fn calendar(&self) -> Id; + + #[method(setCalendar:)] + pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>); + + #[method_id(@__retain_semantics Other locale)] + pub unsafe fn locale(&self) -> Id; + + #[method(setLocale:)] + pub unsafe fn setLocale(&self, locale: Option<&NSLocale>); + + #[method_id(@__retain_semantics Other localizedStringFromDateComponents:)] + pub unsafe fn localizedStringFromDateComponents( + &self, + dateComponents: &NSDateComponents, + ) -> Id; + + #[method_id(@__retain_semantics Other localizedStringFromTimeInterval:)] + pub unsafe fn localizedStringFromTimeInterval( + &self, + timeInterval: NSTimeInterval, + ) -> Id; + + #[method_id(@__retain_semantics Other localizedStringForDate:relativeToDate:)] + pub unsafe fn localizedStringForDate_relativeToDate( + &self, + date: &NSDate, + referenceDate: &NSDate, + ) -> Id; + + #[method_id(@__retain_semantics Other stringForObjectValue:)] + pub unsafe fn stringForObjectValue( + &self, + obj: Option<&Object>, + ) -> Option>; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSRunLoop.rs b/crates/icrate-generated/src/Foundation/generated/NSRunLoop.rs new file mode 100644 index 000000000..d674294e5 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSRunLoop.rs @@ -0,0 +1,131 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +extern_static!(NSDefaultRunLoopMode: &'static NSRunLoopMode); + +extern_static!(NSRunLoopCommonModes: &'static NSRunLoopMode); + +extern_class!( + #[derive(Debug)] + pub struct NSRunLoop; + + unsafe impl ClassType for NSRunLoop { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSRunLoop { + #[method_id(@__retain_semantics Other currentRunLoop)] + pub unsafe fn currentRunLoop() -> Id; + + #[method_id(@__retain_semantics Other mainRunLoop)] + pub unsafe fn mainRunLoop() -> Id; + + #[method_id(@__retain_semantics Other currentMode)] + pub unsafe fn currentMode(&self) -> Option>; + + #[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(@__retain_semantics Other limitDateForMode:)] + pub unsafe fn limitDateForMode(&self, mode: &NSRunLoopMode) -> Option>; + + #[method(acceptInputForMode:beforeDate:)] + pub unsafe fn acceptInputForMode_beforeDate( + &self, + mode: &NSRunLoopMode, + limitDate: &NSDate, + ); + } +); + +extern_methods!( + /// 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(performInModes:block:)] + pub unsafe fn performInModes_block( + &self, + modes: &NSArray, + block: &Block<(), ()>, + ); + + #[method(performBlock:)] + pub unsafe fn performBlock(&self, block: &Block<(), ()>); + } +); + +extern_methods!( + /// 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, + ); + + #[method(performSelector:withObject:afterDelay:)] + pub unsafe fn performSelector_withObject_afterDelay( + &self, + aSelector: Sel, + 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!( + /// NSOrderedPerform + unsafe impl NSRunLoop { + #[method(performSelector:target:argument:order:modes:)] + pub unsafe fn performSelector_target_argument_order_modes( + &self, + aSelector: Sel, + target: &Object, + arg: Option<&Object>, + order: NSUInteger, + modes: &NSArray, + ); + + #[method(cancelPerformSelector:target:argument:)] + pub unsafe fn cancelPerformSelector_target_argument( + &self, + aSelector: Sel, + target: &Object, + arg: Option<&Object>, + ); + + #[method(cancelPerformSelectorsWithTarget:)] + pub unsafe fn cancelPerformSelectorsWithTarget(&self, target: &Object); + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSScanner.rs b/crates/icrate-generated/src/Foundation/generated/NSScanner.rs new file mode 100644 index 000000000..5e0618d07 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSScanner.rs @@ -0,0 +1,125 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSScanner; + + unsafe impl ClassType for NSScanner { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSScanner { + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other 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(@__retain_semantics Other locale)] + pub unsafe fn locale(&self) -> Option>; + + #[method(setLocale:)] + pub unsafe fn setLocale(&self, locale: Option<&Object>); + + #[method_id(@__retain_semantics Init initWithString:)] + pub unsafe fn initWithString( + this: Option>, + string: &NSString, + ) -> Id; + } +); + +extern_methods!( + /// 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: *mut *mut NSString, + ) -> bool; + + #[method(scanCharactersFromSet:intoString:)] + pub unsafe fn scanCharactersFromSet_intoString( + &self, + set: &NSCharacterSet, + result: *mut *mut NSString, + ) -> bool; + + #[method(scanUpToString:intoString:)] + pub unsafe fn scanUpToString_intoString( + &self, + string: &NSString, + result: *mut *mut NSString, + ) -> bool; + + #[method(scanUpToCharactersFromSet:intoString:)] + pub unsafe fn scanUpToCharactersFromSet_intoString( + &self, + set: &NSCharacterSet, + result: *mut *mut NSString, + ) -> bool; + + #[method(isAtEnd)] + pub unsafe fn isAtEnd(&self) -> bool; + + #[method_id(@__retain_semantics Other scannerWithString:)] + pub unsafe fn scannerWithString(string: &NSString) -> Id; + + #[method_id(@__retain_semantics Other localizedScannerWithString:)] + pub unsafe fn localizedScannerWithString(string: &NSString) -> Id; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSSet.rs b/crates/icrate-generated/src/Foundation/generated/NSSet.rs new file mode 100644 index 000000000..a97fb9074 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSSet.rs @@ -0,0 +1,282 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +__inner_extern_class!( + #[derive(Debug)] + pub struct NSSet { + _inner0: PhantomData<*mut ObjectType>, + } + + unsafe impl ClassType for NSSet { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSSet { + #[method(count)] + pub unsafe fn count(&self) -> NSUInteger; + + #[method_id(@__retain_semantics Other member:)] + pub unsafe fn member(&self, object: &ObjectType) -> Option>; + + #[method_id(@__retain_semantics Other objectEnumerator)] + pub unsafe fn objectEnumerator(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method_id(@__retain_semantics Init initWithObjects:count:)] + pub unsafe fn initWithObjects_count( + this: Option>, + objects: *mut NonNull, + cnt: NSUInteger, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; + } +); + +extern_methods!( + /// NSExtendedSet + unsafe impl NSSet { + #[method_id(@__retain_semantics Other allObjects)] + pub unsafe fn allObjects(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other anyObject)] + pub unsafe fn anyObject(&self) -> Option>; + + #[method(containsObject:)] + pub unsafe fn containsObject(&self, anObject: &ObjectType) -> bool; + + #[method_id(@__retain_semantics Other description)] + pub unsafe fn description(&self) -> Id; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other setByAddingObject:)] + pub unsafe fn setByAddingObject( + &self, + anObject: &ObjectType, + ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other setByAddingObjectsFromSet:)] + pub unsafe fn setByAddingObjectsFromSet( + &self, + other: &NSSet, + ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other setByAddingObjectsFromArray:)] + pub unsafe fn setByAddingObjectsFromArray( + &self, + other: &NSArray, + ) -> Id, Shared>; + + #[method(enumerateObjectsUsingBlock:)] + pub unsafe fn enumerateObjectsUsingBlock( + &self, + block: &Block<(NonNull, NonNull), ()>, + ); + + #[method(enumerateObjectsWithOptions:usingBlock:)] + pub unsafe fn enumerateObjectsWithOptions_usingBlock( + &self, + opts: NSEnumerationOptions, + block: &Block<(NonNull, NonNull), ()>, + ); + + #[method_id(@__retain_semantics Other objectsPassingTest:)] + pub unsafe fn objectsPassingTest( + &self, + predicate: &Block<(NonNull, NonNull), Bool>, + ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other objectsWithOptions:passingTest:)] + pub unsafe fn objectsWithOptions_passingTest( + &self, + opts: NSEnumerationOptions, + predicate: &Block<(NonNull, NonNull), Bool>, + ) -> Id, Shared>; + } +); + +extern_methods!( + /// NSSetCreation + unsafe impl NSSet { + #[method_id(@__retain_semantics Other set)] + pub unsafe fn set() -> Id; + + #[method_id(@__retain_semantics Other setWithObject:)] + pub unsafe fn setWithObject(object: &ObjectType) -> Id; + + #[method_id(@__retain_semantics Other setWithObjects:count:)] + pub unsafe fn setWithObjects_count( + objects: NonNull>, + cnt: NSUInteger, + ) -> Id; + + #[method_id(@__retain_semantics Other setWithSet:)] + pub unsafe fn setWithSet(set: &NSSet) -> Id; + + #[method_id(@__retain_semantics Other setWithArray:)] + pub unsafe fn setWithArray(array: &NSArray) -> Id; + + #[method_id(@__retain_semantics Init initWithSet:)] + pub unsafe fn initWithSet( + this: Option>, + set: &NSSet, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithSet:copyItems:)] + pub unsafe fn initWithSet_copyItems( + this: Option>, + set: &NSSet, + flag: bool, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithArray:)] + pub unsafe fn initWithArray( + this: Option>, + array: &NSArray, + ) -> Id; + } +); + +__inner_extern_class!( + #[derive(Debug)] + pub struct NSMutableSet { + _inner0: PhantomData<*mut ObjectType>, + } + + 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(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method_id(@__retain_semantics Init initWithCapacity:)] + pub unsafe fn initWithCapacity( + this: Option>, + numItems: NSUInteger, + ) -> Id; + } +); + +extern_methods!( + /// 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!( + /// NSMutableSetCreation + unsafe impl NSMutableSet { + #[method_id(@__retain_semantics Other setWithCapacity:)] + pub unsafe fn setWithCapacity(numItems: NSUInteger) -> Id; + } +); + +__inner_extern_class!( + #[derive(Debug)] + pub struct NSCountedSet { + _inner0: PhantomData<*mut ObjectType>, + } + + unsafe impl ClassType for NSCountedSet { + type Super = NSMutableSet; + } +); + +extern_methods!( + unsafe impl NSCountedSet { + #[method_id(@__retain_semantics Init initWithCapacity:)] + pub unsafe fn initWithCapacity( + this: Option>, + numItems: NSUInteger, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithArray:)] + pub unsafe fn initWithArray( + this: Option>, + array: &NSArray, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithSet:)] + pub unsafe fn initWithSet( + this: Option>, + set: &NSSet, + ) -> Id; + + #[method(countForObject:)] + pub unsafe fn countForObject(&self, object: &ObjectType) -> NSUInteger; + + #[method_id(@__retain_semantics Other 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-generated/src/Foundation/generated/NSSortDescriptor.rs b/crates/icrate-generated/src/Foundation/generated/NSSortDescriptor.rs new file mode 100644 index 000000000..a44a3c471 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSSortDescriptor.rs @@ -0,0 +1,140 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSSortDescriptor; + + unsafe impl ClassType for NSSortDescriptor { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSSortDescriptor { + #[method_id(@__retain_semantics Other sortDescriptorWithKey:ascending:)] + pub unsafe fn sortDescriptorWithKey_ascending( + key: Option<&NSString>, + ascending: bool, + ) -> Id; + + #[method_id(@__retain_semantics Other sortDescriptorWithKey:ascending:selector:)] + pub unsafe fn sortDescriptorWithKey_ascending_selector( + key: Option<&NSString>, + ascending: bool, + selector: OptionSel, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithKey:ascending:)] + pub unsafe fn initWithKey_ascending( + this: Option>, + key: Option<&NSString>, + ascending: bool, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithKey:ascending:selector:)] + pub unsafe fn initWithKey_ascending_selector( + this: Option>, + key: Option<&NSString>, + ascending: bool, + selector: OptionSel, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; + + #[method_id(@__retain_semantics Other key)] + pub unsafe fn key(&self) -> Option>; + + #[method(ascending)] + pub unsafe fn ascending(&self) -> bool; + + #[method(selector)] + pub unsafe fn selector(&self) -> OptionSel; + + #[method(allowEvaluation)] + pub unsafe fn allowEvaluation(&self); + + #[method_id(@__retain_semantics Other sortDescriptorWithKey:ascending:comparator:)] + pub unsafe fn sortDescriptorWithKey_ascending_comparator( + key: Option<&NSString>, + ascending: bool, + cmptr: NSComparator, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithKey:ascending:comparator:)] + pub unsafe fn initWithKey_ascending_comparator( + this: Option>, + key: Option<&NSString>, + 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(@__retain_semantics Other reversedSortDescriptor)] + pub unsafe fn reversedSortDescriptor(&self) -> Id; + } +); + +extern_methods!( + /// NSSortDescriptorSorting + unsafe impl NSSet { + #[method_id(@__retain_semantics Other sortedArrayUsingDescriptors:)] + pub unsafe fn sortedArrayUsingDescriptors( + &self, + sortDescriptors: &NSArray, + ) -> Id, Shared>; + } +); + +extern_methods!( + /// NSSortDescriptorSorting + unsafe impl NSArray { + #[method_id(@__retain_semantics Other sortedArrayUsingDescriptors:)] + pub unsafe fn sortedArrayUsingDescriptors( + &self, + sortDescriptors: &NSArray, + ) -> Id, Shared>; + } +); + +extern_methods!( + /// NSSortDescriptorSorting + unsafe impl NSMutableArray { + #[method(sortUsingDescriptors:)] + pub unsafe fn sortUsingDescriptors(&self, sortDescriptors: &NSArray); + } +); + +extern_methods!( + /// NSKeyValueSorting + unsafe impl NSOrderedSet { + #[method_id(@__retain_semantics Other sortedArrayUsingDescriptors:)] + pub unsafe fn sortedArrayUsingDescriptors( + &self, + sortDescriptors: &NSArray, + ) -> Id, Shared>; + } +); + +extern_methods!( + /// NSKeyValueSorting + unsafe impl NSMutableOrderedSet { + #[method(sortUsingDescriptors:)] + pub unsafe fn sortUsingDescriptors(&self, sortDescriptors: &NSArray); + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSStream.rs b/crates/icrate-generated/src/Foundation/generated/NSStream.rs new file mode 100644 index 000000000..2830950d6 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSStream.rs @@ -0,0 +1,300 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +pub type NSStreamPropertyKey = NSString; + +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)] + 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(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSStreamDelegate>); + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other 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(@__retain_semantics Init initWithData:)] + pub unsafe fn initWithData( + this: Option>, + data: &NSData, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithURL:)] + pub unsafe fn initWithURL( + this: Option>, + 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(@__retain_semantics Init initToMemory)] + pub unsafe fn initToMemory(this: Option>) -> Id; + + #[method_id(@__retain_semantics Init initToBuffer:capacity:)] + pub unsafe fn initToBuffer_capacity( + this: Option>, + buffer: NonNull, + capacity: NSUInteger, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithURL:append:)] + pub unsafe fn initWithURL_append( + this: Option>, + url: &NSURL, + shouldAppend: bool, + ) -> Option>; + } +); + +extern_methods!( + /// NSSocketStreamCreationExtensions + unsafe impl NSStream { + #[method(getStreamsToHostWithName:port:inputStream:outputStream:)] + pub unsafe fn getStreamsToHostWithName_port_inputStream_outputStream( + hostname: &NSString, + port: NSInteger, + inputStream: *mut *mut NSInputStream, + outputStream: *mut *mut NSOutputStream, + ); + } +); + +extern_methods!( + /// NSStreamBoundPairCreationExtensions + unsafe impl NSStream { + #[method(getBoundStreamsWithBufferSize:inputStream:outputStream:)] + pub unsafe fn getBoundStreamsWithBufferSize_inputStream_outputStream( + bufferSize: NSUInteger, + inputStream: *mut *mut NSInputStream, + outputStream: *mut *mut NSOutputStream, + ); + } +); + +extern_methods!( + /// NSInputStreamExtensions + unsafe impl NSInputStream { + #[method_id(@__retain_semantics Init initWithFileAtPath:)] + pub unsafe fn initWithFileAtPath( + this: Option>, + path: &NSString, + ) -> Option>; + + #[method_id(@__retain_semantics Other inputStreamWithData:)] + pub unsafe fn inputStreamWithData(data: &NSData) -> Option>; + + #[method_id(@__retain_semantics Other inputStreamWithFileAtPath:)] + pub unsafe fn inputStreamWithFileAtPath(path: &NSString) -> Option>; + + #[method_id(@__retain_semantics Other inputStreamWithURL:)] + pub unsafe fn inputStreamWithURL(url: &NSURL) -> Option>; + } +); + +extern_methods!( + /// NSOutputStreamExtensions + unsafe impl NSOutputStream { + #[method_id(@__retain_semantics Init initToFileAtPath:append:)] + pub unsafe fn initToFileAtPath_append( + this: Option>, + path: &NSString, + shouldAppend: bool, + ) -> Option>; + + #[method_id(@__retain_semantics Other outputStreamToMemory)] + pub unsafe fn outputStreamToMemory() -> Id; + + #[method_id(@__retain_semantics Other outputStreamToBuffer:capacity:)] + pub unsafe fn outputStreamToBuffer_capacity( + buffer: NonNull, + capacity: NSUInteger, + ) -> Id; + + #[method_id(@__retain_semantics Other outputStreamToFileAtPath:append:)] + pub unsafe fn outputStreamToFileAtPath_append( + path: &NSString, + shouldAppend: bool, + ) -> Id; + + #[method_id(@__retain_semantics Other outputStreamWithURL:append:)] + pub unsafe fn outputStreamWithURL_append( + url: &NSURL, + shouldAppend: bool, + ) -> Option>; + } +); + +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); + +pub type NSStreamSocketSecurityLevel = NSString; + +extern_static!(NSStreamSocketSecurityLevelNone: &'static NSStreamSocketSecurityLevel); + +extern_static!(NSStreamSocketSecurityLevelSSLv2: &'static NSStreamSocketSecurityLevel); + +extern_static!(NSStreamSocketSecurityLevelSSLv3: &'static NSStreamSocketSecurityLevel); + +extern_static!(NSStreamSocketSecurityLevelTLSv1: &'static NSStreamSocketSecurityLevel); + +extern_static!(NSStreamSocketSecurityLevelNegotiatedSSL: &'static NSStreamSocketSecurityLevel); + +extern_static!(NSStreamSOCKSProxyConfigurationKey: &'static NSStreamPropertyKey); + +pub type NSStreamSOCKSProxyConfiguration = NSString; + +extern_static!(NSStreamSOCKSProxyHostKey: &'static NSStreamSOCKSProxyConfiguration); + +extern_static!(NSStreamSOCKSProxyPortKey: &'static NSStreamSOCKSProxyConfiguration); + +extern_static!(NSStreamSOCKSProxyVersionKey: &'static NSStreamSOCKSProxyConfiguration); + +extern_static!(NSStreamSOCKSProxyUserKey: &'static NSStreamSOCKSProxyConfiguration); + +extern_static!(NSStreamSOCKSProxyPasswordKey: &'static NSStreamSOCKSProxyConfiguration); + +pub type NSStreamSOCKSProxyVersion = NSString; + +extern_static!(NSStreamSOCKSProxyVersion4: &'static NSStreamSOCKSProxyVersion); + +extern_static!(NSStreamSOCKSProxyVersion5: &'static NSStreamSOCKSProxyVersion); + +extern_static!(NSStreamDataWrittenToMemoryStreamKey: &'static NSStreamPropertyKey); + +extern_static!(NSStreamFileCurrentOffsetKey: &'static NSStreamPropertyKey); + +extern_static!(NSStreamSocketSSLErrorDomain: &'static NSErrorDomain); + +extern_static!(NSStreamSOCKSErrorDomain: &'static NSErrorDomain); + +extern_static!(NSStreamNetworkServiceType: &'static NSStreamPropertyKey); + +pub type NSStreamNetworkServiceTypeValue = NSString; + +extern_static!(NSStreamNetworkServiceTypeVoIP: &'static NSStreamNetworkServiceTypeValue); + +extern_static!(NSStreamNetworkServiceTypeVideo: &'static NSStreamNetworkServiceTypeValue); + +extern_static!(NSStreamNetworkServiceTypeBackground: &'static NSStreamNetworkServiceTypeValue); + +extern_static!(NSStreamNetworkServiceTypeVoice: &'static NSStreamNetworkServiceTypeValue); + +extern_static!(NSStreamNetworkServiceTypeCallSignaling: &'static NSStreamNetworkServiceTypeValue); diff --git a/crates/icrate-generated/src/Foundation/generated/NSString.rs b/crates/icrate-generated/src/Foundation/generated/NSString.rs new file mode 100644 index 000000000..ff4087941 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSString.rs @@ -0,0 +1,952 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +pub type unichar = c_ushort; + +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; + +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)] + 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(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; + } +); + +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_static!(NSStringTransformLatinToKatakana: &'static NSStringTransform); + +extern_static!(NSStringTransformLatinToHiragana: &'static NSStringTransform); + +extern_static!(NSStringTransformLatinToHangul: &'static NSStringTransform); + +extern_static!(NSStringTransformLatinToArabic: &'static NSStringTransform); + +extern_static!(NSStringTransformLatinToHebrew: &'static NSStringTransform); + +extern_static!(NSStringTransformLatinToThai: &'static NSStringTransform); + +extern_static!(NSStringTransformLatinToCyrillic: &'static NSStringTransform); + +extern_static!(NSStringTransformLatinToGreek: &'static NSStringTransform); + +extern_static!(NSStringTransformToLatin: &'static NSStringTransform); + +extern_static!(NSStringTransformMandarinToLatin: &'static NSStringTransform); + +extern_static!(NSStringTransformHiraganaToKatakana: &'static NSStringTransform); + +extern_static!(NSStringTransformFullwidthToHalfwidth: &'static NSStringTransform); + +extern_static!(NSStringTransformToXMLHex: &'static NSStringTransform); + +extern_static!(NSStringTransformToUnicodeName: &'static NSStringTransform); + +extern_static!(NSStringTransformStripCombiningMarks: &'static NSStringTransform); + +extern_static!(NSStringTransformStripDiacritics: &'static NSStringTransform); + +extern_methods!( + /// NSStringExtensionMethods + unsafe impl NSString { + #[method_id(@__retain_semantics Other substringFromIndex:)] + pub unsafe fn substringFromIndex(&self, from: NSUInteger) -> Id; + + #[method_id(@__retain_semantics Other substringToIndex:)] + pub unsafe fn substringToIndex(&self, to: NSUInteger) -> Id; + + #[method_id(@__retain_semantics Other 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, + string: &NSString, + mask: NSStringCompareOptions, + rangeOfReceiverToCompare: NSRange, + ) -> NSComparisonResult; + + #[method(compare:options:range:locale:)] + pub unsafe fn compare_options_range_locale( + &self, + string: &NSString, + mask: NSStringCompareOptions, + 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(@__retain_semantics Other 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, + searchString: &NSString, + mask: NSStringCompareOptions, + rangeOfReceiverToSearch: NSRange, + ) -> NSRange; + + #[method(rangeOfString:options:range:locale:)] + pub unsafe fn rangeOfString_options_range_locale( + &self, + searchString: &NSString, + mask: NSStringCompareOptions, + 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, + searchSet: &NSCharacterSet, + 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(@__retain_semantics Other 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(@__retain_semantics Other uppercaseString)] + pub unsafe fn uppercaseString(&self) -> Id; + + #[method_id(@__retain_semantics Other lowercaseString)] + pub unsafe fn lowercaseString(&self) -> Id; + + #[method_id(@__retain_semantics Other capitalizedString)] + pub unsafe fn capitalizedString(&self) -> Id; + + #[method_id(@__retain_semantics Other localizedUppercaseString)] + pub unsafe fn localizedUppercaseString(&self) -> Id; + + #[method_id(@__retain_semantics Other localizedLowercaseString)] + pub unsafe fn localizedLowercaseString(&self) -> Id; + + #[method_id(@__retain_semantics Other localizedCapitalizedString)] + pub unsafe fn localizedCapitalizedString(&self) -> Id; + + #[method_id(@__retain_semantics Other uppercaseStringWithLocale:)] + pub unsafe fn uppercaseStringWithLocale( + &self, + locale: Option<&NSLocale>, + ) -> Id; + + #[method_id(@__retain_semantics Other lowercaseStringWithLocale:)] + pub unsafe fn lowercaseStringWithLocale( + &self, + locale: Option<&NSLocale>, + ) -> Id; + + #[method_id(@__retain_semantics Other capitalizedStringWithLocale:)] + pub unsafe fn capitalizedStringWithLocale( + &self, + locale: Option<&NSLocale>, + ) -> 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, + ); + + #[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, + ); + + #[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: &Block<(*mut NSString, NSRange, NSRange, NonNull), ()>, + ); + + #[method(enumerateLinesUsingBlock:)] + pub unsafe fn enumerateLinesUsingBlock( + &self, + block: &Block<(NonNull, NonNull), ()>, + ); + + #[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(@__retain_semantics Other dataUsingEncoding:allowLossyConversion:)] + pub unsafe fn dataUsingEncoding_allowLossyConversion( + &self, + encoding: NSStringEncoding, + lossy: bool, + ) -> Option>; + + #[method_id(@__retain_semantics Other 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, + buffer: NonNull, + maxBufferCount: NSUInteger, + encoding: NSStringEncoding, + ) -> bool; + + #[method(getBytes:maxLength:usedLength:encoding:options:range:remainingRange:)] + 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; + + #[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(@__retain_semantics Other localizedNameOfStringEncoding:)] + pub unsafe fn localizedNameOfStringEncoding( + encoding: NSStringEncoding, + ) -> Id; + + #[method(defaultCStringEncoding)] + pub unsafe fn defaultCStringEncoding() -> NSStringEncoding; + + #[method_id(@__retain_semantics Other decomposedStringWithCanonicalMapping)] + pub unsafe fn decomposedStringWithCanonicalMapping(&self) -> Id; + + #[method_id(@__retain_semantics Other precomposedStringWithCanonicalMapping)] + pub unsafe fn precomposedStringWithCanonicalMapping(&self) -> Id; + + #[method_id(@__retain_semantics Other decomposedStringWithCompatibilityMapping)] + pub unsafe fn decomposedStringWithCompatibilityMapping(&self) -> Id; + + #[method_id(@__retain_semantics Other precomposedStringWithCompatibilityMapping)] + pub unsafe fn precomposedStringWithCompatibilityMapping(&self) -> Id; + + #[method_id(@__retain_semantics Other componentsSeparatedByString:)] + pub unsafe fn componentsSeparatedByString( + &self, + separator: &NSString, + ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other componentsSeparatedByCharactersInSet:)] + pub unsafe fn componentsSeparatedByCharactersInSet( + &self, + separator: &NSCharacterSet, + ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other stringByTrimmingCharactersInSet:)] + pub unsafe fn stringByTrimmingCharactersInSet( + &self, + set: &NSCharacterSet, + ) -> Id; + + #[method_id(@__retain_semantics Other stringByPaddingToLength:withString:startingAtIndex:)] + pub unsafe fn stringByPaddingToLength_withString_startingAtIndex( + &self, + newLength: NSUInteger, + padString: &NSString, + padIndex: NSUInteger, + ) -> Id; + + #[method_id(@__retain_semantics Other stringByFoldingWithOptions:locale:)] + pub unsafe fn stringByFoldingWithOptions_locale( + &self, + options: NSStringCompareOptions, + locale: Option<&NSLocale>, + ) -> Id; + + #[method_id(@__retain_semantics Other stringByReplacingOccurrencesOfString:withString:options:range:)] + pub unsafe fn stringByReplacingOccurrencesOfString_withString_options_range( + &self, + target: &NSString, + replacement: &NSString, + options: NSStringCompareOptions, + searchRange: NSRange, + ) -> Id; + + #[method_id(@__retain_semantics Other stringByReplacingOccurrencesOfString:withString:)] + pub unsafe fn stringByReplacingOccurrencesOfString_withString( + &self, + target: &NSString, + replacement: &NSString, + ) -> Id; + + #[method_id(@__retain_semantics Other stringByReplacingCharactersInRange:withString:)] + pub unsafe fn stringByReplacingCharactersInRange_withString( + &self, + range: NSRange, + replacement: &NSString, + ) -> Id; + + #[method_id(@__retain_semantics Other 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, + url: &NSURL, + useAuxiliaryFile: bool, + enc: NSStringEncoding, + ) -> Result<(), Id>; + + #[method(writeToFile:atomically:encoding:error:)] + pub unsafe fn writeToFile_atomically_encoding_error( + &self, + path: &NSString, + useAuxiliaryFile: bool, + enc: NSStringEncoding, + ) -> Result<(), Id>; + + #[method_id(@__retain_semantics Other description)] + pub unsafe fn description(&self) -> Id; + + #[method(hash)] + pub unsafe fn hash(&self) -> NSUInteger; + + #[method_id(@__retain_semantics Init initWithCharactersNoCopy:length:freeWhenDone:)] + pub unsafe fn initWithCharactersNoCopy_length_freeWhenDone( + this: Option>, + characters: NonNull, + length: NSUInteger, + freeBuffer: bool, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithCharactersNoCopy:length:deallocator:)] + pub unsafe fn initWithCharactersNoCopy_length_deallocator( + this: Option>, + chars: NonNull, + len: NSUInteger, + deallocator: Option<&Block<(NonNull, NSUInteger), ()>>, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithCharacters:length:)] + pub unsafe fn initWithCharacters_length( + this: Option>, + characters: NonNull, + length: NSUInteger, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithUTF8String:)] + pub unsafe fn initWithUTF8String( + this: Option>, + nullTerminatedCString: NonNull, + ) -> Option>; + + #[method_id(@__retain_semantics Init initWithString:)] + pub unsafe fn initWithString( + this: Option>, + aString: &NSString, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithValidatedFormat:validFormatSpecifiers:arguments:error:)] + pub unsafe fn initWithValidatedFormat_validFormatSpecifiers_arguments_error( + this: Option>, + format: &NSString, + validFormatSpecifiers: &NSString, + argList: va_list, + ) -> Result, Id>; + + #[method_id(@__retain_semantics Init initWithValidatedFormat:validFormatSpecifiers:locale:arguments:error:)] + pub unsafe fn initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error( + this: Option>, + format: &NSString, + validFormatSpecifiers: &NSString, + locale: Option<&Object>, + argList: va_list, + ) -> Result, Id>; + + #[method_id(@__retain_semantics Init initWithData:encoding:)] + pub unsafe fn initWithData_encoding( + this: Option>, + data: &NSData, + encoding: NSStringEncoding, + ) -> Option>; + + #[method_id(@__retain_semantics Init initWithBytes:length:encoding:)] + pub unsafe fn initWithBytes_length_encoding( + this: Option>, + bytes: NonNull, + len: NSUInteger, + encoding: NSStringEncoding, + ) -> Option>; + + #[method_id(@__retain_semantics Init initWithBytesNoCopy:length:encoding:freeWhenDone:)] + pub unsafe fn initWithBytesNoCopy_length_encoding_freeWhenDone( + this: Option>, + bytes: NonNull, + len: NSUInteger, + encoding: NSStringEncoding, + freeBuffer: bool, + ) -> Option>; + + #[method_id(@__retain_semantics Init initWithBytesNoCopy:length:encoding:deallocator:)] + pub unsafe fn initWithBytesNoCopy_length_encoding_deallocator( + this: Option>, + bytes: NonNull, + len: NSUInteger, + encoding: NSStringEncoding, + deallocator: Option<&Block<(NonNull, NSUInteger), ()>>, + ) -> Option>; + + #[method_id(@__retain_semantics Other string)] + pub unsafe fn string() -> Id; + + #[method_id(@__retain_semantics Other stringWithString:)] + pub unsafe fn stringWithString(string: &NSString) -> Id; + + #[method_id(@__retain_semantics Other stringWithCharacters:length:)] + pub unsafe fn stringWithCharacters_length( + characters: NonNull, + length: NSUInteger, + ) -> Id; + + #[method_id(@__retain_semantics Other stringWithUTF8String:)] + pub unsafe fn stringWithUTF8String( + nullTerminatedCString: NonNull, + ) -> Option>; + + #[method_id(@__retain_semantics Init initWithCString:encoding:)] + pub unsafe fn initWithCString_encoding( + this: Option>, + nullTerminatedCString: NonNull, + encoding: NSStringEncoding, + ) -> Option>; + + #[method_id(@__retain_semantics Other stringWithCString:encoding:)] + pub unsafe fn stringWithCString_encoding( + cString: NonNull, + enc: NSStringEncoding, + ) -> Option>; + + #[method_id(@__retain_semantics Init initWithContentsOfURL:encoding:error:)] + pub unsafe fn initWithContentsOfURL_encoding_error( + this: Option>, + url: &NSURL, + enc: NSStringEncoding, + ) -> Result, Id>; + + #[method_id(@__retain_semantics Init initWithContentsOfFile:encoding:error:)] + pub unsafe fn initWithContentsOfFile_encoding_error( + this: Option>, + path: &NSString, + enc: NSStringEncoding, + ) -> Result, Id>; + + #[method_id(@__retain_semantics Other stringWithContentsOfURL:encoding:error:)] + pub unsafe fn stringWithContentsOfURL_encoding_error( + url: &NSURL, + enc: NSStringEncoding, + ) -> Result, Id>; + + #[method_id(@__retain_semantics Other stringWithContentsOfFile:encoding:error:)] + pub unsafe fn stringWithContentsOfFile_encoding_error( + path: &NSString, + enc: NSStringEncoding, + ) -> Result, Id>; + + #[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(@__retain_semantics Init initWithContentsOfFile:usedEncoding:error:)] + pub unsafe fn initWithContentsOfFile_usedEncoding_error( + this: Option>, + path: &NSString, + enc: *mut NSStringEncoding, + ) -> Result, Id>; + + #[method_id(@__retain_semantics Other stringWithContentsOfURL:usedEncoding:error:)] + pub unsafe fn stringWithContentsOfURL_usedEncoding_error( + url: &NSURL, + enc: *mut NSStringEncoding, + ) -> Result, Id>; + + #[method_id(@__retain_semantics Other stringWithContentsOfFile:usedEncoding:error:)] + pub unsafe fn stringWithContentsOfFile_usedEncoding_error( + path: &NSString, + enc: *mut NSStringEncoding, + ) -> Result, Id>; + } +); + +pub type NSStringEncodingDetectionOptionsKey = NSString; + +extern_static!( + NSStringEncodingDetectionSuggestedEncodingsKey: &'static NSStringEncodingDetectionOptionsKey +); + +extern_static!( + NSStringEncodingDetectionDisallowedEncodingsKey: &'static NSStringEncodingDetectionOptionsKey +); + +extern_static!( + NSStringEncodingDetectionUseOnlySuggestedEncodingsKey: + &'static NSStringEncodingDetectionOptionsKey +); + +extern_static!( + NSStringEncodingDetectionAllowLossyKey: &'static NSStringEncodingDetectionOptionsKey +); + +extern_static!( + NSStringEncodingDetectionFromWindowsKey: &'static NSStringEncodingDetectionOptionsKey +); + +extern_static!( + NSStringEncodingDetectionLossySubstitutionKey: &'static NSStringEncodingDetectionOptionsKey +); + +extern_static!( + NSStringEncodingDetectionLikelyLanguageKey: &'static NSStringEncodingDetectionOptionsKey +); + +extern_methods!( + /// NSStringEncodingDetection + unsafe impl NSString { + #[method(stringEncodingForData:encodingOptions:convertedString:usedLossyConversion:)] + pub unsafe fn stringEncodingForData_encodingOptions_convertedString_usedLossyConversion( + data: &NSData, + opts: Option<&NSDictionary>, + string: *mut *mut NSString, + usedLossyConversion: *mut Bool, + ) -> NSStringEncoding; + } +); + +extern_methods!( + /// 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:)] + pub unsafe fn replaceCharactersInRange_withString( + &self, + range: NSRange, + aString: &NSString, + ); + } +); + +extern_methods!( + /// 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, + target: &NSString, + replacement: &NSString, + options: NSStringCompareOptions, + searchRange: NSRange, + ) -> NSUInteger; + + #[method(applyTransform:reverse:range:updatedRange:)] + pub unsafe fn applyTransform_reverse_range_updatedRange( + &self, + transform: &NSStringTransform, + reverse: bool, + range: NSRange, + resultingRange: NSRangePointer, + ) -> bool; + + #[method_id(@__retain_semantics Init initWithCapacity:)] + pub unsafe fn initWithCapacity( + this: Option>, + capacity: NSUInteger, + ) -> Id; + + #[method_id(@__retain_semantics Other stringWithCapacity:)] + pub unsafe fn stringWithCapacity(capacity: NSUInteger) -> Id; + } +); + +extern_static!(NSCharacterConversionException: &'static NSExceptionName); + +extern_static!(NSParseErrorException: &'static NSExceptionName); + +extern_methods!( + /// NSExtendedStringPropertyListParsing + unsafe impl NSString { + #[method_id(@__retain_semantics Other propertyList)] + pub unsafe fn propertyList(&self) -> Id; + + #[method_id(@__retain_semantics Other propertyListFromStringsFileFormat)] + pub unsafe fn propertyListFromStringsFileFormat(&self) -> Option>; + } +); + +extern_methods!( + /// 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, + bytes: NonNull, + maxLength: NSUInteger, + 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(@__retain_semantics Init initWithContentsOfFile:)] + pub unsafe fn initWithContentsOfFile( + this: Option>, + path: &NSString, + ) -> Option>; + + #[method_id(@__retain_semantics Init initWithContentsOfURL:)] + pub unsafe fn initWithContentsOfURL( + this: Option>, + url: &NSURL, + ) -> Option>; + + #[method_id(@__retain_semantics Other stringWithContentsOfFile:)] + pub unsafe fn stringWithContentsOfFile(path: &NSString) -> Option>; + + #[method_id(@__retain_semantics Other stringWithContentsOfURL:)] + pub unsafe fn stringWithContentsOfURL(url: &NSURL) -> Option>; + + #[method_id(@__retain_semantics Init initWithCStringNoCopy:length:freeWhenDone:)] + pub unsafe fn initWithCStringNoCopy_length_freeWhenDone( + this: Option>, + bytes: NonNull, + length: NSUInteger, + freeBuffer: bool, + ) -> Option>; + + #[method_id(@__retain_semantics Init initWithCString:length:)] + pub unsafe fn initWithCString_length( + this: Option>, + bytes: NonNull, + length: NSUInteger, + ) -> Option>; + + #[method_id(@__retain_semantics Init initWithCString:)] + pub unsafe fn initWithCString( + this: Option>, + bytes: NonNull, + ) -> Option>; + + #[method_id(@__retain_semantics Other stringWithCString:length:)] + pub unsafe fn stringWithCString_length( + bytes: NonNull, + length: NSUInteger, + ) -> Option>; + + #[method_id(@__retain_semantics Other stringWithCString:)] + pub unsafe fn stringWithCString(bytes: NonNull) -> Option>; + + #[method(getCharacters:)] + pub unsafe fn getCharacters(&self, buffer: NonNull); + } +); + +ns_enum!( + #[underlying(NSStringEncoding)] + pub enum { + NSProprietaryStringEncoding = 65536, + } +); + +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-generated/src/Foundation/generated/NSTextCheckingResult.rs b/crates/icrate-generated/src/Foundation/generated/NSTextCheckingResult.rs new file mode 100644 index 000000000..8e522a214 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSTextCheckingResult.rs @@ -0,0 +1,237 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +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; + +ns_enum!( + #[underlying(NSTextCheckingTypes)] + pub enum { + NSTextCheckingAllSystemTypes = 0xffffffff, + NSTextCheckingAllCustomTypes = 0xffffffff<<32, + NSTextCheckingAllTypes = NSTextCheckingAllSystemTypes|NSTextCheckingAllCustomTypes, + } +); + +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!( + /// NSTextCheckingResultOptional + unsafe impl NSTextCheckingResult { + #[method_id(@__retain_semantics Other orthography)] + pub unsafe fn orthography(&self) -> Option>; + + #[method_id(@__retain_semantics Other grammarDetails)] + pub unsafe fn grammarDetails( + &self, + ) -> Option>, Shared>>; + + #[method_id(@__retain_semantics Other date)] + pub unsafe fn date(&self) -> Option>; + + #[method_id(@__retain_semantics Other timeZone)] + pub unsafe fn timeZone(&self) -> Option>; + + #[method(duration)] + pub unsafe fn duration(&self) -> NSTimeInterval; + + #[method_id(@__retain_semantics Other components)] + pub unsafe fn components( + &self, + ) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other URL)] + pub unsafe fn URL(&self) -> Option>; + + #[method_id(@__retain_semantics Other replacementString)] + pub unsafe fn replacementString(&self) -> Option>; + + #[method_id(@__retain_semantics Other alternativeStrings)] + pub unsafe fn alternativeStrings(&self) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other regularExpression)] + pub unsafe fn regularExpression(&self) -> Option>; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other resultByAdjustingRangesWithOffset:)] + pub unsafe fn resultByAdjustingRangesWithOffset( + &self, + offset: NSInteger, + ) -> Id; + + #[method_id(@__retain_semantics Other addressComponents)] + pub unsafe fn addressComponents( + &self, + ) -> Option, Shared>>; + } +); + +extern_static!(NSTextCheckingNameKey: &'static NSTextCheckingKey); + +extern_static!(NSTextCheckingJobTitleKey: &'static NSTextCheckingKey); + +extern_static!(NSTextCheckingOrganizationKey: &'static NSTextCheckingKey); + +extern_static!(NSTextCheckingStreetKey: &'static NSTextCheckingKey); + +extern_static!(NSTextCheckingCityKey: &'static NSTextCheckingKey); + +extern_static!(NSTextCheckingStateKey: &'static NSTextCheckingKey); + +extern_static!(NSTextCheckingZIPKey: &'static NSTextCheckingKey); + +extern_static!(NSTextCheckingCountryKey: &'static NSTextCheckingKey); + +extern_static!(NSTextCheckingPhoneKey: &'static NSTextCheckingKey); + +extern_static!(NSTextCheckingAirlineKey: &'static NSTextCheckingKey); + +extern_static!(NSTextCheckingFlightKey: &'static NSTextCheckingKey); + +extern_methods!( + /// NSTextCheckingResultCreation + unsafe impl NSTextCheckingResult { + #[method_id(@__retain_semantics Other orthographyCheckingResultWithRange:orthography:)] + pub unsafe fn orthographyCheckingResultWithRange_orthography( + range: NSRange, + orthography: &NSOrthography, + ) -> Id; + + #[method_id(@__retain_semantics Other spellCheckingResultWithRange:)] + pub unsafe fn spellCheckingResultWithRange( + range: NSRange, + ) -> Id; + + #[method_id(@__retain_semantics Other grammarCheckingResultWithRange:details:)] + pub unsafe fn grammarCheckingResultWithRange_details( + range: NSRange, + details: &NSArray>, + ) -> Id; + + #[method_id(@__retain_semantics Other dateCheckingResultWithRange:date:)] + pub unsafe fn dateCheckingResultWithRange_date( + range: NSRange, + date: &NSDate, + ) -> Id; + + #[method_id(@__retain_semantics Other dateCheckingResultWithRange:date:timeZone:duration:)] + pub unsafe fn dateCheckingResultWithRange_date_timeZone_duration( + range: NSRange, + date: &NSDate, + timeZone: &NSTimeZone, + duration: NSTimeInterval, + ) -> Id; + + #[method_id(@__retain_semantics Other addressCheckingResultWithRange:components:)] + pub unsafe fn addressCheckingResultWithRange_components( + range: NSRange, + components: &NSDictionary, + ) -> Id; + + #[method_id(@__retain_semantics Other linkCheckingResultWithRange:URL:)] + pub unsafe fn linkCheckingResultWithRange_URL( + range: NSRange, + url: &NSURL, + ) -> Id; + + #[method_id(@__retain_semantics Other quoteCheckingResultWithRange:replacementString:)] + pub unsafe fn quoteCheckingResultWithRange_replacementString( + range: NSRange, + replacementString: &NSString, + ) -> Id; + + #[method_id(@__retain_semantics Other dashCheckingResultWithRange:replacementString:)] + pub unsafe fn dashCheckingResultWithRange_replacementString( + range: NSRange, + replacementString: &NSString, + ) -> Id; + + #[method_id(@__retain_semantics Other replacementCheckingResultWithRange:replacementString:)] + pub unsafe fn replacementCheckingResultWithRange_replacementString( + range: NSRange, + replacementString: &NSString, + ) -> Id; + + #[method_id(@__retain_semantics Other correctionCheckingResultWithRange:replacementString:)] + pub unsafe fn correctionCheckingResultWithRange_replacementString( + range: NSRange, + replacementString: &NSString, + ) -> Id; + + #[method_id(@__retain_semantics Other correctionCheckingResultWithRange:replacementString:alternativeStrings:)] + pub unsafe fn correctionCheckingResultWithRange_replacementString_alternativeStrings( + range: NSRange, + replacementString: &NSString, + alternativeStrings: &NSArray, + ) -> Id; + + #[method_id(@__retain_semantics Other regularExpressionCheckingResultWithRanges:count:regularExpression:)] + pub unsafe fn regularExpressionCheckingResultWithRanges_count_regularExpression( + ranges: NSRangePointer, + count: NSUInteger, + regularExpression: &NSRegularExpression, + ) -> Id; + + #[method_id(@__retain_semantics Other phoneNumberCheckingResultWithRange:phoneNumber:)] + pub unsafe fn phoneNumberCheckingResultWithRange_phoneNumber( + range: NSRange, + phoneNumber: &NSString, + ) -> Id; + + #[method_id(@__retain_semantics Other transitInformationCheckingResultWithRange:components:)] + pub unsafe fn transitInformationCheckingResultWithRange_components( + range: NSRange, + components: &NSDictionary, + ) -> Id; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSThread.rs b/crates/icrate-generated/src/Foundation/generated/NSThread.rs new file mode 100644 index 000000000..e0ae7da79 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSThread.rs @@ -0,0 +1,167 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSThread; + + unsafe impl ClassType for NSThread { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSThread { + #[method_id(@__retain_semantics Other currentThread)] + pub unsafe fn currentThread() -> Id; + + #[method(detachNewThreadWithBlock:)] + pub unsafe fn detachNewThreadWithBlock(block: &Block<(), ()>); + + #[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(@__retain_semantics Other 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(qualityOfService)] + pub unsafe fn qualityOfService(&self) -> NSQualityOfService; + + #[method(setQualityOfService:)] + pub unsafe fn setQualityOfService(&self, qualityOfService: NSQualityOfService); + + #[method_id(@__retain_semantics Other callStackReturnAddresses)] + pub unsafe fn callStackReturnAddresses() -> Id, Shared>; + + #[method_id(@__retain_semantics Other callStackSymbols)] + pub unsafe fn callStackSymbols() -> 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(stackSize)] + pub unsafe fn stackSize(&self) -> NSUInteger; + + #[method(setStackSize:)] + pub unsafe fn setStackSize(&self, stackSize: NSUInteger); + + #[method_id(@__retain_semantics Other mainThread)] + pub unsafe fn mainThread() -> Id; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method_id(@__retain_semantics Init initWithTarget:selector:object:)] + pub unsafe fn initWithTarget_selector_object( + this: Option>, + target: &Object, + selector: Sel, + argument: Option<&Object>, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithBlock:)] + pub unsafe fn initWithBlock( + this: Option>, + block: &Block<(), ()>, + ) -> 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_static!(NSWillBecomeMultiThreadedNotification: &'static NSNotificationName); + +extern_static!(NSDidBecomeSingleThreadedNotification: &'static NSNotificationName); + +extern_static!(NSThreadWillExitNotification: &'static NSNotificationName); + +extern_methods!( + /// 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>, + ); + + #[method(performSelectorOnMainThread:withObject:waitUntilDone:)] + pub unsafe fn performSelectorOnMainThread_withObject_waitUntilDone( + &self, + aSelector: Sel, + arg: Option<&Object>, + wait: bool, + ); + + #[method(performSelector:onThread:withObject:waitUntilDone:modes:)] + pub unsafe fn performSelector_onThread_withObject_waitUntilDone_modes( + &self, + aSelector: Sel, + thr: &NSThread, + arg: Option<&Object>, + wait: bool, + array: Option<&NSArray>, + ); + + #[method(performSelector:onThread:withObject:waitUntilDone:)] + pub unsafe fn performSelector_onThread_withObject_waitUntilDone( + &self, + aSelector: Sel, + thr: &NSThread, + arg: Option<&Object>, + wait: bool, + ); + + #[method(performSelectorInBackground:withObject:)] + pub unsafe fn performSelectorInBackground_withObject( + &self, + aSelector: Sel, + arg: Option<&Object>, + ); + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSTimeZone.rs b/crates/icrate-generated/src/Foundation/generated/NSTimeZone.rs new file mode 100644 index 000000000..29500b1db --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSTimeZone.rs @@ -0,0 +1,151 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSTimeZone; + + unsafe impl ClassType for NSTimeZone { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSTimeZone { + #[method_id(@__retain_semantics Other name)] + pub unsafe fn name(&self) -> Id; + + #[method_id(@__retain_semantics Other data)] + pub unsafe fn data(&self) -> Id; + + #[method(secondsFromGMTForDate:)] + pub unsafe fn secondsFromGMTForDate(&self, aDate: &NSDate) -> NSInteger; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other nextDaylightSavingTimeTransitionAfterDate:)] + pub unsafe fn nextDaylightSavingTimeTransitionAfterDate( + &self, + aDate: &NSDate, + ) -> Option>; + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSTimeZoneNameStyle { + NSTimeZoneNameStyleStandard = 0, + NSTimeZoneNameStyleShortStandard = 1, + NSTimeZoneNameStyleDaylightSaving = 2, + NSTimeZoneNameStyleShortDaylightSaving = 3, + NSTimeZoneNameStyleGeneric = 4, + NSTimeZoneNameStyleShortGeneric = 5, + } +); + +extern_methods!( + /// NSExtendedTimeZone + unsafe impl NSTimeZone { + #[method_id(@__retain_semantics Other systemTimeZone)] + pub unsafe fn systemTimeZone() -> Id; + + #[method(resetSystemTimeZone)] + pub unsafe fn resetSystemTimeZone(); + + #[method_id(@__retain_semantics Other defaultTimeZone)] + pub unsafe fn defaultTimeZone() -> Id; + + #[method(setDefaultTimeZone:)] + pub unsafe fn setDefaultTimeZone(defaultTimeZone: &NSTimeZone); + + #[method_id(@__retain_semantics Other localTimeZone)] + pub unsafe fn localTimeZone() -> Id; + + #[method_id(@__retain_semantics Other knownTimeZoneNames)] + pub unsafe fn knownTimeZoneNames() -> Id, Shared>; + + #[method_id(@__retain_semantics Other abbreviationDictionary)] + pub unsafe fn abbreviationDictionary() -> Id, Shared>; + + #[method(setAbbreviationDictionary:)] + pub unsafe fn setAbbreviationDictionary( + abbreviationDictionary: &NSDictionary, + ); + + #[method_id(@__retain_semantics Other timeZoneDataVersion)] + pub unsafe fn timeZoneDataVersion() -> Id; + + #[method(secondsFromGMT)] + pub unsafe fn secondsFromGMT(&self) -> NSInteger; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other nextDaylightSavingTimeTransition)] + pub unsafe fn nextDaylightSavingTimeTransition(&self) -> Option>; + + #[method_id(@__retain_semantics Other description)] + pub unsafe fn description(&self) -> Id; + + #[method(isEqualToTimeZone:)] + pub unsafe fn isEqualToTimeZone(&self, aTimeZone: &NSTimeZone) -> bool; + + #[method_id(@__retain_semantics Other localizedName:locale:)] + pub unsafe fn localizedName_locale( + &self, + style: NSTimeZoneNameStyle, + locale: Option<&NSLocale>, + ) -> Option>; + } +); + +extern_methods!( + /// NSTimeZoneCreation + unsafe impl NSTimeZone { + #[method_id(@__retain_semantics Other timeZoneWithName:)] + pub unsafe fn timeZoneWithName(tzName: &NSString) -> Option>; + + #[method_id(@__retain_semantics Other timeZoneWithName:data:)] + pub unsafe fn timeZoneWithName_data( + tzName: &NSString, + aData: Option<&NSData>, + ) -> Option>; + + #[method_id(@__retain_semantics Init initWithName:)] + pub unsafe fn initWithName( + this: Option>, + tzName: &NSString, + ) -> Option>; + + #[method_id(@__retain_semantics Init initWithName:data:)] + pub unsafe fn initWithName_data( + this: Option>, + tzName: &NSString, + aData: Option<&NSData>, + ) -> Option>; + + #[method_id(@__retain_semantics Other timeZoneForSecondsFromGMT:)] + pub unsafe fn timeZoneForSecondsFromGMT(seconds: NSInteger) -> Id; + + #[method_id(@__retain_semantics Other timeZoneWithAbbreviation:)] + pub unsafe fn timeZoneWithAbbreviation(abbreviation: &NSString) + -> Option>; + } +); + +extern_static!(NSSystemTimeZoneDidChangeNotification: &'static NSNotificationName); diff --git a/crates/icrate-generated/src/Foundation/generated/NSTimer.rs b/crates/icrate-generated/src/Foundation/generated/NSTimer.rs new file mode 100644 index 000000000..cbd071fd6 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSTimer.rs @@ -0,0 +1,110 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSTimer; + + unsafe impl ClassType for NSTimer { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSTimer { + #[method_id(@__retain_semantics Other timerWithTimeInterval:invocation:repeats:)] + pub unsafe fn timerWithTimeInterval_invocation_repeats( + ti: NSTimeInterval, + invocation: &NSInvocation, + yesOrNo: bool, + ) -> Id; + + #[method_id(@__retain_semantics Other scheduledTimerWithTimeInterval:invocation:repeats:)] + pub unsafe fn scheduledTimerWithTimeInterval_invocation_repeats( + ti: NSTimeInterval, + invocation: &NSInvocation, + yesOrNo: bool, + ) -> Id; + + #[method_id(@__retain_semantics Other 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; + + #[method_id(@__retain_semantics Other 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; + + #[method_id(@__retain_semantics Other timerWithTimeInterval:repeats:block:)] + pub unsafe fn timerWithTimeInterval_repeats_block( + interval: NSTimeInterval, + repeats: bool, + block: &Block<(NonNull,), ()>, + ) -> Id; + + #[method_id(@__retain_semantics Other scheduledTimerWithTimeInterval:repeats:block:)] + pub unsafe fn scheduledTimerWithTimeInterval_repeats_block( + interval: NSTimeInterval, + repeats: bool, + block: &Block<(NonNull,), ()>, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithFireDate:interval:repeats:block:)] + pub unsafe fn initWithFireDate_interval_repeats_block( + this: Option>, + date: &NSDate, + interval: NSTimeInterval, + repeats: bool, + block: &Block<(NonNull,), ()>, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithFireDate:interval:target:selector:userInfo:repeats:)] + pub unsafe fn initWithFireDate_interval_target_selector_userInfo_repeats( + this: Option>, + date: &NSDate, + ti: NSTimeInterval, + t: &Object, + s: Sel, + ui: Option<&Object>, + rep: bool, + ) -> Id; + + #[method(fire)] + pub unsafe fn fire(&self); + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other userInfo)] + pub unsafe fn userInfo(&self) -> Option>; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSURL.rs b/crates/icrate-generated/src/Foundation/generated/NSURL.rs new file mode 100644 index 000000000..572bebfb0 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSURL.rs @@ -0,0 +1,1005 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +pub type NSURLResourceKey = NSString; + +extern_static!(NSURLFileScheme: &'static NSString); + +extern_static!(NSURLKeysOfUnsetValuesKey: &'static NSURLResourceKey); + +extern_static!(NSURLNameKey: &'static NSURLResourceKey); + +extern_static!(NSURLLocalizedNameKey: &'static NSURLResourceKey); + +extern_static!(NSURLIsRegularFileKey: &'static NSURLResourceKey); + +extern_static!(NSURLIsDirectoryKey: &'static NSURLResourceKey); + +extern_static!(NSURLIsSymbolicLinkKey: &'static NSURLResourceKey); + +extern_static!(NSURLIsVolumeKey: &'static NSURLResourceKey); + +extern_static!(NSURLIsPackageKey: &'static NSURLResourceKey); + +extern_static!(NSURLIsApplicationKey: &'static NSURLResourceKey); + +extern_static!(NSURLApplicationIsScriptableKey: &'static NSURLResourceKey); + +extern_static!(NSURLIsSystemImmutableKey: &'static NSURLResourceKey); + +extern_static!(NSURLIsUserImmutableKey: &'static NSURLResourceKey); + +extern_static!(NSURLIsHiddenKey: &'static NSURLResourceKey); + +extern_static!(NSURLHasHiddenExtensionKey: &'static NSURLResourceKey); + +extern_static!(NSURLCreationDateKey: &'static NSURLResourceKey); + +extern_static!(NSURLContentAccessDateKey: &'static NSURLResourceKey); + +extern_static!(NSURLContentModificationDateKey: &'static NSURLResourceKey); + +extern_static!(NSURLAttributeModificationDateKey: &'static NSURLResourceKey); + +extern_static!(NSURLLinkCountKey: &'static NSURLResourceKey); + +extern_static!(NSURLParentDirectoryURLKey: &'static NSURLResourceKey); + +extern_static!(NSURLVolumeURLKey: &'static NSURLResourceKey); + +extern_static!(NSURLTypeIdentifierKey: &'static NSURLResourceKey); + +extern_static!(NSURLContentTypeKey: &'static NSURLResourceKey); + +extern_static!(NSURLLocalizedTypeDescriptionKey: &'static NSURLResourceKey); + +extern_static!(NSURLLabelNumberKey: &'static NSURLResourceKey); + +extern_static!(NSURLLabelColorKey: &'static NSURLResourceKey); + +extern_static!(NSURLLocalizedLabelKey: &'static NSURLResourceKey); + +extern_static!(NSURLEffectiveIconKey: &'static NSURLResourceKey); + +extern_static!(NSURLCustomIconKey: &'static NSURLResourceKey); + +extern_static!(NSURLFileResourceIdentifierKey: &'static NSURLResourceKey); + +extern_static!(NSURLVolumeIdentifierKey: &'static NSURLResourceKey); + +extern_static!(NSURLPreferredIOBlockSizeKey: &'static NSURLResourceKey); + +extern_static!(NSURLIsReadableKey: &'static NSURLResourceKey); + +extern_static!(NSURLIsWritableKey: &'static NSURLResourceKey); + +extern_static!(NSURLIsExecutableKey: &'static NSURLResourceKey); + +extern_static!(NSURLFileSecurityKey: &'static NSURLResourceKey); + +extern_static!(NSURLIsExcludedFromBackupKey: &'static NSURLResourceKey); + +extern_static!(NSURLTagNamesKey: &'static NSURLResourceKey); + +extern_static!(NSURLPathKey: &'static NSURLResourceKey); + +extern_static!(NSURLCanonicalPathKey: &'static NSURLResourceKey); + +extern_static!(NSURLIsMountTriggerKey: &'static NSURLResourceKey); + +extern_static!(NSURLGenerationIdentifierKey: &'static NSURLResourceKey); + +extern_static!(NSURLDocumentIdentifierKey: &'static NSURLResourceKey); + +extern_static!(NSURLAddedToDirectoryDateKey: &'static NSURLResourceKey); + +extern_static!(NSURLQuarantinePropertiesKey: &'static NSURLResourceKey); + +extern_static!(NSURLFileResourceTypeKey: &'static NSURLResourceKey); + +extern_static!(NSURLFileContentIdentifierKey: &'static NSURLResourceKey); + +extern_static!(NSURLMayShareFileContentKey: &'static NSURLResourceKey); + +extern_static!(NSURLMayHaveExtendedAttributesKey: &'static NSURLResourceKey); + +extern_static!(NSURLIsPurgeableKey: &'static NSURLResourceKey); + +extern_static!(NSURLIsSparseKey: &'static NSURLResourceKey); + +pub type NSURLFileResourceType = NSString; + +extern_static!(NSURLFileResourceTypeNamedPipe: &'static NSURLFileResourceType); + +extern_static!(NSURLFileResourceTypeCharacterSpecial: &'static NSURLFileResourceType); + +extern_static!(NSURLFileResourceTypeDirectory: &'static NSURLFileResourceType); + +extern_static!(NSURLFileResourceTypeBlockSpecial: &'static NSURLFileResourceType); + +extern_static!(NSURLFileResourceTypeRegular: &'static NSURLFileResourceType); + +extern_static!(NSURLFileResourceTypeSymbolicLink: &'static NSURLFileResourceType); + +extern_static!(NSURLFileResourceTypeSocket: &'static NSURLFileResourceType); + +extern_static!(NSURLFileResourceTypeUnknown: &'static NSURLFileResourceType); + +extern_static!(NSURLThumbnailDictionaryKey: &'static NSURLResourceKey); + +extern_static!(NSURLThumbnailKey: &'static NSURLResourceKey); + +pub type NSURLThumbnailDictionaryItem = NSString; + +extern_static!(NSThumbnail1024x1024SizeKey: &'static NSURLThumbnailDictionaryItem); + +extern_static!(NSURLFileSizeKey: &'static NSURLResourceKey); + +extern_static!(NSURLFileAllocatedSizeKey: &'static NSURLResourceKey); + +extern_static!(NSURLTotalFileSizeKey: &'static NSURLResourceKey); + +extern_static!(NSURLTotalFileAllocatedSizeKey: &'static NSURLResourceKey); + +extern_static!(NSURLIsAliasFileKey: &'static NSURLResourceKey); + +extern_static!(NSURLFileProtectionKey: &'static NSURLResourceKey); + +pub type NSURLFileProtectionType = NSString; + +extern_static!(NSURLFileProtectionNone: &'static NSURLFileProtectionType); + +extern_static!(NSURLFileProtectionComplete: &'static NSURLFileProtectionType); + +extern_static!(NSURLFileProtectionCompleteUnlessOpen: &'static NSURLFileProtectionType); + +extern_static!( + NSURLFileProtectionCompleteUntilFirstUserAuthentication: &'static NSURLFileProtectionType +); + +extern_static!(NSURLVolumeLocalizedFormatDescriptionKey: &'static NSURLResourceKey); + +extern_static!(NSURLVolumeTotalCapacityKey: &'static NSURLResourceKey); + +extern_static!(NSURLVolumeAvailableCapacityKey: &'static NSURLResourceKey); + +extern_static!(NSURLVolumeResourceCountKey: &'static NSURLResourceKey); + +extern_static!(NSURLVolumeSupportsPersistentIDsKey: &'static NSURLResourceKey); + +extern_static!(NSURLVolumeSupportsSymbolicLinksKey: &'static NSURLResourceKey); + +extern_static!(NSURLVolumeSupportsHardLinksKey: &'static NSURLResourceKey); + +extern_static!(NSURLVolumeSupportsJournalingKey: &'static NSURLResourceKey); + +extern_static!(NSURLVolumeIsJournalingKey: &'static NSURLResourceKey); + +extern_static!(NSURLVolumeSupportsSparseFilesKey: &'static NSURLResourceKey); + +extern_static!(NSURLVolumeSupportsZeroRunsKey: &'static NSURLResourceKey); + +extern_static!(NSURLVolumeSupportsCaseSensitiveNamesKey: &'static NSURLResourceKey); + +extern_static!(NSURLVolumeSupportsCasePreservedNamesKey: &'static NSURLResourceKey); + +extern_static!(NSURLVolumeSupportsRootDirectoryDatesKey: &'static NSURLResourceKey); + +extern_static!(NSURLVolumeSupportsVolumeSizesKey: &'static NSURLResourceKey); + +extern_static!(NSURLVolumeSupportsRenamingKey: &'static NSURLResourceKey); + +extern_static!(NSURLVolumeSupportsAdvisoryFileLockingKey: &'static NSURLResourceKey); + +extern_static!(NSURLVolumeSupportsExtendedSecurityKey: &'static NSURLResourceKey); + +extern_static!(NSURLVolumeIsBrowsableKey: &'static NSURLResourceKey); + +extern_static!(NSURLVolumeMaximumFileSizeKey: &'static NSURLResourceKey); + +extern_static!(NSURLVolumeIsEjectableKey: &'static NSURLResourceKey); + +extern_static!(NSURLVolumeIsRemovableKey: &'static NSURLResourceKey); + +extern_static!(NSURLVolumeIsInternalKey: &'static NSURLResourceKey); + +extern_static!(NSURLVolumeIsAutomountedKey: &'static NSURLResourceKey); + +extern_static!(NSURLVolumeIsLocalKey: &'static NSURLResourceKey); + +extern_static!(NSURLVolumeIsReadOnlyKey: &'static NSURLResourceKey); + +extern_static!(NSURLVolumeCreationDateKey: &'static NSURLResourceKey); + +extern_static!(NSURLVolumeURLForRemountingKey: &'static NSURLResourceKey); + +extern_static!(NSURLVolumeUUIDStringKey: &'static NSURLResourceKey); + +extern_static!(NSURLVolumeNameKey: &'static NSURLResourceKey); + +extern_static!(NSURLVolumeLocalizedNameKey: &'static NSURLResourceKey); + +extern_static!(NSURLVolumeIsEncryptedKey: &'static NSURLResourceKey); + +extern_static!(NSURLVolumeIsRootFileSystemKey: &'static NSURLResourceKey); + +extern_static!(NSURLVolumeSupportsCompressionKey: &'static NSURLResourceKey); + +extern_static!(NSURLVolumeSupportsFileCloningKey: &'static NSURLResourceKey); + +extern_static!(NSURLVolumeSupportsSwapRenamingKey: &'static NSURLResourceKey); + +extern_static!(NSURLVolumeSupportsExclusiveRenamingKey: &'static NSURLResourceKey); + +extern_static!(NSURLVolumeSupportsImmutableFilesKey: &'static NSURLResourceKey); + +extern_static!(NSURLVolumeSupportsAccessPermissionsKey: &'static NSURLResourceKey); + +extern_static!(NSURLVolumeSupportsFileProtectionKey: &'static NSURLResourceKey); + +extern_static!(NSURLVolumeAvailableCapacityForImportantUsageKey: &'static NSURLResourceKey); + +extern_static!(NSURLVolumeAvailableCapacityForOpportunisticUsageKey: &'static NSURLResourceKey); + +extern_static!(NSURLIsUbiquitousItemKey: &'static NSURLResourceKey); + +extern_static!(NSURLUbiquitousItemHasUnresolvedConflictsKey: &'static NSURLResourceKey); + +extern_static!(NSURLUbiquitousItemIsDownloadedKey: &'static NSURLResourceKey); + +extern_static!(NSURLUbiquitousItemIsDownloadingKey: &'static NSURLResourceKey); + +extern_static!(NSURLUbiquitousItemIsUploadedKey: &'static NSURLResourceKey); + +extern_static!(NSURLUbiquitousItemIsUploadingKey: &'static NSURLResourceKey); + +extern_static!(NSURLUbiquitousItemPercentDownloadedKey: &'static NSURLResourceKey); + +extern_static!(NSURLUbiquitousItemPercentUploadedKey: &'static NSURLResourceKey); + +extern_static!(NSURLUbiquitousItemDownloadingStatusKey: &'static NSURLResourceKey); + +extern_static!(NSURLUbiquitousItemDownloadingErrorKey: &'static NSURLResourceKey); + +extern_static!(NSURLUbiquitousItemUploadingErrorKey: &'static NSURLResourceKey); + +extern_static!(NSURLUbiquitousItemDownloadRequestedKey: &'static NSURLResourceKey); + +extern_static!(NSURLUbiquitousItemContainerDisplayNameKey: &'static NSURLResourceKey); + +extern_static!(NSURLUbiquitousItemIsExcludedFromSyncKey: &'static NSURLResourceKey); + +extern_static!(NSURLUbiquitousItemIsSharedKey: &'static NSURLResourceKey); + +extern_static!(NSURLUbiquitousSharedItemCurrentUserRoleKey: &'static NSURLResourceKey); + +extern_static!(NSURLUbiquitousSharedItemCurrentUserPermissionsKey: &'static NSURLResourceKey); + +extern_static!(NSURLUbiquitousSharedItemOwnerNameComponentsKey: &'static NSURLResourceKey); + +extern_static!( + NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey: &'static NSURLResourceKey +); + +pub type NSURLUbiquitousItemDownloadingStatus = NSString; + +extern_static!( + NSURLUbiquitousItemDownloadingStatusNotDownloaded: + &'static NSURLUbiquitousItemDownloadingStatus +); + +extern_static!( + NSURLUbiquitousItemDownloadingStatusDownloaded: &'static NSURLUbiquitousItemDownloadingStatus +); + +extern_static!( + NSURLUbiquitousItemDownloadingStatusCurrent: &'static NSURLUbiquitousItemDownloadingStatus +); + +pub type NSURLUbiquitousSharedItemRole = NSString; + +extern_static!(NSURLUbiquitousSharedItemRoleOwner: &'static NSURLUbiquitousSharedItemRole); + +extern_static!(NSURLUbiquitousSharedItemRoleParticipant: &'static NSURLUbiquitousSharedItemRole); + +pub type NSURLUbiquitousSharedItemPermissions = NSString; + +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; + +extern_class!( + #[derive(Debug)] + pub struct NSURL; + + unsafe impl ClassType for NSURL { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSURL { + #[method_id(@__retain_semantics Init initWithScheme:host:path:)] + pub unsafe fn initWithScheme_host_path( + this: Option>, + scheme: &NSString, + host: Option<&NSString>, + path: &NSString, + ) -> Option>; + + #[method_id(@__retain_semantics Init initFileURLWithPath:isDirectory:relativeToURL:)] + pub unsafe fn initFileURLWithPath_isDirectory_relativeToURL( + this: Option>, + path: &NSString, + isDir: bool, + baseURL: Option<&NSURL>, + ) -> Id; + + #[method_id(@__retain_semantics Init initFileURLWithPath:relativeToURL:)] + pub unsafe fn initFileURLWithPath_relativeToURL( + this: Option>, + path: &NSString, + baseURL: Option<&NSURL>, + ) -> Id; + + #[method_id(@__retain_semantics Init initFileURLWithPath:isDirectory:)] + pub unsafe fn initFileURLWithPath_isDirectory( + this: Option>, + path: &NSString, + isDir: bool, + ) -> Id; + + #[method_id(@__retain_semantics Init initFileURLWithPath:)] + pub unsafe fn initFileURLWithPath( + this: Option>, + path: &NSString, + ) -> Id; + + #[method_id(@__retain_semantics Other fileURLWithPath:isDirectory:relativeToURL:)] + pub unsafe fn fileURLWithPath_isDirectory_relativeToURL( + path: &NSString, + isDir: bool, + baseURL: Option<&NSURL>, + ) -> Id; + + #[method_id(@__retain_semantics Other fileURLWithPath:relativeToURL:)] + pub unsafe fn fileURLWithPath_relativeToURL( + path: &NSString, + baseURL: Option<&NSURL>, + ) -> Id; + + #[method_id(@__retain_semantics Other fileURLWithPath:isDirectory:)] + pub unsafe fn fileURLWithPath_isDirectory( + path: &NSString, + isDir: bool, + ) -> Id; + + #[method_id(@__retain_semantics Other fileURLWithPath:)] + pub unsafe fn fileURLWithPath(path: &NSString) -> Id; + + #[method_id(@__retain_semantics Init initFileURLWithFileSystemRepresentation:isDirectory:relativeToURL:)] + pub unsafe fn initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL( + this: Option>, + path: NonNull, + isDir: bool, + baseURL: Option<&NSURL>, + ) -> Id; + + #[method_id(@__retain_semantics Other fileURLWithFileSystemRepresentation:isDirectory:relativeToURL:)] + pub unsafe fn fileURLWithFileSystemRepresentation_isDirectory_relativeToURL( + path: NonNull, + isDir: bool, + baseURL: Option<&NSURL>, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithString:)] + pub unsafe fn initWithString( + this: Option>, + URLString: &NSString, + ) -> Option>; + + #[method_id(@__retain_semantics Init initWithString:relativeToURL:)] + pub unsafe fn initWithString_relativeToURL( + this: Option>, + URLString: &NSString, + baseURL: Option<&NSURL>, + ) -> Option>; + + #[method_id(@__retain_semantics Other URLWithString:)] + pub unsafe fn URLWithString(URLString: &NSString) -> Option>; + + #[method_id(@__retain_semantics Other URLWithString:relativeToURL:)] + pub unsafe fn URLWithString_relativeToURL( + URLString: &NSString, + baseURL: Option<&NSURL>, + ) -> Option>; + + #[method_id(@__retain_semantics Init initWithDataRepresentation:relativeToURL:)] + pub unsafe fn initWithDataRepresentation_relativeToURL( + this: Option>, + data: &NSData, + baseURL: Option<&NSURL>, + ) -> Id; + + #[method_id(@__retain_semantics Other URLWithDataRepresentation:relativeToURL:)] + pub unsafe fn URLWithDataRepresentation_relativeToURL( + data: &NSData, + baseURL: Option<&NSURL>, + ) -> Id; + + #[method_id(@__retain_semantics Init initAbsoluteURLWithDataRepresentation:relativeToURL:)] + pub unsafe fn initAbsoluteURLWithDataRepresentation_relativeToURL( + this: Option>, + data: &NSData, + baseURL: Option<&NSURL>, + ) -> Id; + + #[method_id(@__retain_semantics Other absoluteURLWithDataRepresentation:relativeToURL:)] + pub unsafe fn absoluteURLWithDataRepresentation_relativeToURL( + data: &NSData, + baseURL: Option<&NSURL>, + ) -> Id; + + #[method_id(@__retain_semantics Other dataRepresentation)] + pub unsafe fn dataRepresentation(&self) -> Id; + + #[method_id(@__retain_semantics Other absoluteString)] + pub unsafe fn absoluteString(&self) -> Option>; + + #[method_id(@__retain_semantics Other relativeString)] + pub unsafe fn relativeString(&self) -> Id; + + #[method_id(@__retain_semantics Other baseURL)] + pub unsafe fn baseURL(&self) -> Option>; + + #[method_id(@__retain_semantics Other absoluteURL)] + pub unsafe fn absoluteURL(&self) -> Option>; + + #[method_id(@__retain_semantics Other scheme)] + pub unsafe fn scheme(&self) -> Option>; + + #[method_id(@__retain_semantics Other resourceSpecifier)] + pub unsafe fn resourceSpecifier(&self) -> Option>; + + #[method_id(@__retain_semantics Other host)] + pub unsafe fn host(&self) -> Option>; + + #[method_id(@__retain_semantics Other port)] + pub unsafe fn port(&self) -> Option>; + + #[method_id(@__retain_semantics Other user)] + pub unsafe fn user(&self) -> Option>; + + #[method_id(@__retain_semantics Other password)] + pub unsafe fn password(&self) -> Option>; + + #[method_id(@__retain_semantics Other path)] + pub unsafe fn path(&self) -> Option>; + + #[method_id(@__retain_semantics Other fragment)] + pub unsafe fn fragment(&self) -> Option>; + + #[method_id(@__retain_semantics Other parameterString)] + pub unsafe fn parameterString(&self) -> Option>; + + #[method_id(@__retain_semantics Other query)] + pub unsafe fn query(&self) -> Option>; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other 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(@__retain_semantics Other fileReferenceURL)] + pub unsafe fn fileReferenceURL(&self) -> Option>; + + #[method_id(@__retain_semantics Other filePathURL)] + pub unsafe fn filePathURL(&self) -> Option>; + + #[method(getResourceValue:forKey:error:)] + pub unsafe fn getResourceValue_forKey_error( + &self, + value: NonNull<*mut Object>, + key: &NSURLResourceKey, + ) -> Result<(), Id>; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:)] + pub unsafe fn bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error( + &self, + options: NSURLBookmarkCreationOptions, + keys: Option<&NSArray>, + relativeURL: Option<&NSURL>, + ) -> Result, Id>; + + #[method_id(@__retain_semantics Init initByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:)] + pub unsafe fn initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error( + this: Option>, + bookmarkData: &NSData, + options: NSURLBookmarkResolutionOptions, + relativeURL: Option<&NSURL>, + isStale: *mut Bool, + ) -> Result, Id>; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other 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(@__retain_semantics Other bookmarkDataWithContentsOfURL:error:)] + pub unsafe fn bookmarkDataWithContentsOfURL_error( + bookmarkFileURL: &NSURL, + ) -> Result, Id>; + + #[method_id(@__retain_semantics Other 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!( + /// NSPromisedItems + unsafe impl NSURL { + #[method(getPromisedItemResourceValue:forKey:error:)] + pub unsafe fn getPromisedItemResourceValue_forKey_error( + &self, + value: NonNull<*mut Object>, + key: &NSURLResourceKey, + ) -> Result<(), Id>; + + #[method_id(@__retain_semantics Other promisedItemResourceValuesForKeys:error:)] + pub unsafe fn promisedItemResourceValuesForKeys_error( + &self, + keys: &NSArray, + ) -> Result, Shared>, Id>; + + #[method(checkPromisedItemIsReachableAndReturnError:)] + pub unsafe fn checkPromisedItemIsReachableAndReturnError( + &self, + ) -> Result<(), Id>; + } +); + +extern_methods!( + /// 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(@__retain_semantics Init initWithName:value:)] + pub unsafe fn initWithName_value( + this: Option>, + name: &NSString, + value: Option<&NSString>, + ) -> Id; + + #[method_id(@__retain_semantics Other queryItemWithName:value:)] + pub unsafe fn queryItemWithName_value( + name: &NSString, + value: Option<&NSString>, + ) -> Id; + + #[method_id(@__retain_semantics Other name)] + pub unsafe fn name(&self) -> Id; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method_id(@__retain_semantics Init initWithURL:resolvingAgainstBaseURL:)] + pub unsafe fn initWithURL_resolvingAgainstBaseURL( + this: Option>, + url: &NSURL, + resolve: bool, + ) -> Option>; + + #[method_id(@__retain_semantics Other componentsWithURL:resolvingAgainstBaseURL:)] + pub unsafe fn componentsWithURL_resolvingAgainstBaseURL( + url: &NSURL, + resolve: bool, + ) -> Option>; + + #[method_id(@__retain_semantics Init initWithString:)] + pub unsafe fn initWithString( + this: Option>, + URLString: &NSString, + ) -> Option>; + + #[method_id(@__retain_semantics Other componentsWithString:)] + pub unsafe fn componentsWithString(URLString: &NSString) -> Option>; + + #[method_id(@__retain_semantics Other URL)] + pub unsafe fn URL(&self) -> Option>; + + #[method_id(@__retain_semantics Other URLRelativeToURL:)] + pub unsafe fn URLRelativeToURL(&self, baseURL: Option<&NSURL>) + -> Option>; + + #[method_id(@__retain_semantics Other string)] + pub unsafe fn string(&self) -> Option>; + + #[method_id(@__retain_semantics Other scheme)] + pub unsafe fn scheme(&self) -> Option>; + + #[method(setScheme:)] + pub unsafe fn setScheme(&self, scheme: Option<&NSString>); + + #[method_id(@__retain_semantics Other user)] + pub unsafe fn user(&self) -> Option>; + + #[method(setUser:)] + pub unsafe fn setUser(&self, user: Option<&NSString>); + + #[method_id(@__retain_semantics Other password)] + pub unsafe fn password(&self) -> Option>; + + #[method(setPassword:)] + pub unsafe fn setPassword(&self, password: Option<&NSString>); + + #[method_id(@__retain_semantics Other host)] + pub unsafe fn host(&self) -> Option>; + + #[method(setHost:)] + pub unsafe fn setHost(&self, host: Option<&NSString>); + + #[method_id(@__retain_semantics Other port)] + pub unsafe fn port(&self) -> Option>; + + #[method(setPort:)] + pub unsafe fn setPort(&self, port: Option<&NSNumber>); + + #[method_id(@__retain_semantics Other path)] + pub unsafe fn path(&self) -> Option>; + + #[method(setPath:)] + pub unsafe fn setPath(&self, path: Option<&NSString>); + + #[method_id(@__retain_semantics Other query)] + pub unsafe fn query(&self) -> Option>; + + #[method(setQuery:)] + pub unsafe fn setQuery(&self, query: Option<&NSString>); + + #[method_id(@__retain_semantics Other fragment)] + pub unsafe fn fragment(&self) -> Option>; + + #[method(setFragment:)] + pub unsafe fn setFragment(&self, fragment: Option<&NSString>); + + #[method_id(@__retain_semantics Other percentEncodedUser)] + pub unsafe fn percentEncodedUser(&self) -> Option>; + + #[method(setPercentEncodedUser:)] + pub unsafe fn setPercentEncodedUser(&self, percentEncodedUser: Option<&NSString>); + + #[method_id(@__retain_semantics Other percentEncodedPassword)] + pub unsafe fn percentEncodedPassword(&self) -> Option>; + + #[method(setPercentEncodedPassword:)] + pub unsafe fn setPercentEncodedPassword(&self, percentEncodedPassword: Option<&NSString>); + + #[method_id(@__retain_semantics Other percentEncodedHost)] + pub unsafe fn percentEncodedHost(&self) -> Option>; + + #[method(setPercentEncodedHost:)] + pub unsafe fn setPercentEncodedHost(&self, percentEncodedHost: Option<&NSString>); + + #[method_id(@__retain_semantics Other percentEncodedPath)] + pub unsafe fn percentEncodedPath(&self) -> Option>; + + #[method(setPercentEncodedPath:)] + pub unsafe fn setPercentEncodedPath(&self, percentEncodedPath: Option<&NSString>); + + #[method_id(@__retain_semantics Other percentEncodedQuery)] + pub unsafe fn percentEncodedQuery(&self) -> Option>; + + #[method(setPercentEncodedQuery:)] + pub unsafe fn setPercentEncodedQuery(&self, percentEncodedQuery: Option<&NSString>); + + #[method_id(@__retain_semantics Other percentEncodedFragment)] + pub unsafe fn percentEncodedFragment(&self) -> Option>; + + #[method(setPercentEncodedFragment:)] + pub unsafe fn setPercentEncodedFragment(&self, percentEncodedFragment: Option<&NSString>); + + #[method_id(@__retain_semantics Other encodedHost)] + pub unsafe fn encodedHost(&self) -> Option>; + + #[method(setEncodedHost:)] + pub unsafe fn setEncodedHost(&self, encodedHost: 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(@__retain_semantics Other queryItems)] + pub unsafe fn queryItems(&self) -> Option, Shared>>; + + #[method(setQueryItems:)] + pub unsafe fn setQueryItems(&self, queryItems: Option<&NSArray>); + + #[method_id(@__retain_semantics Other percentEncodedQueryItems)] + pub unsafe fn percentEncodedQueryItems( + &self, + ) -> Option, Shared>>; + + #[method(setPercentEncodedQueryItems:)] + pub unsafe fn setPercentEncodedQueryItems( + &self, + percentEncodedQueryItems: Option<&NSArray>, + ); + } +); + +extern_methods!( + /// NSURLUtilities + unsafe impl NSCharacterSet { + #[method_id(@__retain_semantics Other URLUserAllowedCharacterSet)] + pub unsafe fn URLUserAllowedCharacterSet() -> Id; + + #[method_id(@__retain_semantics Other URLPasswordAllowedCharacterSet)] + pub unsafe fn URLPasswordAllowedCharacterSet() -> Id; + + #[method_id(@__retain_semantics Other URLHostAllowedCharacterSet)] + pub unsafe fn URLHostAllowedCharacterSet() -> Id; + + #[method_id(@__retain_semantics Other URLPathAllowedCharacterSet)] + pub unsafe fn URLPathAllowedCharacterSet() -> Id; + + #[method_id(@__retain_semantics Other URLQueryAllowedCharacterSet)] + pub unsafe fn URLQueryAllowedCharacterSet() -> Id; + + #[method_id(@__retain_semantics Other URLFragmentAllowedCharacterSet)] + pub unsafe fn URLFragmentAllowedCharacterSet() -> Id; + } +); + +extern_methods!( + /// NSURLUtilities + unsafe impl NSString { + #[method_id(@__retain_semantics Other stringByAddingPercentEncodingWithAllowedCharacters:)] + pub unsafe fn stringByAddingPercentEncodingWithAllowedCharacters( + &self, + allowedCharacters: &NSCharacterSet, + ) -> Option>; + + #[method_id(@__retain_semantics Other stringByRemovingPercentEncoding)] + pub unsafe fn stringByRemovingPercentEncoding(&self) -> Option>; + + #[method_id(@__retain_semantics Other stringByAddingPercentEscapesUsingEncoding:)] + pub unsafe fn stringByAddingPercentEscapesUsingEncoding( + &self, + enc: NSStringEncoding, + ) -> Option>; + + #[method_id(@__retain_semantics Other stringByReplacingPercentEscapesUsingEncoding:)] + pub unsafe fn stringByReplacingPercentEscapesUsingEncoding( + &self, + enc: NSStringEncoding, + ) -> Option>; + } +); + +extern_methods!( + /// NSURLPathUtilities + unsafe impl NSURL { + #[method_id(@__retain_semantics Other fileURLWithPathComponents:)] + pub unsafe fn fileURLWithPathComponents( + components: &NSArray, + ) -> Option>; + + #[method_id(@__retain_semantics Other pathComponents)] + pub unsafe fn pathComponents(&self) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other lastPathComponent)] + pub unsafe fn lastPathComponent(&self) -> Option>; + + #[method_id(@__retain_semantics Other pathExtension)] + pub unsafe fn pathExtension(&self) -> Option>; + + #[method_id(@__retain_semantics Other URLByAppendingPathComponent:)] + pub unsafe fn URLByAppendingPathComponent( + &self, + pathComponent: &NSString, + ) -> Option>; + + #[method_id(@__retain_semantics Other URLByAppendingPathComponent:isDirectory:)] + pub unsafe fn URLByAppendingPathComponent_isDirectory( + &self, + pathComponent: &NSString, + isDirectory: bool, + ) -> Option>; + + #[method_id(@__retain_semantics Other URLByDeletingLastPathComponent)] + pub unsafe fn URLByDeletingLastPathComponent(&self) -> Option>; + + #[method_id(@__retain_semantics Other URLByAppendingPathExtension:)] + pub unsafe fn URLByAppendingPathExtension( + &self, + pathExtension: &NSString, + ) -> Option>; + + #[method_id(@__retain_semantics Other URLByDeletingPathExtension)] + pub unsafe fn URLByDeletingPathExtension(&self) -> Option>; + + #[method_id(@__retain_semantics Other URLByStandardizingPath)] + pub unsafe fn URLByStandardizingPath(&self) -> Option>; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSURLAuthenticationChallenge.rs b/crates/icrate-generated/src/Foundation/generated/NSURLAuthenticationChallenge.rs new file mode 100644 index 000000000..898d61a9e --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSURLAuthenticationChallenge.rs @@ -0,0 +1,92 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +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)] + pub struct NSURLAuthenticationChallenge; + + unsafe impl ClassType for NSURLAuthenticationChallenge { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSURLAuthenticationChallenge { + #[method_id(@__retain_semantics Init initWithProtectionSpace:proposedCredential:previousFailureCount:failureResponse:error:sender:)] + pub unsafe fn initWithProtectionSpace_proposedCredential_previousFailureCount_failureResponse_error_sender( + this: Option>, + space: &NSURLProtectionSpace, + credential: Option<&NSURLCredential>, + previousFailureCount: NSInteger, + response: Option<&NSURLResponse>, + error: Option<&NSError>, + sender: &NSURLAuthenticationChallengeSender, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithAuthenticationChallenge:sender:)] + pub unsafe fn initWithAuthenticationChallenge_sender( + this: Option>, + challenge: &NSURLAuthenticationChallenge, + sender: &NSURLAuthenticationChallengeSender, + ) -> Id; + + #[method_id(@__retain_semantics Other protectionSpace)] + pub unsafe fn protectionSpace(&self) -> Id; + + #[method_id(@__retain_semantics Other proposedCredential)] + pub unsafe fn proposedCredential(&self) -> Option>; + + #[method(previousFailureCount)] + pub unsafe fn previousFailureCount(&self) -> NSInteger; + + #[method_id(@__retain_semantics Other failureResponse)] + pub unsafe fn failureResponse(&self) -> Option>; + + #[method_id(@__retain_semantics Other error)] + pub unsafe fn error(&self) -> Option>; + + #[method_id(@__retain_semantics Other sender)] + pub unsafe fn sender(&self) -> Option>; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSURLCache.rs b/crates/icrate-generated/src/Foundation/generated/NSURLCache.rs new file mode 100644 index 000000000..9a7e2986f --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSURLCache.rs @@ -0,0 +1,151 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSURLCacheStoragePolicy { + NSURLCacheStorageAllowed = 0, + NSURLCacheStorageAllowedInMemoryOnly = 1, + NSURLCacheStorageNotAllowed = 2, + } +); + +extern_class!( + #[derive(Debug)] + pub struct NSCachedURLResponse; + + unsafe impl ClassType for NSCachedURLResponse { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSCachedURLResponse { + #[method_id(@__retain_semantics Init initWithResponse:data:)] + pub unsafe fn initWithResponse_data( + this: Option>, + response: &NSURLResponse, + data: &NSData, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithResponse:data:userInfo:storagePolicy:)] + pub unsafe fn initWithResponse_data_userInfo_storagePolicy( + this: Option>, + response: &NSURLResponse, + data: &NSData, + userInfo: Option<&NSDictionary>, + storagePolicy: NSURLCacheStoragePolicy, + ) -> Id; + + #[method_id(@__retain_semantics Other response)] + pub unsafe fn response(&self) -> Id; + + #[method_id(@__retain_semantics Other data)] + pub unsafe fn data(&self) -> Id; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other sharedURLCache)] + pub unsafe fn sharedURLCache() -> Id; + + #[method(setSharedURLCache:)] + pub unsafe fn setSharedURLCache(sharedURLCache: &NSURLCache); + + #[method_id(@__retain_semantics Init initWithMemoryCapacity:diskCapacity:diskPath:)] + pub unsafe fn initWithMemoryCapacity_diskCapacity_diskPath( + this: Option>, + memoryCapacity: NSUInteger, + diskCapacity: NSUInteger, + path: Option<&NSString>, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithMemoryCapacity:diskCapacity:directoryURL:)] + pub unsafe fn initWithMemoryCapacity_diskCapacity_directoryURL( + this: Option>, + memoryCapacity: NSUInteger, + diskCapacity: NSUInteger, + directoryURL: Option<&NSURL>, + ) -> Id; + + #[method_id(@__retain_semantics Other 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!( + /// NSURLSessionTaskAdditions + unsafe impl NSURLCache { + #[method(storeCachedResponse:forDataTask:)] + pub unsafe fn storeCachedResponse_forDataTask( + &self, + cachedResponse: &NSCachedURLResponse, + dataTask: &NSURLSessionDataTask, + ); + + #[method(getCachedResponseForDataTask:completionHandler:)] + pub unsafe fn getCachedResponseForDataTask_completionHandler( + &self, + dataTask: &NSURLSessionDataTask, + completionHandler: &Block<(*mut NSCachedURLResponse,), ()>, + ); + + #[method(removeCachedResponseForDataTask:)] + pub unsafe fn removeCachedResponseForDataTask(&self, dataTask: &NSURLSessionDataTask); + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSURLConnection.rs b/crates/icrate-generated/src/Foundation/generated/NSURLConnection.rs new file mode 100644 index 000000000..095d6f06c --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSURLConnection.rs @@ -0,0 +1,231 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSURLConnection; + + unsafe impl ClassType for NSURLConnection { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSURLConnection { + #[method_id(@__retain_semantics Init initWithRequest:delegate:startImmediately:)] + pub unsafe fn initWithRequest_delegate_startImmediately( + this: Option>, + request: &NSURLRequest, + delegate: Option<&Object>, + startImmediately: bool, + ) -> Option>; + + #[method_id(@__retain_semantics Init initWithRequest:delegate:)] + pub unsafe fn initWithRequest_delegate( + this: Option>, + request: &NSURLRequest, + delegate: Option<&Object>, + ) -> Option>; + + #[method_id(@__retain_semantics Other connectionWithRequest:delegate:)] + pub unsafe fn connectionWithRequest_delegate( + request: &NSURLRequest, + delegate: Option<&Object>, + ) -> Option>; + + #[method_id(@__retain_semantics Other originalRequest)] + pub unsafe fn originalRequest(&self) -> Id; + + #[method_id(@__retain_semantics Other 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; + } +); + +extern_protocol!( + pub struct NSURLConnectionDelegate; + + 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, + ); + + #[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 + unsafe impl NSURLConnection { + #[method_id(@__retain_semantics Other sendSynchronousRequest:returningResponse:error:)] + pub unsafe fn sendSynchronousRequest_returningResponse_error( + request: &NSURLRequest, + response: *mut *mut NSURLResponse, + ) -> Result, Id>; + } +); + +extern_methods!( + /// NSURLConnectionQueuedLoading + unsafe impl NSURLConnection { + #[method(sendAsynchronousRequest:queue:completionHandler:)] + pub unsafe fn sendAsynchronousRequest_queue_completionHandler( + request: &NSURLRequest, + queue: &NSOperationQueue, + handler: &Block<(*mut NSURLResponse, *mut NSData, *mut NSError), ()>, + ); + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSURLCredential.rs b/crates/icrate-generated/src/Foundation/generated/NSURLCredential.rs new file mode 100644 index 000000000..b8afdac8e --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSURLCredential.rs @@ -0,0 +1,72 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSURLCredentialPersistence { + NSURLCredentialPersistenceNone = 0, + NSURLCredentialPersistenceForSession = 1, + NSURLCredentialPersistencePermanent = 2, + NSURLCredentialPersistenceSynchronizable = 3, + } +); + +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!( + /// NSInternetPassword + unsafe impl NSURLCredential { + #[method_id(@__retain_semantics Init initWithUser:password:persistence:)] + pub unsafe fn initWithUser_password_persistence( + this: Option>, + user: &NSString, + password: &NSString, + persistence: NSURLCredentialPersistence, + ) -> Id; + + #[method_id(@__retain_semantics Other credentialWithUser:password:persistence:)] + pub unsafe fn credentialWithUser_password_persistence( + user: &NSString, + password: &NSString, + persistence: NSURLCredentialPersistence, + ) -> Id; + + #[method_id(@__retain_semantics Other user)] + pub unsafe fn user(&self) -> Option>; + + #[method_id(@__retain_semantics Other password)] + pub unsafe fn password(&self) -> Option>; + + #[method(hasPassword)] + pub unsafe fn hasPassword(&self) -> bool; + } +); + +extern_methods!( + /// NSClientCertificate + unsafe impl NSURLCredential { + #[method_id(@__retain_semantics Other certificates)] + pub unsafe fn certificates(&self) -> Id; + } +); + +extern_methods!( + /// NSServerTrust + unsafe impl NSURLCredential {} +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSURLCredentialStorage.rs b/crates/icrate-generated/src/Foundation/generated/NSURLCredentialStorage.rs new file mode 100644 index 000000000..99b6389cb --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSURLCredentialStorage.rs @@ -0,0 +1,116 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSURLCredentialStorage; + + unsafe impl ClassType for NSURLCredentialStorage { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSURLCredentialStorage { + #[method_id(@__retain_semantics Other sharedCredentialStorage)] + pub unsafe fn sharedCredentialStorage() -> Id; + + #[method_id(@__retain_semantics Other credentialsForProtectionSpace:)] + pub unsafe fn credentialsForProtectionSpace( + &self, + space: &NSURLProtectionSpace, + ) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other 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, + credential: &NSURLCredential, + space: &NSURLProtectionSpace, + options: Option<&NSDictionary>, + ); + + #[method_id(@__retain_semantics Other defaultCredentialForProtectionSpace:)] + pub unsafe fn defaultCredentialForProtectionSpace( + &self, + space: &NSURLProtectionSpace, + ) -> Option>; + + #[method(setDefaultCredential:forProtectionSpace:)] + pub unsafe fn setDefaultCredential_forProtectionSpace( + &self, + credential: &NSURLCredential, + space: &NSURLProtectionSpace, + ); + } +); + +extern_methods!( + /// NSURLSessionTaskAdditions + unsafe impl NSURLCredentialStorage { + #[method(getCredentialsForProtectionSpace:task:completionHandler:)] + pub unsafe fn getCredentialsForProtectionSpace_task_completionHandler( + &self, + protectionSpace: &NSURLProtectionSpace, + task: &NSURLSessionTask, + completionHandler: &Block<(*mut NSDictionary,), ()>, + ); + + #[method(setCredential:forProtectionSpace:task:)] + pub unsafe fn setCredential_forProtectionSpace_task( + &self, + credential: &NSURLCredential, + protectionSpace: &NSURLProtectionSpace, + task: &NSURLSessionTask, + ); + + #[method(removeCredential:forProtectionSpace:options:task:)] + pub unsafe fn removeCredential_forProtectionSpace_options_task( + &self, + credential: &NSURLCredential, + protectionSpace: &NSURLProtectionSpace, + options: Option<&NSDictionary>, + task: &NSURLSessionTask, + ); + + #[method(getDefaultCredentialForProtectionSpace:task:completionHandler:)] + pub unsafe fn getDefaultCredentialForProtectionSpace_task_completionHandler( + &self, + space: &NSURLProtectionSpace, + task: &NSURLSessionTask, + completionHandler: &Block<(*mut NSURLCredential,), ()>, + ); + + #[method(setDefaultCredential:forProtectionSpace:task:)] + pub unsafe fn setDefaultCredential_forProtectionSpace_task( + &self, + credential: &NSURLCredential, + protectionSpace: &NSURLProtectionSpace, + task: &NSURLSessionTask, + ); + } +); + +extern_static!(NSURLCredentialStorageChangedNotification: &'static NSNotificationName); + +extern_static!(NSURLCredentialStorageRemoveSynchronizableCredentials: &'static NSString); diff --git a/crates/icrate-generated/src/Foundation/generated/NSURLError.rs b/crates/icrate-generated/src/Foundation/generated/NSURLError.rs new file mode 100644 index 000000000..05ac44e28 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSURLError.rs @@ -0,0 +1,91 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +extern_static!(NSURLErrorDomain: &'static NSErrorDomain); + +extern_static!(NSURLErrorFailingURLErrorKey: &'static NSString); + +extern_static!(NSURLErrorFailingURLStringErrorKey: &'static NSString); + +extern_static!(NSErrorFailingURLStringKey: &'static NSString); + +extern_static!(NSURLErrorFailingURLPeerTrustErrorKey: &'static NSString); + +extern_static!(NSURLErrorBackgroundTaskCancelledReasonKey: &'static NSString); + +ns_enum!( + #[underlying(NSInteger)] + pub enum { + NSURLErrorCancelledReasonUserForceQuitApplication = 0, + NSURLErrorCancelledReasonBackgroundUpdatesDisabled = 1, + NSURLErrorCancelledReasonInsufficientSystemResources = 2, + } +); + +extern_static!(NSURLErrorNetworkUnavailableReasonKey: &'static NSErrorUserInfoKey); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSURLErrorNetworkUnavailableReason { + NSURLErrorNetworkUnavailableReasonCellular = 0, + NSURLErrorNetworkUnavailableReasonExpensive = 1, + NSURLErrorNetworkUnavailableReasonConstrained = 2, + } +); + +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-generated/src/Foundation/generated/NSURLProtectionSpace.rs b/crates/icrate-generated/src/Foundation/generated/NSURLProtectionSpace.rs new file mode 100644 index 000000000..961ffa194 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSURLProtectionSpace.rs @@ -0,0 +1,104 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +extern_static!(NSURLProtectionSpaceHTTP: &'static NSString); + +extern_static!(NSURLProtectionSpaceHTTPS: &'static NSString); + +extern_static!(NSURLProtectionSpaceFTP: &'static NSString); + +extern_static!(NSURLProtectionSpaceHTTPProxy: &'static NSString); + +extern_static!(NSURLProtectionSpaceHTTPSProxy: &'static NSString); + +extern_static!(NSURLProtectionSpaceFTPProxy: &'static NSString); + +extern_static!(NSURLProtectionSpaceSOCKSProxy: &'static NSString); + +extern_static!(NSURLAuthenticationMethodDefault: &'static NSString); + +extern_static!(NSURLAuthenticationMethodHTTPBasic: &'static NSString); + +extern_static!(NSURLAuthenticationMethodHTTPDigest: &'static NSString); + +extern_static!(NSURLAuthenticationMethodHTMLForm: &'static NSString); + +extern_static!(NSURLAuthenticationMethodNTLM: &'static NSString); + +extern_static!(NSURLAuthenticationMethodNegotiate: &'static NSString); + +extern_static!(NSURLAuthenticationMethodClientCertificate: &'static NSString); + +extern_static!(NSURLAuthenticationMethodServerTrust: &'static NSString); + +extern_class!( + #[derive(Debug)] + pub struct NSURLProtectionSpace; + + unsafe impl ClassType for NSURLProtectionSpace { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSURLProtectionSpace { + #[method_id(@__retain_semantics Init initWithHost:port:protocol:realm:authenticationMethod:)] + pub unsafe fn initWithHost_port_protocol_realm_authenticationMethod( + this: Option>, + host: &NSString, + port: NSInteger, + protocol: Option<&NSString>, + realm: Option<&NSString>, + authenticationMethod: Option<&NSString>, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithProxyHost:port:type:realm:authenticationMethod:)] + pub unsafe fn initWithProxyHost_port_type_realm_authenticationMethod( + this: Option>, + host: &NSString, + port: NSInteger, + type_: Option<&NSString>, + realm: Option<&NSString>, + authenticationMethod: Option<&NSString>, + ) -> Id; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other host)] + pub unsafe fn host(&self) -> Id; + + #[method(port)] + pub unsafe fn port(&self) -> NSInteger; + + #[method_id(@__retain_semantics Other proxyType)] + pub unsafe fn proxyType(&self) -> Option>; + + #[method_id(@__retain_semantics Other protocol)] + pub unsafe fn protocol(&self) -> Option>; + + #[method_id(@__retain_semantics Other authenticationMethod)] + pub unsafe fn authenticationMethod(&self) -> Id; + } +); + +extern_methods!( + /// NSClientCertificateSpace + unsafe impl NSURLProtectionSpace { + #[method_id(@__retain_semantics Other distinguishedNames)] + pub unsafe fn distinguishedNames(&self) -> Option, Shared>>; + } +); + +extern_methods!( + /// NSServerTrustValidationSpace + unsafe impl NSURLProtectionSpace {} +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSURLProtocol.rs b/crates/icrate-generated/src/Foundation/generated/NSURLProtocol.rs new file mode 100644 index 000000000..2479082f8 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSURLProtocol.rs @@ -0,0 +1,151 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +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)] + pub struct NSURLProtocol; + + unsafe impl ClassType for NSURLProtocol { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSURLProtocol { + #[method_id(@__retain_semantics Init initWithRequest:cachedResponse:client:)] + pub unsafe fn initWithRequest_cachedResponse_client( + this: Option>, + request: &NSURLRequest, + cachedResponse: Option<&NSCachedURLResponse>, + client: Option<&NSURLProtocolClient>, + ) -> Id; + + #[method_id(@__retain_semantics Other client)] + pub unsafe fn client(&self) -> Option>; + + #[method_id(@__retain_semantics Other request)] + pub unsafe fn request(&self) -> Id; + + #[method_id(@__retain_semantics Other cachedResponse)] + pub unsafe fn cachedResponse(&self) -> Option>; + + #[method(canInitWithRequest:)] + pub unsafe fn canInitWithRequest(request: &NSURLRequest) -> bool; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other 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!( + /// NSURLSessionTaskAdditions + unsafe impl NSURLProtocol { + #[method(canInitWithTask:)] + pub unsafe fn canInitWithTask(task: &NSURLSessionTask) -> bool; + + #[method_id(@__retain_semantics Init initWithTask:cachedResponse:client:)] + pub unsafe fn initWithTask_cachedResponse_client( + this: Option>, + task: &NSURLSessionTask, + cachedResponse: Option<&NSCachedURLResponse>, + client: Option<&NSURLProtocolClient>, + ) -> Id; + + #[method_id(@__retain_semantics Other task)] + pub unsafe fn task(&self) -> Option>; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSURLRequest.rs b/crates/icrate-generated/src/Foundation/generated/NSURLRequest.rs new file mode 100644 index 000000000..e88506bcc --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSURLRequest.rs @@ -0,0 +1,279 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +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)] + pub struct NSURLRequest; + + unsafe impl ClassType for NSURLRequest { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSURLRequest { + #[method_id(@__retain_semantics Other requestWithURL:)] + pub unsafe fn requestWithURL(URL: &NSURL) -> Id; + + #[method(supportsSecureCoding)] + pub unsafe fn supportsSecureCoding() -> bool; + + #[method_id(@__retain_semantics Other requestWithURL:cachePolicy:timeoutInterval:)] + pub unsafe fn requestWithURL_cachePolicy_timeoutInterval( + URL: &NSURL, + cachePolicy: NSURLRequestCachePolicy, + timeoutInterval: NSTimeInterval, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithURL:)] + pub unsafe fn initWithURL(this: Option>, URL: &NSURL) -> Id; + + #[method_id(@__retain_semantics Init initWithURL:cachePolicy:timeoutInterval:)] + pub unsafe fn initWithURL_cachePolicy_timeoutInterval( + this: Option>, + URL: &NSURL, + cachePolicy: NSURLRequestCachePolicy, + timeoutInterval: NSTimeInterval, + ) -> Id; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other 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(@__retain_semantics Other 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(@__retain_semantics Other 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(requiresDNSSECValidation)] + pub unsafe fn requiresDNSSECValidation(&self) -> bool; + + #[method(setRequiresDNSSECValidation:)] + pub unsafe fn setRequiresDNSSECValidation(&self, requiresDNSSECValidation: bool); + + #[method(attribution)] + pub unsafe fn attribution(&self) -> NSURLRequestAttribution; + + #[method(setAttribution:)] + pub unsafe fn setAttribution(&self, attribution: NSURLRequestAttribution); + } +); + +extern_methods!( + /// NSHTTPURLRequest + unsafe impl NSURLRequest { + #[method_id(@__retain_semantics Other HTTPMethod)] + pub unsafe fn HTTPMethod(&self) -> Option>; + + #[method_id(@__retain_semantics Other allHTTPHeaderFields)] + pub unsafe fn allHTTPHeaderFields( + &self, + ) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other valueForHTTPHeaderField:)] + pub unsafe fn valueForHTTPHeaderField( + &self, + field: &NSString, + ) -> Option>; + + #[method_id(@__retain_semantics Other HTTPBody)] + pub unsafe fn HTTPBody(&self) -> Option>; + + #[method_id(@__retain_semantics Other 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!( + /// NSMutableHTTPURLRequest + unsafe impl NSMutableURLRequest { + #[method_id(@__retain_semantics Other HTTPMethod)] + pub unsafe fn HTTPMethod(&self) -> Id; + + #[method(setHTTPMethod:)] + pub unsafe fn setHTTPMethod(&self, HTTPMethod: &NSString); + + #[method_id(@__retain_semantics Other 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(@__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 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-generated/src/Foundation/generated/NSURLResponse.rs b/crates/icrate-generated/src/Foundation/generated/NSURLResponse.rs new file mode 100644 index 000000000..55544971c --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSURLResponse.rs @@ -0,0 +1,78 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSURLResponse; + + unsafe impl ClassType for NSURLResponse { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSURLResponse { + #[method_id(@__retain_semantics Init initWithURL:MIMEType:expectedContentLength:textEncodingName:)] + pub unsafe fn initWithURL_MIMEType_expectedContentLength_textEncodingName( + this: Option>, + URL: &NSURL, + MIMEType: Option<&NSString>, + length: NSInteger, + name: Option<&NSString>, + ) -> Id; + + #[method_id(@__retain_semantics Other URL)] + pub unsafe fn URL(&self) -> Option>; + + #[method_id(@__retain_semantics Other MIMEType)] + pub unsafe fn MIMEType(&self) -> Option>; + + #[method(expectedContentLength)] + pub unsafe fn expectedContentLength(&self) -> c_longlong; + + #[method_id(@__retain_semantics Other textEncodingName)] + pub unsafe fn textEncodingName(&self) -> Option>; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Init initWithURL:statusCode:HTTPVersion:headerFields:)] + pub unsafe fn initWithURL_statusCode_HTTPVersion_headerFields( + this: Option>, + url: &NSURL, + statusCode: NSInteger, + HTTPVersion: Option<&NSString>, + headerFields: Option<&NSDictionary>, + ) -> Option>; + + #[method(statusCode)] + pub unsafe fn statusCode(&self) -> NSInteger; + + #[method_id(@__retain_semantics Other allHeaderFields)] + pub unsafe fn allHeaderFields(&self) -> Id; + + #[method_id(@__retain_semantics Other valueForHTTPHeaderField:)] + pub unsafe fn valueForHTTPHeaderField( + &self, + field: &NSString, + ) -> Option>; + + #[method_id(@__retain_semantics Other localizedStringForStatusCode:)] + pub unsafe fn localizedStringForStatusCode(statusCode: NSInteger) -> Id; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSURLSession.rs b/crates/icrate-generated/src/Foundation/generated/NSURLSession.rs new file mode 100644 index 000000000..6deff461e --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSURLSession.rs @@ -0,0 +1,1302 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +extern_static!(NSURLSessionTransferSizeUnknown: i64); + +extern_class!( + #[derive(Debug)] + pub struct NSURLSession; + + unsafe impl ClassType for NSURLSession { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSURLSession { + #[method_id(@__retain_semantics Other sharedSession)] + pub unsafe fn sharedSession() -> Id; + + #[method_id(@__retain_semantics Other sessionWithConfiguration:)] + pub unsafe fn sessionWithConfiguration( + configuration: &NSURLSessionConfiguration, + ) -> Id; + + #[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(@__retain_semantics Other delegateQueue)] + pub unsafe fn delegateQueue(&self) -> Id; + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self) -> Option>; + + #[method_id(@__retain_semantics Other configuration)] + pub unsafe fn configuration(&self) -> Id; + + #[method_id(@__retain_semantics Other 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: &Block<(), ()>); + + #[method(flushWithCompletionHandler:)] + pub unsafe fn flushWithCompletionHandler(&self, completionHandler: &Block<(), ()>); + + #[method(getTasksWithCompletionHandler:)] + pub unsafe fn getTasksWithCompletionHandler( + &self, + completionHandler: &Block< + ( + NonNull>, + NonNull>, + NonNull>, + ), + (), + >, + ); + + #[method(getAllTasksWithCompletionHandler:)] + pub unsafe fn getAllTasksWithCompletionHandler( + &self, + completionHandler: &Block<(NonNull>,), ()>, + ); + + #[method_id(@__retain_semantics Other dataTaskWithRequest:)] + pub unsafe fn dataTaskWithRequest( + &self, + request: &NSURLRequest, + ) -> Id; + + #[method_id(@__retain_semantics Other dataTaskWithURL:)] + pub unsafe fn dataTaskWithURL(&self, url: &NSURL) -> Id; + + #[method_id(@__retain_semantics Other uploadTaskWithRequest:fromFile:)] + pub unsafe fn uploadTaskWithRequest_fromFile( + &self, + request: &NSURLRequest, + fileURL: &NSURL, + ) -> Id; + + #[method_id(@__retain_semantics Other uploadTaskWithRequest:fromData:)] + pub unsafe fn uploadTaskWithRequest_fromData( + &self, + request: &NSURLRequest, + bodyData: &NSData, + ) -> Id; + + #[method_id(@__retain_semantics Other uploadTaskWithStreamedRequest:)] + pub unsafe fn uploadTaskWithStreamedRequest( + &self, + request: &NSURLRequest, + ) -> Id; + + #[method_id(@__retain_semantics Other downloadTaskWithRequest:)] + pub unsafe fn downloadTaskWithRequest( + &self, + request: &NSURLRequest, + ) -> Id; + + #[method_id(@__retain_semantics Other downloadTaskWithURL:)] + pub unsafe fn downloadTaskWithURL( + &self, + url: &NSURL, + ) -> Id; + + #[method_id(@__retain_semantics Other downloadTaskWithResumeData:)] + pub unsafe fn downloadTaskWithResumeData( + &self, + resumeData: &NSData, + ) -> Id; + + #[method_id(@__retain_semantics Other streamTaskWithHostName:port:)] + pub unsafe fn streamTaskWithHostName_port( + &self, + hostname: &NSString, + port: NSInteger, + ) -> Id; + + #[method_id(@__retain_semantics Other streamTaskWithNetService:)] + pub unsafe fn streamTaskWithNetService( + &self, + service: &NSNetService, + ) -> Id; + + #[method_id(@__retain_semantics Other webSocketTaskWithURL:)] + pub unsafe fn webSocketTaskWithURL( + &self, + url: &NSURL, + ) -> Id; + + #[method_id(@__retain_semantics Other webSocketTaskWithURL:protocols:)] + pub unsafe fn webSocketTaskWithURL_protocols( + &self, + url: &NSURL, + protocols: &NSArray, + ) -> Id; + + #[method_id(@__retain_semantics Other webSocketTaskWithRequest:)] + pub unsafe fn webSocketTaskWithRequest( + &self, + request: &NSURLRequest, + ) -> 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; + } +); + +extern_methods!( + /// NSURLSessionAsynchronousConvenience + unsafe impl NSURLSession { + #[method_id(@__retain_semantics Other dataTaskWithRequest:completionHandler:)] + pub unsafe fn dataTaskWithRequest_completionHandler( + &self, + request: &NSURLRequest, + 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: &Block<(*mut NSData, *mut NSURLResponse, *mut NSError), ()>, + ) -> Id; + + #[method_id(@__retain_semantics Other uploadTaskWithRequest:fromFile:completionHandler:)] + pub unsafe fn uploadTaskWithRequest_fromFile_completionHandler( + &self, + request: &NSURLRequest, + fileURL: &NSURL, + completionHandler: &Block<(*mut NSData, *mut NSURLResponse, *mut NSError), ()>, + ) -> Id; + + #[method_id(@__retain_semantics Other uploadTaskWithRequest:fromData:completionHandler:)] + pub unsafe fn uploadTaskWithRequest_fromData_completionHandler( + &self, + request: &NSURLRequest, + bodyData: Option<&NSData>, + 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: &Block<(*mut NSURL, *mut NSURLResponse, *mut NSError), ()>, + ) -> Id; + + #[method_id(@__retain_semantics Other downloadTaskWithURL:completionHandler:)] + pub unsafe fn downloadTaskWithURL_completionHandler( + &self, + url: &NSURL, + 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: &Block<(*mut NSURL, *mut NSURLResponse, *mut NSError), ()>, + ) -> Id; + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSURLSessionTaskState { + NSURLSessionTaskStateRunning = 0, + NSURLSessionTaskStateSuspended = 1, + NSURLSessionTaskStateCanceling = 2, + NSURLSessionTaskStateCompleted = 3, + } +); + +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(@__retain_semantics Other originalRequest)] + pub unsafe fn originalRequest(&self) -> Option>; + + #[method_id(@__retain_semantics Other currentRequest)] + pub unsafe fn currentRequest(&self) -> Option>; + + #[method_id(@__retain_semantics Other response)] + pub unsafe fn response(&self) -> Option>; + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSURLSessionTaskDelegate>); + + #[method_id(@__retain_semantics Other progress)] + pub unsafe fn progress(&self) -> Id; + + #[method_id(@__retain_semantics Other earliestBeginDate)] + pub unsafe fn earliestBeginDate(&self) -> Option>; + + #[method(setEarliestBeginDate:)] + pub unsafe fn setEarliestBeginDate(&self, earliestBeginDate: Option<&NSDate>); + + #[method(countOfBytesClientExpectsToSend)] + pub unsafe fn countOfBytesClientExpectsToSend(&self) -> i64; + + #[method(setCountOfBytesClientExpectsToSend:)] + pub unsafe fn setCountOfBytesClientExpectsToSend( + &self, + countOfBytesClientExpectsToSend: i64, + ); + + #[method(countOfBytesClientExpectsToReceive)] + pub unsafe fn countOfBytesClientExpectsToReceive(&self) -> i64; + + #[method(setCountOfBytesClientExpectsToReceive:)] + pub unsafe fn setCountOfBytesClientExpectsToReceive( + &self, + countOfBytesClientExpectsToReceive: i64, + ); + + #[method(countOfBytesSent)] + pub unsafe fn countOfBytesSent(&self) -> i64; + + #[method(countOfBytesReceived)] + pub unsafe fn countOfBytesReceived(&self) -> i64; + + #[method(countOfBytesExpectedToSend)] + pub unsafe fn countOfBytesExpectedToSend(&self) -> i64; + + #[method(countOfBytesExpectedToReceive)] + pub unsafe fn countOfBytesExpectedToReceive(&self) -> i64; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other 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(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method_id(@__retain_semantics New new)] + pub unsafe fn new() -> Id; + } +); + +extern_static!(NSURLSessionTaskPriorityDefault: c_float); + +extern_static!(NSURLSessionTaskPriorityLow: c_float); + +extern_static!(NSURLSessionTaskPriorityHigh: c_float); + +extern_class!( + #[derive(Debug)] + pub struct NSURLSessionDataTask; + + unsafe impl ClassType for NSURLSessionDataTask { + type Super = NSURLSessionTask; + } +); + +extern_methods!( + unsafe impl NSURLSessionDataTask { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method_id(@__retain_semantics New 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(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method_id(@__retain_semantics New 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: &Block<(*mut NSData,), ()>, + ); + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method_id(@__retain_semantics New 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:)] + pub unsafe fn readDataOfMinLength_maxLength_timeout_completionHandler( + &self, + minBytes: NSUInteger, + maxBytes: NSUInteger, + timeout: NSTimeInterval, + completionHandler: &Block<(*mut NSData, Bool, *mut NSError), ()>, + ); + + #[method(writeData:timeout:completionHandler:)] + pub unsafe fn writeData_timeout_completionHandler( + &self, + data: &NSData, + timeout: NSTimeInterval, + completionHandler: &Block<(*mut NSError,), ()>, + ); + + #[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(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method_id(@__retain_semantics New new)] + pub unsafe fn new() -> Id; + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSURLSessionWebSocketMessageType { + NSURLSessionWebSocketMessageTypeData = 0, + NSURLSessionWebSocketMessageTypeString = 1, + } +); + +extern_class!( + #[derive(Debug)] + pub struct NSURLSessionWebSocketMessage; + + unsafe impl ClassType for NSURLSessionWebSocketMessage { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSURLSessionWebSocketMessage { + #[method_id(@__retain_semantics Init initWithData:)] + pub unsafe fn initWithData( + this: Option>, + data: &NSData, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithString:)] + pub unsafe fn initWithString( + this: Option>, + string: &NSString, + ) -> Id; + + #[method(type)] + pub unsafe fn type_(&self) -> NSURLSessionWebSocketMessageType; + + #[method_id(@__retain_semantics Other data)] + pub unsafe fn data(&self) -> Option>; + + #[method_id(@__retain_semantics Other string)] + pub unsafe fn string(&self) -> Option>; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method_id(@__retain_semantics New new)] + pub unsafe fn new() -> Id; + } +); + +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)] + pub struct NSURLSessionWebSocketTask; + + unsafe impl ClassType for NSURLSessionWebSocketTask { + type Super = NSURLSessionTask; + } +); + +extern_methods!( + unsafe impl NSURLSessionWebSocketTask { + #[method(sendMessage:completionHandler:)] + pub unsafe fn sendMessage_completionHandler( + &self, + message: &NSURLSessionWebSocketMessage, + completionHandler: &Block<(*mut NSError,), ()>, + ); + + #[method(receiveMessageWithCompletionHandler:)] + pub unsafe fn receiveMessageWithCompletionHandler( + &self, + completionHandler: &Block<(*mut NSURLSessionWebSocketMessage, *mut NSError), ()>, + ); + + #[method(sendPingWithPongReceiveHandler:)] + pub unsafe fn sendPingWithPongReceiveHandler( + &self, + pongReceiveHandler: &Block<(*mut NSError,), ()>, + ); + + #[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(@__retain_semantics Other closeReason)] + pub unsafe fn closeReason(&self) -> Option>; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method_id(@__retain_semantics New new)] + pub unsafe fn new() -> Id; + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSURLSessionMultipathServiceType { + NSURLSessionMultipathServiceTypeNone = 0, + NSURLSessionMultipathServiceTypeHandover = 1, + NSURLSessionMultipathServiceTypeInteractive = 2, + NSURLSessionMultipathServiceTypeAggregate = 3, + } +); + +extern_class!( + #[derive(Debug)] + pub struct NSURLSessionConfiguration; + + unsafe impl ClassType for NSURLSessionConfiguration { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSURLSessionConfiguration { + #[method_id(@__retain_semantics Other defaultSessionConfiguration)] + pub unsafe fn defaultSessionConfiguration() -> Id; + + #[method_id(@__retain_semantics Other ephemeralSessionConfiguration)] + pub unsafe fn ephemeralSessionConfiguration() -> Id; + + #[method_id(@__retain_semantics Other backgroundSessionConfigurationWithIdentifier:)] + pub unsafe fn backgroundSessionConfigurationWithIdentifier( + identifier: &NSString, + ) -> Id; + + #[method_id(@__retain_semantics Other 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(requiresDNSSECValidation)] + pub unsafe fn requiresDNSSECValidation(&self) -> bool; + + #[method(setRequiresDNSSECValidation:)] + pub unsafe fn setRequiresDNSSECValidation(&self, requiresDNSSECValidation: 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(@__retain_semantics Other 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(@__retain_semantics Other connectionProxyDictionary)] + pub unsafe fn connectionProxyDictionary(&self) -> Option>; + + #[method(setConnectionProxyDictionary:)] + pub unsafe fn setConnectionProxyDictionary( + &self, + connectionProxyDictionary: Option<&NSDictionary>, + ); + + #[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(@__retain_semantics Other 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(@__retain_semantics Other HTTPCookieStorage)] + pub unsafe fn HTTPCookieStorage(&self) -> Option>; + + #[method(setHTTPCookieStorage:)] + pub unsafe fn setHTTPCookieStorage(&self, HTTPCookieStorage: Option<&NSHTTPCookieStorage>); + + #[method_id(@__retain_semantics Other URLCredentialStorage)] + pub unsafe fn URLCredentialStorage(&self) -> Option>; + + #[method(setURLCredentialStorage:)] + pub unsafe fn setURLCredentialStorage( + &self, + URLCredentialStorage: Option<&NSURLCredentialStorage>, + ); + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other 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(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method_id(@__retain_semantics New new)] + pub unsafe fn new() -> Id; + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSURLSessionDelayedRequestDisposition { + NSURLSessionDelayedRequestContinueLoading = 0, + NSURLSessionDelayedRequestUseNewRequest = 1, + NSURLSessionDelayedRequestCancel = 2, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSURLSessionAuthChallengeDisposition { + NSURLSessionAuthChallengeUseCredential = 0, + NSURLSessionAuthChallengePerformDefaultHandling = 1, + NSURLSessionAuthChallengeCancelAuthenticationChallenge = 2, + NSURLSessionAuthChallengeRejectProtectionSpace = 3, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSURLSessionResponseDisposition { + NSURLSessionResponseCancel = 0, + NSURLSessionResponseAllow = 1, + NSURLSessionResponseBecomeDownload = 2, + NSURLSessionResponseBecomeStream = 3, + } +); + +extern_protocol!( + pub struct NSURLSessionDelegate; + + 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, + ); + } +); + +extern_protocol!( + pub struct NSURLSessionTaskDelegate; + + unsafe impl NSURLSessionTaskDelegate { + #[optional] + #[method(URLSession:didCreateTask:)] + pub unsafe fn URLSession_didCreateTask( + &self, + session: &NSURLSession, + task: &NSURLSessionTask, + ); + + #[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), + (), + >, + ); + + #[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,), ()>, + ); + + #[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); + +extern_methods!( + /// NSURLSessionDeprecated + unsafe impl NSURLSessionConfiguration { + #[method_id(@__retain_semantics Other backgroundSessionConfiguration:)] + pub unsafe fn backgroundSessionConfiguration( + identifier: &NSString, + ) -> Id; + } +); + +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)] + pub struct NSURLSessionTaskTransactionMetrics; + + unsafe impl ClassType for NSURLSessionTaskTransactionMetrics { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSURLSessionTaskTransactionMetrics { + #[method_id(@__retain_semantics Other request)] + pub unsafe fn request(&self) -> Id; + + #[method_id(@__retain_semantics Other response)] + pub unsafe fn response(&self) -> Option>; + + #[method_id(@__retain_semantics Other fetchStartDate)] + pub unsafe fn fetchStartDate(&self) -> Option>; + + #[method_id(@__retain_semantics Other domainLookupStartDate)] + pub unsafe fn domainLookupStartDate(&self) -> Option>; + + #[method_id(@__retain_semantics Other domainLookupEndDate)] + pub unsafe fn domainLookupEndDate(&self) -> Option>; + + #[method_id(@__retain_semantics Other connectStartDate)] + pub unsafe fn connectStartDate(&self) -> Option>; + + #[method_id(@__retain_semantics Other secureConnectionStartDate)] + pub unsafe fn secureConnectionStartDate(&self) -> Option>; + + #[method_id(@__retain_semantics Other secureConnectionEndDate)] + pub unsafe fn secureConnectionEndDate(&self) -> Option>; + + #[method_id(@__retain_semantics Other connectEndDate)] + pub unsafe fn connectEndDate(&self) -> Option>; + + #[method_id(@__retain_semantics Other requestStartDate)] + pub unsafe fn requestStartDate(&self) -> Option>; + + #[method_id(@__retain_semantics Other requestEndDate)] + pub unsafe fn requestEndDate(&self) -> Option>; + + #[method_id(@__retain_semantics Other responseStartDate)] + pub unsafe fn responseStartDate(&self) -> Option>; + + #[method_id(@__retain_semantics Other responseEndDate)] + pub unsafe fn responseEndDate(&self) -> Option>; + + #[method_id(@__retain_semantics Other 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) -> i64; + + #[method(countOfRequestBodyBytesSent)] + pub unsafe fn countOfRequestBodyBytesSent(&self) -> i64; + + #[method(countOfRequestBodyBytesBeforeEncoding)] + pub unsafe fn countOfRequestBodyBytesBeforeEncoding(&self) -> i64; + + #[method(countOfResponseHeaderBytesReceived)] + pub unsafe fn countOfResponseHeaderBytesReceived(&self) -> i64; + + #[method(countOfResponseBodyBytesReceived)] + pub unsafe fn countOfResponseBodyBytesReceived(&self) -> i64; + + #[method(countOfResponseBodyBytesAfterDecoding)] + pub unsafe fn countOfResponseBodyBytesAfterDecoding(&self) -> i64; + + #[method_id(@__retain_semantics Other localAddress)] + pub unsafe fn localAddress(&self) -> Option>; + + #[method_id(@__retain_semantics Other localPort)] + pub unsafe fn localPort(&self) -> Option>; + + #[method_id(@__retain_semantics Other remoteAddress)] + pub unsafe fn remoteAddress(&self) -> Option>; + + #[method_id(@__retain_semantics Other remotePort)] + pub unsafe fn remotePort(&self) -> Option>; + + #[method_id(@__retain_semantics Other negotiatedTLSProtocolVersion)] + pub unsafe fn negotiatedTLSProtocolVersion(&self) -> Option>; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method_id(@__retain_semantics New 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(@__retain_semantics Other transactionMetrics)] + pub unsafe fn transactionMetrics( + &self, + ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other taskInterval)] + pub unsafe fn taskInterval(&self) -> Id; + + #[method(redirectCount)] + pub unsafe fn redirectCount(&self) -> NSUInteger; + + #[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-generated/src/Foundation/generated/NSUUID.rs b/crates/icrate-generated/src/Foundation/generated/NSUUID.rs new file mode 100644 index 000000000..7212e8fec --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSUUID.rs @@ -0,0 +1,35 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSUUID; + + unsafe impl ClassType for NSUUID { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSUUID { + #[method_id(@__retain_semantics Other UUID)] + pub unsafe fn UUID() -> Id; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method_id(@__retain_semantics Init initWithUUIDString:)] + pub unsafe fn initWithUUIDString( + this: Option>, + string: &NSString, + ) -> Option>; + + #[method(compare:)] + pub unsafe fn compare(&self, otherUUID: &NSUUID) -> NSComparisonResult; + + #[method_id(@__retain_semantics Other UUIDString)] + pub unsafe fn UUIDString(&self) -> Id; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSUbiquitousKeyValueStore.rs b/crates/icrate-generated/src/Foundation/generated/NSUbiquitousKeyValueStore.rs new file mode 100644 index 000000000..bb33c024b --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSUbiquitousKeyValueStore.rs @@ -0,0 +1,103 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSUbiquitousKeyValueStore; + + unsafe impl ClassType for NSUbiquitousKeyValueStore { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSUbiquitousKeyValueStore { + #[method_id(@__retain_semantics Other defaultStore)] + pub unsafe fn defaultStore() -> Id; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other stringForKey:)] + pub unsafe fn stringForKey(&self, aKey: &NSString) -> Option>; + + #[method_id(@__retain_semantics Other arrayForKey:)] + pub unsafe fn arrayForKey(&self, aKey: &NSString) -> Option>; + + #[method_id(@__retain_semantics Other dictionaryForKey:)] + pub unsafe fn dictionaryForKey( + &self, + aKey: &NSString, + ) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other dictionaryRepresentation)] + pub unsafe fn dictionaryRepresentation(&self) + -> Id, Shared>; + + #[method(synchronize)] + pub unsafe fn synchronize(&self) -> bool; + } +); + +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-generated/src/Foundation/generated/NSUndoManager.rs b/crates/icrate-generated/src/Foundation/generated/NSUndoManager.rs new file mode 100644 index 000000000..02ea1c6d7 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSUndoManager.rs @@ -0,0 +1,154 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +extern_static!(NSUndoCloseGroupingRunLoopOrdering: NSUInteger = 350000); + +extern_static!(NSUndoManagerGroupIsDiscardableKey: &'static NSString); + +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(@__retain_semantics Other 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>, + ); + + #[method_id(@__retain_semantics Other prepareWithInvocationTarget:)] + pub unsafe fn prepareWithInvocationTarget(&self, target: &Object) -> Id; + + #[method(registerUndoWithTarget:handler:)] + pub unsafe fn registerUndoWithTarget_handler( + &self, + target: &Object, + undoHandler: &Block<(NonNull,), ()>, + ); + + #[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(@__retain_semantics Other undoActionName)] + pub unsafe fn undoActionName(&self) -> Id; + + #[method_id(@__retain_semantics Other redoActionName)] + pub unsafe fn redoActionName(&self) -> Id; + + #[method(setActionName:)] + pub unsafe fn setActionName(&self, actionName: &NSString); + + #[method_id(@__retain_semantics Other undoMenuItemTitle)] + pub unsafe fn undoMenuItemTitle(&self) -> Id; + + #[method_id(@__retain_semantics Other redoMenuItemTitle)] + pub unsafe fn redoMenuItemTitle(&self) -> Id; + + #[method_id(@__retain_semantics Other undoMenuTitleForUndoActionName:)] + pub unsafe fn undoMenuTitleForUndoActionName( + &self, + actionName: &NSString, + ) -> Id; + + #[method_id(@__retain_semantics Other redoMenuTitleForUndoActionName:)] + pub unsafe fn redoMenuTitleForUndoActionName( + &self, + actionName: &NSString, + ) -> Id; + } +); + +extern_static!(NSUndoManagerCheckpointNotification: &'static NSNotificationName); + +extern_static!(NSUndoManagerWillUndoChangeNotification: &'static NSNotificationName); + +extern_static!(NSUndoManagerWillRedoChangeNotification: &'static NSNotificationName); + +extern_static!(NSUndoManagerDidUndoChangeNotification: &'static NSNotificationName); + +extern_static!(NSUndoManagerDidRedoChangeNotification: &'static NSNotificationName); + +extern_static!(NSUndoManagerDidOpenUndoGroupNotification: &'static NSNotificationName); + +extern_static!(NSUndoManagerWillCloseUndoGroupNotification: &'static NSNotificationName); + +extern_static!(NSUndoManagerDidCloseUndoGroupNotification: &'static NSNotificationName); diff --git a/crates/icrate-generated/src/Foundation/generated/NSUnit.rs b/crates/icrate-generated/src/Foundation/generated/NSUnit.rs new file mode 100644 index 000000000..67bce1a1f --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSUnit.rs @@ -0,0 +1,1009 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +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(@__retain_semantics Init initWithCoefficient:)] + pub unsafe fn initWithCoefficient( + this: Option>, + coefficient: c_double, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithCoefficient:constant:)] + pub unsafe fn initWithCoefficient_constant( + this: Option>, + coefficient: c_double, + constant: c_double, + ) -> Id; + } +); + +extern_class!( + #[derive(Debug)] + pub struct NSUnit; + + unsafe impl ClassType for NSUnit { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSUnit { + #[method_id(@__retain_semantics Other symbol)] + pub unsafe fn symbol(&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; + + #[method_id(@__retain_semantics Init initWithSymbol:)] + pub unsafe fn initWithSymbol( + this: Option>, + 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(@__retain_semantics Other converter)] + pub unsafe fn converter(&self) -> Id; + + #[method_id(@__retain_semantics Init initWithSymbol:converter:)] + pub unsafe fn initWithSymbol_converter( + this: Option>, + symbol: &NSString, + converter: &NSUnitConverter, + ) -> Id; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other metersPerSecondSquared)] + pub unsafe fn metersPerSecondSquared() -> Id; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other degrees)] + pub unsafe fn degrees() -> Id; + + #[method_id(@__retain_semantics Other arcMinutes)] + pub unsafe fn arcMinutes() -> Id; + + #[method_id(@__retain_semantics Other arcSeconds)] + pub unsafe fn arcSeconds() -> Id; + + #[method_id(@__retain_semantics Other radians)] + pub unsafe fn radians() -> Id; + + #[method_id(@__retain_semantics Other gradians)] + pub unsafe fn gradians() -> Id; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other squareMegameters)] + pub unsafe fn squareMegameters() -> Id; + + #[method_id(@__retain_semantics Other squareKilometers)] + pub unsafe fn squareKilometers() -> Id; + + #[method_id(@__retain_semantics Other squareMeters)] + pub unsafe fn squareMeters() -> Id; + + #[method_id(@__retain_semantics Other squareCentimeters)] + pub unsafe fn squareCentimeters() -> Id; + + #[method_id(@__retain_semantics Other squareMillimeters)] + pub unsafe fn squareMillimeters() -> Id; + + #[method_id(@__retain_semantics Other squareMicrometers)] + pub unsafe fn squareMicrometers() -> Id; + + #[method_id(@__retain_semantics Other squareNanometers)] + pub unsafe fn squareNanometers() -> Id; + + #[method_id(@__retain_semantics Other squareInches)] + pub unsafe fn squareInches() -> Id; + + #[method_id(@__retain_semantics Other squareFeet)] + pub unsafe fn squareFeet() -> Id; + + #[method_id(@__retain_semantics Other squareYards)] + pub unsafe fn squareYards() -> Id; + + #[method_id(@__retain_semantics Other squareMiles)] + pub unsafe fn squareMiles() -> Id; + + #[method_id(@__retain_semantics Other acres)] + pub unsafe fn acres() -> Id; + + #[method_id(@__retain_semantics Other ares)] + pub unsafe fn ares() -> Id; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other gramsPerLiter)] + pub unsafe fn gramsPerLiter() -> Id; + + #[method_id(@__retain_semantics Other milligramsPerDeciliter)] + pub unsafe fn milligramsPerDeciliter() -> Id; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other 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(@__retain_semantics Other hours)] + pub unsafe fn hours() -> Id; + + #[method_id(@__retain_semantics Other minutes)] + pub unsafe fn minutes() -> Id; + + #[method_id(@__retain_semantics Other seconds)] + pub unsafe fn seconds() -> Id; + + #[method_id(@__retain_semantics Other milliseconds)] + pub unsafe fn milliseconds() -> Id; + + #[method_id(@__retain_semantics Other microseconds)] + pub unsafe fn microseconds() -> Id; + + #[method_id(@__retain_semantics Other nanoseconds)] + pub unsafe fn nanoseconds() -> Id; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other coulombs)] + pub unsafe fn coulombs() -> Id; + + #[method_id(@__retain_semantics Other megaampereHours)] + pub unsafe fn megaampereHours() -> Id; + + #[method_id(@__retain_semantics Other kiloampereHours)] + pub unsafe fn kiloampereHours() -> Id; + + #[method_id(@__retain_semantics Other ampereHours)] + pub unsafe fn ampereHours() -> Id; + + #[method_id(@__retain_semantics Other milliampereHours)] + pub unsafe fn milliampereHours() -> Id; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other megaamperes)] + pub unsafe fn megaamperes() -> Id; + + #[method_id(@__retain_semantics Other kiloamperes)] + pub unsafe fn kiloamperes() -> Id; + + #[method_id(@__retain_semantics Other amperes)] + pub unsafe fn amperes() -> Id; + + #[method_id(@__retain_semantics Other milliamperes)] + pub unsafe fn milliamperes() -> Id; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other megavolts)] + pub unsafe fn megavolts() -> Id; + + #[method_id(@__retain_semantics Other kilovolts)] + pub unsafe fn kilovolts() -> Id; + + #[method_id(@__retain_semantics Other volts)] + pub unsafe fn volts() -> Id; + + #[method_id(@__retain_semantics Other millivolts)] + pub unsafe fn millivolts() -> Id; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other megaohms)] + pub unsafe fn megaohms() -> Id; + + #[method_id(@__retain_semantics Other kiloohms)] + pub unsafe fn kiloohms() -> Id; + + #[method_id(@__retain_semantics Other ohms)] + pub unsafe fn ohms() -> Id; + + #[method_id(@__retain_semantics Other milliohms)] + pub unsafe fn milliohms() -> Id; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other kilojoules)] + pub unsafe fn kilojoules() -> Id; + + #[method_id(@__retain_semantics Other joules)] + pub unsafe fn joules() -> Id; + + #[method_id(@__retain_semantics Other kilocalories)] + pub unsafe fn kilocalories() -> Id; + + #[method_id(@__retain_semantics Other calories)] + pub unsafe fn calories() -> Id; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other terahertz)] + pub unsafe fn terahertz() -> Id; + + #[method_id(@__retain_semantics Other gigahertz)] + pub unsafe fn gigahertz() -> Id; + + #[method_id(@__retain_semantics Other megahertz)] + pub unsafe fn megahertz() -> Id; + + #[method_id(@__retain_semantics Other kilohertz)] + pub unsafe fn kilohertz() -> Id; + + #[method_id(@__retain_semantics Other hertz)] + pub unsafe fn hertz() -> Id; + + #[method_id(@__retain_semantics Other millihertz)] + pub unsafe fn millihertz() -> Id; + + #[method_id(@__retain_semantics Other microhertz)] + pub unsafe fn microhertz() -> Id; + + #[method_id(@__retain_semantics Other nanohertz)] + pub unsafe fn nanohertz() -> Id; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other litersPer100Kilometers)] + pub unsafe fn litersPer100Kilometers() -> Id; + + #[method_id(@__retain_semantics Other milesPerImperialGallon)] + pub unsafe fn milesPerImperialGallon() -> Id; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other bytes)] + pub unsafe fn bytes() -> Id; + + #[method_id(@__retain_semantics Other bits)] + pub unsafe fn bits() -> Id; + + #[method_id(@__retain_semantics Other nibbles)] + pub unsafe fn nibbles() -> Id; + + #[method_id(@__retain_semantics Other yottabytes)] + pub unsafe fn yottabytes() -> Id; + + #[method_id(@__retain_semantics Other zettabytes)] + pub unsafe fn zettabytes() -> Id; + + #[method_id(@__retain_semantics Other exabytes)] + pub unsafe fn exabytes() -> Id; + + #[method_id(@__retain_semantics Other petabytes)] + pub unsafe fn petabytes() -> Id; + + #[method_id(@__retain_semantics Other terabytes)] + pub unsafe fn terabytes() -> Id; + + #[method_id(@__retain_semantics Other gigabytes)] + pub unsafe fn gigabytes() -> Id; + + #[method_id(@__retain_semantics Other megabytes)] + pub unsafe fn megabytes() -> Id; + + #[method_id(@__retain_semantics Other kilobytes)] + pub unsafe fn kilobytes() -> Id; + + #[method_id(@__retain_semantics Other yottabits)] + pub unsafe fn yottabits() -> Id; + + #[method_id(@__retain_semantics Other zettabits)] + pub unsafe fn zettabits() -> Id; + + #[method_id(@__retain_semantics Other exabits)] + pub unsafe fn exabits() -> Id; + + #[method_id(@__retain_semantics Other petabits)] + pub unsafe fn petabits() -> Id; + + #[method_id(@__retain_semantics Other terabits)] + pub unsafe fn terabits() -> Id; + + #[method_id(@__retain_semantics Other gigabits)] + pub unsafe fn gigabits() -> Id; + + #[method_id(@__retain_semantics Other megabits)] + pub unsafe fn megabits() -> Id; + + #[method_id(@__retain_semantics Other kilobits)] + pub unsafe fn kilobits() -> Id; + + #[method_id(@__retain_semantics Other yobibytes)] + pub unsafe fn yobibytes() -> Id; + + #[method_id(@__retain_semantics Other zebibytes)] + pub unsafe fn zebibytes() -> Id; + + #[method_id(@__retain_semantics Other exbibytes)] + pub unsafe fn exbibytes() -> Id; + + #[method_id(@__retain_semantics Other pebibytes)] + pub unsafe fn pebibytes() -> Id; + + #[method_id(@__retain_semantics Other tebibytes)] + pub unsafe fn tebibytes() -> Id; + + #[method_id(@__retain_semantics Other gibibytes)] + pub unsafe fn gibibytes() -> Id; + + #[method_id(@__retain_semantics Other mebibytes)] + pub unsafe fn mebibytes() -> Id; + + #[method_id(@__retain_semantics Other kibibytes)] + pub unsafe fn kibibytes() -> Id; + + #[method_id(@__retain_semantics Other yobibits)] + pub unsafe fn yobibits() -> Id; + + #[method_id(@__retain_semantics Other zebibits)] + pub unsafe fn zebibits() -> Id; + + #[method_id(@__retain_semantics Other exbibits)] + pub unsafe fn exbibits() -> Id; + + #[method_id(@__retain_semantics Other pebibits)] + pub unsafe fn pebibits() -> Id; + + #[method_id(@__retain_semantics Other tebibits)] + pub unsafe fn tebibits() -> Id; + + #[method_id(@__retain_semantics Other gibibits)] + pub unsafe fn gibibits() -> Id; + + #[method_id(@__retain_semantics Other mebibits)] + pub unsafe fn mebibits() -> Id; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other megameters)] + pub unsafe fn megameters() -> Id; + + #[method_id(@__retain_semantics Other kilometers)] + pub unsafe fn kilometers() -> Id; + + #[method_id(@__retain_semantics Other hectometers)] + pub unsafe fn hectometers() -> Id; + + #[method_id(@__retain_semantics Other decameters)] + pub unsafe fn decameters() -> Id; + + #[method_id(@__retain_semantics Other meters)] + pub unsafe fn meters() -> Id; + + #[method_id(@__retain_semantics Other decimeters)] + pub unsafe fn decimeters() -> Id; + + #[method_id(@__retain_semantics Other centimeters)] + pub unsafe fn centimeters() -> Id; + + #[method_id(@__retain_semantics Other millimeters)] + pub unsafe fn millimeters() -> Id; + + #[method_id(@__retain_semantics Other micrometers)] + pub unsafe fn micrometers() -> Id; + + #[method_id(@__retain_semantics Other nanometers)] + pub unsafe fn nanometers() -> Id; + + #[method_id(@__retain_semantics Other picometers)] + pub unsafe fn picometers() -> Id; + + #[method_id(@__retain_semantics Other inches)] + pub unsafe fn inches() -> Id; + + #[method_id(@__retain_semantics Other feet)] + pub unsafe fn feet() -> Id; + + #[method_id(@__retain_semantics Other yards)] + pub unsafe fn yards() -> Id; + + #[method_id(@__retain_semantics Other miles)] + pub unsafe fn miles() -> Id; + + #[method_id(@__retain_semantics Other scandinavianMiles)] + pub unsafe fn scandinavianMiles() -> Id; + + #[method_id(@__retain_semantics Other lightyears)] + pub unsafe fn lightyears() -> Id; + + #[method_id(@__retain_semantics Other nauticalMiles)] + pub unsafe fn nauticalMiles() -> Id; + + #[method_id(@__retain_semantics Other fathoms)] + pub unsafe fn fathoms() -> Id; + + #[method_id(@__retain_semantics Other furlongs)] + pub unsafe fn furlongs() -> Id; + + #[method_id(@__retain_semantics Other astronomicalUnits)] + pub unsafe fn astronomicalUnits() -> Id; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other 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(@__retain_semantics Other kilograms)] + pub unsafe fn kilograms() -> Id; + + #[method_id(@__retain_semantics Other grams)] + pub unsafe fn grams() -> Id; + + #[method_id(@__retain_semantics Other decigrams)] + pub unsafe fn decigrams() -> Id; + + #[method_id(@__retain_semantics Other centigrams)] + pub unsafe fn centigrams() -> Id; + + #[method_id(@__retain_semantics Other milligrams)] + pub unsafe fn milligrams() -> Id; + + #[method_id(@__retain_semantics Other micrograms)] + pub unsafe fn micrograms() -> Id; + + #[method_id(@__retain_semantics Other nanograms)] + pub unsafe fn nanograms() -> Id; + + #[method_id(@__retain_semantics Other picograms)] + pub unsafe fn picograms() -> Id; + + #[method_id(@__retain_semantics Other ounces)] + pub unsafe fn ounces() -> Id; + + #[method_id(@__retain_semantics Other poundsMass)] + pub unsafe fn poundsMass() -> Id; + + #[method_id(@__retain_semantics Other stones)] + pub unsafe fn stones() -> Id; + + #[method_id(@__retain_semantics Other metricTons)] + pub unsafe fn metricTons() -> Id; + + #[method_id(@__retain_semantics Other shortTons)] + pub unsafe fn shortTons() -> Id; + + #[method_id(@__retain_semantics Other carats)] + pub unsafe fn carats() -> Id; + + #[method_id(@__retain_semantics Other ouncesTroy)] + pub unsafe fn ouncesTroy() -> Id; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other terawatts)] + pub unsafe fn terawatts() -> Id; + + #[method_id(@__retain_semantics Other gigawatts)] + pub unsafe fn gigawatts() -> Id; + + #[method_id(@__retain_semantics Other megawatts)] + pub unsafe fn megawatts() -> Id; + + #[method_id(@__retain_semantics Other kilowatts)] + pub unsafe fn kilowatts() -> Id; + + #[method_id(@__retain_semantics Other watts)] + pub unsafe fn watts() -> Id; + + #[method_id(@__retain_semantics Other milliwatts)] + pub unsafe fn milliwatts() -> Id; + + #[method_id(@__retain_semantics Other microwatts)] + pub unsafe fn microwatts() -> Id; + + #[method_id(@__retain_semantics Other nanowatts)] + pub unsafe fn nanowatts() -> Id; + + #[method_id(@__retain_semantics Other picowatts)] + pub unsafe fn picowatts() -> Id; + + #[method_id(@__retain_semantics Other femtowatts)] + pub unsafe fn femtowatts() -> Id; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other newtonsPerMetersSquared)] + pub unsafe fn newtonsPerMetersSquared() -> Id; + + #[method_id(@__retain_semantics Other gigapascals)] + pub unsafe fn gigapascals() -> Id; + + #[method_id(@__retain_semantics Other megapascals)] + pub unsafe fn megapascals() -> Id; + + #[method_id(@__retain_semantics Other kilopascals)] + pub unsafe fn kilopascals() -> Id; + + #[method_id(@__retain_semantics Other hectopascals)] + pub unsafe fn hectopascals() -> Id; + + #[method_id(@__retain_semantics Other inchesOfMercury)] + pub unsafe fn inchesOfMercury() -> Id; + + #[method_id(@__retain_semantics Other bars)] + pub unsafe fn bars() -> Id; + + #[method_id(@__retain_semantics Other millibars)] + pub unsafe fn millibars() -> Id; + + #[method_id(@__retain_semantics Other millimetersOfMercury)] + pub unsafe fn millimetersOfMercury() -> Id; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other metersPerSecond)] + pub unsafe fn metersPerSecond() -> Id; + + #[method_id(@__retain_semantics Other kilometersPerHour)] + pub unsafe fn kilometersPerHour() -> Id; + + #[method_id(@__retain_semantics Other milesPerHour)] + pub unsafe fn milesPerHour() -> Id; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other kelvin)] + pub unsafe fn kelvin() -> Id; + + #[method_id(@__retain_semantics Other celsius)] + pub unsafe fn celsius() -> Id; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other megaliters)] + pub unsafe fn megaliters() -> Id; + + #[method_id(@__retain_semantics Other kiloliters)] + pub unsafe fn kiloliters() -> Id; + + #[method_id(@__retain_semantics Other liters)] + pub unsafe fn liters() -> Id; + + #[method_id(@__retain_semantics Other deciliters)] + pub unsafe fn deciliters() -> Id; + + #[method_id(@__retain_semantics Other centiliters)] + pub unsafe fn centiliters() -> Id; + + #[method_id(@__retain_semantics Other milliliters)] + pub unsafe fn milliliters() -> Id; + + #[method_id(@__retain_semantics Other cubicKilometers)] + pub unsafe fn cubicKilometers() -> Id; + + #[method_id(@__retain_semantics Other cubicMeters)] + pub unsafe fn cubicMeters() -> Id; + + #[method_id(@__retain_semantics Other cubicDecimeters)] + pub unsafe fn cubicDecimeters() -> Id; + + #[method_id(@__retain_semantics Other cubicCentimeters)] + pub unsafe fn cubicCentimeters() -> Id; + + #[method_id(@__retain_semantics Other cubicMillimeters)] + pub unsafe fn cubicMillimeters() -> Id; + + #[method_id(@__retain_semantics Other cubicInches)] + pub unsafe fn cubicInches() -> Id; + + #[method_id(@__retain_semantics Other cubicFeet)] + pub unsafe fn cubicFeet() -> Id; + + #[method_id(@__retain_semantics Other cubicYards)] + pub unsafe fn cubicYards() -> Id; + + #[method_id(@__retain_semantics Other cubicMiles)] + pub unsafe fn cubicMiles() -> Id; + + #[method_id(@__retain_semantics Other acreFeet)] + pub unsafe fn acreFeet() -> Id; + + #[method_id(@__retain_semantics Other bushels)] + pub unsafe fn bushels() -> Id; + + #[method_id(@__retain_semantics Other teaspoons)] + pub unsafe fn teaspoons() -> Id; + + #[method_id(@__retain_semantics Other tablespoons)] + pub unsafe fn tablespoons() -> Id; + + #[method_id(@__retain_semantics Other fluidOunces)] + pub unsafe fn fluidOunces() -> Id; + + #[method_id(@__retain_semantics Other cups)] + pub unsafe fn cups() -> Id; + + #[method_id(@__retain_semantics Other pints)] + pub unsafe fn pints() -> Id; + + #[method_id(@__retain_semantics Other quarts)] + pub unsafe fn quarts() -> Id; + + #[method_id(@__retain_semantics Other gallons)] + pub unsafe fn gallons() -> Id; + + #[method_id(@__retain_semantics Other imperialTeaspoons)] + pub unsafe fn imperialTeaspoons() -> Id; + + #[method_id(@__retain_semantics Other imperialTablespoons)] + pub unsafe fn imperialTablespoons() -> Id; + + #[method_id(@__retain_semantics Other imperialFluidOunces)] + pub unsafe fn imperialFluidOunces() -> Id; + + #[method_id(@__retain_semantics Other imperialPints)] + pub unsafe fn imperialPints() -> Id; + + #[method_id(@__retain_semantics Other imperialQuarts)] + pub unsafe fn imperialQuarts() -> Id; + + #[method_id(@__retain_semantics Other imperialGallons)] + pub unsafe fn imperialGallons() -> Id; + + #[method_id(@__retain_semantics Other metricCups)] + pub unsafe fn metricCups() -> Id; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSUserActivity.rs b/crates/icrate-generated/src/Foundation/generated/NSUserActivity.rs new file mode 100644 index 000000000..a6d16a8eb --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSUserActivity.rs @@ -0,0 +1,187 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +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(@__retain_semantics Init initWithActivityType:)] + pub unsafe fn initWithActivityType( + this: Option>, + activityType: &NSString, + ) -> Id; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method_id(@__retain_semantics Other activityType)] + pub unsafe fn activityType(&self) -> Id; + + #[method_id(@__retain_semantics Other title)] + pub unsafe fn title(&self) -> Option>; + + #[method(setTitle:)] + pub unsafe fn setTitle(&self, title: Option<&NSString>); + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other 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(@__retain_semantics Other webpageURL)] + pub unsafe fn webpageURL(&self) -> Option>; + + #[method(setWebpageURL:)] + pub unsafe fn setWebpageURL(&self, webpageURL: Option<&NSURL>); + + #[method_id(@__retain_semantics Other referrerURL)] + pub unsafe fn referrerURL(&self) -> Option>; + + #[method(setReferrerURL:)] + pub unsafe fn setReferrerURL(&self, referrerURL: Option<&NSURL>); + + #[method_id(@__retain_semantics Other expirationDate)] + pub unsafe fn expirationDate(&self) -> Option>; + + #[method(setExpirationDate:)] + pub unsafe fn setExpirationDate(&self, expirationDate: Option<&NSDate>); + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSUserActivityDelegate>); + + #[method_id(@__retain_semantics Other 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: &Block<(*mut NSInputStream, *mut NSOutputStream, *mut NSError), ()>, + ); + + #[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(@__retain_semantics Other 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: &Block<(), ()>, + ); + + #[method(deleteAllSavedUserActivitiesWithCompletionHandler:)] + pub unsafe fn deleteAllSavedUserActivitiesWithCompletionHandler(handler: &Block<(), ()>); + } +); + +extern_static!(NSUserActivityTypeBrowsingWeb: &'static NSString); + +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-generated/src/Foundation/generated/NSUserDefaults.rs b/crates/icrate-generated/src/Foundation/generated/NSUserDefaults.rs new file mode 100644 index 000000000..e870fad2b --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSUserDefaults.rs @@ -0,0 +1,183 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +extern_static!(NSGlobalDomain: &'static NSString); + +extern_static!(NSArgumentDomain: &'static NSString); + +extern_static!(NSRegistrationDomain: &'static NSString); + +extern_class!( + #[derive(Debug)] + pub struct NSUserDefaults; + + unsafe impl ClassType for NSUserDefaults { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSUserDefaults { + #[method_id(@__retain_semantics Other standardUserDefaults)] + pub unsafe fn standardUserDefaults() -> Id; + + #[method(resetStandardUserDefaults)] + pub unsafe fn resetStandardUserDefaults(); + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method_id(@__retain_semantics Init initWithSuiteName:)] + pub unsafe fn initWithSuiteName( + this: Option>, + suitename: Option<&NSString>, + ) -> Option>; + + #[method_id(@__retain_semantics Init initWithUser:)] + pub unsafe fn initWithUser( + this: Option>, + username: &NSString, + ) -> Option>; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other stringForKey:)] + pub unsafe fn stringForKey(&self, defaultName: &NSString) -> Option>; + + #[method_id(@__retain_semantics Other arrayForKey:)] + pub unsafe fn arrayForKey(&self, defaultName: &NSString) -> Option>; + + #[method_id(@__retain_semantics Other dictionaryForKey:)] + pub unsafe fn dictionaryForKey( + &self, + defaultName: &NSString, + ) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other dataForKey:)] + pub unsafe fn dataForKey(&self, defaultName: &NSString) -> Option>; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other 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(@__retain_semantics Other dictionaryRepresentation)] + pub unsafe fn dictionaryRepresentation(&self) + -> Id, Shared>; + + #[method_id(@__retain_semantics Other volatileDomainNames)] + pub unsafe fn volatileDomainNames(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other persistentDomainNames)] + pub unsafe fn persistentDomainNames(&self) -> Id; + + #[method_id(@__retain_semantics Other 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, + key: &NSString, + domain: &NSString, + ) -> bool; + } +); + +extern_static!(NSUserDefaultsSizeLimitExceededNotification: &'static NSNotificationName); + +extern_static!(NSUbiquitousUserDefaultsNoCloudAccountNotification: &'static NSNotificationName); + +extern_static!(NSUbiquitousUserDefaultsDidChangeAccountsNotification: &'static NSNotificationName); + +extern_static!( + NSUbiquitousUserDefaultsCompletedInitialSyncNotification: &'static NSNotificationName +); + +extern_static!(NSUserDefaultsDidChangeNotification: &'static NSNotificationName); diff --git a/crates/icrate-generated/src/Foundation/generated/NSValue.rs b/crates/icrate-generated/src/Foundation/generated/NSValue.rs new file mode 100644 index 000000000..e2e4442c5 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSValue.rs @@ -0,0 +1,298 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +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(@__retain_semantics Init initWithBytes:objCType:)] + pub unsafe fn initWithBytes_objCType( + this: Option>, + value: NonNull, + type_: NonNull, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; + } +); + +extern_methods!( + /// NSValueCreation + unsafe impl NSValue { + #[method_id(@__retain_semantics Other valueWithBytes:objCType:)] + pub unsafe fn valueWithBytes_objCType( + value: NonNull, + type_: NonNull, + ) -> Id; + + #[method_id(@__retain_semantics Other value:withObjCType:)] + pub unsafe fn value_withObjCType( + value: NonNull, + type_: NonNull, + ) -> Id; + } +); + +extern_methods!( + /// NSValueExtensionMethods + unsafe impl NSValue { + #[method_id(@__retain_semantics Other valueWithNonretainedObject:)] + pub unsafe fn valueWithNonretainedObject(anObject: Option<&Object>) -> Id; + + #[method_id(@__retain_semantics Other nonretainedObjectValue)] + pub unsafe fn nonretainedObjectValue(&self) -> Option>; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; + + #[method_id(@__retain_semantics Init initWithChar:)] + pub unsafe fn initWithChar( + this: Option>, + value: c_char, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithUnsignedChar:)] + pub unsafe fn initWithUnsignedChar( + this: Option>, + value: c_uchar, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithShort:)] + pub unsafe fn initWithShort( + this: Option>, + value: c_short, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithUnsignedShort:)] + pub unsafe fn initWithUnsignedShort( + this: Option>, + value: c_ushort, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithInt:)] + pub unsafe fn initWithInt( + this: Option>, + value: c_int, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithUnsignedInt:)] + pub unsafe fn initWithUnsignedInt( + this: Option>, + value: c_uint, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithLong:)] + pub unsafe fn initWithLong( + this: Option>, + value: c_long, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithUnsignedLong:)] + pub unsafe fn initWithUnsignedLong( + this: Option>, + value: c_ulong, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithLongLong:)] + pub unsafe fn initWithLongLong( + this: Option>, + value: c_longlong, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithUnsignedLongLong:)] + pub unsafe fn initWithUnsignedLongLong( + this: Option>, + value: c_ulonglong, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithFloat:)] + pub unsafe fn initWithFloat( + this: Option>, + value: c_float, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithDouble:)] + pub unsafe fn initWithDouble( + this: Option>, + value: c_double, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithBool:)] + pub unsafe fn initWithBool( + this: Option>, + value: bool, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithInteger:)] + pub unsafe fn initWithInteger( + this: Option>, + value: NSInteger, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithUnsignedInteger:)] + pub unsafe fn initWithUnsignedInteger( + this: Option>, + 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(@__retain_semantics Other 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(@__retain_semantics Other descriptionWithLocale:)] + pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) + -> Id; + } +); + +extern_methods!( + /// NSNumberCreation + unsafe impl NSNumber { + #[method_id(@__retain_semantics Other numberWithChar:)] + pub unsafe fn numberWithChar(value: c_char) -> Id; + + #[method_id(@__retain_semantics Other numberWithUnsignedChar:)] + pub unsafe fn numberWithUnsignedChar(value: c_uchar) -> Id; + + #[method_id(@__retain_semantics Other numberWithShort:)] + pub unsafe fn numberWithShort(value: c_short) -> Id; + + #[method_id(@__retain_semantics Other numberWithUnsignedShort:)] + pub unsafe fn numberWithUnsignedShort(value: c_ushort) -> Id; + + #[method_id(@__retain_semantics Other numberWithInt:)] + pub unsafe fn numberWithInt(value: c_int) -> Id; + + #[method_id(@__retain_semantics Other numberWithUnsignedInt:)] + pub unsafe fn numberWithUnsignedInt(value: c_uint) -> Id; + + #[method_id(@__retain_semantics Other numberWithLong:)] + pub unsafe fn numberWithLong(value: c_long) -> Id; + + #[method_id(@__retain_semantics Other numberWithUnsignedLong:)] + pub unsafe fn numberWithUnsignedLong(value: c_ulong) -> Id; + + #[method_id(@__retain_semantics Other numberWithLongLong:)] + pub unsafe fn numberWithLongLong(value: c_longlong) -> Id; + + #[method_id(@__retain_semantics Other numberWithUnsignedLongLong:)] + pub unsafe fn numberWithUnsignedLongLong(value: c_ulonglong) -> Id; + + #[method_id(@__retain_semantics Other numberWithFloat:)] + pub unsafe fn numberWithFloat(value: c_float) -> Id; + + #[method_id(@__retain_semantics Other numberWithDouble:)] + pub unsafe fn numberWithDouble(value: c_double) -> Id; + + #[method_id(@__retain_semantics Other numberWithBool:)] + pub unsafe fn numberWithBool(value: bool) -> Id; + + #[method_id(@__retain_semantics Other numberWithInteger:)] + pub unsafe fn numberWithInteger(value: NSInteger) -> Id; + + #[method_id(@__retain_semantics Other numberWithUnsignedInteger:)] + pub unsafe fn numberWithUnsignedInteger(value: NSUInteger) -> Id; + } +); + +extern_methods!( + /// NSDeprecated + unsafe impl NSValue { + #[method(getValue:)] + pub unsafe fn getValue(&self, value: NonNull); + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSValueTransformer.rs b/crates/icrate-generated/src/Foundation/generated/NSValueTransformer.rs new file mode 100644 index 000000000..5ae5c3e06 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSValueTransformer.rs @@ -0,0 +1,77 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +pub type NSValueTransformerName = NSString; + +extern_static!(NSNegateBooleanTransformerName: &'static NSValueTransformerName); + +extern_static!(NSIsNilTransformerName: &'static NSValueTransformerName); + +extern_static!(NSIsNotNilTransformerName: &'static NSValueTransformerName); + +extern_static!(NSUnarchiveFromDataTransformerName: &'static NSValueTransformerName); + +extern_static!(NSKeyedUnarchiveFromDataTransformerName: &'static NSValueTransformerName); + +extern_static!(NSSecureUnarchiveFromDataTransformerName: &'static NSValueTransformerName); + +extern_class!( + #[derive(Debug)] + pub struct NSValueTransformer; + + unsafe impl ClassType for NSValueTransformer { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSValueTransformer { + #[method(setValueTransformer:forName:)] + pub unsafe fn setValueTransformer_forName( + transformer: Option<&NSValueTransformer>, + name: &NSValueTransformerName, + ); + + #[method_id(@__retain_semantics Other valueTransformerForName:)] + pub unsafe fn valueTransformerForName( + name: &NSValueTransformerName, + ) -> Option>; + + #[method_id(@__retain_semantics Other valueTransformerNames)] + pub unsafe fn valueTransformerNames() -> Id, Shared>; + + #[method(transformedValueClass)] + pub unsafe fn transformedValueClass() -> &'static Class; + + #[method(allowsReverseTransformation)] + pub unsafe fn allowsReverseTransformation() -> bool; + + #[method_id(@__retain_semantics Other transformedValue:)] + pub unsafe fn transformedValue(&self, value: Option<&Object>) + -> Option>; + + #[method_id(@__retain_semantics Other reverseTransformedValue:)] + pub unsafe fn reverseTransformedValue( + &self, + value: Option<&Object>, + ) -> Option>; + } +); + +extern_class!( + #[derive(Debug)] + pub struct NSSecureUnarchiveFromDataTransformer; + + unsafe impl ClassType for NSSecureUnarchiveFromDataTransformer { + type Super = NSValueTransformer; + } +); + +extern_methods!( + unsafe impl NSSecureUnarchiveFromDataTransformer { + #[method_id(@__retain_semantics Other allowedTopLevelClasses)] + pub unsafe fn allowedTopLevelClasses() -> Id, Shared>; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSXMLParser.rs b/crates/icrate-generated/src/Foundation/generated/NSXMLParser.rs new file mode 100644 index 000000000..0b93134c2 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSXMLParser.rs @@ -0,0 +1,374 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSXMLParserExternalEntityResolvingPolicy { + NSXMLParserResolveExternalEntitiesNever = 0, + NSXMLParserResolveExternalEntitiesNoNetwork = 1, + NSXMLParserResolveExternalEntitiesSameOriginOnly = 2, + NSXMLParserResolveExternalEntitiesAlways = 3, + } +); + +extern_class!( + #[derive(Debug)] + pub struct NSXMLParser; + + unsafe impl ClassType for NSXMLParser { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSXMLParser { + #[method_id(@__retain_semantics Init initWithContentsOfURL:)] + pub unsafe fn initWithContentsOfURL( + this: Option>, + url: &NSURL, + ) -> Option>; + + #[method_id(@__retain_semantics Init initWithData:)] + pub unsafe fn initWithData( + this: Option>, + data: &NSData, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithStream:)] + pub unsafe fn initWithStream( + this: Option>, + stream: &NSInputStream, + ) -> Id; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other 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(@__retain_semantics Other 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!( + /// NSXMLParserLocatorAdditions + unsafe impl NSXMLParser { + #[method_id(@__retain_semantics Other publicID)] + pub unsafe fn publicID(&self) -> Option>; + + #[method_id(@__retain_semantics Other systemID)] + pub unsafe fn systemID(&self) -> Option>; + + #[method(lineNumber)] + pub unsafe fn lineNumber(&self) -> NSInteger; + + #[method(columnNumber)] + pub unsafe fn columnNumber(&self) -> NSInteger; + } +); + +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); + +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-generated/src/Foundation/generated/NSXPCConnection.rs b/crates/icrate-generated/src/Foundation/generated/NSXPCConnection.rs new file mode 100644 index 000000000..e57df6781 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSXPCConnection.rs @@ -0,0 +1,294 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::Foundation::*; + +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)] + pub enum NSXPCConnectionOptions { + NSXPCConnectionPrivileged = 1 << 12, + } +); + +extern_class!( + #[derive(Debug)] + pub struct NSXPCConnection; + + unsafe impl ClassType for NSXPCConnection { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSXPCConnection { + #[method_id(@__retain_semantics Init initWithServiceName:)] + pub unsafe fn initWithServiceName( + this: Option>, + serviceName: &NSString, + ) -> Id; + + #[method_id(@__retain_semantics Other serviceName)] + pub unsafe fn serviceName(&self) -> Option>; + + #[method_id(@__retain_semantics Init initWithMachServiceName:options:)] + pub unsafe fn initWithMachServiceName_options( + this: Option>, + name: &NSString, + options: NSXPCConnectionOptions, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithListenerEndpoint:)] + pub unsafe fn initWithListenerEndpoint( + this: Option>, + endpoint: &NSXPCListenerEndpoint, + ) -> Id; + + #[method_id(@__retain_semantics Other endpoint)] + pub unsafe fn endpoint(&self) -> Id; + + #[method_id(@__retain_semantics Other exportedInterface)] + pub unsafe fn exportedInterface(&self) -> Option>; + + #[method(setExportedInterface:)] + pub unsafe fn setExportedInterface(&self, exportedInterface: Option<&NSXPCInterface>); + + #[method_id(@__retain_semantics Other exportedObject)] + pub unsafe fn exportedObject(&self) -> Option>; + + #[method(setExportedObject:)] + pub unsafe fn setExportedObject(&self, exportedObject: Option<&Object>); + + #[method_id(@__retain_semantics Other remoteObjectInterface)] + pub unsafe fn remoteObjectInterface(&self) -> Option>; + + #[method(setRemoteObjectInterface:)] + pub unsafe fn setRemoteObjectInterface( + &self, + remoteObjectInterface: Option<&NSXPCInterface>, + ); + + #[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; + + #[method_id(@__retain_semantics Other synchronousRemoteObjectProxyWithErrorHandler:)] + pub unsafe fn synchronousRemoteObjectProxyWithErrorHandler( + &self, + handler: &Block<(NonNull,), ()>, + ) -> Id; + + #[method(interruptionHandler)] + pub unsafe fn interruptionHandler(&self) -> *mut Block<(), ()>; + + #[method(setInterruptionHandler:)] + pub unsafe fn setInterruptionHandler(&self, interruptionHandler: Option<&Block<(), ()>>); + + #[method(invalidationHandler)] + pub unsafe fn invalidationHandler(&self) -> *mut Block<(), ()>; + + #[method(setInvalidationHandler:)] + pub unsafe fn setInvalidationHandler(&self, invalidationHandler: Option<&Block<(), ()>>); + + #[method(resume)] + pub unsafe fn resume(&self); + + #[method(suspend)] + pub unsafe fn suspend(&self); + + #[method(activate)] + pub unsafe fn activate(&self); + + #[method(invalidate)] + pub unsafe fn invalidate(&self); + + #[method_id(@__retain_semantics Other currentConnection)] + pub unsafe fn currentConnection() -> Option>; + + #[method(scheduleSendBarrierBlock:)] + pub unsafe fn scheduleSendBarrierBlock(&self, block: &Block<(), ()>); + + #[method(setCodeSigningRequirement:)] + pub unsafe fn setCodeSigningRequirement(&self, requirement: &NSString); + } +); + +extern_class!( + #[derive(Debug)] + pub struct NSXPCListener; + + unsafe impl ClassType for NSXPCListener { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSXPCListener { + #[method_id(@__retain_semantics Other serviceListener)] + pub unsafe fn serviceListener() -> Id; + + #[method_id(@__retain_semantics Other anonymousListener)] + pub unsafe fn anonymousListener() -> Id; + + #[method_id(@__retain_semantics Init initWithMachServiceName:)] + pub unsafe fn initWithMachServiceName( + this: Option>, + name: &NSString, + ) -> Id; + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSXPCListenerDelegate>); + + #[method_id(@__retain_semantics Other endpoint)] + pub unsafe fn endpoint(&self) -> Id; + + #[method(resume)] + pub unsafe fn resume(&self); + + #[method(suspend)] + pub unsafe fn suspend(&self); + + #[method(activate)] + pub unsafe fn activate(&self); + + #[method(invalidate)] + pub unsafe fn invalidate(&self); + + #[method(setConnectionCodeSigningRequirement:)] + pub unsafe fn setConnectionCodeSigningRequirement(&self, requirement: &NSString); + } +); + +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)] + pub struct NSXPCInterface; + + unsafe impl ClassType for NSXPCInterface { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSXPCInterface { + #[method_id(@__retain_semantics Other interfaceWithProtocol:)] + pub unsafe fn interfaceWithProtocol(protocol: &Protocol) -> Id; + + #[method_id(@__retain_semantics Other 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, + ); + + #[method_id(@__retain_semantics Other classesForSelector:argumentIndex:ofReply:)] + pub unsafe fn classesForSelector_argumentIndex_ofReply( + &self, + sel: Sel, + arg: NSUInteger, + ofReply: bool, + ) -> Id, Shared>; + + #[method(setInterface:forSelector:argumentIndex:ofReply:)] + pub unsafe fn setInterface_forSelector_argumentIndex_ofReply( + &self, + ifc: &NSXPCInterface, + sel: Sel, + arg: NSUInteger, + ofReply: bool, + ); + + #[method_id(@__retain_semantics Other interfaceForSelector:argumentIndex:ofReply:)] + pub unsafe fn interfaceForSelector_argumentIndex_ofReply( + &self, + sel: Sel, + arg: NSUInteger, + ofReply: bool, + ) -> Option>; + } +); + +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_id(@__retain_semantics Other userInfo)] + pub unsafe fn userInfo(&self) -> Option>; + + #[method(setUserInfo:)] + pub unsafe fn setUserInfo(&self, userInfo: Option<&NSObject>); + + #[method_id(@__retain_semantics Other connection)] + pub unsafe fn connection(&self) -> Option>; + } +); diff --git a/crates/icrate-generated/src/Foundation/generated/NSZone.rs b/crates/icrate-generated/src/Foundation/generated/NSZone.rs new file mode 100644 index 000000000..24436f7eb --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/NSZone.rs @@ -0,0 +1,104 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +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); +); + +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-generated/src/Foundation/generated/mod.rs b/crates/icrate-generated/src/Foundation/generated/mod.rs new file mode 100644 index 000000000..af5eddf46 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/generated/mod.rs @@ -0,0 +1,1299 @@ +#[path = "FoundationErrors.rs"] +mod __FoundationErrors; +#[path = "FoundationLegacySwiftCompatibility.rs"] +mod __FoundationLegacySwiftCompatibility; +#[path = "NSArray.rs"] +mod __NSArray; +#[path = "NSAttributedString.rs"] +mod __NSAttributedString; +#[path = "NSAutoreleasePool.rs"] +mod __NSAutoreleasePool; +#[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 = "NSCharacterSet.rs"] +mod __NSCharacterSet; +#[path = "NSCoder.rs"] +mod __NSCoder; +#[path = "NSComparisonPredicate.rs"] +mod __NSComparisonPredicate; +#[path = "NSCompoundPredicate.rs"] +mod __NSCompoundPredicate; +#[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 = "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 = "NSHTTPCookie.rs"] +mod __NSHTTPCookie; +#[path = "NSHTTPCookieStorage.rs"] +mod __NSHTTPCookieStorage; +#[path = "NSHashTable.rs"] +mod __NSHashTable; +#[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 = "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 = "NSPredicate.rs"] +mod __NSPredicate; +#[path = "NSProcessInfo.rs"] +mod __NSProcessInfo; +#[path = "NSProgress.rs"] +mod __NSProgress; +#[path = "NSPropertyList.rs"] +mod __NSPropertyList; +#[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 = "NSSet.rs"] +mod __NSSet; +#[path = "NSSortDescriptor.rs"] +mod __NSSortDescriptor; +#[path = "NSStream.rs"] +mod __NSStream; +#[path = "NSString.rs"] +mod __NSString; +#[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 = "NSURLError.rs"] +mod __NSURLError; +#[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 = "NSValue.rs"] +mod __NSValue; +#[path = "NSValueTransformer.rs"] +mod __NSValueTransformer; +#[path = "NSXMLParser.rs"] +mod __NSXMLParser; +#[path = "NSXPCConnection.rs"] +mod __NSXPCConnection; +#[path = "NSZone.rs"] +mod __NSZone; + +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, + NSXPCConnectionCodeSigningRequirementFailure, NSXPCConnectionErrorMaximum, + NSXPCConnectionErrorMinimum, NSXPCConnectionInterrupted, NSXPCConnectionInvalid, + NSXPCConnectionReplyInvalid, +}; +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, NSAttributedStringMarkdownSourcePosition, + NSImageURLAttributeName, NSInflectionAlternativeAttributeName, NSInflectionRuleAttributeName, + NSInlinePresentationIntent, NSInlinePresentationIntentAttributeName, + NSInlinePresentationIntentBlockHTML, NSInlinePresentationIntentCode, + NSInlinePresentationIntentEmphasized, NSInlinePresentationIntentInlineHTML, + NSInlinePresentationIntentLineBreak, NSInlinePresentationIntentSoftBreak, + NSInlinePresentationIntentStrikethrough, NSInlinePresentationIntentStronglyEmphasized, + NSLanguageIdentifierAttributeName, NSMarkdownSourcePositionAttributeName, + 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::__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::__NSCharacterSet::{ + NSCharacterSet, NSMutableCharacterSet, NSOpenStepUnicodeReservedBase, +}; +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::__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_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, NSDecimalAdd, + NSDecimalCompact, NSDecimalCompare, NSDecimalCopy, NSDecimalDivide, NSDecimalMultiply, + NSDecimalMultiplyByPowerOf10, NSDecimalNormalize, NSDecimalPower, NSDecimalRound, + NSDecimalString, NSDecimalSubtract, 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::__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, NSGetUncaughtExceptionHandler, NSInconsistentArchiveException, + NSInternalInconsistencyException, NSInvalidArgumentException, NSInvalidReceivePortException, + NSInvalidSendPortException, NSMallocException, NSObjectInaccessibleException, + NSObjectNotAvailableException, NSOldStyleException, NSPortReceiveException, + NSPortSendException, NSPortTimeoutException, NSRangeException, NSSetUncaughtExceptionHandler, + 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::__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::{ + 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, NSNextHashEnumeratorItem, NSNonOwnedPointerHashCallBacks, + NSNonRetainedObjectHashCallBacks, NSObjectHashCallBacks, NSOwnedObjectIdentityHashCallBacks, + NSOwnedPointerHashCallBacks, NSPointerToStructHashCallBacks, NSResetHashTable, + NSStringFromHashTable, +}; +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::{ + 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, NSResetMapTable, NSStringFromMapTable, +}; +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_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::{ + NSClassFromString, NSComparator, NSComparisonResult, NSEnumerationConcurrent, + NSEnumerationOptions, NSEnumerationReverse, NSExceptionName, NSFoundationVersionNumber, + NSGetSizeAndAlignment, NSOrderedAscending, NSOrderedDescending, NSOrderedSame, + NSProtocolFromString, NSQualityOfService, NSQualityOfServiceBackground, + NSQualityOfServiceDefault, NSQualityOfServiceUserInitiated, NSQualityOfServiceUserInteractive, + NSQualityOfServiceUtility, NSRunLoopMode, NSSelectorFromString, NSSortConcurrent, + NSSortOptions, NSSortStable, NSStringFromClass, NSStringFromProtocol, NSStringFromSelector, +}; +pub use self::__NSObject::{ + NSAllocateObject, NSCoding, NSCopyObject, NSCopying, NSDeallocateObject, + NSDecrementExtraRefCountWasZero, NSDiscardableContent, NSExtraRefCount, + NSIncrementExtraRefCount, NSMutableCopying, NSSecureCoding, NSShouldRetainWithZone, +}; +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, NSFullUserName, NSHomeDirectory, + NSHomeDirectoryForUser, NSInputMethodsDirectory, NSItemReplacementDirectory, + NSLibraryDirectory, NSLocalDomainMask, NSMoviesDirectory, NSMusicDirectory, + NSNetworkDomainMask, NSOpenStepRootDirectory, NSPicturesDirectory, NSPreferencePanesDirectory, + NSPrinterDescriptionDirectory, NSSearchPathDirectory, NSSearchPathDomainMask, + NSSearchPathForDirectoriesInDomains, NSSharedPublicDirectory, NSSystemDomainMask, + NSTemporaryDirectory, NSTrashDirectory, NSUserDirectory, NSUserDomainMask, NSUserName, +}; +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, +}; +pub use self::__NSPredicate::NSPredicate; +pub use self::__NSProcessInfo::{ + NSActivityAnimationTrackingEnabled, NSActivityAutomaticTerminationDisabled, + NSActivityBackground, NSActivityIdleDisplaySleepDisabled, NSActivityIdleSystemSleepDisabled, + NSActivityLatencyCritical, NSActivityOptions, NSActivitySuddenTerminationDisabled, + NSActivityTrackingEnabled, NSActivityUserInitiated, + NSActivityUserInitiatedAllowingIdleSystemSleep, NSActivityUserInteractive, + 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::__NSRange::{ + NSIntersectionRange, NSRange, NSRangeFromString, NSRangePointer, NSStringFromRange, + NSUnionRange, +}; +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::__NSSet::{NSCountedSet, NSMutableSet, NSSet}; +pub use self::__NSSortDescriptor::NSSortDescriptor; +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::__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::__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::__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::{ + NSArgumentDomain, NSGlobalDomain, NSRegistrationDomain, + NSUbiquitousUserDefaultsCompletedInitialSyncNotification, + NSUbiquitousUserDefaultsDidChangeAccountsNotification, + NSUbiquitousUserDefaultsNoCloudAccountNotification, NSUserDefaults, + NSUserDefaultsDidChangeNotification, NSUserDefaultsSizeLimitExceededNotification, +}; +pub use self::__NSValue::{NSNumber, NSValue}; +pub use self::__NSValueTransformer::{ + NSIsNilTransformerName, NSIsNotNilTransformerName, NSKeyedUnarchiveFromDataTransformerName, + NSNegateBooleanTransformerName, NSSecureUnarchiveFromDataTransformer, + NSSecureUnarchiveFromDataTransformerName, NSUnarchiveFromDataTransformerName, + NSValueTransformer, NSValueTransformerName, +}; +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::{ + NSAllocateMemoryPages, NSCopyMemoryPages, NSCreateZone, NSDeallocateMemoryPages, + NSDefaultMallocZone, NSLogPageSize, NSPageSize, NSRealMemoryAvailable, NSRecycleZone, + NSRoundDownToMultipleOfPageSize, NSRoundUpToMultipleOfPageSize, NSSetZoneName, NSZoneCalloc, + NSZoneFree, NSZoneFromPointer, NSZoneMalloc, NSZoneName, NSZoneRealloc, +}; +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; diff --git a/crates/icrate-generated/src/Foundation/mod.rs b/crates/icrate-generated/src/Foundation/mod.rs new file mode 100644 index 000000000..b3f6bac43 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/mod.rs @@ -0,0 +1,107 @@ +#[allow(unused_imports)] +mod generated; + +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::generated::*; diff --git a/crates/icrate-generated/src/Foundation/translation-config.toml b/crates/icrate-generated/src/Foundation/translation-config.toml new file mode 100644 index 000000000..2fad301d7 --- /dev/null +++ b/crates/icrate-generated/src/Foundation/translation-config.toml @@ -0,0 +1,213 @@ +imports = ["Foundation"] + +[class.NSObject.methods] +# Uses NS_REPLACES_RECEIVER +awakeAfterUsingCoder = { skipped = true } + +[protocol.NSKeyedUnarchiverDelegate.methods] +# Uses NS_RELEASES_ARGUMENT and NS_RETURNS_RETAINED +unarchiver_didDecodeObject = { skipped = true } + +[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 } + +[class.NSString.properties] +length = { unsafe = false } +# Safe to call, but the returned pointer may not be safe to use +UTF8String = { unsafe = false } + +[class.NSMutableString.methods] +new = { unsafe = false } +initWithString = { unsafe = false } +# "appendString:" = { unsafe = false, mutable = true } +# "setString:" = { unsafe = false, mutable = true } + +[class.NSBlockOperation.properties] +# 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 } + +# 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 + +# 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.properties.timeIntervalSinceReferenceDate] +skipped = true + +# Root class +[class.NSProxy] +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 +[fn.NSLogv] +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-generated/src/UIKit/generated/DocumentManager.rs b/crates/icrate-generated/src/UIKit/generated/DocumentManager.rs new file mode 100644 index 000000000..bc88fc826 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/DocumentManager.rs @@ -0,0 +1,4 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + diff --git a/crates/icrate-generated/src/UIKit/generated/NSAttributedString.rs b/crates/icrate-generated/src/UIKit/generated/NSAttributedString.rs new file mode 100644 index 000000000..5455a09f7 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/NSAttributedString.rs @@ -0,0 +1,238 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_static!(NSFontAttributeName: &'static NSAttributedStringKey); + +extern_static!(NSParagraphStyleAttributeName: &'static NSAttributedStringKey); + +extern_static!(NSForegroundColorAttributeName: &'static NSAttributedStringKey); + +extern_static!(NSBackgroundColorAttributeName: &'static NSAttributedStringKey); + +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); + +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_static!(NSTextEffectLetterpressStyle: &'static NSTextEffectStyle); + +extern_methods!( + /// NSAttributedStringAttributeFixing + unsafe impl NSMutableAttributedString { + #[method(fixAttributesInRange:)] + pub unsafe fn fixAttributesInRange(&self, range: NSRange,); + + } +); + +pub type NSAttributedStringDocumentType = NSString; + +extern_static!(NSPlainTextDocumentType: &'static NSAttributedStringDocumentType); + +extern_static!(NSRTFTextDocumentType: &'static NSAttributedStringDocumentType); + +extern_static!(NSRTFDTextDocumentType: &'static NSAttributedStringDocumentType); + +extern_static!(NSHTMLTextDocumentType: &'static NSAttributedStringDocumentType); + +pub type NSTextLayoutSectionKey = NSString; + +extern_static!(NSTextLayoutSectionOrientation: &'static NSTextLayoutSectionKey); + +extern_static!(NSTextLayoutSectionRange: &'static NSTextLayoutSectionKey); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSTextScalingType { + NSTextScalingStandard = 0, + NSTextScalingiOS = 1, + } +); + +pub type NSAttributedStringDocumentAttributeKey = NSString; + +extern_static!(NSDocumentTypeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey); + +extern_static!(NSCharacterEncodingDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey); + +extern_static!(NSDefaultAttributesDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey); + +extern_static!(NSPaperSizeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey); + +extern_static!(NSPaperMarginDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey); + +extern_static!(NSViewSizeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey); + +extern_static!(NSViewZoomDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey); + +extern_static!(NSViewModeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey); + +extern_static!(NSReadOnlyDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey); + +extern_static!(NSBackgroundColorDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey); + +extern_static!(NSHyphenationFactorDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey); + +extern_static!(NSDefaultTabIntervalDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey); + +extern_static!(NSTextLayoutSectionsAttribute: &'static NSAttributedStringDocumentAttributeKey); + +extern_static!(NSTextScalingDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey); + +extern_static!(NSSourceTextScalingDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey); + +extern_static!(NSCocoaVersionDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey); + +pub type NSAttributedStringDocumentReadingOptionKey = NSString; + +extern_static!(NSDocumentTypeDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey); + +extern_static!(NSDefaultAttributesDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey); + +extern_static!(NSCharacterEncodingDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey); + +extern_static!(NSTargetTextScalingDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey); + +extern_static!(NSSourceTextScalingDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey); + +extern_methods!( + /// NSAttributedStringDocumentFormats + unsafe impl NSAttributedString { + #[method_id(@__retain_semantics Init initWithURL:options:documentAttributes:error:)] + pub unsafe fn initWithURL_options_documentAttributes_error(this: Option>, url: &NSURL,options: &NSDictionary,dict: *mut *mut NSDictionary,) -> Result, Id>; + + #[method_id(@__retain_semantics Init initWithData:options:documentAttributes:error:)] + pub unsafe fn initWithData_options_documentAttributes_error(this: Option>, data: &NSData,options: &NSDictionary,dict: *mut *mut NSDictionary,) -> Result, Id>; + + #[method_id(@__retain_semantics Other dataFromRange:documentAttributes:error:)] + pub unsafe fn dataFromRange_documentAttributes_error(&self, range: NSRange,dict: &NSDictionary,) -> Result, Id>; + + #[method_id(@__retain_semantics Other fileWrapperFromRange:documentAttributes:error:)] + pub unsafe fn fileWrapperFromRange_documentAttributes_error(&self, range: NSRange,dict: &NSDictionary,) -> Result, Id>; + + } +); + +extern_methods!( + /// NSMutableAttributedStringDocumentFormats + unsafe impl NSMutableAttributedString { + #[method(readFromURL:options:documentAttributes:error:)] + pub unsafe fn readFromURL_options_documentAttributes_error(&self, url: &NSURL,opts: &NSDictionary,dict: *mut *mut NSDictionary,) -> Result<(), Id>; + + #[method(readFromData:options:documentAttributes:error:)] + pub unsafe fn readFromData_options_documentAttributes_error(&self, data: &NSData,opts: &NSDictionary,dict: *mut *mut NSDictionary,) -> Result<(), Id>; + + } +); + +extern_methods!( + /// NSAttributedStringKitAdditions + unsafe impl NSAttributedString { + #[method(containsAttachmentsInRange:)] + pub unsafe fn containsAttachmentsInRange(&self, range: NSRange,) -> bool; + + } +); + +extern_methods!( + /// NSAttributedString_ItemProvider + unsafe impl NSAttributedString { + } +); + +extern_static!(NSUnderlinePatternSolid: NSUnderlineStyle = NSUnderlineStylePatternSolid); + +extern_static!(NSUnderlinePatternDot: NSUnderlineStyle = NSUnderlineStylePatternDot); + +extern_static!(NSUnderlinePatternDash: NSUnderlineStyle = NSUnderlineStylePatternDash); + +extern_static!(NSUnderlinePatternDashDot: NSUnderlineStyle = NSUnderlineStylePatternDashDot); + +extern_static!(NSUnderlinePatternDashDotDot: NSUnderlineStyle = NSUnderlineStylePatternDashDotDot); + +extern_static!(NSUnderlineByWord: NSUnderlineStyle = NSUnderlineStyleByWord); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSTextWritingDirection { + NSTextWritingDirectionEmbedding = 0<<1, + NSTextWritingDirectionOverride = 1<<1, + } +); + +extern_methods!( + /// NSDeprecatedKitAdditions + unsafe impl NSAttributedString { + #[method_id(@__retain_semantics Init initWithFileURL:options:documentAttributes:error:)] + pub unsafe fn initWithFileURL_options_documentAttributes_error(this: Option>, url: &NSURL,options: &NSDictionary,dict: *mut *mut NSDictionary,) -> Result, Id>; + + } +); + +extern_methods!( + /// NSDeprecatedKitAdditions + unsafe impl NSMutableAttributedString { + #[method(readFromFileURL:options:documentAttributes:error:)] + pub unsafe fn readFromFileURL_options_documentAttributes_error(&self, url: &NSURL,opts: &NSDictionary,dict: *mut *mut NSDictionary,) -> Result<(), Id>; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/NSDataAsset.rs b/crates/icrate-generated/src/UIKit/generated/NSDataAsset.rs new file mode 100644 index 000000000..9be733b13 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/NSDataAsset.rs @@ -0,0 +1,38 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +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(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics Init initWithName:)] + pub unsafe fn initWithName(this: Option>, name: &NSDataAssetName,) -> Option>; + + #[method_id(@__retain_semantics Init initWithName:bundle:)] + pub unsafe fn initWithName_bundle(this: Option>, name: &NSDataAssetName,bundle: &NSBundle,) -> Option>; + + #[method_id(@__retain_semantics Other name)] + pub unsafe fn name(&self, ) -> Id; + + #[method_id(@__retain_semantics Other data)] + pub unsafe fn data(&self, ) -> Id; + + #[method_id(@__retain_semantics Other typeIdentifier)] + pub unsafe fn typeIdentifier(&self, ) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/NSDiffableDataSourceSectionSnapshot.rs b/crates/icrate-generated/src/UIKit/generated/NSDiffableDataSourceSectionSnapshot.rs new file mode 100644 index 000000000..6fc3da17e --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/NSDiffableDataSourceSectionSnapshot.rs @@ -0,0 +1,98 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +__inner_extern_class!( + #[derive(Debug)] + pub struct NSDiffableDataSourceSectionSnapshot { +_inner0: PhantomData<*mut ItemIdentifierType>, +} + + unsafe impl ClassType for NSDiffableDataSourceSectionSnapshot { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSDiffableDataSourceSectionSnapshot { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method(appendItems:)] + pub unsafe fn appendItems(&self, items: &NSArray,); + + #[method(appendItems:intoParentItem:)] + pub unsafe fn appendItems_intoParentItem(&self, items: &NSArray,parentItem: Option<&ItemIdentifierType>,); + + #[method(insertItems:beforeItem:)] + pub unsafe fn insertItems_beforeItem(&self, items: &NSArray,beforeIdentifier: &ItemIdentifierType,); + + #[method(insertItems:afterItem:)] + pub unsafe fn insertItems_afterItem(&self, items: &NSArray,afterIdentifier: &ItemIdentifierType,); + + #[method(deleteItems:)] + pub unsafe fn deleteItems(&self, items: &NSArray,); + + #[method(deleteAllItems)] + pub unsafe fn deleteAllItems(&self, ); + + #[method(expandItems:)] + pub unsafe fn expandItems(&self, items: &NSArray,); + + #[method(collapseItems:)] + pub unsafe fn collapseItems(&self, items: &NSArray,); + + #[method(replaceChildrenOfParentItem:withSnapshot:)] + pub unsafe fn replaceChildrenOfParentItem_withSnapshot(&self, parentItem: &ItemIdentifierType,snapshot: &NSDiffableDataSourceSectionSnapshot,); + + #[method(insertSnapshot:beforeItem:)] + pub unsafe fn insertSnapshot_beforeItem(&self, snapshot: &NSDiffableDataSourceSectionSnapshot,item: &ItemIdentifierType,); + + #[method_id(@__retain_semantics Other insertSnapshot:afterItem:)] + pub unsafe fn insertSnapshot_afterItem(&self, snapshot: &NSDiffableDataSourceSectionSnapshot,item: &ItemIdentifierType,) -> Id; + + #[method(isExpanded:)] + pub unsafe fn isExpanded(&self, item: &ItemIdentifierType,) -> bool; + + #[method(isVisible:)] + pub unsafe fn isVisible(&self, item: &ItemIdentifierType,) -> bool; + + #[method(containsItem:)] + pub unsafe fn containsItem(&self, item: &ItemIdentifierType,) -> bool; + + #[method(levelOfItem:)] + pub unsafe fn levelOfItem(&self, item: &ItemIdentifierType,) -> NSInteger; + + #[method(indexOfItem:)] + pub unsafe fn indexOfItem(&self, item: &ItemIdentifierType,) -> NSInteger; + + #[method_id(@__retain_semantics Other items)] + pub unsafe fn items(&self, ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other expandedItems)] + pub unsafe fn expandedItems(&self, ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other parentOfChildItem:)] + pub unsafe fn parentOfChildItem(&self, childItem: &ItemIdentifierType,) -> Option>; + + #[method_id(@__retain_semantics Other snapshotOfParentItem:)] + pub unsafe fn snapshotOfParentItem(&self, parentItem: &ItemIdentifierType,) -> Id, Shared>; + + #[method_id(@__retain_semantics Other snapshotOfParentItem:includingParentItem:)] + pub unsafe fn snapshotOfParentItem_includingParentItem(&self, parentItem: &ItemIdentifierType,includingParentItem: bool,) -> Id, Shared>; + + #[method_id(@__retain_semantics Other items)] + pub unsafe fn items(&self, ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other rootItems)] + pub unsafe fn rootItems(&self, ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other visibleItems)] + pub unsafe fn visibleItems(&self, ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other visualDescription)] + pub unsafe fn visualDescription(&self, ) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/NSFileProviderExtension.rs b/crates/icrate-generated/src/UIKit/generated/NSFileProviderExtension.rs new file mode 100644 index 000000000..bc88fc826 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/NSFileProviderExtension.rs @@ -0,0 +1,4 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + diff --git a/crates/icrate-generated/src/UIKit/generated/NSIndexPath+UIKitAdditions.rs b/crates/icrate-generated/src/UIKit/generated/NSIndexPath+UIKitAdditions.rs new file mode 100644 index 000000000..6f43f64ee --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/NSIndexPath+UIKitAdditions.rs @@ -0,0 +1,25 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_methods!( + /// UIKitAdditions + unsafe impl NSIndexPath { + #[method_id(@__retain_semantics Other indexPathForRow:inSection:)] + pub unsafe fn indexPathForRow_inSection(row: NSInteger,section: NSInteger,) -> Id; + + #[method_id(@__retain_semantics Other indexPathForItem:inSection:)] + pub unsafe fn indexPathForItem_inSection(item: NSInteger,section: NSInteger,) -> Id; + + #[method(section)] + pub unsafe fn section(&self, ) -> NSInteger; + + #[method(row)] + pub unsafe fn row(&self, ) -> NSInteger; + + #[method(item)] + pub unsafe fn item(&self, ) -> NSInteger; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/NSItemProvider+UIKitAdditions.rs b/crates/icrate-generated/src/UIKit/generated/NSItemProvider+UIKitAdditions.rs new file mode 100644 index 000000000..c143c7d34 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/NSItemProvider+UIKitAdditions.rs @@ -0,0 +1,47 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIPreferredPresentationStyle { + UIPreferredPresentationStyleUnspecified = 0, + UIPreferredPresentationStyleInline = 1, + UIPreferredPresentationStyleAttachment = 2, + } +); + +extern_methods!( + /// UIKitAdditions + unsafe impl NSItemProvider { + #[method_id(@__retain_semantics Other teamData)] + pub unsafe fn teamData(&self, ) -> Option>; + + #[method(setTeamData:)] + pub unsafe fn setTeamData(&self, teamData: Option<&NSData>,); + + #[method(preferredPresentationSize)] + pub unsafe fn preferredPresentationSize(&self, ) -> CGSize; + + #[method(setPreferredPresentationSize:)] + pub unsafe fn setPreferredPresentationSize(&self, preferredPresentationSize: CGSize,); + + #[method(preferredPresentationStyle)] + pub unsafe fn preferredPresentationStyle(&self, ) -> UIPreferredPresentationStyle; + + #[method(setPreferredPresentationStyle:)] + pub unsafe fn setPreferredPresentationStyle(&self, preferredPresentationStyle: UIPreferredPresentationStyle,); + + } +); + +extern_protocol!( + pub struct UIItemProviderPresentationSizeProviding; + + unsafe impl UIItemProviderPresentationSizeProviding { + #[method(preferredPresentationSizeForItemProvider)] + pub unsafe fn preferredPresentationSizeForItemProvider(&self, ) -> CGSize; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/NSLayoutAnchor.rs b/crates/icrate-generated/src/UIKit/generated/NSLayoutAnchor.rs new file mode 100644 index 000000000..cd38a854d --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/NSLayoutAnchor.rs @@ -0,0 +1,155 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +__inner_extern_class!( + #[derive(Debug)] + pub struct NSLayoutAnchor { +_inner0: PhantomData<*mut AnchorType>, +} + + unsafe impl ClassType for NSLayoutAnchor { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSLayoutAnchor { + #[method_id(@__retain_semantics Other constraintEqualToAnchor:)] + pub unsafe fn constraintEqualToAnchor(&self, anchor: &NSLayoutAnchor,) -> Id; + + #[method_id(@__retain_semantics Other constraintGreaterThanOrEqualToAnchor:)] + pub unsafe fn constraintGreaterThanOrEqualToAnchor(&self, anchor: &NSLayoutAnchor,) -> Id; + + #[method_id(@__retain_semantics Other constraintLessThanOrEqualToAnchor:)] + pub unsafe fn constraintLessThanOrEqualToAnchor(&self, anchor: &NSLayoutAnchor,) -> Id; + + #[method_id(@__retain_semantics Other constraintEqualToAnchor:constant:)] + pub unsafe fn constraintEqualToAnchor_constant(&self, anchor: &NSLayoutAnchor,c: CGFloat,) -> Id; + + #[method_id(@__retain_semantics Other constraintGreaterThanOrEqualToAnchor:constant:)] + pub unsafe fn constraintGreaterThanOrEqualToAnchor_constant(&self, anchor: &NSLayoutAnchor,c: CGFloat,) -> Id; + + #[method_id(@__retain_semantics Other constraintLessThanOrEqualToAnchor:constant:)] + pub unsafe fn constraintLessThanOrEqualToAnchor_constant(&self, anchor: &NSLayoutAnchor,c: CGFloat,) -> Id; + + #[method_id(@__retain_semantics Other name)] + pub unsafe fn name(&self, ) -> Id; + + #[method_id(@__retain_semantics Other item)] + pub unsafe fn item(&self, ) -> Option>; + + #[method(hasAmbiguousLayout)] + pub unsafe fn hasAmbiguousLayout(&self, ) -> bool; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other anchorWithOffsetToAnchor:)] + pub unsafe fn anchorWithOffsetToAnchor(&self, otherAnchor: &NSLayoutXAxisAnchor,) -> Id; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct NSLayoutYAxisAnchor; + + unsafe impl ClassType for NSLayoutYAxisAnchor { + type Super = NSLayoutAnchor; + } +); + +extern_methods!( + unsafe impl NSLayoutYAxisAnchor { + #[method_id(@__retain_semantics Other anchorWithOffsetToAnchor:)] + pub unsafe fn anchorWithOffsetToAnchor(&self, otherAnchor: &NSLayoutYAxisAnchor,) -> Id; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct NSLayoutDimension; + + unsafe impl ClassType for NSLayoutDimension { + type Super = NSLayoutAnchor; + } +); + +extern_methods!( + unsafe impl NSLayoutDimension { + #[method_id(@__retain_semantics Other constraintEqualToConstant:)] + pub unsafe fn constraintEqualToConstant(&self, c: CGFloat,) -> Id; + + #[method_id(@__retain_semantics Other constraintGreaterThanOrEqualToConstant:)] + pub unsafe fn constraintGreaterThanOrEqualToConstant(&self, c: CGFloat,) -> Id; + + #[method_id(@__retain_semantics Other constraintLessThanOrEqualToConstant:)] + pub unsafe fn constraintLessThanOrEqualToConstant(&self, c: CGFloat,) -> Id; + + #[method_id(@__retain_semantics Other constraintEqualToAnchor:multiplier:)] + pub unsafe fn constraintEqualToAnchor_multiplier(&self, anchor: &NSLayoutDimension,m: CGFloat,) -> Id; + + #[method_id(@__retain_semantics Other constraintGreaterThanOrEqualToAnchor:multiplier:)] + pub unsafe fn constraintGreaterThanOrEqualToAnchor_multiplier(&self, anchor: &NSLayoutDimension,m: CGFloat,) -> Id; + + #[method_id(@__retain_semantics Other constraintLessThanOrEqualToAnchor:multiplier:)] + pub unsafe fn constraintLessThanOrEqualToAnchor_multiplier(&self, anchor: &NSLayoutDimension,m: CGFloat,) -> Id; + + #[method_id(@__retain_semantics Other constraintEqualToAnchor:multiplier:constant:)] + pub unsafe fn constraintEqualToAnchor_multiplier_constant(&self, anchor: &NSLayoutDimension,m: CGFloat,c: CGFloat,) -> Id; + + #[method_id(@__retain_semantics Other constraintGreaterThanOrEqualToAnchor:multiplier:constant:)] + pub unsafe fn constraintGreaterThanOrEqualToAnchor_multiplier_constant(&self, anchor: &NSLayoutDimension,m: CGFloat,c: CGFloat,) -> Id; + + #[method_id(@__retain_semantics Other constraintLessThanOrEqualToAnchor:multiplier:constant:)] + pub unsafe fn constraintLessThanOrEqualToAnchor_multiplier_constant(&self, anchor: &NSLayoutDimension,m: CGFloat,c: CGFloat,) -> Id; + + } +); + +extern_methods!( + /// UIViewDynamicSystemSpacingSupport + unsafe impl NSLayoutXAxisAnchor { + #[method_id(@__retain_semantics Other constraintEqualToSystemSpacingAfterAnchor:multiplier:)] + pub unsafe fn constraintEqualToSystemSpacingAfterAnchor_multiplier(&self, anchor: &NSLayoutXAxisAnchor,multiplier: CGFloat,) -> Id; + + #[method_id(@__retain_semantics Other constraintGreaterThanOrEqualToSystemSpacingAfterAnchor:multiplier:)] + pub unsafe fn constraintGreaterThanOrEqualToSystemSpacingAfterAnchor_multiplier(&self, anchor: &NSLayoutXAxisAnchor,multiplier: CGFloat,) -> Id; + + #[method_id(@__retain_semantics Other constraintLessThanOrEqualToSystemSpacingAfterAnchor:multiplier:)] + pub unsafe fn constraintLessThanOrEqualToSystemSpacingAfterAnchor_multiplier(&self, anchor: &NSLayoutXAxisAnchor,multiplier: CGFloat,) -> Id; + + } +); + +extern_methods!( + /// UIViewDynamicSystemSpacingSupport + unsafe impl NSLayoutYAxisAnchor { + #[method_id(@__retain_semantics Other constraintEqualToSystemSpacingBelowAnchor:multiplier:)] + pub unsafe fn constraintEqualToSystemSpacingBelowAnchor_multiplier(&self, anchor: &NSLayoutYAxisAnchor,multiplier: CGFloat,) -> Id; + + #[method_id(@__retain_semantics Other constraintGreaterThanOrEqualToSystemSpacingBelowAnchor:multiplier:)] + pub unsafe fn constraintGreaterThanOrEqualToSystemSpacingBelowAnchor_multiplier(&self, anchor: &NSLayoutYAxisAnchor,multiplier: CGFloat,) -> Id; + + #[method_id(@__retain_semantics Other constraintLessThanOrEqualToSystemSpacingBelowAnchor:multiplier:)] + pub unsafe fn constraintLessThanOrEqualToSystemSpacingBelowAnchor_multiplier(&self, anchor: &NSLayoutYAxisAnchor,multiplier: CGFloat,) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/NSLayoutConstraint.rs b/crates/icrate-generated/src/UIKit/generated/NSLayoutConstraint.rs new file mode 100644 index 000000000..4a3159b0d --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/NSLayoutConstraint.rs @@ -0,0 +1,187 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +pub type UILayoutPriority = c_float; + +extern_static!(UILayoutPriorityRequired: UILayoutPriority = 1000); + +extern_static!(UILayoutPriorityDefaultHigh: UILayoutPriority = 750); + +extern_static!(UILayoutPriorityDragThatCanResizeScene: UILayoutPriority = 510); + +extern_static!(UILayoutPrioritySceneSizeStayPut: UILayoutPriority = 500); + +extern_static!(UILayoutPriorityDragThatCannotResizeScene: UILayoutPriority = 490); + +extern_static!(UILayoutPriorityDefaultLow: UILayoutPriority = 250); + +extern_static!(UILayoutPriorityFittingSizeLevel: UILayoutPriority = 50); + +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, + NSLayoutAttributeLeftMargin = 13, + NSLayoutAttributeRightMargin = 14, + NSLayoutAttributeTopMargin = 15, + NSLayoutAttributeBottomMargin = 16, + NSLayoutAttributeLeadingMargin = 17, + NSLayoutAttributeTrailingMargin = 18, + NSLayoutAttributeCenterXWithinMargins = 19, + NSLayoutAttributeCenterYWithinMargins = 20, + NSLayoutAttributeNotAnAttribute = 0, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSLayoutFormatOptions { + NSLayoutFormatAlignAllLeft = 1<>,views: &NSDictionary,) -> Id, Shared>; + + #[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,relation: NSLayoutRelation,view2: Option<&Object>,attr2: NSLayoutAttribute,multiplier: CGFloat,c: CGFloat,) -> Id; + + #[method(priority)] + pub unsafe fn priority(&self, ) -> UILayoutPriority; + + #[method(setPriority:)] + pub unsafe fn setPriority(&self, priority: UILayoutPriority,); + + #[method(shouldBeArchived)] + pub unsafe fn shouldBeArchived(&self, ) -> bool; + + #[method(setShouldBeArchived:)] + pub unsafe fn setShouldBeArchived(&self, shouldBeArchived: bool,); + + #[method_id(@__retain_semantics Other firstItem)] + pub unsafe fn firstItem(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other firstAnchor)] + pub unsafe fn firstAnchor(&self, ) -> Id; + + #[method_id(@__retain_semantics Other 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!( + /// NSIdentifier + unsafe impl NSLayoutConstraint { + #[method_id(@__retain_semantics Other identifier)] + pub unsafe fn identifier(&self, ) -> Option>; + + #[method(setIdentifier:)] + pub unsafe fn setIdentifier(&self, identifier: Option<&NSString>,); + + } +); + +extern_protocol!( + pub struct UILayoutSupport; + + unsafe impl UILayoutSupport { + #[method(length)] + pub unsafe fn length(&self, ) -> CGFloat; + + #[method_id(@__retain_semantics Other topAnchor)] + pub unsafe fn topAnchor(&self, ) -> Id; + + #[method_id(@__retain_semantics Other bottomAnchor)] + pub unsafe fn bottomAnchor(&self, ) -> Id; + + #[method_id(@__retain_semantics Other heightAnchor)] + pub unsafe fn heightAnchor(&self, ) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/NSLayoutManager.rs b/crates/icrate-generated/src/UIKit/generated/NSLayoutManager.rs new file mode 100644 index 000000000..2670c79ab --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/NSLayoutManager.rs @@ -0,0 +1,419 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +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, + } +); + +extern_protocol!( + pub struct NSTextLayoutOrientationProvider; + + unsafe impl NSTextLayoutOrientationProvider { + #[method(layoutOrientation)] + pub unsafe fn layoutOrientation(&self, ) -> NSTextLayoutOrientation; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct NSLayoutManager; + + unsafe impl ClassType for NSLayoutManager { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSLayoutManager { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method_id(@__retain_semantics Other textStorage)] + pub unsafe fn textStorage(&self, ) -> Option>; + + #[method(setTextStorage:)] + pub unsafe fn setTextStorage(&self, textStorage: Option<&NSTextStorage>,); + + #[method_id(@__retain_semantics Other 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_id(@__retain_semantics Other 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(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(usesDefaultHyphenation)] + pub unsafe fn usesDefaultHyphenation(&self, ) -> bool; + + #[method(setUsesDefaultHyphenation:)] + pub unsafe fn setUsesDefaultHyphenation(&self, usesDefaultHyphenation: bool,); + + #[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: CGRect,container: &NSTextContainer,); + + #[method(setGlyphs:properties:characterIndexes:font:forGlyphRange:)] + pub unsafe fn setGlyphs_properties_characterIndexes_font_forGlyphRange(&self, glyphs: NonNull,props: NonNull,charIndexes: NonNull,aFont: &UIFont,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: CGRect,glyphRange: NSRange,usedRect: CGRect,); + + #[method(setExtraLineFragmentRect:usedRect:textContainer:)] + pub unsafe fn setExtraLineFragmentRect_usedRect_textContainer(&self, fragmentRect: CGRect,usedRect: CGRect,container: &NSTextContainer,); + + #[method(setLocation:forStartOfGlyphRange:)] + pub unsafe fn setLocation_forStartOfGlyphRange(&self, location: CGPoint,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: CGSize,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(@__retain_semantics Other textContainerForGlyphAtIndex:effectiveRange:)] + pub unsafe fn textContainerForGlyphAtIndex_effectiveRange(&self, glyphIndex: NSUInteger,effectiveGlyphRange: NSRangePointer,) -> Option>; + + #[method_id(@__retain_semantics Other 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,) -> CGRect; + + #[method(lineFragmentRectForGlyphAtIndex:effectiveRange:)] + pub unsafe fn lineFragmentRectForGlyphAtIndex_effectiveRange(&self, glyphIndex: NSUInteger,effectiveGlyphRange: NSRangePointer,) -> CGRect; + + #[method(lineFragmentRectForGlyphAtIndex:effectiveRange:withoutAdditionalLayout:)] + pub unsafe fn lineFragmentRectForGlyphAtIndex_effectiveRange_withoutAdditionalLayout(&self, glyphIndex: NSUInteger,effectiveGlyphRange: NSRangePointer,flag: bool,) -> CGRect; + + #[method(lineFragmentUsedRectForGlyphAtIndex:effectiveRange:)] + pub unsafe fn lineFragmentUsedRectForGlyphAtIndex_effectiveRange(&self, glyphIndex: NSUInteger,effectiveGlyphRange: NSRangePointer,) -> CGRect; + + #[method(lineFragmentUsedRectForGlyphAtIndex:effectiveRange:withoutAdditionalLayout:)] + pub unsafe fn lineFragmentUsedRectForGlyphAtIndex_effectiveRange_withoutAdditionalLayout(&self, glyphIndex: NSUInteger,effectiveGlyphRange: NSRangePointer,flag: bool,) -> CGRect; + + #[method(extraLineFragmentRect)] + pub unsafe fn extraLineFragmentRect(&self, ) -> CGRect; + + #[method(extraLineFragmentUsedRect)] + pub unsafe fn extraLineFragmentUsedRect(&self, ) -> CGRect; + + #[method_id(@__retain_semantics Other extraLineFragmentTextContainer)] + pub unsafe fn extraLineFragmentTextContainer(&self, ) -> Option>; + + #[method(locationForGlyphAtIndex:)] + pub unsafe fn locationForGlyphAtIndex(&self, glyphIndex: NSUInteger,) -> CGPoint; + + #[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,) -> CGSize; + + #[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,) -> CGRect; + + #[method(glyphRangeForBoundingRect:inTextContainer:)] + pub unsafe fn glyphRangeForBoundingRect_inTextContainer(&self, bounds: CGRect,container: &NSTextContainer,) -> NSRange; + + #[method(glyphRangeForBoundingRectWithoutAdditionalLayout:inTextContainer:)] + pub unsafe fn glyphRangeForBoundingRectWithoutAdditionalLayout_inTextContainer(&self, bounds: CGRect,container: &NSTextContainer,) -> NSRange; + + #[method(glyphIndexForPoint:inTextContainer:fractionOfDistanceThroughGlyph:)] + pub unsafe fn glyphIndexForPoint_inTextContainer_fractionOfDistanceThroughGlyph(&self, point: CGPoint,container: &NSTextContainer,partialFraction: *mut CGFloat,) -> NSUInteger; + + #[method(glyphIndexForPoint:inTextContainer:)] + pub unsafe fn glyphIndexForPoint_inTextContainer(&self, point: CGPoint,container: &NSTextContainer,) -> NSUInteger; + + #[method(fractionOfDistanceThroughGlyphForPoint:inTextContainer:)] + pub unsafe fn fractionOfDistanceThroughGlyphForPoint_inTextContainer(&self, point: CGPoint,container: &NSTextContainer,) -> CGFloat; + + #[method(characterIndexForPoint:inTextContainer:fractionOfDistanceBetweenInsertionPoints:)] + pub unsafe fn characterIndexForPoint_inTextContainer_fractionOfDistanceBetweenInsertionPoints(&self, point: CGPoint,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: &Block<(CGRect, CGRect, NonNull, NSRange, NonNull, ), ()>,); + + #[method(enumerateEnclosingRectsForGlyphRange:withinSelectedGlyphRange:inTextContainer:usingBlock:)] + pub unsafe fn enumerateEnclosingRectsForGlyphRange_withinSelectedGlyphRange_inTextContainer_usingBlock(&self, glyphRange: NSRange,selectedRange: NSRange,textContainer: &NSTextContainer,block: &Block<(CGRect, NonNull, ), ()>,); + + #[method(drawBackgroundForGlyphRange:atPoint:)] + pub unsafe fn drawBackgroundForGlyphRange_atPoint(&self, glyphsToShow: NSRange,origin: CGPoint,); + + #[method(drawGlyphsForGlyphRange:atPoint:)] + pub unsafe fn drawGlyphsForGlyphRange_atPoint(&self, glyphsToShow: NSRange,origin: CGPoint,); + + #[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: &UIFont,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: &UIColor,); + + #[method(drawUnderlineForGlyphRange:underlineType:baselineOffset:lineFragmentRect:lineFragmentGlyphRange:containerOrigin:)] + pub unsafe fn drawUnderlineForGlyphRange_underlineType_baselineOffset_lineFragmentRect_lineFragmentGlyphRange_containerOrigin(&self, glyphRange: NSRange,underlineVal: NSUnderlineStyle,baselineOffset: CGFloat,lineRect: CGRect,lineGlyphRange: NSRange,containerOrigin: CGPoint,); + + #[method(underlineGlyphRange:underlineType:lineFragmentRect:lineFragmentGlyphRange:containerOrigin:)] + pub unsafe fn underlineGlyphRange_underlineType_lineFragmentRect_lineFragmentGlyphRange_containerOrigin(&self, glyphRange: NSRange,underlineVal: NSUnderlineStyle,lineRect: CGRect,lineGlyphRange: NSRange,containerOrigin: CGPoint,); + + #[method(drawStrikethroughForGlyphRange:strikethroughType:baselineOffset:lineFragmentRect:lineFragmentGlyphRange:containerOrigin:)] + pub unsafe fn drawStrikethroughForGlyphRange_strikethroughType_baselineOffset_lineFragmentRect_lineFragmentGlyphRange_containerOrigin(&self, glyphRange: NSRange,strikethroughVal: NSUnderlineStyle,baselineOffset: CGFloat,lineRect: CGRect,lineGlyphRange: NSRange,containerOrigin: CGPoint,); + + #[method(strikethroughGlyphRange:strikethroughType:lineFragmentRect:lineFragmentGlyphRange:containerOrigin:)] + pub unsafe fn strikethroughGlyphRange_strikethroughType_lineFragmentRect_lineFragmentGlyphRange_containerOrigin(&self, glyphRange: NSRange,strikethroughVal: NSUnderlineStyle,lineRect: CGRect,lineGlyphRange: NSRange,containerOrigin: CGPoint,); + + } +); + +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: &UIFont,glyphRange: NSRange,) -> NSUInteger; + + #[optional] + #[method(layoutManager:lineSpacingAfterGlyphAtIndex:withProposedLineFragmentRect:)] + pub unsafe fn layoutManager_lineSpacingAfterGlyphAtIndex_withProposedLineFragmentRect(&self, layoutManager: &NSLayoutManager,glyphIndex: NSUInteger,rect: CGRect,) -> CGFloat; + + #[optional] + #[method(layoutManager:paragraphSpacingBeforeGlyphAtIndex:withProposedLineFragmentRect:)] + pub unsafe fn layoutManager_paragraphSpacingBeforeGlyphAtIndex_withProposedLineFragmentRect(&self, layoutManager: &NSLayoutManager,glyphIndex: NSUInteger,rect: CGRect,) -> CGFloat; + + #[optional] + #[method(layoutManager:paragraphSpacingAfterGlyphAtIndex:withProposedLineFragmentRect:)] + pub unsafe fn layoutManager_paragraphSpacingAfterGlyphAtIndex_withProposedLineFragmentRect(&self, layoutManager: &NSLayoutManager,glyphIndex: NSUInteger,rect: CGRect,) -> 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: CGRect,glyphPosition: CGPoint,charIndex: NSUInteger,) -> CGRect; + + #[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: CGSize,); + + } +); + +extern_enum!( + #[underlying(c_uint)] + pub enum { + NSControlCharacterZeroAdvancementAction = NSControlCharacterActionZeroAdvancement, + NSControlCharacterWhitespaceAction = NSControlCharacterActionWhitespace, + NSControlCharacterHorizontalTabAction = NSControlCharacterActionHorizontalTab, + NSControlCharacterLineBreakAction = NSControlCharacterActionLineBreak, + NSControlCharacterParagraphBreakAction = NSControlCharacterActionParagraphBreak, + NSControlCharacterContainerBreakAction = NSControlCharacterActionContainerBreak, + } +); + +extern_methods!( + /// NSLayoutManagerDeprecated + unsafe impl NSLayoutManager { + #[method(glyphAtIndex:isValidIndex:)] + pub unsafe fn glyphAtIndex_isValidIndex(&self, glyphIndex: NSUInteger,isValidIndex: *mut Bool,) -> CGGlyph; + + #[method(glyphAtIndex:)] + pub unsafe fn glyphAtIndex(&self, glyphIndex: NSUInteger,) -> CGGlyph; + + #[method(hyphenationFactor)] + pub unsafe fn hyphenationFactor(&self, ) -> CGFloat; + + #[method(setHyphenationFactor:)] + pub unsafe fn setHyphenationFactor(&self, hyphenationFactor: CGFloat,); + + #[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: &UIFont,textMatrix: CGAffineTransform,attributes: &NSDictionary,graphicsContext: CGContextRef,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/NSParagraphStyle.rs b/crates/icrate-generated/src/UIKit/generated/NSParagraphStyle.rs new file mode 100644 index 000000000..2bb5fe1c3 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/NSParagraphStyle.rs @@ -0,0 +1,273 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + 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_static!(NSTabColumnTerminatorsAttributeName: &'static NSTextTabOptionKey); + +extern_class!( + #[derive(Debug)] + pub struct NSTextTab; + + unsafe impl ClassType for NSTextTab { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSTextTab { + #[method_id(@__retain_semantics Other columnTerminatorsForLocale:)] + pub unsafe fn columnTerminatorsForLocale(aLocale: Option<&NSLocale>,) -> Id; + + #[method_id(@__retain_semantics Init initWithTextAlignment:location:options:)] + pub unsafe fn initWithTextAlignment_location_options(this: Option>, 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(@__retain_semantics Other 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(@__retain_semantics Other 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(@__retain_semantics Other tabStops)] + pub unsafe fn tabStops(&self, ) -> Id, Shared>; + + #[method(defaultTabInterval)] + pub unsafe fn defaultTabInterval(&self, ) -> CGFloat; + + #[method_id(@__retain_semantics Other textLists)] + pub unsafe fn textLists(&self, ) -> Id, Shared>; + + #[method(allowsDefaultTighteningForTruncation)] + pub unsafe fn allowsDefaultTighteningForTruncation(&self, ) -> bool; + + #[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(@__retain_semantics Other 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(lineBreakStrategy)] + pub unsafe fn lineBreakStrategy(&self, ) -> NSLineBreakStrategy; + + #[method(setLineBreakStrategy:)] + pub unsafe fn setLineBreakStrategy(&self, lineBreakStrategy: NSLineBreakStrategy,); + + #[method_id(@__retain_semantics Other textLists)] + pub unsafe fn textLists(&self, ) -> Id, Shared>; + + #[method(setTextLists:)] + pub unsafe fn setTextLists(&self, textLists: &NSArray,); + + #[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,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/NSShadow.rs b/crates/icrate-generated/src/UIKit/generated/NSShadow.rs new file mode 100644 index 000000000..a7d789b02 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/NSShadow.rs @@ -0,0 +1,42 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct NSShadow; + + unsafe impl ClassType for NSShadow { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSShadow { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method(shadowOffset)] + pub unsafe fn shadowOffset(&self, ) -> CGSize; + + #[method(setShadowOffset:)] + pub unsafe fn setShadowOffset(&self, shadowOffset: CGSize,); + + #[method(shadowBlurRadius)] + pub unsafe fn shadowBlurRadius(&self, ) -> CGFloat; + + #[method(setShadowBlurRadius:)] + pub unsafe fn setShadowBlurRadius(&self, shadowBlurRadius: CGFloat,); + + #[method_id(@__retain_semantics Other shadowColor)] + pub unsafe fn shadowColor(&self, ) -> Option>; + + #[method(setShadowColor:)] + pub unsafe fn setShadowColor(&self, shadowColor: Option<&Object>,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/NSStringDrawing.rs b/crates/icrate-generated/src/UIKit/generated/NSStringDrawing.rs new file mode 100644 index 000000000..fec1834ef --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/NSStringDrawing.rs @@ -0,0 +1,109 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +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, ) -> CGRect; + + } +); + +extern_methods!( + /// NSStringDrawing + unsafe impl NSString { + #[method(sizeWithAttributes:)] + pub unsafe fn sizeWithAttributes(&self, attrs: Option<&NSDictionary>,) -> CGSize; + + #[method(drawAtPoint:withAttributes:)] + pub unsafe fn drawAtPoint_withAttributes(&self, point: CGPoint,attrs: Option<&NSDictionary>,); + + #[method(drawInRect:withAttributes:)] + pub unsafe fn drawInRect_withAttributes(&self, rect: CGRect,attrs: Option<&NSDictionary>,); + + } +); + +extern_methods!( + /// NSStringDrawing + unsafe impl NSAttributedString { + #[method(size)] + pub unsafe fn size(&self, ) -> CGSize; + + #[method(drawAtPoint:)] + pub unsafe fn drawAtPoint(&self, point: CGPoint,); + + #[method(drawInRect:)] + pub unsafe fn drawInRect(&self, rect: CGRect,); + + } +); + +ns_options!( + #[underlying(NSInteger)] + pub enum NSStringDrawingOptions { + NSStringDrawingUsesLineFragmentOrigin = 1<<0, + NSStringDrawingUsesFontLeading = 1<<1, + NSStringDrawingUsesDeviceMetrics = 1<<3, + NSStringDrawingTruncatesLastVisibleLine = 1<<5, + } +); + +extern_methods!( + /// NSExtendedStringDrawing + unsafe impl NSString { + #[method(drawWithRect:options:attributes:context:)] + pub unsafe fn drawWithRect_options_attributes_context(&self, rect: CGRect,options: NSStringDrawingOptions,attributes: Option<&NSDictionary>,context: Option<&NSStringDrawingContext>,); + + #[method(boundingRectWithSize:options:attributes:context:)] + pub unsafe fn boundingRectWithSize_options_attributes_context(&self, size: CGSize,options: NSStringDrawingOptions,attributes: Option<&NSDictionary>,context: Option<&NSStringDrawingContext>,) -> CGRect; + + } +); + +extern_methods!( + /// NSExtendedStringDrawing + unsafe impl NSAttributedString { + #[method(drawWithRect:options:context:)] + pub unsafe fn drawWithRect_options_context(&self, rect: CGRect,options: NSStringDrawingOptions,context: Option<&NSStringDrawingContext>,); + + #[method(boundingRectWithSize:options:context:)] + pub unsafe fn boundingRectWithSize_options_context(&self, size: CGSize,options: NSStringDrawingOptions,context: Option<&NSStringDrawingContext>,) -> CGRect; + + } +); + +extern_methods!( + /// NSStringDrawingContextDeprecated + unsafe impl NSStringDrawingContext { + #[method(minimumTrackingAdjustment)] + pub unsafe fn minimumTrackingAdjustment(&self, ) -> CGFloat; + + #[method(setMinimumTrackingAdjustment:)] + pub unsafe fn setMinimumTrackingAdjustment(&self, minimumTrackingAdjustment: CGFloat,); + + #[method(actualTrackingAdjustment)] + pub unsafe fn actualTrackingAdjustment(&self, ) -> CGFloat; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/NSText.rs b/crates/icrate-generated/src/UIKit/generated/NSText.rs new file mode 100644 index 000000000..93e2c0b86 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/NSText.rs @@ -0,0 +1,32 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSTextAlignment { + NSTextAlignmentLeft = 0, + NSTextAlignmentCenter = 1, + NSTextAlignmentRight = 2, + NSTextAlignmentJustified = 3, + NSTextAlignmentNatural = 4, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSWritingDirection { + NSWritingDirectionNatural = -1, + NSWritingDirectionLeftToRight = 0, + NSWritingDirectionRightToLeft = 1, + } +); + +extern_fn!( + pub unsafe fn NSTextAlignmentToCTTextAlignment(nsTextAlignment: NSTextAlignment,) -> CTTextAlignment; +); + +extern_fn!( + pub unsafe fn NSTextAlignmentFromCTTextAlignment(ctTextAlignment: CTTextAlignment,) -> NSTextAlignment; +); + diff --git a/crates/icrate-generated/src/UIKit/generated/NSTextAttachment.rs b/crates/icrate-generated/src/UIKit/generated/NSTextAttachment.rs new file mode 100644 index 000000000..760e045a8 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/NSTextAttachment.rs @@ -0,0 +1,167 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_enum!( + #[underlying(c_uint)] + pub enum { + NSAttachmentCharacter = 0xFFFC, + } +); + +extern_protocol!( + pub struct NSTextAttachmentContainer; + + 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<&UIView>,location: &NSTextLocation,textContainer: Option<&NSTextContainer>,) -> Option>; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct NSTextAttachment; + + unsafe impl ClassType for NSTextAttachment { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSTextAttachment { + #[method_id(@__retain_semantics Init initWithData:ofType:)] + pub unsafe fn initWithData_ofType(this: Option>, contentData: Option<&NSData>,uti: Option<&NSString>,) -> Id; + + #[method_id(@__retain_semantics Other contents)] + pub unsafe fn contents(&self, ) -> Option>; + + #[method(setContents:)] + pub unsafe fn setContents(&self, contents: Option<&NSData>,); + + #[method_id(@__retain_semantics Other fileType)] + pub unsafe fn fileType(&self, ) -> Option>; + + #[method(setFileType:)] + pub unsafe fn setFileType(&self, fileType: Option<&NSString>,); + + #[method_id(@__retain_semantics Other image)] + pub unsafe fn image(&self, ) -> Option>; + + #[method(setImage:)] + pub unsafe fn setImage(&self, image: Option<&UIImage>,); + + #[method(bounds)] + pub unsafe fn bounds(&self, ) -> CGRect; + + #[method(setBounds:)] + pub unsafe fn setBounds(&self, bounds: CGRect,); + + #[method_id(@__retain_semantics Other fileWrapper)] + pub unsafe fn fileWrapper(&self, ) -> Option>; + + #[method(setFileWrapper:)] + pub unsafe fn setFileWrapper(&self, fileWrapper: Option<&NSFileWrapper>,); + + #[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<&'static 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!( + /// NSAttributedStringAttachmentConveniences + unsafe impl NSAttributedString { + #[method_id(@__retain_semantics Other 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(@__retain_semantics Init initWithTextAttachment:parentView:textLayoutManager:location:)] + pub unsafe fn initWithTextAttachment_parentView_textLayoutManager_location(this: Option>, textAttachment: &NSTextAttachment,parentView: Option<&UIView>,textLayoutManager: Option<&NSTextLayoutManager>,location: &NSTextLocation,) -> 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; + + #[method_id(@__retain_semantics Other textAttachment)] + pub unsafe fn textAttachment(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other textLayoutManager)] + pub unsafe fn textLayoutManager(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other location)] + pub unsafe fn location(&self, ) -> Id; + + #[method_id(@__retain_semantics Other view)] + pub unsafe fn view(&self, ) -> Option>; + + #[method(setView:)] + pub unsafe fn setView(&self, view: Option<&UIView>,); + + #[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; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/NSTextContainer.rs b/crates/icrate-generated/src/UIKit/generated/NSTextContainer.rs new file mode 100644 index 000000000..c509daa23 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/NSTextContainer.rs @@ -0,0 +1,84 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct NSTextContainer; + + unsafe impl ClassType for NSTextContainer { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSTextContainer { + #[method_id(@__retain_semantics Init initWithSize:)] + pub unsafe fn initWithSize(this: Option>, size: CGSize,) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Id; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other textLayoutManager)] + pub unsafe fn textLayoutManager(&self, ) -> Option>; + + #[method(size)] + pub unsafe fn size(&self, ) -> CGSize; + + #[method(setSize:)] + pub unsafe fn setSize(&self, size: CGSize,); + + #[method_id(@__retain_semantics Other 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: CGRect,characterIndex: NSUInteger,baseWritingDirection: NSWritingDirection,remainingRect: *mut CGRect,) -> CGRect; + + #[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,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/NSTextContentManager.rs b/crates/icrate-generated/src/UIKit/generated/NSTextContentManager.rs new file mode 100644 index 000000000..0820bb89a --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/NSTextContentManager.rs @@ -0,0 +1,180 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSTextContentManagerEnumerationOptions { + NSTextContentManagerEnumerationOptionsNone = 0, + NSTextContentManagerEnumerationOptionsReverse = 1<<0, + } +); + +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)] + pub struct NSTextContentManager; + + unsafe impl ClassType for NSTextContentManager { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSTextContentManager { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSTextContentManagerDelegate>,); + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other 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: Option<&Block<(*mut NSError, ), ()>>,); + + #[method_id(@__retain_semantics Other 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: &Block<(), ()>,); + + #[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,); + + } +); + +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; + + 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)] + pub struct NSTextContentStorage; + + unsafe impl ClassType for NSTextContentStorage { + type Super = NSTextContentManager; + } +); + +extern_methods!( + unsafe impl NSTextContentStorage { + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSTextContentStorageDelegate>,); + + #[method_id(@__retain_semantics Other attributedString)] + pub unsafe fn attributedString(&self, ) -> Option>; + + #[method(setAttributedString:)] + pub unsafe fn setAttributedString(&self, attributedString: Option<&NSAttributedString>,); + + #[method_id(@__retain_semantics Other attributedStringForTextElement:)] + pub unsafe fn attributedStringForTextElement(&self, textElement: &NSTextElement,) -> Option>; + + #[method_id(@__retain_semantics Other textElementForAttributedString:)] + pub unsafe fn textElementForAttributedString(&self, attributedString: &NSAttributedString,) -> 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_id(@__retain_semantics Other adjustedRangeFromRange:forEditingTextSelection:)] + pub unsafe fn adjustedRangeFromRange_forEditingTextSelection(&self, textRange: &NSTextRange,forEditingTextSelection: bool,) -> Option>; + + } +); + +extern_static!(NSTextContentStorageUnsupportedAttributeAddedNotification: &'static NSNotificationName); + diff --git a/crates/icrate-generated/src/UIKit/generated/NSTextElement.rs b/crates/icrate-generated/src/UIKit/generated/NSTextElement.rs new file mode 100644 index 000000000..1492636ee --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/NSTextElement.rs @@ -0,0 +1,68 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct NSTextElement; + + unsafe impl ClassType for NSTextElement { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSTextElement { + #[method_id(@__retain_semantics Init initWithTextContentManager:)] + pub unsafe fn initWithTextContentManager(this: Option>, textContentManager: Option<&NSTextContentManager>,) -> Id; + + #[method_id(@__retain_semantics Other textContentManager)] + pub unsafe fn textContentManager(&self, ) -> Option>; + + #[method(setTextContentManager:)] + pub unsafe fn setTextContentManager(&self, textContentManager: Option<&NSTextContentManager>,); + + #[method_id(@__retain_semantics Other elementRange)] + pub unsafe fn elementRange(&self, ) -> Option>; + + #[method(setElementRange:)] + pub unsafe fn setElementRange(&self, elementRange: Option<&NSTextRange>,); + + #[method_id(@__retain_semantics Other childElements)] + pub unsafe fn childElements(&self, ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other parentElement)] + pub unsafe fn parentElement(&self, ) -> Option>; + + #[method(isRepresentedElement)] + pub unsafe fn isRepresentedElement(&self, ) -> bool; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct NSTextParagraph; + + unsafe impl ClassType for NSTextParagraph { + type Super = NSTextElement; + } +); + +extern_methods!( + unsafe impl NSTextParagraph { + #[method_id(@__retain_semantics Init initWithAttributedString:)] + pub unsafe fn initWithAttributedString(this: Option>, attributedString: Option<&NSAttributedString>,) -> Id; + + #[method_id(@__retain_semantics Other attributedString)] + pub unsafe fn attributedString(&self, ) -> Id; + + #[method_id(@__retain_semantics Other paragraphContentRange)] + pub unsafe fn paragraphContentRange(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other paragraphSeparatorRange)] + pub unsafe fn paragraphSeparatorRange(&self, ) -> Option>; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/NSTextLayoutFragment.rs b/crates/icrate-generated/src/UIKit/generated/NSTextLayoutFragment.rs new file mode 100644 index 000000000..9ba38759a --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/NSTextLayoutFragment.rs @@ -0,0 +1,99 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +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)] + pub struct NSTextLayoutFragment; + + unsafe impl ClassType for NSTextLayoutFragment { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSTextLayoutFragment { + #[method_id(@__retain_semantics Init initWithTextElement:range:)] + pub unsafe fn initWithTextElement_range(this: Option>, textElement: &NSTextElement,rangeInElement: Option<&NSTextRange>,) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics Other textLayoutManager)] + pub unsafe fn textLayoutManager(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other textElement)] + pub unsafe fn textElement(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other rangeInElement)] + pub unsafe fn rangeInElement(&self, ) -> Id; + + #[method_id(@__retain_semantics Other textLineFragments)] + pub unsafe fn textLineFragments(&self, ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other textAttachmentViewProviders)] + pub unsafe fn textAttachmentViewProviders(&self, ) -> Id, Shared>; + + #[method(frameForTextAttachmentAtLocation:)] + pub unsafe fn frameForTextAttachmentAtLocation(&self, location: &NSTextLocation,) -> CGRect; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/NSTextLayoutManager.rs b/crates/icrate-generated/src/UIKit/generated/NSTextLayoutManager.rs new file mode 100644 index 000000000..b5b37a3c5 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/NSTextLayoutManager.rs @@ -0,0 +1,178 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +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)] + pub struct NSTextLayoutManager; + + unsafe impl ClassType for NSTextLayoutManager { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSTextLayoutManager { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other textContentManager)] + pub unsafe fn textContentManager(&self, ) -> Option>; + + #[method(replaceTextContentManager:)] + pub unsafe fn replaceTextContentManager(&self, textContentManager: &NSTextContentManager,); + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other textViewportLayoutController)] + pub unsafe fn textViewportLayoutController(&self, ) -> Id; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other textLayoutFragmentForPosition:)] + pub unsafe fn textLayoutFragmentForPosition(&self, position: CGPoint,) -> Option>; + + #[method_id(@__retain_semantics Other textLayoutFragmentForLocation:)] + pub unsafe fn textLayoutFragmentForLocation(&self, location: &NSTextLocation,) -> Option>; + + #[method_id(@__retain_semantics Other enumerateTextLayoutFragmentsFromLocation:options:usingBlock:)] + pub unsafe fn enumerateTextLayoutFragmentsFromLocation_options_usingBlock(&self, location: Option<&NSTextLocation>,options: NSTextLayoutFragmentEnumerationOptions,block: &Block<(NonNull, ), Bool>,) -> Option>; + + #[method_id(@__retain_semantics Other textSelections)] + pub unsafe fn textSelections(&self, ) -> Id, Shared>; + + #[method(setTextSelections:)] + pub unsafe fn setTextSelections(&self, textSelections: &NSArray,); + + #[method_id(@__retain_semantics Other 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: &Block<(NonNull, NonNull>, NonNull, ), Bool>,); + + #[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, ) -> *mut Block<(NonNull, NonNull, ), ()>; + + #[method(setRenderingAttributesValidator:)] + pub unsafe fn setRenderingAttributesValidator(&self, renderingAttributesValidator: Option<&Block<(NonNull, NonNull, ), ()>>,); + + #[method_id(@__retain_semantics Other linkRenderingAttributes)] + pub unsafe fn linkRenderingAttributes() -> Id, Shared>; + + #[method_id(@__retain_semantics Other 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: &Block<(*mut NSTextRange, CGRect, CGFloat, NonNull, ), Bool>,); + + #[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,); + + } +); + +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-generated/src/UIKit/generated/NSTextLineFragment.rs b/crates/icrate-generated/src/UIKit/generated/NSTextLineFragment.rs new file mode 100644 index 000000000..d26845977 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/NSTextLineFragment.rs @@ -0,0 +1,54 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct NSTextLineFragment; + + unsafe impl ClassType for NSTextLineFragment { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSTextLineFragment { + #[method_id(@__retain_semantics Init initWithAttributedString:range:)] + pub unsafe fn initWithAttributedString_range(this: Option>, attributedString: &NSAttributedString,range: NSRange,) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, aDecoder: &NSCoder,) -> Option>; + + #[method_id(@__retain_semantics Init initWithString:attributes:range:)] + pub unsafe fn initWithString_attributes_range(this: Option>, string: &NSString,attributes: &NSDictionary,range: NSRange,) -> Id; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics Other 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-generated/src/UIKit/generated/NSTextList.rs b/crates/icrate-generated/src/UIKit/generated/NSTextList.rs new file mode 100644 index 000000000..6da7b9371 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/NSTextList.rs @@ -0,0 +1,88 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSTextListOptions { + NSTextListPrependEnclosingMarker = 1<<0, + } +); + +pub type NSTextListMarkerFormat = NSString; + +extern_static!(NSTextListMarkerBox: &'static NSTextListMarkerFormat); + +extern_static!(NSTextListMarkerCheck: &'static NSTextListMarkerFormat); + +extern_static!(NSTextListMarkerCircle: &'static NSTextListMarkerFormat); + +extern_static!(NSTextListMarkerDiamond: &'static NSTextListMarkerFormat); + +extern_static!(NSTextListMarkerDisc: &'static NSTextListMarkerFormat); + +extern_static!(NSTextListMarkerHyphen: &'static NSTextListMarkerFormat); + +extern_static!(NSTextListMarkerSquare: &'static NSTextListMarkerFormat); + +extern_static!(NSTextListMarkerLowercaseHexadecimal: &'static NSTextListMarkerFormat); + +extern_static!(NSTextListMarkerUppercaseHexadecimal: &'static NSTextListMarkerFormat); + +extern_static!(NSTextListMarkerOctal: &'static NSTextListMarkerFormat); + +extern_static!(NSTextListMarkerLowercaseAlpha: &'static NSTextListMarkerFormat); + +extern_static!(NSTextListMarkerUppercaseAlpha: &'static NSTextListMarkerFormat); + +extern_static!(NSTextListMarkerLowercaseLatin: &'static NSTextListMarkerFormat); + +extern_static!(NSTextListMarkerUppercaseLatin: &'static NSTextListMarkerFormat); + +extern_static!(NSTextListMarkerLowercaseRoman: &'static NSTextListMarkerFormat); + +extern_static!(NSTextListMarkerUppercaseRoman: &'static NSTextListMarkerFormat); + +extern_static!(NSTextListMarkerDecimal: &'static NSTextListMarkerFormat); + +extern_class!( + #[derive(Debug)] + pub struct NSTextList; + + unsafe impl ClassType for NSTextList { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSTextList { + #[method_id(@__retain_semantics Init initWithMarkerFormat:options:startingItemNumber:)] + pub unsafe fn initWithMarkerFormat_options_startingItemNumber(this: Option>, markerFormat: &NSTextListMarkerFormat,options: NSTextListOptions,startingItemNumber: NSInteger,) -> Id; + + #[method_id(@__retain_semantics Init initWithMarkerFormat:options:)] + pub unsafe fn initWithMarkerFormat_options(this: Option>, markerFormat: &NSTextListMarkerFormat,options: NSUInteger,) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method_id(@__retain_semantics Other markerFormat)] + pub unsafe fn markerFormat(&self, ) -> Id; + + #[method(listOptions)] + pub unsafe fn listOptions(&self, ) -> NSTextListOptions; + + #[method(startingItemNumber)] + pub unsafe fn startingItemNumber(&self, ) -> NSInteger; + + #[method(setStartingItemNumber:)] + pub unsafe fn setStartingItemNumber(&self, startingItemNumber: NSInteger,); + + #[method(isOrdered)] + pub unsafe fn isOrdered(&self, ) -> bool; + + #[method_id(@__retain_semantics Other markerForItemNumber:)] + pub unsafe fn markerForItemNumber(&self, itemNumber: NSInteger,) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/NSTextListElement.rs b/crates/icrate-generated/src/UIKit/generated/NSTextListElement.rs new file mode 100644 index 000000000..d0c8ef269 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/NSTextListElement.rs @@ -0,0 +1,48 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct NSTextListElement; + + unsafe impl ClassType for NSTextListElement { + type Super = NSTextParagraph; + } +); + +extern_methods!( + unsafe impl NSTextListElement { + #[method_id(@__retain_semantics Init initWithParentElement:textList:contents:markerAttributes:childElements:)] + pub unsafe fn initWithParentElement_textList_contents_markerAttributes_childElements(this: Option>, parent: Option<&NSTextListElement>,textList: &NSTextList,contents: Option<&NSAttributedString>,markerAttributes: Option<&NSDictionary>,children: Option<&NSArray>,) -> Id; + + #[method_id(@__retain_semantics Init initWithAttributedString:)] + pub unsafe fn initWithAttributedString(this: Option>, attributedString: Option<&NSAttributedString>,) -> Id; + + #[method_id(@__retain_semantics Other textListElementWithContents:markerAttributes:textList:childElements:)] + pub unsafe fn textListElementWithContents_markerAttributes_textList_childElements(contents: &NSAttributedString,markerAttributes: Option<&NSDictionary>,textList: &NSTextList,children: Option<&NSArray>,) -> Id; + + #[method_id(@__retain_semantics Other textListElementWithChildElements:textList:nestingLevel:)] + pub unsafe fn textListElementWithChildElements_textList_nestingLevel(children: &NSArray,textList: &NSTextList,nestingLevel: NSInteger,) -> Option>; + + #[method_id(@__retain_semantics Other textList)] + pub unsafe fn textList(&self, ) -> Id; + + #[method_id(@__retain_semantics Other contents)] + pub unsafe fn contents(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other markerAttributes)] + pub unsafe fn markerAttributes(&self, ) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other attributedString)] + pub unsafe fn attributedString(&self, ) -> Id; + + #[method_id(@__retain_semantics Other childElements)] + pub unsafe fn childElements(&self, ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other parentElement)] + pub unsafe fn parentElement(&self, ) -> Option>; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/NSTextRange.rs b/crates/icrate-generated/src/UIKit/generated/NSTextRange.rs new file mode 100644 index 000000000..6bc268e20 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/NSTextRange.rs @@ -0,0 +1,67 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_protocol!( + pub struct NSTextLocation; + + unsafe impl NSTextLocation { + #[method(compare:)] + pub unsafe fn compare(&self, location: &NSTextLocation,) -> NSComparisonResult; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct NSTextRange; + + unsafe impl ClassType for NSTextRange { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSTextRange { + #[method_id(@__retain_semantics Init initWithLocation:endLocation:)] + pub unsafe fn initWithLocation_endLocation(this: Option>, location: &NSTextLocation,endLocation: Option<&NSTextLocation>,) -> Option>; + + #[method_id(@__retain_semantics Init initWithLocation:)] + pub unsafe fn initWithLocation(this: Option>, location: &NSTextLocation,) -> 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; + + #[method(isEmpty)] + pub unsafe fn isEmpty(&self, ) -> bool; + + #[method_id(@__retain_semantics Other location)] + pub unsafe fn location(&self, ) -> Id; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other textRangeByIntersectingWithTextRange:)] + pub unsafe fn textRangeByIntersectingWithTextRange(&self, textRange: &NSTextRange,) -> Option>; + + #[method_id(@__retain_semantics Other textRangeByFormingUnionWithTextRange:)] + pub unsafe fn textRangeByFormingUnionWithTextRange(&self, textRange: &NSTextRange,) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/NSTextSelection.rs b/crates/icrate-generated/src/UIKit/generated/NSTextSelection.rs new file mode 100644 index 000000000..cb5a82c43 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/NSTextSelection.rs @@ -0,0 +1,91 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +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)] + pub struct NSTextSelection; + + unsafe impl ClassType for NSTextSelection { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSTextSelection { + #[method_id(@__retain_semantics Init initWithRanges:affinity:granularity:)] + pub unsafe fn initWithRanges_affinity_granularity(this: Option>, textRanges: &NSArray,affinity: NSTextSelectionAffinity,granularity: NSTextSelectionGranularity,) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method_id(@__retain_semantics Init initWithRange:affinity:granularity:)] + pub unsafe fn initWithRange_affinity_granularity(this: Option>, range: &NSTextRange,affinity: NSTextSelectionAffinity,granularity: NSTextSelectionGranularity,) -> Id; + + #[method_id(@__retain_semantics Init initWithLocation:affinity:)] + pub unsafe fn initWithLocation_affinity(this: Option>, location: &NSTextLocation,affinity: NSTextSelectionAffinity,) -> Id; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other secondarySelectionLocation)] + pub unsafe fn secondarySelectionLocation(&self, ) -> Option>; + + #[method(setSecondarySelectionLocation:)] + pub unsafe fn setSecondarySelectionLocation(&self, secondarySelectionLocation: Option<&NSTextLocation>,); + + #[method_id(@__retain_semantics Other typingAttributes)] + pub unsafe fn typingAttributes(&self, ) -> Id, Shared>; + + #[method(setTypingAttributes:)] + pub unsafe fn setTypingAttributes(&self, typingAttributes: &NSDictionary,); + + #[method_id(@__retain_semantics Other textSelectionWithTextRanges:)] + pub unsafe fn textSelectionWithTextRanges(&self, textRanges: &NSArray,) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/NSTextSelectionNavigation.rs b/crates/icrate-generated/src/UIKit/generated/NSTextSelectionNavigation.rs new file mode 100644 index 000000000..c9f283dc7 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/NSTextSelectionNavigation.rs @@ -0,0 +1,152 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +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)] + pub struct NSTextSelectionNavigation; + + unsafe impl ClassType for NSTextSelectionNavigation { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSTextSelectionNavigation { + #[method_id(@__retain_semantics Init initWithDataSource:)] + pub unsafe fn initWithDataSource(this: Option>, dataSource: &NSTextSelectionDataSource,) -> 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 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(@__retain_semantics Other 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(@__retain_semantics Other 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(@__retain_semantics Other textSelectionForSelectionGranularity:enclosingTextSelection:)] + pub unsafe fn textSelectionForSelectionGranularity_enclosingTextSelection(&self, selectionGranularity: NSTextSelectionGranularity,textSelection: &NSTextSelection,) -> Id; + + #[method_id(@__retain_semantics Other textSelectionForSelectionGranularity:enclosingPoint:inContainerAtLocation:)] + pub unsafe fn textSelectionForSelectionGranularity_enclosingPoint_inContainerAtLocation(&self, selectionGranularity: NSTextSelectionGranularity,point: CGPoint,location: &NSTextLocation,) -> Option>; + + #[method_id(@__retain_semantics Other resolvedInsertionLocationForTextSelection:writingDirection:)] + pub unsafe fn resolvedInsertionLocationForTextSelection_writingDirection(&self, textSelection: &NSTextSelection,writingDirection: NSTextSelectionNavigationWritingDirection,) -> Option>; + + #[method_id(@__retain_semantics Other deletionRangesForTextSelection:direction:destination:allowsDecomposition:)] + pub unsafe fn deletionRangesForTextSelection_direction_destination_allowsDecomposition(&self, textSelection: &NSTextSelection,direction: NSTextSelectionNavigationDirection,destination: NSTextSelectionNavigationDestination,allowsDecomposition: bool,) -> Id, Shared>; + + } +); + +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-generated/src/UIKit/generated/NSTextStorage.rs b/crates/icrate-generated/src/UIKit/generated/NSTextStorage.rs new file mode 100644 index 000000000..24ad07e97 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/NSTextStorage.rs @@ -0,0 +1,109 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSTextStorageEditActions { + NSTextStorageEditedAttributes = 1<<0, + NSTextStorageEditedCharacters = 1<<1, + } +); + +extern_class!( + #[derive(Debug)] + pub struct NSTextStorage; + + unsafe impl ClassType for NSTextStorage { + type Super = NSMutableAttributedString; + } +); + +extern_methods!( + unsafe impl NSTextStorage { + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other 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(@__retain_semantics Other textStorageObserver)] + pub unsafe fn textStorageObserver(&self, ) -> Option>; + + #[method(setTextStorageObserver:)] + pub unsafe fn setTextStorageObserver(&self, textStorageObserver: Option<&NSTextStorageObserving>,); + + } +); + +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); + +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<(), ()>,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/NSTextViewportLayoutController.rs b/crates/icrate-generated/src/UIKit/generated/NSTextViewportLayoutController.rs new file mode 100644 index 000000000..e8ec9cd06 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/NSTextViewportLayoutController.rs @@ -0,0 +1,72 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +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)] + pub struct NSTextViewportLayoutController; + + unsafe impl ClassType for NSTextViewportLayoutController { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSTextViewportLayoutController { + #[method_id(@__retain_semantics Init initWithTextLayoutManager:)] + pub unsafe fn initWithTextLayoutManager(this: Option>, textLayoutManager: &NSTextLayoutManager,) -> 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 delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSTextViewportLayoutControllerDelegate>,); + + #[method_id(@__retain_semantics Other textLayoutManager)] + pub unsafe fn textLayoutManager(&self, ) -> Option>; + + #[method(viewportBounds)] + pub unsafe fn viewportBounds(&self, ) -> CGRect; + + #[method_id(@__retain_semantics Other 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-generated/src/UIKit/generated/NSToolbar+UIKitAdditions.rs b/crates/icrate-generated/src/UIKit/generated/NSToolbar+UIKitAdditions.rs new file mode 100644 index 000000000..bc88fc826 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/NSToolbar+UIKitAdditions.rs @@ -0,0 +1,4 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + diff --git a/crates/icrate-generated/src/UIKit/generated/NSTouchBar+UIKitAdditions.rs b/crates/icrate-generated/src/UIKit/generated/NSTouchBar+UIKitAdditions.rs new file mode 100644 index 000000000..bc88fc826 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/NSTouchBar+UIKitAdditions.rs @@ -0,0 +1,4 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + diff --git a/crates/icrate-generated/src/UIKit/generated/NSUserActivity+NSItemProvider.rs b/crates/icrate-generated/src/UIKit/generated/NSUserActivity+NSItemProvider.rs new file mode 100644 index 000000000..7f7cc66c5 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/NSUserActivity+NSItemProvider.rs @@ -0,0 +1,10 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_methods!( + /// NSItemProvider + unsafe impl NSUserActivity { + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/PrintKitUI.rs b/crates/icrate-generated/src/UIKit/generated/PrintKitUI.rs new file mode 100644 index 000000000..bc88fc826 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/PrintKitUI.rs @@ -0,0 +1,4 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + diff --git a/crates/icrate-generated/src/UIKit/generated/ShareSheet.rs b/crates/icrate-generated/src/UIKit/generated/ShareSheet.rs new file mode 100644 index 000000000..bc88fc826 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/ShareSheet.rs @@ -0,0 +1,4 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + diff --git a/crates/icrate-generated/src/UIKit/generated/UIAccelerometer.rs b/crates/icrate-generated/src/UIKit/generated/UIAccelerometer.rs new file mode 100644 index 000000000..a70cc29b6 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIAccelerometer.rs @@ -0,0 +1,72 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +pub type UIAccelerationValue = c_double; + +extern_class!( + #[derive(Debug)] + pub struct UIAcceleration; + + unsafe impl ClassType for UIAcceleration { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIAcceleration { + #[method(timestamp)] + pub unsafe fn timestamp(&self, ) -> NSTimeInterval; + + #[method(x)] + pub unsafe fn x(&self, ) -> UIAccelerationValue; + + #[method(y)] + pub unsafe fn y(&self, ) -> UIAccelerationValue; + + #[method(z)] + pub unsafe fn z(&self, ) -> UIAccelerationValue; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIAccelerometer; + + unsafe impl ClassType for UIAccelerometer { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIAccelerometer { + #[method_id(@__retain_semantics Other sharedAccelerometer)] + pub unsafe fn sharedAccelerometer() -> Id; + + #[method(updateInterval)] + pub unsafe fn updateInterval(&self, ) -> NSTimeInterval; + + #[method(setUpdateInterval:)] + pub unsafe fn setUpdateInterval(&self, updateInterval: NSTimeInterval,); + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&UIAccelerometerDelegate>,); + + } +); + +extern_protocol!( + pub struct UIAccelerometerDelegate; + + unsafe impl UIAccelerometerDelegate { + #[optional] + #[method(accelerometer:didAccelerate:)] + pub unsafe fn accelerometer_didAccelerate(&self, accelerometer: &UIAccelerometer,acceleration: &UIAcceleration,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIAccessibility.rs b/crates/icrate-generated/src/UIKit/generated/UIAccessibility.rs new file mode 100644 index 000000000..97e4d0ff3 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIAccessibility.rs @@ -0,0 +1,399 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_fn!( + pub unsafe fn UIAccessibilityConvertFrameToScreenCoordinates(rect: CGRect,view: &UIView,) -> CGRect; +); + +extern_fn!( + pub unsafe fn UIAccessibilityConvertPathToScreenCoordinates(path: &UIBezierPath,view: &UIView,) -> NonNull; +); + +extern_methods!( + /// UIAccessibility + unsafe impl NSObject { + #[method(isAccessibilityElement)] + pub unsafe fn isAccessibilityElement(&self, ) -> bool; + + #[method(setIsAccessibilityElement:)] + pub unsafe fn setIsAccessibilityElement(&self, isAccessibilityElement: bool,); + + #[method_id(@__retain_semantics Other accessibilityLabel)] + pub unsafe fn accessibilityLabel(&self, ) -> Option>; + + #[method(setAccessibilityLabel:)] + pub unsafe fn setAccessibilityLabel(&self, accessibilityLabel: Option<&NSString>,); + + #[method_id(@__retain_semantics Other accessibilityAttributedLabel)] + pub unsafe fn accessibilityAttributedLabel(&self, ) -> Option>; + + #[method(setAccessibilityAttributedLabel:)] + pub unsafe fn setAccessibilityAttributedLabel(&self, accessibilityAttributedLabel: Option<&NSAttributedString>,); + + #[method_id(@__retain_semantics Other accessibilityHint)] + pub unsafe fn accessibilityHint(&self, ) -> Option>; + + #[method(setAccessibilityHint:)] + pub unsafe fn setAccessibilityHint(&self, accessibilityHint: Option<&NSString>,); + + #[method_id(@__retain_semantics Other accessibilityAttributedHint)] + pub unsafe fn accessibilityAttributedHint(&self, ) -> Option>; + + #[method(setAccessibilityAttributedHint:)] + pub unsafe fn setAccessibilityAttributedHint(&self, accessibilityAttributedHint: Option<&NSAttributedString>,); + + #[method_id(@__retain_semantics Other accessibilityValue)] + pub unsafe fn accessibilityValue(&self, ) -> Option>; + + #[method(setAccessibilityValue:)] + pub unsafe fn setAccessibilityValue(&self, accessibilityValue: Option<&NSString>,); + + #[method_id(@__retain_semantics Other accessibilityAttributedValue)] + pub unsafe fn accessibilityAttributedValue(&self, ) -> Option>; + + #[method(setAccessibilityAttributedValue:)] + pub unsafe fn setAccessibilityAttributedValue(&self, accessibilityAttributedValue: Option<&NSAttributedString>,); + + #[method(accessibilityTraits)] + pub unsafe fn accessibilityTraits(&self, ) -> UIAccessibilityTraits; + + #[method(setAccessibilityTraits:)] + pub unsafe fn setAccessibilityTraits(&self, accessibilityTraits: UIAccessibilityTraits,); + + #[method(accessibilityFrame)] + pub unsafe fn accessibilityFrame(&self, ) -> CGRect; + + #[method(setAccessibilityFrame:)] + pub unsafe fn setAccessibilityFrame(&self, accessibilityFrame: CGRect,); + + #[method_id(@__retain_semantics Other accessibilityPath)] + pub unsafe fn accessibilityPath(&self, ) -> Option>; + + #[method(setAccessibilityPath:)] + pub unsafe fn setAccessibilityPath(&self, accessibilityPath: Option<&UIBezierPath>,); + + #[method(accessibilityActivationPoint)] + pub unsafe fn accessibilityActivationPoint(&self, ) -> CGPoint; + + #[method(setAccessibilityActivationPoint:)] + pub unsafe fn setAccessibilityActivationPoint(&self, accessibilityActivationPoint: CGPoint,); + + #[method_id(@__retain_semantics Other accessibilityLanguage)] + pub unsafe fn accessibilityLanguage(&self, ) -> Option>; + + #[method(setAccessibilityLanguage:)] + pub unsafe fn setAccessibilityLanguage(&self, accessibilityLanguage: Option<&NSString>,); + + #[method(accessibilityElementsHidden)] + pub unsafe fn accessibilityElementsHidden(&self, ) -> bool; + + #[method(setAccessibilityElementsHidden:)] + pub unsafe fn setAccessibilityElementsHidden(&self, accessibilityElementsHidden: bool,); + + #[method(accessibilityViewIsModal)] + pub unsafe fn accessibilityViewIsModal(&self, ) -> bool; + + #[method(setAccessibilityViewIsModal:)] + pub unsafe fn setAccessibilityViewIsModal(&self, accessibilityViewIsModal: bool,); + + #[method(shouldGroupAccessibilityChildren)] + pub unsafe fn shouldGroupAccessibilityChildren(&self, ) -> bool; + + #[method(setShouldGroupAccessibilityChildren:)] + pub unsafe fn setShouldGroupAccessibilityChildren(&self, shouldGroupAccessibilityChildren: bool,); + + #[method(accessibilityNavigationStyle)] + pub unsafe fn accessibilityNavigationStyle(&self, ) -> UIAccessibilityNavigationStyle; + + #[method(setAccessibilityNavigationStyle:)] + pub unsafe fn setAccessibilityNavigationStyle(&self, accessibilityNavigationStyle: UIAccessibilityNavigationStyle,); + + #[method(accessibilityRespondsToUserInteraction)] + pub unsafe fn accessibilityRespondsToUserInteraction(&self, ) -> bool; + + #[method(setAccessibilityRespondsToUserInteraction:)] + pub unsafe fn setAccessibilityRespondsToUserInteraction(&self, accessibilityRespondsToUserInteraction: bool,); + + #[method_id(@__retain_semantics Other accessibilityUserInputLabels)] + pub unsafe fn accessibilityUserInputLabels(&self, ) -> Option, Shared>>; + + #[method(setAccessibilityUserInputLabels:)] + pub unsafe fn setAccessibilityUserInputLabels(&self, accessibilityUserInputLabels: Option<&NSArray>,); + + #[method_id(@__retain_semantics Other accessibilityAttributedUserInputLabels)] + pub unsafe fn accessibilityAttributedUserInputLabels(&self, ) -> Id, Shared>; + + #[method(setAccessibilityAttributedUserInputLabels:)] + pub unsafe fn setAccessibilityAttributedUserInputLabels(&self, accessibilityAttributedUserInputLabels: Option<&NSArray>,); + + #[method_id(@__retain_semantics Other accessibilityHeaderElements)] + pub unsafe fn accessibilityHeaderElements(&self, ) -> Option>; + + #[method(setAccessibilityHeaderElements:)] + pub unsafe fn setAccessibilityHeaderElements(&self, accessibilityHeaderElements: Option<&NSArray>,); + + #[method_id(@__retain_semantics Other accessibilityTextualContext)] + pub unsafe fn accessibilityTextualContext(&self, ) -> Option>; + + #[method(setAccessibilityTextualContext:)] + pub unsafe fn setAccessibilityTextualContext(&self, accessibilityTextualContext: Option<&UIAccessibilityTextualContext>,); + + } +); + +extern_fn!( + pub unsafe fn UIAccessibilityFocusedElement(assistiveTechnologyIdentifier: Option<&UIAccessibilityAssistiveTechnologyIdentifier>,) -> *mut Object; +); + +extern_methods!( + /// UIAccessibilityFocus + unsafe impl NSObject { + #[method(accessibilityElementDidBecomeFocused)] + pub unsafe fn accessibilityElementDidBecomeFocused(&self, ); + + #[method(accessibilityElementDidLoseFocus)] + pub unsafe fn accessibilityElementDidLoseFocus(&self, ); + + #[method(accessibilityElementIsFocused)] + pub unsafe fn accessibilityElementIsFocused(&self, ) -> bool; + + #[method_id(@__retain_semantics Other accessibilityAssistiveTechnologyFocusedIdentifiers)] + pub unsafe fn accessibilityAssistiveTechnologyFocusedIdentifiers(&self, ) -> Option, Shared>>; + + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIAccessibilityScrollDirection { + UIAccessibilityScrollDirectionRight = 1, + UIAccessibilityScrollDirectionLeft = 2, + UIAccessibilityScrollDirectionUp = 3, + UIAccessibilityScrollDirectionDown = 4, + UIAccessibilityScrollDirectionNext = 5, + UIAccessibilityScrollDirectionPrevious = 6, + } +); + +extern_methods!( + /// UIAccessibilityAction + unsafe impl NSObject { + #[method(accessibilityActivate)] + pub unsafe fn accessibilityActivate(&self, ) -> bool; + + #[method(accessibilityIncrement)] + pub unsafe fn accessibilityIncrement(&self, ); + + #[method(accessibilityDecrement)] + pub unsafe fn accessibilityDecrement(&self, ); + + #[method(accessibilityScroll:)] + pub unsafe fn accessibilityScroll(&self, direction: UIAccessibilityScrollDirection,) -> bool; + + #[method(accessibilityPerformEscape)] + pub unsafe fn accessibilityPerformEscape(&self, ) -> bool; + + #[method(accessibilityPerformMagicTap)] + pub unsafe fn accessibilityPerformMagicTap(&self, ) -> bool; + + #[method_id(@__retain_semantics Other accessibilityCustomActions)] + pub unsafe fn accessibilityCustomActions(&self, ) -> Option, Shared>>; + + #[method(setAccessibilityCustomActions:)] + pub unsafe fn setAccessibilityCustomActions(&self, accessibilityCustomActions: Option<&NSArray>,); + + } +); + +extern_protocol!( + pub struct UIAccessibilityReadingContent; + + unsafe impl UIAccessibilityReadingContent { + #[method(accessibilityLineNumberForPoint:)] + pub unsafe fn accessibilityLineNumberForPoint(&self, point: CGPoint,) -> NSInteger; + + #[method_id(@__retain_semantics Other accessibilityContentForLineNumber:)] + pub unsafe fn accessibilityContentForLineNumber(&self, lineNumber: NSInteger,) -> Option>; + + #[method(accessibilityFrameForLineNumber:)] + pub unsafe fn accessibilityFrameForLineNumber(&self, lineNumber: NSInteger,) -> CGRect; + + #[method_id(@__retain_semantics Other accessibilityPageContent)] + pub unsafe fn accessibilityPageContent(&self, ) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other accessibilityAttributedContentForLineNumber:)] + pub unsafe fn accessibilityAttributedContentForLineNumber(&self, lineNumber: NSInteger,) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other accessibilityAttributedPageContent)] + pub unsafe fn accessibilityAttributedPageContent(&self, ) -> Option>; + + } +); + +extern_methods!( + /// UIAccessibilityDragging + unsafe impl NSObject { + #[method_id(@__retain_semantics Other accessibilityDragSourceDescriptors)] + pub unsafe fn accessibilityDragSourceDescriptors(&self, ) -> Option, Shared>>; + + #[method(setAccessibilityDragSourceDescriptors:)] + pub unsafe fn setAccessibilityDragSourceDescriptors(&self, accessibilityDragSourceDescriptors: Option<&NSArray>,); + + #[method_id(@__retain_semantics Other accessibilityDropPointDescriptors)] + pub unsafe fn accessibilityDropPointDescriptors(&self, ) -> Option, Shared>>; + + #[method(setAccessibilityDropPointDescriptors:)] + pub unsafe fn setAccessibilityDropPointDescriptors(&self, accessibilityDropPointDescriptors: Option<&NSArray>,); + + } +); + +extern_fn!( + pub unsafe fn UIAccessibilityPostNotification(notification: UIAccessibilityNotifications,argument: Option<&Object>,); +); + +extern_fn!( + pub unsafe fn UIAccessibilityIsVoiceOverRunning() -> Bool; +); + +extern_static!(UIAccessibilityVoiceOverStatusChanged: &'static NSString); + +extern_static!(UIAccessibilityVoiceOverStatusDidChangeNotification: &'static NSNotificationName); + +extern_fn!( + pub unsafe fn UIAccessibilityIsMonoAudioEnabled() -> Bool; +); + +extern_static!(UIAccessibilityMonoAudioStatusDidChangeNotification: &'static NSNotificationName); + +extern_fn!( + pub unsafe fn UIAccessibilityIsClosedCaptioningEnabled() -> Bool; +); + +extern_static!(UIAccessibilityClosedCaptioningStatusDidChangeNotification: &'static NSNotificationName); + +extern_fn!( + pub unsafe fn UIAccessibilityIsInvertColorsEnabled() -> Bool; +); + +extern_static!(UIAccessibilityInvertColorsStatusDidChangeNotification: &'static NSNotificationName); + +extern_fn!( + pub unsafe fn UIAccessibilityIsGuidedAccessEnabled() -> Bool; +); + +extern_static!(UIAccessibilityGuidedAccessStatusDidChangeNotification: &'static NSNotificationName); + +extern_fn!( + pub unsafe fn UIAccessibilityIsBoldTextEnabled() -> Bool; +); + +extern_static!(UIAccessibilityBoldTextStatusDidChangeNotification: &'static NSNotificationName); + +extern_fn!( + pub unsafe fn UIAccessibilityButtonShapesEnabled() -> Bool; +); + +extern_static!(UIAccessibilityButtonShapesEnabledStatusDidChangeNotification: &'static NSNotificationName); + +extern_fn!( + pub unsafe fn UIAccessibilityIsGrayscaleEnabled() -> Bool; +); + +extern_static!(UIAccessibilityGrayscaleStatusDidChangeNotification: &'static NSNotificationName); + +extern_fn!( + pub unsafe fn UIAccessibilityIsReduceTransparencyEnabled() -> Bool; +); + +extern_static!(UIAccessibilityReduceTransparencyStatusDidChangeNotification: &'static NSNotificationName); + +extern_fn!( + pub unsafe fn UIAccessibilityIsReduceMotionEnabled() -> Bool; +); + +extern_static!(UIAccessibilityReduceMotionStatusDidChangeNotification: &'static NSNotificationName); + +extern_fn!( + pub unsafe fn UIAccessibilityPrefersCrossFadeTransitions() -> Bool; +); + +extern_static!(UIAccessibilityPrefersCrossFadeTransitionsStatusDidChangeNotification: &'static NSNotificationName); + +extern_fn!( + pub unsafe fn UIAccessibilityIsVideoAutoplayEnabled() -> Bool; +); + +extern_static!(UIAccessibilityVideoAutoplayStatusDidChangeNotification: &'static NSNotificationName); + +extern_fn!( + pub unsafe fn UIAccessibilityDarkerSystemColorsEnabled() -> Bool; +); + +extern_static!(UIAccessibilityDarkerSystemColorsStatusDidChangeNotification: &'static NSNotificationName); + +extern_fn!( + pub unsafe fn UIAccessibilityIsSwitchControlRunning() -> Bool; +); + +extern_static!(UIAccessibilitySwitchControlStatusDidChangeNotification: &'static NSNotificationName); + +extern_fn!( + pub unsafe fn UIAccessibilityIsSpeakSelectionEnabled() -> Bool; +); + +extern_static!(UIAccessibilitySpeakSelectionStatusDidChangeNotification: &'static NSNotificationName); + +extern_fn!( + pub unsafe fn UIAccessibilityIsSpeakScreenEnabled() -> Bool; +); + +extern_static!(UIAccessibilitySpeakScreenStatusDidChangeNotification: &'static NSNotificationName); + +extern_fn!( + pub unsafe fn UIAccessibilityIsShakeToUndoEnabled() -> Bool; +); + +extern_static!(UIAccessibilityShakeToUndoDidChangeNotification: &'static NSNotificationName); + +extern_fn!( + pub unsafe fn UIAccessibilityIsAssistiveTouchRunning() -> Bool; +); + +extern_static!(UIAccessibilityAssistiveTouchStatusDidChangeNotification: &'static NSNotificationName); + +extern_fn!( + pub unsafe fn UIAccessibilityShouldDifferentiateWithoutColor() -> Bool; +); + +extern_static!(UIAccessibilityShouldDifferentiateWithoutColorDidChangeNotification: &'static NSNotificationName); + +extern_fn!( + pub unsafe fn UIAccessibilityIsOnOffSwitchLabelsEnabled() -> Bool; +); + +extern_static!(UIAccessibilityOnOffSwitchLabelsDidChangeNotification: &'static NSNotificationName); + +extern_fn!( + pub unsafe fn UIAccessibilityRequestGuidedAccessSession(enable: Bool,completionHandler: &Block<(Bool, ), ()>,); +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum UIAccessibilityHearingDeviceEar { + UIAccessibilityHearingDeviceEarNone = 0, + UIAccessibilityHearingDeviceEarLeft = 1<<1, + UIAccessibilityHearingDeviceEarRight = 1<<2, + UIAccessibilityHearingDeviceEarBoth = UIAccessibilityHearingDeviceEarLeft|UIAccessibilityHearingDeviceEarRight, + } +); + +extern_fn!( + pub unsafe fn UIAccessibilityHearingDevicePairedEar() -> UIAccessibilityHearingDeviceEar; +); + +extern_static!(UIAccessibilityHearingDevicePairedEarDidChangeNotification: &'static NSNotificationName); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIAccessibilityAdditions.rs b/crates/icrate-generated/src/UIKit/generated/UIAccessibilityAdditions.rs new file mode 100644 index 000000000..53008708b --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIAccessibilityAdditions.rs @@ -0,0 +1,71 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_protocol!( + pub struct UIPickerViewAccessibilityDelegate; + + unsafe impl UIPickerViewAccessibilityDelegate { + #[optional] + #[method_id(@__retain_semantics Other pickerView:accessibilityLabelForComponent:)] + pub unsafe fn pickerView_accessibilityLabelForComponent(&self, pickerView: &UIPickerView,component: NSInteger,) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other pickerView:accessibilityHintForComponent:)] + pub unsafe fn pickerView_accessibilityHintForComponent(&self, pickerView: &UIPickerView,component: NSInteger,) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other pickerView:accessibilityUserInputLabelsForComponent:)] + pub unsafe fn pickerView_accessibilityUserInputLabelsForComponent(&self, pickerView: &UIPickerView,component: NSInteger,) -> Id, Shared>; + + #[optional] + #[method_id(@__retain_semantics Other pickerView:accessibilityAttributedLabelForComponent:)] + pub unsafe fn pickerView_accessibilityAttributedLabelForComponent(&self, pickerView: &UIPickerView,component: NSInteger,) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other pickerView:accessibilityAttributedHintForComponent:)] + pub unsafe fn pickerView_accessibilityAttributedHintForComponent(&self, pickerView: &UIPickerView,component: NSInteger,) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other pickerView:accessibilityAttributedUserInputLabelsForComponent:)] + pub unsafe fn pickerView_accessibilityAttributedUserInputLabelsForComponent(&self, pickerView: &UIPickerView,component: NSInteger,) -> Id, Shared>; + + } +); + +extern_protocol!( + pub struct UIScrollViewAccessibilityDelegate; + + unsafe impl UIScrollViewAccessibilityDelegate { + #[optional] + #[method_id(@__retain_semantics Other accessibilityScrollStatusForScrollView:)] + pub unsafe fn accessibilityScrollStatusForScrollView(&self, scrollView: &UIScrollView,) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other accessibilityAttributedScrollStatusForScrollView:)] + pub unsafe fn accessibilityAttributedScrollStatusForScrollView(&self, scrollView: &UIScrollView,) -> Option>; + + } +); + +extern_methods!( + /// UIAccessibilityInvertColors + unsafe impl UIView { + #[method(accessibilityIgnoresInvertColors)] + pub unsafe fn accessibilityIgnoresInvertColors(&self, ) -> bool; + + #[method(setAccessibilityIgnoresInvertColors:)] + pub unsafe fn setAccessibilityIgnoresInvertColors(&self, accessibilityIgnoresInvertColors: bool,); + + } +); + +extern_methods!( + /// UIAccessibility + unsafe impl UIColor { + #[method_id(@__retain_semantics Other accessibilityName)] + pub unsafe fn accessibilityName(&self, ) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIAccessibilityConstants.rs b/crates/icrate-generated/src/UIKit/generated/UIAccessibilityConstants.rs new file mode 100644 index 000000000..4860131ef --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIAccessibilityConstants.rs @@ -0,0 +1,130 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +pub type UIAccessibilityTraits = u64; + +extern_static!(UIAccessibilityTraitNone: UIAccessibilityTraits); + +extern_static!(UIAccessibilityTraitButton: UIAccessibilityTraits); + +extern_static!(UIAccessibilityTraitLink: UIAccessibilityTraits); + +extern_static!(UIAccessibilityTraitHeader: UIAccessibilityTraits); + +extern_static!(UIAccessibilityTraitSearchField: UIAccessibilityTraits); + +extern_static!(UIAccessibilityTraitImage: UIAccessibilityTraits); + +extern_static!(UIAccessibilityTraitSelected: UIAccessibilityTraits); + +extern_static!(UIAccessibilityTraitPlaysSound: UIAccessibilityTraits); + +extern_static!(UIAccessibilityTraitKeyboardKey: UIAccessibilityTraits); + +extern_static!(UIAccessibilityTraitStaticText: UIAccessibilityTraits); + +extern_static!(UIAccessibilityTraitSummaryElement: UIAccessibilityTraits); + +extern_static!(UIAccessibilityTraitNotEnabled: UIAccessibilityTraits); + +extern_static!(UIAccessibilityTraitUpdatesFrequently: UIAccessibilityTraits); + +extern_static!(UIAccessibilityTraitStartsMediaSession: UIAccessibilityTraits); + +extern_static!(UIAccessibilityTraitAdjustable: UIAccessibilityTraits); + +extern_static!(UIAccessibilityTraitAllowsDirectInteraction: UIAccessibilityTraits); + +extern_static!(UIAccessibilityTraitCausesPageTurn: UIAccessibilityTraits); + +extern_static!(UIAccessibilityTraitTabBar: UIAccessibilityTraits); + +pub type UIAccessibilityNotifications = u32; + +extern_static!(UIAccessibilityScreenChangedNotification: UIAccessibilityNotifications); + +extern_static!(UIAccessibilityLayoutChangedNotification: UIAccessibilityNotifications); + +extern_static!(UIAccessibilityAnnouncementNotification: UIAccessibilityNotifications); + +extern_static!(UIAccessibilityPageScrolledNotification: UIAccessibilityNotifications); + +extern_static!(UIAccessibilityPauseAssistiveTechnologyNotification: UIAccessibilityNotifications); + +extern_static!(UIAccessibilityResumeAssistiveTechnologyNotification: UIAccessibilityNotifications); + +extern_static!(UIAccessibilityAnnouncementDidFinishNotification: &'static NSNotificationName); + +extern_static!(UIAccessibilityAnnouncementKeyStringValue: &'static NSString); + +extern_static!(UIAccessibilityAnnouncementKeyWasSuccessful: &'static NSString); + +extern_static!(UIAccessibilityElementFocusedNotification: &'static NSNotificationName); + +extern_static!(UIAccessibilityFocusedElementKey: &'static NSString); + +extern_static!(UIAccessibilityUnfocusedElementKey: &'static NSString); + +extern_static!(UIAccessibilityAssistiveTechnologyKey: &'static NSString); + +pub type UIAccessibilityAssistiveTechnologyIdentifier = NSString; + +extern_static!(UIAccessibilityNotificationSwitchControlIdentifier: &'static UIAccessibilityAssistiveTechnologyIdentifier); + +extern_static!(UIAccessibilityNotificationVoiceOverIdentifier: &'static UIAccessibilityAssistiveTechnologyIdentifier); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIAccessibilityNavigationStyle { + UIAccessibilityNavigationStyleAutomatic = 0, + UIAccessibilityNavigationStyleSeparate = 1, + UIAccessibilityNavigationStyleCombined = 2, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIAccessibilityContainerType { + UIAccessibilityContainerTypeNone = 0, + UIAccessibilityContainerTypeDataTable = 1, + UIAccessibilityContainerTypeList = 2, + UIAccessibilityContainerTypeLandmark = 3, + UIAccessibilityContainerTypeSemanticGroup = 4, + } +); + +pub type UIAccessibilityTextualContext = NSString; + +extern_static!(UIAccessibilityTextualContextWordProcessing: &'static UIAccessibilityTextualContext); + +extern_static!(UIAccessibilityTextualContextNarrative: &'static UIAccessibilityTextualContext); + +extern_static!(UIAccessibilityTextualContextMessaging: &'static UIAccessibilityTextualContext); + +extern_static!(UIAccessibilityTextualContextSpreadsheet: &'static UIAccessibilityTextualContext); + +extern_static!(UIAccessibilityTextualContextFileSystem: &'static UIAccessibilityTextualContext); + +extern_static!(UIAccessibilityTextualContextSourceCode: &'static UIAccessibilityTextualContext); + +extern_static!(UIAccessibilityTextualContextConsole: &'static UIAccessibilityTextualContext); + +extern_static!(UIAccessibilitySpeechAttributePunctuation: &'static NSAttributedStringKey); + +extern_static!(UIAccessibilitySpeechAttributeLanguage: &'static NSAttributedStringKey); + +extern_static!(UIAccessibilitySpeechAttributePitch: &'static NSAttributedStringKey); + +extern_static!(UIAccessibilitySpeechAttributeQueueAnnouncement: &'static NSAttributedStringKey); + +extern_static!(UIAccessibilitySpeechAttributeIPANotation: &'static NSAttributedStringKey); + +extern_static!(UIAccessibilitySpeechAttributeSpellOut: &'static NSAttributedStringKey); + +extern_static!(UIAccessibilityTextAttributeHeadingLevel: &'static NSAttributedStringKey); + +extern_static!(UIAccessibilityTextAttributeCustom: &'static NSAttributedStringKey); + +extern_static!(UIAccessibilityTextAttributeContext: &'static NSAttributedStringKey); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIAccessibilityContainer.rs b/crates/icrate-generated/src/UIKit/generated/UIAccessibilityContainer.rs new file mode 100644 index 000000000..8b69d7c4f --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIAccessibilityContainer.rs @@ -0,0 +1,68 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_methods!( + /// UIAccessibilityContainer + unsafe impl NSObject { + #[method(accessibilityElementCount)] + pub unsafe fn accessibilityElementCount(&self, ) -> NSInteger; + + #[method_id(@__retain_semantics Other accessibilityElementAtIndex:)] + pub unsafe fn accessibilityElementAtIndex(&self, index: NSInteger,) -> Option>; + + #[method(indexOfAccessibilityElement:)] + pub unsafe fn indexOfAccessibilityElement(&self, element: &Object,) -> NSInteger; + + #[method_id(@__retain_semantics Other accessibilityElements)] + pub unsafe fn accessibilityElements(&self, ) -> Option>; + + #[method(setAccessibilityElements:)] + pub unsafe fn setAccessibilityElements(&self, accessibilityElements: Option<&NSArray>,); + + #[method(accessibilityContainerType)] + pub unsafe fn accessibilityContainerType(&self, ) -> UIAccessibilityContainerType; + + #[method(setAccessibilityContainerType:)] + pub unsafe fn setAccessibilityContainerType(&self, accessibilityContainerType: UIAccessibilityContainerType,); + + } +); + +extern_protocol!( + pub struct UIAccessibilityContainerDataTableCell; + + unsafe impl UIAccessibilityContainerDataTableCell { + #[method(accessibilityRowRange)] + pub unsafe fn accessibilityRowRange(&self, ) -> NSRange; + + #[method(accessibilityColumnRange)] + pub unsafe fn accessibilityColumnRange(&self, ) -> NSRange; + + } +); + +extern_protocol!( + pub struct UIAccessibilityContainerDataTable; + + unsafe impl UIAccessibilityContainerDataTable { + #[method_id(@__retain_semantics Other accessibilityDataTableCellElementForRow:column:)] + pub unsafe fn accessibilityDataTableCellElementForRow_column(&self, row: NSUInteger,column: NSUInteger,) -> Option>; + + #[method(accessibilityRowCount)] + pub unsafe fn accessibilityRowCount(&self, ) -> NSUInteger; + + #[method(accessibilityColumnCount)] + pub unsafe fn accessibilityColumnCount(&self, ) -> NSUInteger; + + #[optional] + #[method_id(@__retain_semantics Other accessibilityHeaderElementsForRow:)] + pub unsafe fn accessibilityHeaderElementsForRow(&self, row: NSUInteger,) -> Option, Shared>>; + + #[optional] + #[method_id(@__retain_semantics Other accessibilityHeaderElementsForColumn:)] + pub unsafe fn accessibilityHeaderElementsForColumn(&self, column: NSUInteger,) -> Option, Shared>>; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIAccessibilityContentSizeCategoryImageAdjusting.rs b/crates/icrate-generated/src/UIKit/generated/UIAccessibilityContentSizeCategoryImageAdjusting.rs new file mode 100644 index 000000000..f05943837 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIAccessibilityContentSizeCategoryImageAdjusting.rs @@ -0,0 +1,35 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_protocol!( + pub struct UIAccessibilityContentSizeCategoryImageAdjusting; + + unsafe impl UIAccessibilityContentSizeCategoryImageAdjusting { + #[method(adjustsImageSizeForAccessibilityContentSizeCategory)] + pub unsafe fn adjustsImageSizeForAccessibilityContentSizeCategory(&self, ) -> bool; + + #[method(setAdjustsImageSizeForAccessibilityContentSizeCategory:)] + pub unsafe fn setAdjustsImageSizeForAccessibilityContentSizeCategory(&self, adjustsImageSizeForAccessibilityContentSizeCategory: bool,); + + } +); + +extern_methods!( + /// UIAccessibilityContentSizeCategoryImageAdjusting + unsafe impl UIImageView { + } +); + +extern_methods!( + /// UIAccessibilityContentSizeCategoryImageAdjusting + unsafe impl UIButton { + } +); + +extern_methods!( + /// UIAccessibilityContentSizeCategoryImageAdjusting + unsafe impl NSTextAttachment { + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIAccessibilityCustomAction.rs b/crates/icrate-generated/src/UIKit/generated/UIAccessibilityCustomAction.rs new file mode 100644 index 000000000..54982c013 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIAccessibilityCustomAction.rs @@ -0,0 +1,80 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +pub type UIAccessibilityCustomActionHandler = *mut Block<(NonNull, ), Bool>; + +extern_class!( + #[derive(Debug)] + pub struct UIAccessibilityCustomAction; + + unsafe impl ClassType for UIAccessibilityCustomAction { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIAccessibilityCustomAction { + #[method_id(@__retain_semantics Init initWithName:target:selector:)] + pub unsafe fn initWithName_target_selector(this: Option>, name: &NSString,target: Option<&Object>,selector: Sel,) -> Id; + + #[method_id(@__retain_semantics Init initWithAttributedName:target:selector:)] + pub unsafe fn initWithAttributedName_target_selector(this: Option>, attributedName: &NSAttributedString,target: Option<&Object>,selector: Sel,) -> Id; + + #[method_id(@__retain_semantics Init initWithName:image:target:selector:)] + pub unsafe fn initWithName_image_target_selector(this: Option>, name: &NSString,image: Option<&UIImage>,target: Option<&Object>,selector: Sel,) -> Id; + + #[method_id(@__retain_semantics Init initWithAttributedName:image:target:selector:)] + pub unsafe fn initWithAttributedName_image_target_selector(this: Option>, attributedName: &NSAttributedString,image: Option<&UIImage>,target: Option<&Object>,selector: Sel,) -> Id; + + #[method_id(@__retain_semantics Init initWithName:actionHandler:)] + pub unsafe fn initWithName_actionHandler(this: Option>, name: &NSString,actionHandler: UIAccessibilityCustomActionHandler,) -> Id; + + #[method_id(@__retain_semantics Init initWithAttributedName:actionHandler:)] + pub unsafe fn initWithAttributedName_actionHandler(this: Option>, attributedName: &NSAttributedString,actionHandler: UIAccessibilityCustomActionHandler,) -> Id; + + #[method_id(@__retain_semantics Init initWithName:image:actionHandler:)] + pub unsafe fn initWithName_image_actionHandler(this: Option>, name: &NSString,image: Option<&UIImage>,actionHandler: UIAccessibilityCustomActionHandler,) -> Id; + + #[method_id(@__retain_semantics Init initWithAttributedName:image:actionHandler:)] + pub unsafe fn initWithAttributedName_image_actionHandler(this: Option>, attributedName: &NSAttributedString,image: Option<&UIImage>,actionHandler: UIAccessibilityCustomActionHandler,) -> 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 image)] + pub unsafe fn image(&self, ) -> Option>; + + #[method(setImage:)] + pub unsafe fn setImage(&self, image: Option<&UIImage>,); + + #[method_id(@__retain_semantics Other attributedName)] + pub unsafe fn attributedName(&self, ) -> Id; + + #[method(setAttributedName:)] + pub unsafe fn setAttributedName(&self, attributedName: &NSAttributedString,); + + #[method_id(@__retain_semantics Other 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(actionHandler)] + pub unsafe fn actionHandler(&self, ) -> UIAccessibilityCustomActionHandler; + + #[method(setActionHandler:)] + pub unsafe fn setActionHandler(&self, actionHandler: UIAccessibilityCustomActionHandler,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIAccessibilityCustomRotor.rs b/crates/icrate-generated/src/UIKit/generated/UIAccessibilityCustomRotor.rs new file mode 100644 index 000000000..33c3208b6 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIAccessibilityCustomRotor.rs @@ -0,0 +1,150 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIAccessibilityCustomRotorDirection { + UIAccessibilityCustomRotorDirectionPrevious = 0, + UIAccessibilityCustomRotorDirectionNext = 1, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIAccessibilityCustomSystemRotorType { + UIAccessibilityCustomSystemRotorTypeNone = 0, + UIAccessibilityCustomSystemRotorTypeLink = 1, + UIAccessibilityCustomSystemRotorTypeVisitedLink = 2, + UIAccessibilityCustomSystemRotorTypeHeading = 3, + UIAccessibilityCustomSystemRotorTypeHeadingLevel1 = 4, + UIAccessibilityCustomSystemRotorTypeHeadingLevel2 = 5, + UIAccessibilityCustomSystemRotorTypeHeadingLevel3 = 6, + UIAccessibilityCustomSystemRotorTypeHeadingLevel4 = 7, + UIAccessibilityCustomSystemRotorTypeHeadingLevel5 = 8, + UIAccessibilityCustomSystemRotorTypeHeadingLevel6 = 9, + UIAccessibilityCustomSystemRotorTypeBoldText = 10, + UIAccessibilityCustomSystemRotorTypeItalicText = 11, + UIAccessibilityCustomSystemRotorTypeUnderlineText = 12, + UIAccessibilityCustomSystemRotorTypeMisspelledWord = 13, + UIAccessibilityCustomSystemRotorTypeImage = 14, + UIAccessibilityCustomSystemRotorTypeTextField = 15, + UIAccessibilityCustomSystemRotorTypeTable = 16, + UIAccessibilityCustomSystemRotorTypeList = 17, + UIAccessibilityCustomSystemRotorTypeLandmark = 18, + } +); + +pub type UIAccessibilityCustomRotorSearch = *mut Block<(NonNull, ), *mut UIAccessibilityCustomRotorItemResult>; + +extern_methods!( + /// UIAccessibilityCustomRotor + unsafe impl NSObject { + #[method_id(@__retain_semantics Other accessibilityCustomRotors)] + pub unsafe fn accessibilityCustomRotors(&self, ) -> Option, Shared>>; + + #[method(setAccessibilityCustomRotors:)] + pub unsafe fn setAccessibilityCustomRotors(&self, accessibilityCustomRotors: Option<&NSArray>,); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIAccessibilityCustomRotorSearchPredicate; + + unsafe impl ClassType for UIAccessibilityCustomRotorSearchPredicate { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIAccessibilityCustomRotorSearchPredicate { + #[method_id(@__retain_semantics Other currentItem)] + pub unsafe fn currentItem(&self, ) -> Id; + + #[method(setCurrentItem:)] + pub unsafe fn setCurrentItem(&self, currentItem: &UIAccessibilityCustomRotorItemResult,); + + #[method(searchDirection)] + pub unsafe fn searchDirection(&self, ) -> UIAccessibilityCustomRotorDirection; + + #[method(setSearchDirection:)] + pub unsafe fn setSearchDirection(&self, searchDirection: UIAccessibilityCustomRotorDirection,); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIAccessibilityCustomRotor; + + unsafe impl ClassType for UIAccessibilityCustomRotor { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIAccessibilityCustomRotor { + #[method_id(@__retain_semantics Init initWithName:itemSearchBlock:)] + pub unsafe fn initWithName_itemSearchBlock(this: Option>, name: &NSString,itemSearchBlock: UIAccessibilityCustomRotorSearch,) -> Id; + + #[method_id(@__retain_semantics Init initWithAttributedName:itemSearchBlock:)] + pub unsafe fn initWithAttributedName_itemSearchBlock(this: Option>, attributedName: &NSAttributedString,itemSearchBlock: UIAccessibilityCustomRotorSearch,) -> Id; + + #[method_id(@__retain_semantics Init initWithSystemType:itemSearchBlock:)] + pub unsafe fn initWithSystemType_itemSearchBlock(this: Option>, type_: UIAccessibilityCustomSystemRotorType,itemSearchBlock: UIAccessibilityCustomRotorSearch,) -> 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 attributedName)] + pub unsafe fn attributedName(&self, ) -> Id; + + #[method(setAttributedName:)] + pub unsafe fn setAttributedName(&self, attributedName: &NSAttributedString,); + + #[method(itemSearchBlock)] + pub unsafe fn itemSearchBlock(&self, ) -> UIAccessibilityCustomRotorSearch; + + #[method(setItemSearchBlock:)] + pub unsafe fn setItemSearchBlock(&self, itemSearchBlock: UIAccessibilityCustomRotorSearch,); + + #[method(systemRotorType)] + pub unsafe fn systemRotorType(&self, ) -> UIAccessibilityCustomSystemRotorType; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIAccessibilityCustomRotorItemResult; + + unsafe impl ClassType for UIAccessibilityCustomRotorItemResult { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIAccessibilityCustomRotorItemResult { + #[method_id(@__retain_semantics Init initWithTargetElement:targetRange:)] + pub unsafe fn initWithTargetElement_targetRange(this: Option>, targetElement: &NSObject,targetRange: Option<&UITextRange>,) -> Id; + + #[method_id(@__retain_semantics Other targetElement)] + pub unsafe fn targetElement(&self, ) -> Option>; + + #[method(setTargetElement:)] + pub unsafe fn setTargetElement(&self, targetElement: Option<&NSObject>,); + + #[method_id(@__retain_semantics Other targetRange)] + pub unsafe fn targetRange(&self, ) -> Option>; + + #[method(setTargetRange:)] + pub unsafe fn setTargetRange(&self, targetRange: Option<&UITextRange>,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIAccessibilityElement.rs b/crates/icrate-generated/src/UIKit/generated/UIAccessibilityElement.rs new file mode 100644 index 000000000..8231e24e6 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIAccessibilityElement.rs @@ -0,0 +1,69 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIAccessibilityElement; + + unsafe impl ClassType for UIAccessibilityElement { + type Super = UIResponder; + } +); + +extern_methods!( + unsafe impl UIAccessibilityElement { + #[method_id(@__retain_semantics Init initWithAccessibilityContainer:)] + pub unsafe fn initWithAccessibilityContainer(this: Option>, container: &Object,) -> Id; + + #[method_id(@__retain_semantics Other accessibilityContainer)] + pub unsafe fn accessibilityContainer(&self, ) -> Option>; + + #[method(setAccessibilityContainer:)] + pub unsafe fn setAccessibilityContainer(&self, accessibilityContainer: Option<&Object>,); + + #[method(isAccessibilityElement)] + pub unsafe fn isAccessibilityElement(&self, ) -> bool; + + #[method(setIsAccessibilityElement:)] + pub unsafe fn setIsAccessibilityElement(&self, isAccessibilityElement: bool,); + + #[method_id(@__retain_semantics Other accessibilityLabel)] + pub unsafe fn accessibilityLabel(&self, ) -> Option>; + + #[method(setAccessibilityLabel:)] + pub unsafe fn setAccessibilityLabel(&self, accessibilityLabel: Option<&NSString>,); + + #[method_id(@__retain_semantics Other accessibilityHint)] + pub unsafe fn accessibilityHint(&self, ) -> Option>; + + #[method(setAccessibilityHint:)] + pub unsafe fn setAccessibilityHint(&self, accessibilityHint: Option<&NSString>,); + + #[method_id(@__retain_semantics Other accessibilityValue)] + pub unsafe fn accessibilityValue(&self, ) -> Option>; + + #[method(setAccessibilityValue:)] + pub unsafe fn setAccessibilityValue(&self, accessibilityValue: Option<&NSString>,); + + #[method(accessibilityFrame)] + pub unsafe fn accessibilityFrame(&self, ) -> CGRect; + + #[method(setAccessibilityFrame:)] + pub unsafe fn setAccessibilityFrame(&self, accessibilityFrame: CGRect,); + + #[method(accessibilityTraits)] + pub unsafe fn accessibilityTraits(&self, ) -> UIAccessibilityTraits; + + #[method(setAccessibilityTraits:)] + pub unsafe fn setAccessibilityTraits(&self, accessibilityTraits: UIAccessibilityTraits,); + + #[method(accessibilityFrameInContainerSpace)] + pub unsafe fn accessibilityFrameInContainerSpace(&self, ) -> CGRect; + + #[method(setAccessibilityFrameInContainerSpace:)] + pub unsafe fn setAccessibilityFrameInContainerSpace(&self, accessibilityFrameInContainerSpace: CGRect,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIAccessibilityIdentification.rs b/crates/icrate-generated/src/UIKit/generated/UIAccessibilityIdentification.rs new file mode 100644 index 000000000..f64c7e689 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIAccessibilityIdentification.rs @@ -0,0 +1,47 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_protocol!( + pub struct UIAccessibilityIdentification; + + unsafe impl UIAccessibilityIdentification { + #[method_id(@__retain_semantics Other accessibilityIdentifier)] + pub unsafe fn accessibilityIdentifier(&self, ) -> Option>; + + #[method(setAccessibilityIdentifier:)] + pub unsafe fn setAccessibilityIdentifier(&self, accessibilityIdentifier: Option<&NSString>,); + + } +); + +extern_methods!( + /// UIAccessibility + unsafe impl UIView { + } +); + +extern_methods!( + /// UIAccessibility + unsafe impl UIBarItem { + } +); + +extern_methods!( + /// UIAccessibility + unsafe impl UIAlertAction { + } +); + +extern_methods!( + /// UIAccessibility + unsafe impl UIMenuElement { + } +); + +extern_methods!( + /// UIAccessibility + unsafe impl UIImage { + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIAccessibilityLocationDescriptor.rs b/crates/icrate-generated/src/UIKit/generated/UIAccessibilityLocationDescriptor.rs new file mode 100644 index 000000000..8c6e7785f --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIAccessibilityLocationDescriptor.rs @@ -0,0 +1,45 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIAccessibilityLocationDescriptor; + + unsafe impl ClassType for UIAccessibilityLocationDescriptor { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIAccessibilityLocationDescriptor { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics New new)] + pub unsafe fn new() -> Id; + + #[method_id(@__retain_semantics Init initWithName:view:)] + pub unsafe fn initWithName_view(this: Option>, name: &NSString,view: &UIView,) -> Id; + + #[method_id(@__retain_semantics Init initWithName:point:inView:)] + pub unsafe fn initWithName_point_inView(this: Option>, name: &NSString,point: CGPoint,view: &UIView,) -> Id; + + #[method_id(@__retain_semantics Init initWithAttributedName:point:inView:)] + pub unsafe fn initWithAttributedName_point_inView(this: Option>, attributedName: &NSAttributedString,point: CGPoint,view: &UIView,) -> Id; + + #[method_id(@__retain_semantics Other view)] + pub unsafe fn view(&self, ) -> Option>; + + #[method(point)] + pub unsafe fn point(&self, ) -> CGPoint; + + #[method_id(@__retain_semantics Other name)] + pub unsafe fn name(&self, ) -> Id; + + #[method_id(@__retain_semantics Other attributedName)] + pub unsafe fn attributedName(&self, ) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIAccessibilityZoom.rs b/crates/icrate-generated/src/UIKit/generated/UIAccessibilityZoom.rs new file mode 100644 index 000000000..6976c8e85 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIAccessibilityZoom.rs @@ -0,0 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIAccessibilityZoomType { + UIAccessibilityZoomTypeInsertionPoint = 0, + } +); + +extern_fn!( + pub unsafe fn UIAccessibilityZoomFocusChanged(type_: UIAccessibilityZoomType,frame: CGRect,view: &UIView,); +); + +extern_fn!( + pub unsafe fn UIAccessibilityRegisterGestureConflictWithZoom(); +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIAction.rs b/crates/icrate-generated/src/UIKit/generated/UIAction.rs new file mode 100644 index 000000000..7137f4dd1 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIAction.rs @@ -0,0 +1,87 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +pub type UIActionIdentifier = NSString; + +extern_static!(UIActionPaste: &'static UIActionIdentifier); + +extern_static!(UIActionPasteAndMatchStyle: &'static UIActionIdentifier); + +extern_static!(UIActionPasteAndGo: &'static UIActionIdentifier); + +extern_static!(UIActionPasteAndSearch: &'static UIActionIdentifier); + +pub type UIActionHandler = *mut Block<(NonNull, ), ()>; + +extern_class!( + #[derive(Debug)] + pub struct UIAction; + + unsafe impl ClassType for UIAction { + type Super = UIMenuElement; + } +); + +extern_methods!( + unsafe impl UIAction { + #[method_id(@__retain_semantics Other title)] + pub unsafe fn title(&self, ) -> Id; + + #[method(setTitle:)] + pub unsafe fn setTitle(&self, title: &NSString,); + + #[method_id(@__retain_semantics Other image)] + pub unsafe fn image(&self, ) -> Option>; + + #[method(setImage:)] + pub unsafe fn setImage(&self, image: Option<&UIImage>,); + + #[method_id(@__retain_semantics Other discoverabilityTitle)] + pub unsafe fn discoverabilityTitle(&self, ) -> Option>; + + #[method(setDiscoverabilityTitle:)] + pub unsafe fn setDiscoverabilityTitle(&self, discoverabilityTitle: Option<&NSString>,); + + #[method_id(@__retain_semantics Other identifier)] + pub unsafe fn identifier(&self, ) -> Id; + + #[method(attributes)] + pub unsafe fn attributes(&self, ) -> UIMenuElementAttributes; + + #[method(setAttributes:)] + pub unsafe fn setAttributes(&self, attributes: UIMenuElementAttributes,); + + #[method(state)] + pub unsafe fn state(&self, ) -> UIMenuElementState; + + #[method(setState:)] + pub unsafe fn setState(&self, state: UIMenuElementState,); + + #[method_id(@__retain_semantics Other sender)] + pub unsafe fn sender(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other actionWithHandler:)] + pub unsafe fn actionWithHandler(handler: UIActionHandler,) -> Id; + + #[method_id(@__retain_semantics Other actionWithTitle:image:identifier:handler:)] + pub unsafe fn actionWithTitle_image_identifier_handler(title: &NSString,image: Option<&UIImage>,identifier: Option<&UIActionIdentifier>,handler: UIActionHandler,) -> 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; + + } +); + +extern_methods!( + /// UICaptureTextFromCameraSupporting + unsafe impl UIAction { + #[method_id(@__retain_semantics Other captureTextFromCameraActionForResponder:identifier:)] + pub unsafe fn captureTextFromCameraActionForResponder_identifier(responder: &TodoProtocols,identifier: Option<&UIActionIdentifier>,) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIActionSheet.rs b/crates/icrate-generated/src/UIKit/generated/UIActionSheet.rs new file mode 100644 index 000000000..c99dae909 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIActionSheet.rs @@ -0,0 +1,122 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIActionSheetStyle { + UIActionSheetStyleAutomatic = -1, + UIActionSheetStyleDefault = UIBarStyleDefault, + UIActionSheetStyleBlackTranslucent = UIBarStyleBlackTranslucent, + UIActionSheetStyleBlackOpaque = UIBarStyleBlackOpaque, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIActionSheet; + + unsafe impl ClassType for UIActionSheet { + type Super = UIView; + } +); + +extern_methods!( + unsafe impl UIActionSheet { + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&UIActionSheetDelegate>,); + + #[method_id(@__retain_semantics Other title)] + pub unsafe fn title(&self, ) -> Id; + + #[method(setTitle:)] + pub unsafe fn setTitle(&self, title: &NSString,); + + #[method(actionSheetStyle)] + pub unsafe fn actionSheetStyle(&self, ) -> UIActionSheetStyle; + + #[method(setActionSheetStyle:)] + pub unsafe fn setActionSheetStyle(&self, actionSheetStyle: UIActionSheetStyle,); + + #[method(addButtonWithTitle:)] + pub unsafe fn addButtonWithTitle(&self, title: Option<&NSString>,) -> NSInteger; + + #[method_id(@__retain_semantics Other buttonTitleAtIndex:)] + pub unsafe fn buttonTitleAtIndex(&self, buttonIndex: NSInteger,) -> Option>; + + #[method(numberOfButtons)] + pub unsafe fn numberOfButtons(&self, ) -> NSInteger; + + #[method(cancelButtonIndex)] + pub unsafe fn cancelButtonIndex(&self, ) -> NSInteger; + + #[method(setCancelButtonIndex:)] + pub unsafe fn setCancelButtonIndex(&self, cancelButtonIndex: NSInteger,); + + #[method(destructiveButtonIndex)] + pub unsafe fn destructiveButtonIndex(&self, ) -> NSInteger; + + #[method(setDestructiveButtonIndex:)] + pub unsafe fn setDestructiveButtonIndex(&self, destructiveButtonIndex: NSInteger,); + + #[method(firstOtherButtonIndex)] + pub unsafe fn firstOtherButtonIndex(&self, ) -> NSInteger; + + #[method(isVisible)] + pub unsafe fn isVisible(&self, ) -> bool; + + #[method(showFromToolbar:)] + pub unsafe fn showFromToolbar(&self, view: &UIToolbar,); + + #[method(showFromTabBar:)] + pub unsafe fn showFromTabBar(&self, view: &UITabBar,); + + #[method(showFromBarButtonItem:animated:)] + pub unsafe fn showFromBarButtonItem_animated(&self, item: &UIBarButtonItem,animated: bool,); + + #[method(showFromRect:inView:animated:)] + pub unsafe fn showFromRect_inView_animated(&self, rect: CGRect,view: &UIView,animated: bool,); + + #[method(showInView:)] + pub unsafe fn showInView(&self, view: &UIView,); + + #[method(dismissWithClickedButtonIndex:animated:)] + pub unsafe fn dismissWithClickedButtonIndex_animated(&self, buttonIndex: NSInteger,animated: bool,); + + } +); + +extern_protocol!( + pub struct UIActionSheetDelegate; + + unsafe impl UIActionSheetDelegate { + #[optional] + #[method(actionSheet:clickedButtonAtIndex:)] + pub unsafe fn actionSheet_clickedButtonAtIndex(&self, actionSheet: &UIActionSheet,buttonIndex: NSInteger,); + + #[optional] + #[method(actionSheetCancel:)] + pub unsafe fn actionSheetCancel(&self, actionSheet: &UIActionSheet,); + + #[optional] + #[method(willPresentActionSheet:)] + pub unsafe fn willPresentActionSheet(&self, actionSheet: &UIActionSheet,); + + #[optional] + #[method(didPresentActionSheet:)] + pub unsafe fn didPresentActionSheet(&self, actionSheet: &UIActionSheet,); + + #[optional] + #[method(actionSheet:willDismissWithButtonIndex:)] + pub unsafe fn actionSheet_willDismissWithButtonIndex(&self, actionSheet: &UIActionSheet,buttonIndex: NSInteger,); + + #[optional] + #[method(actionSheet:didDismissWithButtonIndex:)] + pub unsafe fn actionSheet_didDismissWithButtonIndex(&self, actionSheet: &UIActionSheet,buttonIndex: NSInteger,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIActivity.rs b/crates/icrate-generated/src/UIKit/generated/UIActivity.rs new file mode 100644 index 000000000..bc9e42324 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIActivity.rs @@ -0,0 +1,93 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +pub type UIActivityType = NSString; + +extern_static!(UIActivityTypePostToFacebook: &'static UIActivityType); + +extern_static!(UIActivityTypePostToTwitter: &'static UIActivityType); + +extern_static!(UIActivityTypePostToWeibo: &'static UIActivityType); + +extern_static!(UIActivityTypeMessage: &'static UIActivityType); + +extern_static!(UIActivityTypeMail: &'static UIActivityType); + +extern_static!(UIActivityTypePrint: &'static UIActivityType); + +extern_static!(UIActivityTypeCopyToPasteboard: &'static UIActivityType); + +extern_static!(UIActivityTypeAssignToContact: &'static UIActivityType); + +extern_static!(UIActivityTypeSaveToCameraRoll: &'static UIActivityType); + +extern_static!(UIActivityTypeAddToReadingList: &'static UIActivityType); + +extern_static!(UIActivityTypePostToFlickr: &'static UIActivityType); + +extern_static!(UIActivityTypePostToVimeo: &'static UIActivityType); + +extern_static!(UIActivityTypePostToTencentWeibo: &'static UIActivityType); + +extern_static!(UIActivityTypeAirDrop: &'static UIActivityType); + +extern_static!(UIActivityTypeOpenInIBooks: &'static UIActivityType); + +extern_static!(UIActivityTypeMarkupAsPDF: &'static UIActivityType); + +extern_static!(UIActivityTypeSharePlay: &'static UIActivityType); + +extern_static!(UIActivityTypeCollaborationInviteWithLink: &'static UIActivityType); + +extern_static!(UIActivityTypeCollaborationCopyLink: &'static UIActivityType); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIActivityCategory { + UIActivityCategoryAction = 0, + UIActivityCategoryShare = 1, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIActivity; + + unsafe impl ClassType for UIActivity { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIActivity { + #[method(activityCategory)] + pub unsafe fn activityCategory() -> UIActivityCategory; + + #[method_id(@__retain_semantics Other activityType)] + pub unsafe fn activityType(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other activityTitle)] + pub unsafe fn activityTitle(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other activityImage)] + pub unsafe fn activityImage(&self, ) -> Option>; + + #[method(canPerformWithActivityItems:)] + pub unsafe fn canPerformWithActivityItems(&self, activityItems: &NSArray,) -> bool; + + #[method(prepareWithActivityItems:)] + pub unsafe fn prepareWithActivityItems(&self, activityItems: &NSArray,); + + #[method_id(@__retain_semantics Other activityViewController)] + pub unsafe fn activityViewController(&self, ) -> Option>; + + #[method(performActivity)] + pub unsafe fn performActivity(&self, ); + + #[method(activityDidFinish:)] + pub unsafe fn activityDidFinish(&self, completed: bool,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIActivityIndicatorView.rs b/crates/icrate-generated/src/UIKit/generated/UIActivityIndicatorView.rs new file mode 100644 index 000000000..0f062b09f --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIActivityIndicatorView.rs @@ -0,0 +1,65 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIActivityIndicatorViewStyle { + UIActivityIndicatorViewStyleMedium = 100, + UIActivityIndicatorViewStyleLarge = 101, + UIActivityIndicatorViewStyleWhiteLarge = 0, + UIActivityIndicatorViewStyleWhite = 1, + UIActivityIndicatorViewStyleGray = 2, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIActivityIndicatorView; + + unsafe impl ClassType for UIActivityIndicatorView { + type Super = UIView; + } +); + +extern_methods!( + unsafe impl UIActivityIndicatorView { + #[method_id(@__retain_semantics Init initWithActivityIndicatorStyle:)] + pub unsafe fn initWithActivityIndicatorStyle(this: Option>, style: UIActivityIndicatorViewStyle,) -> Id; + + #[method_id(@__retain_semantics Init initWithFrame:)] + pub unsafe fn initWithFrame(this: Option>, frame: CGRect,) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Id; + + #[method(activityIndicatorViewStyle)] + pub unsafe fn activityIndicatorViewStyle(&self, ) -> UIActivityIndicatorViewStyle; + + #[method(setActivityIndicatorViewStyle:)] + pub unsafe fn setActivityIndicatorViewStyle(&self, activityIndicatorViewStyle: UIActivityIndicatorViewStyle,); + + #[method(hidesWhenStopped)] + pub unsafe fn hidesWhenStopped(&self, ) -> bool; + + #[method(setHidesWhenStopped:)] + pub unsafe fn setHidesWhenStopped(&self, hidesWhenStopped: bool,); + + #[method_id(@__retain_semantics Other color)] + pub unsafe fn color(&self, ) -> Option>; + + #[method(setColor:)] + pub unsafe fn setColor(&self, color: Option<&UIColor>,); + + #[method(startAnimating)] + pub unsafe fn startAnimating(&self, ); + + #[method(stopAnimating)] + pub unsafe fn stopAnimating(&self, ); + + #[method(isAnimating)] + pub unsafe fn isAnimating(&self, ) -> bool; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIActivityItemProvider.rs b/crates/icrate-generated/src/UIKit/generated/UIActivityItemProvider.rs new file mode 100644 index 000000000..2b850e6c2 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIActivityItemProvider.rs @@ -0,0 +1,62 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_protocol!( + pub struct UIActivityItemSource; + + unsafe impl UIActivityItemSource { + #[method_id(@__retain_semantics Other activityViewControllerPlaceholderItem:)] + pub unsafe fn activityViewControllerPlaceholderItem(&self, activityViewController: &UIActivityViewController,) -> Id; + + #[method_id(@__retain_semantics Other activityViewController:itemForActivityType:)] + pub unsafe fn activityViewController_itemForActivityType(&self, activityViewController: &UIActivityViewController,activityType: Option<&UIActivityType>,) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other activityViewController:subjectForActivityType:)] + pub unsafe fn activityViewController_subjectForActivityType(&self, activityViewController: &UIActivityViewController,activityType: Option<&UIActivityType>,) -> Id; + + #[optional] + #[method_id(@__retain_semantics Other activityViewController:dataTypeIdentifierForActivityType:)] + pub unsafe fn activityViewController_dataTypeIdentifierForActivityType(&self, activityViewController: &UIActivityViewController,activityType: Option<&UIActivityType>,) -> Id; + + #[optional] + #[method_id(@__retain_semantics Other activityViewController:thumbnailImageForActivityType:suggestedSize:)] + pub unsafe fn activityViewController_thumbnailImageForActivityType_suggestedSize(&self, activityViewController: &UIActivityViewController,activityType: Option<&UIActivityType>,size: CGSize,) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other activityViewControllerLinkMetadata:)] + pub unsafe fn activityViewControllerLinkMetadata(&self, activityViewController: &UIActivityViewController,) -> Option>; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIActivityItemProvider; + + unsafe impl ClassType for UIActivityItemProvider { + type Super = NSOperation; + } +); + +extern_methods!( + unsafe impl UIActivityItemProvider { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics Init initWithPlaceholderItem:)] + pub unsafe fn initWithPlaceholderItem(this: Option>, placeholderItem: &Object,) -> Id; + + #[method_id(@__retain_semantics Other placeholderItem)] + pub unsafe fn placeholderItem(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other activityType)] + pub unsafe fn activityType(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other item)] + pub unsafe fn item(&self, ) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIActivityItemsConfiguration.rs b/crates/icrate-generated/src/UIKit/generated/UIActivityItemsConfiguration.rs new file mode 100644 index 000000000..1606238f7 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIActivityItemsConfiguration.rs @@ -0,0 +1,72 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIActivityItemsConfiguration; + + unsafe impl ClassType for UIActivityItemsConfiguration { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIActivityItemsConfiguration { + #[method_id(@__retain_semantics Other localObject)] + pub unsafe fn localObject(&self, ) -> Option>; + + #[method(setLocalObject:)] + pub unsafe fn setLocalObject(&self, localObject: Option<&Object>,); + + #[method_id(@__retain_semantics Other supportedInteractions)] + pub unsafe fn supportedInteractions(&self, ) -> Id, Shared>; + + #[method(setSupportedInteractions:)] + pub unsafe fn setSupportedInteractions(&self, supportedInteractions: &NSArray,); + + #[method(metadataProvider)] + pub unsafe fn metadataProvider(&self, ) -> *mut Block<(NonNull, ), *mut Object>; + + #[method(setMetadataProvider:)] + pub unsafe fn setMetadataProvider(&self, metadataProvider: Option<&Block<(NonNull, ), *mut Object>>,); + + #[method(perItemMetadataProvider)] + pub unsafe fn perItemMetadataProvider(&self, ) -> *mut Block<(NSInteger, NonNull, ), *mut Object>; + + #[method(setPerItemMetadataProvider:)] + pub unsafe fn setPerItemMetadataProvider(&self, perItemMetadataProvider: Option<&Block<(NSInteger, NonNull, ), *mut Object>>,); + + #[method(previewProvider)] + pub unsafe fn previewProvider(&self, ) -> *mut Block<(NSInteger, NonNull, CGSize, ), *mut NSItemProvider>; + + #[method(setPreviewProvider:)] + pub unsafe fn setPreviewProvider(&self, previewProvider: Option<&Block<(NSInteger, NonNull, CGSize, ), *mut NSItemProvider>>,); + + #[method(applicationActivitiesProvider)] + pub unsafe fn applicationActivitiesProvider(&self, ) -> *mut Block<(), NonNull>>; + + #[method(setApplicationActivitiesProvider:)] + pub unsafe fn setApplicationActivitiesProvider(&self, applicationActivitiesProvider: Option<&Block<(), NonNull>>>,); + + #[method_id(@__retain_semantics Other activityItemsConfigurationWithObjects:)] + pub unsafe fn activityItemsConfigurationWithObjects(objects: &NSArray,) -> Id; + + #[method_id(@__retain_semantics Other activityItemsConfigurationWithItemProviders:)] + pub unsafe fn activityItemsConfigurationWithItemProviders(itemProviders: &NSArray,) -> Id; + + #[method_id(@__retain_semantics Init initWithObjects:)] + pub unsafe fn initWithObjects(this: Option>, objects: &NSArray,) -> Id; + + #[method_id(@__retain_semantics Init initWithItemProviders:)] + pub unsafe fn initWithItemProviders(this: Option>, itemProviders: &NSArray,) -> 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-generated/src/UIKit/generated/UIActivityItemsConfigurationReading.rs b/crates/icrate-generated/src/UIKit/generated/UIActivityItemsConfigurationReading.rs new file mode 100644 index 000000000..2ba843661 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIActivityItemsConfigurationReading.rs @@ -0,0 +1,62 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +pub type UIActivityItemsConfigurationMetadataKey = NSString; + +extern_static!(UIActivityItemsConfigurationMetadataKeyTitle: &'static UIActivityItemsConfigurationMetadataKey); + +extern_static!(UIActivityItemsConfigurationMetadataKeyMessageBody: &'static UIActivityItemsConfigurationMetadataKey); + +extern_static!(UIActivityItemsConfigurationMetadataKeyLinkPresentationMetadata: &'static UIActivityItemsConfigurationMetadataKey); + +pub type UIActivityItemsConfigurationPreviewIntent = NSString; + +extern_static!(UIActivityItemsConfigurationPreviewIntentFullSize: &'static UIActivityItemsConfigurationPreviewIntent); + +extern_static!(UIActivityItemsConfigurationPreviewIntentThumbnail: &'static UIActivityItemsConfigurationPreviewIntent); + +pub type UIActivityItemsConfigurationInteraction = NSString; + +extern_static!(UIActivityItemsConfigurationInteractionShare: &'static UIActivityItemsConfigurationInteraction); + +extern_protocol!( + pub struct UIActivityItemsConfigurationReading; + + unsafe impl UIActivityItemsConfigurationReading { + #[method_id(@__retain_semantics Other itemProvidersForActivityItemsConfiguration)] + pub unsafe fn itemProvidersForActivityItemsConfiguration(&self, ) -> Id, Shared>; + + #[optional] + #[method(activityItemsConfigurationSupportsInteraction:)] + pub unsafe fn activityItemsConfigurationSupportsInteraction(&self, interaction: &UIActivityItemsConfigurationInteraction,) -> bool; + + #[optional] + #[method_id(@__retain_semantics Other activityItemsConfigurationMetadataForKey:)] + pub unsafe fn activityItemsConfigurationMetadataForKey(&self, key: &UIActivityItemsConfigurationMetadataKey,) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other activityItemsConfigurationMetadataForItemAtIndex:key:)] + pub unsafe fn activityItemsConfigurationMetadataForItemAtIndex_key(&self, index: NSInteger,key: &UIActivityItemsConfigurationMetadataKey,) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other activityItemsConfigurationPreviewForItemAtIndex:intent:suggestedSize:)] + pub unsafe fn activityItemsConfigurationPreviewForItemAtIndex_intent_suggestedSize(&self, index: NSInteger,intent: &UIActivityItemsConfigurationPreviewIntent,suggestedSize: CGSize,) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other applicationActivitiesForActivityItemsConfiguration)] + pub unsafe fn applicationActivitiesForActivityItemsConfiguration(&self, ) -> Option, Shared>>; + + } +); + +extern_protocol!( + pub struct UIActivityItemsConfigurationProviding; + + unsafe impl UIActivityItemsConfigurationProviding { + #[method_id(@__retain_semantics Other activityItemsConfiguration)] + pub unsafe fn activityItemsConfiguration(&self, ) -> Option>; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIActivityViewController.rs b/crates/icrate-generated/src/UIKit/generated/UIActivityViewController.rs new file mode 100644 index 000000000..7a472e2c2 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIActivityViewController.rs @@ -0,0 +1,67 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +pub type UIActivityViewControllerCompletionHandler = *mut Block<(*mut UIActivityType, Bool, ), ()>; + +pub type UIActivityViewControllerCompletionWithItemsHandler = *mut Block<(*mut UIActivityType, Bool, *mut NSArray, *mut NSError, ), ()>; + +extern_class!( + #[derive(Debug)] + pub struct UIActivityViewController; + + unsafe impl ClassType for UIActivityViewController { + type Super = UIViewController; + } +); + +extern_methods!( + unsafe impl UIActivityViewController { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics Init initWithNibName:bundle:)] + pub unsafe fn initWithNibName_bundle(this: Option>, nibNameOrNil: Option<&NSString>,nibBundleOrNil: Option<&NSBundle>,) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method_id(@__retain_semantics Init initWithActivityItems:applicationActivities:)] + pub unsafe fn initWithActivityItems_applicationActivities(this: Option>, activityItems: &NSArray,applicationActivities: Option<&NSArray>,) -> Id; + + #[method(completionHandler)] + pub unsafe fn completionHandler(&self, ) -> UIActivityViewControllerCompletionHandler; + + #[method(setCompletionHandler:)] + pub unsafe fn setCompletionHandler(&self, completionHandler: UIActivityViewControllerCompletionHandler,); + + #[method(completionWithItemsHandler)] + pub unsafe fn completionWithItemsHandler(&self, ) -> UIActivityViewControllerCompletionWithItemsHandler; + + #[method(setCompletionWithItemsHandler:)] + pub unsafe fn setCompletionWithItemsHandler(&self, completionWithItemsHandler: UIActivityViewControllerCompletionWithItemsHandler,); + + #[method_id(@__retain_semantics Other excludedActivityTypes)] + pub unsafe fn excludedActivityTypes(&self, ) -> Option, Shared>>; + + #[method(setExcludedActivityTypes:)] + pub unsafe fn setExcludedActivityTypes(&self, excludedActivityTypes: Option<&NSArray>,); + + #[method(allowsProminentActivity)] + pub unsafe fn allowsProminentActivity(&self, ) -> bool; + + #[method(setAllowsProminentActivity:)] + pub unsafe fn setAllowsProminentActivity(&self, allowsProminentActivity: bool,); + + } +); + +extern_methods!( + /// UIActivityItemsConfiguration + unsafe impl UIActivityViewController { + #[method_id(@__retain_semantics Init initWithActivityItemsConfiguration:)] + pub unsafe fn initWithActivityItemsConfiguration(this: Option>, activityItemsConfiguration: &UIActivityItemsConfigurationReading,) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIAlert.rs b/crates/icrate-generated/src/UIKit/generated/UIAlert.rs new file mode 100644 index 000000000..bc88fc826 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIAlert.rs @@ -0,0 +1,4 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + diff --git a/crates/icrate-generated/src/UIKit/generated/UIAlertController.rs b/crates/icrate-generated/src/UIKit/generated/UIAlertController.rs new file mode 100644 index 000000000..86bd630e1 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIAlertController.rs @@ -0,0 +1,120 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIAlertActionStyle { + UIAlertActionStyleDefault = 0, + UIAlertActionStyleCancel = 1, + UIAlertActionStyleDestructive = 2, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIAlertControllerStyle { + UIAlertControllerStyleActionSheet = 0, + UIAlertControllerStyleAlert = 1, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIAlertControllerSeverity { + UIAlertControllerSeverityDefault = 0, + UIAlertControllerSeverityCritical = 1, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIAlertAction; + + unsafe impl ClassType for UIAlertAction { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIAlertAction { + #[method_id(@__retain_semantics Other actionWithTitle:style:handler:)] + pub unsafe fn actionWithTitle_style_handler(title: Option<&NSString>,style: UIAlertActionStyle,handler: Option<&Block<(NonNull, ), ()>>,) -> Id; + + #[method_id(@__retain_semantics Other title)] + pub unsafe fn title(&self, ) -> Option>; + + #[method(style)] + pub unsafe fn style(&self, ) -> UIAlertActionStyle; + + #[method(isEnabled)] + pub unsafe fn isEnabled(&self, ) -> bool; + + #[method(setEnabled:)] + pub unsafe fn setEnabled(&self, enabled: bool,); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIAlertController; + + unsafe impl ClassType for UIAlertController { + type Super = UIViewController; + } +); + +extern_methods!( + unsafe impl UIAlertController { + #[method_id(@__retain_semantics Other alertControllerWithTitle:message:preferredStyle:)] + pub unsafe fn alertControllerWithTitle_message_preferredStyle(title: Option<&NSString>,message: Option<&NSString>,preferredStyle: UIAlertControllerStyle,) -> Id; + + #[method(addAction:)] + pub unsafe fn addAction(&self, action: &UIAlertAction,); + + #[method_id(@__retain_semantics Other actions)] + pub unsafe fn actions(&self, ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other preferredAction)] + pub unsafe fn preferredAction(&self, ) -> Option>; + + #[method(setPreferredAction:)] + pub unsafe fn setPreferredAction(&self, preferredAction: Option<&UIAlertAction>,); + + #[method(addTextFieldWithConfigurationHandler:)] + pub unsafe fn addTextFieldWithConfigurationHandler(&self, configurationHandler: Option<&Block<(NonNull, ), ()>>,); + + #[method_id(@__retain_semantics Other textFields)] + pub unsafe fn textFields(&self, ) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other title)] + pub unsafe fn title(&self, ) -> Option>; + + #[method(setTitle:)] + pub unsafe fn setTitle(&self, title: Option<&NSString>,); + + #[method_id(@__retain_semantics Other message)] + pub unsafe fn message(&self, ) -> Option>; + + #[method(setMessage:)] + pub unsafe fn setMessage(&self, message: Option<&NSString>,); + + #[method(preferredStyle)] + pub unsafe fn preferredStyle(&self, ) -> UIAlertControllerStyle; + + #[method(severity)] + pub unsafe fn severity(&self, ) -> UIAlertControllerSeverity; + + #[method(setSeverity:)] + pub unsafe fn setSeverity(&self, severity: UIAlertControllerSeverity,); + + } +); + +extern_methods!( + /// SpringLoading + unsafe impl UIAlertController { + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIAlertView.rs b/crates/icrate-generated/src/UIKit/generated/UIAlertView.rs new file mode 100644 index 000000000..a581e34b2 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIAlertView.rs @@ -0,0 +1,123 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIAlertViewStyle { + UIAlertViewStyleDefault = 0, + UIAlertViewStyleSecureTextInput = 1, + UIAlertViewStylePlainTextInput = 2, + UIAlertViewStyleLoginAndPasswordInput = 3, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIAlertView; + + unsafe impl ClassType for UIAlertView { + type Super = UIView; + } +); + +extern_methods!( + unsafe impl UIAlertView { + #[method_id(@__retain_semantics Init initWithFrame:)] + pub unsafe fn initWithFrame(this: Option>, frame: CGRect,) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&Object>,); + + #[method_id(@__retain_semantics Other title)] + pub unsafe fn title(&self, ) -> Id; + + #[method(setTitle:)] + pub unsafe fn setTitle(&self, title: &NSString,); + + #[method_id(@__retain_semantics Other message)] + pub unsafe fn message(&self, ) -> Option>; + + #[method(setMessage:)] + pub unsafe fn setMessage(&self, message: Option<&NSString>,); + + #[method(addButtonWithTitle:)] + pub unsafe fn addButtonWithTitle(&self, title: Option<&NSString>,) -> NSInteger; + + #[method_id(@__retain_semantics Other buttonTitleAtIndex:)] + pub unsafe fn buttonTitleAtIndex(&self, buttonIndex: NSInteger,) -> Option>; + + #[method(numberOfButtons)] + pub unsafe fn numberOfButtons(&self, ) -> NSInteger; + + #[method(cancelButtonIndex)] + pub unsafe fn cancelButtonIndex(&self, ) -> NSInteger; + + #[method(setCancelButtonIndex:)] + pub unsafe fn setCancelButtonIndex(&self, cancelButtonIndex: NSInteger,); + + #[method(firstOtherButtonIndex)] + pub unsafe fn firstOtherButtonIndex(&self, ) -> NSInteger; + + #[method(isVisible)] + pub unsafe fn isVisible(&self, ) -> bool; + + #[method(show)] + pub unsafe fn show(&self, ); + + #[method(dismissWithClickedButtonIndex:animated:)] + pub unsafe fn dismissWithClickedButtonIndex_animated(&self, buttonIndex: NSInteger,animated: bool,); + + #[method(alertViewStyle)] + pub unsafe fn alertViewStyle(&self, ) -> UIAlertViewStyle; + + #[method(setAlertViewStyle:)] + pub unsafe fn setAlertViewStyle(&self, alertViewStyle: UIAlertViewStyle,); + + #[method_id(@__retain_semantics Other textFieldAtIndex:)] + pub unsafe fn textFieldAtIndex(&self, textFieldIndex: NSInteger,) -> Option>; + + } +); + +extern_protocol!( + pub struct UIAlertViewDelegate; + + unsafe impl UIAlertViewDelegate { + #[optional] + #[method(alertView:clickedButtonAtIndex:)] + pub unsafe fn alertView_clickedButtonAtIndex(&self, alertView: &UIAlertView,buttonIndex: NSInteger,); + + #[optional] + #[method(alertViewCancel:)] + pub unsafe fn alertViewCancel(&self, alertView: &UIAlertView,); + + #[optional] + #[method(willPresentAlertView:)] + pub unsafe fn willPresentAlertView(&self, alertView: &UIAlertView,); + + #[optional] + #[method(didPresentAlertView:)] + pub unsafe fn didPresentAlertView(&self, alertView: &UIAlertView,); + + #[optional] + #[method(alertView:willDismissWithButtonIndex:)] + pub unsafe fn alertView_willDismissWithButtonIndex(&self, alertView: &UIAlertView,buttonIndex: NSInteger,); + + #[optional] + #[method(alertView:didDismissWithButtonIndex:)] + pub unsafe fn alertView_didDismissWithButtonIndex(&self, alertView: &UIAlertView,buttonIndex: NSInteger,); + + #[optional] + #[method(alertViewShouldEnableFirstOtherButton:)] + pub unsafe fn alertViewShouldEnableFirstOtherButton(&self, alertView: &UIAlertView,) -> bool; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIAppearance.rs b/crates/icrate-generated/src/UIKit/generated/UIAppearance.rs new file mode 100644 index 000000000..054b88adb --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIAppearance.rs @@ -0,0 +1,30 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_protocol!( + pub struct UIAppearanceContainer; + + unsafe impl UIAppearanceContainer { + } +); + +extern_protocol!( + pub struct UIAppearance; + + unsafe impl UIAppearance { + #[method_id(@__retain_semantics Other appearance)] + pub unsafe fn appearance() -> Id; + + #[method_id(@__retain_semantics Other appearanceWhenContainedInInstancesOfClasses:)] + pub unsafe fn appearanceWhenContainedInInstancesOfClasses(containerTypes: &NSArray,) -> Id; + + #[method_id(@__retain_semantics Other appearanceForTraitCollection:)] + pub unsafe fn appearanceForTraitCollection(trait_: &UITraitCollection,) -> Id; + + #[method_id(@__retain_semantics Other appearanceForTraitCollection:whenContainedInInstancesOfClasses:)] + pub unsafe fn appearanceForTraitCollection_whenContainedInInstancesOfClasses(trait_: &UITraitCollection,containerTypes: &NSArray,) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIApplication.rs b/crates/icrate-generated/src/UIKit/generated/UIApplication.rs new file mode 100644 index 000000000..ec5c5b928 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIApplication.rs @@ -0,0 +1,747 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIStatusBarStyle { + UIStatusBarStyleDefault = 0, + UIStatusBarStyleLightContent = 1, + UIStatusBarStyleDarkContent = 3, + UIStatusBarStyleBlackTranslucent = 1, + UIStatusBarStyleBlackOpaque = 2, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIStatusBarAnimation { + UIStatusBarAnimationNone = 0, + UIStatusBarAnimationFade = 1, + UIStatusBarAnimationSlide = 2, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIInterfaceOrientation { + UIInterfaceOrientationUnknown = UIDeviceOrientationUnknown, + UIInterfaceOrientationPortrait = UIDeviceOrientationPortrait, + UIInterfaceOrientationPortraitUpsideDown = UIDeviceOrientationPortraitUpsideDown, + UIInterfaceOrientationLandscapeLeft = UIDeviceOrientationLandscapeRight, + UIInterfaceOrientationLandscapeRight = UIDeviceOrientationLandscapeLeft, + } +); + +extern_static!(UIApplicationInvalidInterfaceOrientationException: &'static NSExceptionName); + +ns_options!( + #[underlying(NSUInteger)] + pub enum UIInterfaceOrientationMask { + UIInterfaceOrientationMaskPortrait = 1< Bool { + todo!() + } +); + +inline_fn!( + pub unsafe fn UIInterfaceOrientationIsLandscape(orientation: UIInterfaceOrientation,) -> Bool { + todo!() + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum UIRemoteNotificationType { + UIRemoteNotificationTypeNone = 0, + UIRemoteNotificationTypeBadge = 1<<0, + UIRemoteNotificationTypeSound = 1<<1, + UIRemoteNotificationTypeAlert = 1<<2, + UIRemoteNotificationTypeNewsstandContentAvailability = 1<<3, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum UIBackgroundFetchResult { + UIBackgroundFetchResultNewData = 0, + UIBackgroundFetchResultNoData = 1, + UIBackgroundFetchResultFailed = 2, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIBackgroundRefreshStatus { + UIBackgroundRefreshStatusRestricted = 0, + UIBackgroundRefreshStatusDenied = 1, + UIBackgroundRefreshStatusAvailable = 2, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIApplicationState { + UIApplicationStateActive = 0, + UIApplicationStateInactive = 1, + UIApplicationStateBackground = 2, + } +); + +pub type UIBackgroundTaskIdentifier = NSUInteger; + +extern_static!(UIBackgroundTaskInvalid: UIBackgroundTaskIdentifier); + +extern_static!(UIMinimumKeepAliveTimeout: NSTimeInterval); + +extern_static!(UIApplicationBackgroundFetchIntervalMinimum: NSTimeInterval); + +extern_static!(UIApplicationBackgroundFetchIntervalNever: NSTimeInterval); + +pub type UIApplicationOpenExternalURLOptionsKey = NSString; + +extern_class!( + #[derive(Debug)] + pub struct UIApplication; + + unsafe impl ClassType for UIApplication { + type Super = UIResponder; + } +); + +extern_methods!( + unsafe impl UIApplication { + #[method_id(@__retain_semantics Other sharedApplication)] + pub unsafe fn sharedApplication() -> Id; + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&UIApplicationDelegate>,); + + #[method(beginIgnoringInteractionEvents)] + pub unsafe fn beginIgnoringInteractionEvents(&self, ); + + #[method(endIgnoringInteractionEvents)] + pub unsafe fn endIgnoringInteractionEvents(&self, ); + + #[method(isIgnoringInteractionEvents)] + pub unsafe fn isIgnoringInteractionEvents(&self, ) -> bool; + + #[method(isIdleTimerDisabled)] + pub unsafe fn isIdleTimerDisabled(&self, ) -> bool; + + #[method(setIdleTimerDisabled:)] + pub unsafe fn setIdleTimerDisabled(&self, idleTimerDisabled: bool,); + + #[method(openURL:)] + pub unsafe fn openURL(&self, url: &NSURL,) -> bool; + + #[method(canOpenURL:)] + pub unsafe fn canOpenURL(&self, url: &NSURL,) -> bool; + + #[method(openURL:options:completionHandler:)] + pub unsafe fn openURL_options_completionHandler(&self, url: &NSURL,options: &NSDictionary,completion: Option<&Block<(Bool, ), ()>>,); + + #[method(sendEvent:)] + pub unsafe fn sendEvent(&self, event: &UIEvent,); + + #[method_id(@__retain_semantics Other keyWindow)] + pub unsafe fn keyWindow(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other windows)] + pub unsafe fn windows(&self, ) -> Id, Shared>; + + #[method(sendAction:to:from:forEvent:)] + pub unsafe fn sendAction_to_from_forEvent(&self, action: Sel,target: Option<&Object>,sender: Option<&Object>,event: Option<&UIEvent>,) -> bool; + + #[method(isNetworkActivityIndicatorVisible)] + pub unsafe fn isNetworkActivityIndicatorVisible(&self, ) -> bool; + + #[method(setNetworkActivityIndicatorVisible:)] + pub unsafe fn setNetworkActivityIndicatorVisible(&self, networkActivityIndicatorVisible: bool,); + + #[method(statusBarStyle)] + pub unsafe fn statusBarStyle(&self, ) -> UIStatusBarStyle; + + #[method(isStatusBarHidden)] + pub unsafe fn isStatusBarHidden(&self, ) -> bool; + + #[method(statusBarOrientation)] + pub unsafe fn statusBarOrientation(&self, ) -> UIInterfaceOrientation; + + #[method(supportedInterfaceOrientationsForWindow:)] + pub unsafe fn supportedInterfaceOrientationsForWindow(&self, window: Option<&UIWindow>,) -> UIInterfaceOrientationMask; + + #[method(statusBarOrientationAnimationDuration)] + pub unsafe fn statusBarOrientationAnimationDuration(&self, ) -> NSTimeInterval; + + #[method(statusBarFrame)] + pub unsafe fn statusBarFrame(&self, ) -> CGRect; + + #[method(applicationIconBadgeNumber)] + pub unsafe fn applicationIconBadgeNumber(&self, ) -> NSInteger; + + #[method(setApplicationIconBadgeNumber:)] + pub unsafe fn setApplicationIconBadgeNumber(&self, applicationIconBadgeNumber: NSInteger,); + + #[method(applicationSupportsShakeToEdit)] + pub unsafe fn applicationSupportsShakeToEdit(&self, ) -> bool; + + #[method(setApplicationSupportsShakeToEdit:)] + pub unsafe fn setApplicationSupportsShakeToEdit(&self, applicationSupportsShakeToEdit: bool,); + + #[method(applicationState)] + pub unsafe fn applicationState(&self, ) -> UIApplicationState; + + #[method(backgroundTimeRemaining)] + pub unsafe fn backgroundTimeRemaining(&self, ) -> NSTimeInterval; + + #[method(beginBackgroundTaskWithExpirationHandler:)] + pub unsafe fn beginBackgroundTaskWithExpirationHandler(&self, handler: Option<&Block<(), ()>>,) -> UIBackgroundTaskIdentifier; + + #[method(beginBackgroundTaskWithName:expirationHandler:)] + pub unsafe fn beginBackgroundTaskWithName_expirationHandler(&self, taskName: Option<&NSString>,handler: Option<&Block<(), ()>>,) -> UIBackgroundTaskIdentifier; + + #[method(endBackgroundTask:)] + pub unsafe fn endBackgroundTask(&self, identifier: UIBackgroundTaskIdentifier,); + + #[method(setMinimumBackgroundFetchInterval:)] + pub unsafe fn setMinimumBackgroundFetchInterval(&self, minimumBackgroundFetchInterval: NSTimeInterval,); + + #[method(backgroundRefreshStatus)] + pub unsafe fn backgroundRefreshStatus(&self, ) -> UIBackgroundRefreshStatus; + + #[method(isProtectedDataAvailable)] + pub unsafe fn isProtectedDataAvailable(&self, ) -> bool; + + #[method(userInterfaceLayoutDirection)] + pub unsafe fn userInterfaceLayoutDirection(&self, ) -> UIUserInterfaceLayoutDirection; + + #[method_id(@__retain_semantics Other preferredContentSizeCategory)] + pub unsafe fn preferredContentSizeCategory(&self, ) -> Id; + + #[method_id(@__retain_semantics Other connectedScenes)] + pub unsafe fn connectedScenes(&self, ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other openSessions)] + pub unsafe fn openSessions(&self, ) -> Id, Shared>; + + #[method(supportsMultipleScenes)] + pub unsafe fn supportsMultipleScenes(&self, ) -> bool; + + #[method(requestSceneSessionActivation:userActivity:options:errorHandler:)] + pub unsafe fn requestSceneSessionActivation_userActivity_options_errorHandler(&self, sceneSession: Option<&UISceneSession>,userActivity: Option<&NSUserActivity>,options: Option<&UISceneActivationRequestOptions>,errorHandler: Option<&Block<(NonNull, ), ()>>,); + + #[method(requestSceneSessionDestruction:options:errorHandler:)] + pub unsafe fn requestSceneSessionDestruction_options_errorHandler(&self, sceneSession: &UISceneSession,options: Option<&UISceneDestructionRequestOptions>,errorHandler: Option<&Block<(NonNull, ), ()>>,); + + #[method(requestSceneSessionRefresh:)] + pub unsafe fn requestSceneSessionRefresh(&self, sceneSession: &UISceneSession,); + + } +); + +extern_methods!( + /// UIRemoteNotifications + unsafe impl UIApplication { + #[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: UIRemoteNotificationType,); + + #[method(enabledRemoteNotificationTypes)] + pub unsafe fn enabledRemoteNotificationTypes(&self, ) -> UIRemoteNotificationType; + + } +); + +extern_methods!( + /// UILocalNotifications + unsafe impl UIApplication { + #[method(presentLocalNotificationNow:)] + pub unsafe fn presentLocalNotificationNow(&self, notification: &UILocalNotification,); + + #[method(scheduleLocalNotification:)] + pub unsafe fn scheduleLocalNotification(&self, notification: &UILocalNotification,); + + #[method(cancelLocalNotification:)] + pub unsafe fn cancelLocalNotification(&self, notification: &UILocalNotification,); + + #[method(cancelAllLocalNotifications)] + pub unsafe fn cancelAllLocalNotifications(&self, ); + + #[method_id(@__retain_semantics Other scheduledLocalNotifications)] + pub unsafe fn scheduledLocalNotifications(&self, ) -> Option, Shared>>; + + #[method(setScheduledLocalNotifications:)] + pub unsafe fn setScheduledLocalNotifications(&self, scheduledLocalNotifications: Option<&NSArray>,); + + } +); + +extern_methods!( + /// UIUserNotificationSettings + unsafe impl UIApplication { + #[method(registerUserNotificationSettings:)] + pub unsafe fn registerUserNotificationSettings(&self, notificationSettings: &UIUserNotificationSettings,); + + #[method_id(@__retain_semantics Other currentUserNotificationSettings)] + pub unsafe fn currentUserNotificationSettings(&self, ) -> Option>; + + } +); + +extern_methods!( + /// UIRemoteControlEvents + unsafe impl UIApplication { + #[method(beginReceivingRemoteControlEvents)] + pub unsafe fn beginReceivingRemoteControlEvents(&self, ); + + #[method(endReceivingRemoteControlEvents)] + pub unsafe fn endReceivingRemoteControlEvents(&self, ); + + } +); + +extern_methods!( + /// UINewsstand + unsafe impl UIApplication { + #[method(setNewsstandIconImage:)] + pub unsafe fn setNewsstandIconImage(&self, image: Option<&UIImage>,); + + } +); + +extern_methods!( + /// UIShortcutItems + unsafe impl UIApplication { + #[method_id(@__retain_semantics Other shortcutItems)] + pub unsafe fn shortcutItems(&self, ) -> Option, Shared>>; + + #[method(setShortcutItems:)] + pub unsafe fn setShortcutItems(&self, shortcutItems: Option<&NSArray>,); + + } +); + +extern_methods!( + /// UIAlternateApplicationIcons + unsafe impl UIApplication { + #[method(supportsAlternateIcons)] + pub unsafe fn supportsAlternateIcons(&self, ) -> bool; + + #[method(setAlternateIconName:completionHandler:)] + pub unsafe fn setAlternateIconName_completionHandler(&self, alternateIconName: Option<&NSString>,completionHandler: Option<&Block<(*mut NSError, ), ()>>,); + + #[method_id(@__retain_semantics Other alternateIconName)] + pub unsafe fn alternateIconName(&self, ) -> Option>; + + } +); + +extern_methods!( + /// UIStateRestoration + unsafe impl UIApplication { + #[method(extendStateRestoration)] + pub unsafe fn extendStateRestoration(&self, ); + + #[method(completeStateRestoration)] + pub unsafe fn completeStateRestoration(&self, ); + + #[method(ignoreSnapshotOnNextApplicationLaunch)] + pub unsafe fn ignoreSnapshotOnNextApplicationLaunch(&self, ); + + #[method(registerObjectForStateRestoration:restorationIdentifier:)] + pub unsafe fn registerObjectForStateRestoration_restorationIdentifier(object: &UIStateRestoring,restorationIdentifier: &NSString,); + + } +); + +pub type UIApplicationLaunchOptionsKey = NSString; + +pub type UIApplicationOpenURLOptionsKey = NSString; + +pub type UIApplicationExtensionPointIdentifier = NSString; + +extern_protocol!( + pub struct UIApplicationDelegate; + + unsafe impl UIApplicationDelegate { + #[optional] + #[method(applicationDidFinishLaunching:)] + pub unsafe fn applicationDidFinishLaunching(&self, application: &UIApplication,); + + #[optional] + #[method(application:willFinishLaunchingWithOptions:)] + pub unsafe fn application_willFinishLaunchingWithOptions(&self, application: &UIApplication,launchOptions: Option<&NSDictionary>,) -> bool; + + #[optional] + #[method(application:didFinishLaunchingWithOptions:)] + pub unsafe fn application_didFinishLaunchingWithOptions(&self, application: &UIApplication,launchOptions: Option<&NSDictionary>,) -> bool; + + #[optional] + #[method(applicationDidBecomeActive:)] + pub unsafe fn applicationDidBecomeActive(&self, application: &UIApplication,); + + #[optional] + #[method(applicationWillResignActive:)] + pub unsafe fn applicationWillResignActive(&self, application: &UIApplication,); + + #[optional] + #[method(application:handleOpenURL:)] + pub unsafe fn application_handleOpenURL(&self, application: &UIApplication,url: &NSURL,) -> bool; + + #[optional] + #[method(application:openURL:sourceApplication:annotation:)] + pub unsafe fn application_openURL_sourceApplication_annotation(&self, application: &UIApplication,url: &NSURL,sourceApplication: Option<&NSString>,annotation: &Object,) -> bool; + + #[optional] + #[method(application:openURL:options:)] + pub unsafe fn application_openURL_options(&self, app: &UIApplication,url: &NSURL,options: &NSDictionary,) -> bool; + + #[optional] + #[method(applicationDidReceiveMemoryWarning:)] + pub unsafe fn applicationDidReceiveMemoryWarning(&self, application: &UIApplication,); + + #[optional] + #[method(applicationWillTerminate:)] + pub unsafe fn applicationWillTerminate(&self, application: &UIApplication,); + + #[optional] + #[method(applicationSignificantTimeChange:)] + pub unsafe fn applicationSignificantTimeChange(&self, application: &UIApplication,); + + #[optional] + #[method(application:willChangeStatusBarOrientation:duration:)] + pub unsafe fn application_willChangeStatusBarOrientation_duration(&self, application: &UIApplication,newStatusBarOrientation: UIInterfaceOrientation,duration: NSTimeInterval,); + + #[optional] + #[method(application:didChangeStatusBarOrientation:)] + pub unsafe fn application_didChangeStatusBarOrientation(&self, application: &UIApplication,oldStatusBarOrientation: UIInterfaceOrientation,); + + #[optional] + #[method(application:willChangeStatusBarFrame:)] + pub unsafe fn application_willChangeStatusBarFrame(&self, application: &UIApplication,newStatusBarFrame: CGRect,); + + #[optional] + #[method(application:didChangeStatusBarFrame:)] + pub unsafe fn application_didChangeStatusBarFrame(&self, application: &UIApplication,oldStatusBarFrame: CGRect,); + + #[optional] + #[method(application:didRegisterUserNotificationSettings:)] + pub unsafe fn application_didRegisterUserNotificationSettings(&self, application: &UIApplication,notificationSettings: &UIUserNotificationSettings,); + + #[optional] + #[method(application:didRegisterForRemoteNotificationsWithDeviceToken:)] + pub unsafe fn application_didRegisterForRemoteNotificationsWithDeviceToken(&self, application: &UIApplication,deviceToken: &NSData,); + + #[optional] + #[method(application:didFailToRegisterForRemoteNotificationsWithError:)] + pub unsafe fn application_didFailToRegisterForRemoteNotificationsWithError(&self, application: &UIApplication,error: &NSError,); + + #[optional] + #[method(application:didReceiveRemoteNotification:)] + pub unsafe fn application_didReceiveRemoteNotification(&self, application: &UIApplication,userInfo: &NSDictionary,); + + #[optional] + #[method(application:didReceiveLocalNotification:)] + pub unsafe fn application_didReceiveLocalNotification(&self, application: &UIApplication,notification: &UILocalNotification,); + + #[optional] + #[method(application:handleActionWithIdentifier:forLocalNotification:completionHandler:)] + pub unsafe fn application_handleActionWithIdentifier_forLocalNotification_completionHandler(&self, application: &UIApplication,identifier: Option<&NSString>,notification: &UILocalNotification,completionHandler: &Block<(), ()>,); + + #[optional] + #[method(application:handleActionWithIdentifier:forRemoteNotification:withResponseInfo:completionHandler:)] + pub unsafe fn application_handleActionWithIdentifier_forRemoteNotification_withResponseInfo_completionHandler(&self, application: &UIApplication,identifier: Option<&NSString>,userInfo: &NSDictionary,responseInfo: &NSDictionary,completionHandler: &Block<(), ()>,); + + #[optional] + #[method(application:handleActionWithIdentifier:forRemoteNotification:completionHandler:)] + pub unsafe fn application_handleActionWithIdentifier_forRemoteNotification_completionHandler(&self, application: &UIApplication,identifier: Option<&NSString>,userInfo: &NSDictionary,completionHandler: &Block<(), ()>,); + + #[optional] + #[method(application:handleActionWithIdentifier:forLocalNotification:withResponseInfo:completionHandler:)] + pub unsafe fn application_handleActionWithIdentifier_forLocalNotification_withResponseInfo_completionHandler(&self, application: &UIApplication,identifier: Option<&NSString>,notification: &UILocalNotification,responseInfo: &NSDictionary,completionHandler: &Block<(), ()>,); + + #[optional] + #[method(application:didReceiveRemoteNotification:fetchCompletionHandler:)] + pub unsafe fn application_didReceiveRemoteNotification_fetchCompletionHandler(&self, application: &UIApplication,userInfo: &NSDictionary,completionHandler: &Block<(UIBackgroundFetchResult, ), ()>,); + + #[optional] + #[method(application:performFetchWithCompletionHandler:)] + pub unsafe fn application_performFetchWithCompletionHandler(&self, application: &UIApplication,completionHandler: &Block<(UIBackgroundFetchResult, ), ()>,); + + #[optional] + #[method(application:performActionForShortcutItem:completionHandler:)] + pub unsafe fn application_performActionForShortcutItem_completionHandler(&self, application: &UIApplication,shortcutItem: &UIApplicationShortcutItem,completionHandler: &Block<(Bool, ), ()>,); + + #[optional] + #[method(application:handleEventsForBackgroundURLSession:completionHandler:)] + pub unsafe fn application_handleEventsForBackgroundURLSession_completionHandler(&self, application: &UIApplication,identifier: &NSString,completionHandler: &Block<(), ()>,); + + #[optional] + #[method(application:handleWatchKitExtensionRequest:reply:)] + pub unsafe fn application_handleWatchKitExtensionRequest_reply(&self, application: &UIApplication,userInfo: Option<&NSDictionary>,reply: &Block<(*mut NSDictionary, ), ()>,); + + #[optional] + #[method(applicationShouldRequestHealthAuthorization:)] + pub unsafe fn applicationShouldRequestHealthAuthorization(&self, application: &UIApplication,); + + #[optional] + #[method_id(@__retain_semantics Other application:handlerForIntent:)] + pub unsafe fn application_handlerForIntent(&self, application: &UIApplication,intent: &INIntent,) -> Option>; + + #[optional] + #[method(application:handleIntent:completionHandler:)] + pub unsafe fn application_handleIntent_completionHandler(&self, application: &UIApplication,intent: &INIntent,completionHandler: &Block<(NonNull, ), ()>,); + + #[optional] + #[method(applicationDidEnterBackground:)] + pub unsafe fn applicationDidEnterBackground(&self, application: &UIApplication,); + + #[optional] + #[method(applicationWillEnterForeground:)] + pub unsafe fn applicationWillEnterForeground(&self, application: &UIApplication,); + + #[optional] + #[method(applicationProtectedDataWillBecomeUnavailable:)] + pub unsafe fn applicationProtectedDataWillBecomeUnavailable(&self, application: &UIApplication,); + + #[optional] + #[method(applicationProtectedDataDidBecomeAvailable:)] + pub unsafe fn applicationProtectedDataDidBecomeAvailable(&self, application: &UIApplication,); + + #[optional] + #[method_id(@__retain_semantics Other window)] + pub unsafe fn window(&self, ) -> Option>; + + #[optional] + #[method(setWindow:)] + pub unsafe fn setWindow(&self, window: Option<&UIWindow>,); + + #[optional] + #[method(application:supportedInterfaceOrientationsForWindow:)] + pub unsafe fn application_supportedInterfaceOrientationsForWindow(&self, application: &UIApplication,window: Option<&UIWindow>,) -> UIInterfaceOrientationMask; + + #[optional] + #[method(application:shouldAllowExtensionPointIdentifier:)] + pub unsafe fn application_shouldAllowExtensionPointIdentifier(&self, application: &UIApplication,extensionPointIdentifier: &UIApplicationExtensionPointIdentifier,) -> bool; + + #[optional] + #[method_id(@__retain_semantics Other application:viewControllerWithRestorationIdentifierPath:coder:)] + pub unsafe fn application_viewControllerWithRestorationIdentifierPath_coder(&self, application: &UIApplication,identifierComponents: &NSArray,coder: &NSCoder,) -> Option>; + + #[optional] + #[method(application:shouldSaveSecureApplicationState:)] + pub unsafe fn application_shouldSaveSecureApplicationState(&self, application: &UIApplication,coder: &NSCoder,) -> bool; + + #[optional] + #[method(application:shouldRestoreSecureApplicationState:)] + pub unsafe fn application_shouldRestoreSecureApplicationState(&self, application: &UIApplication,coder: &NSCoder,) -> bool; + + #[optional] + #[method(application:willEncodeRestorableStateWithCoder:)] + pub unsafe fn application_willEncodeRestorableStateWithCoder(&self, application: &UIApplication,coder: &NSCoder,); + + #[optional] + #[method(application:didDecodeRestorableStateWithCoder:)] + pub unsafe fn application_didDecodeRestorableStateWithCoder(&self, application: &UIApplication,coder: &NSCoder,); + + #[optional] + #[method(application:shouldSaveApplicationState:)] + pub unsafe fn application_shouldSaveApplicationState(&self, application: &UIApplication,coder: &NSCoder,) -> bool; + + #[optional] + #[method(application:shouldRestoreApplicationState:)] + pub unsafe fn application_shouldRestoreApplicationState(&self, application: &UIApplication,coder: &NSCoder,) -> bool; + + #[optional] + #[method(application:willContinueUserActivityWithType:)] + pub unsafe fn application_willContinueUserActivityWithType(&self, application: &UIApplication,userActivityType: &NSString,) -> bool; + + #[optional] + #[method(application:continueUserActivity:restorationHandler:)] + pub unsafe fn application_continueUserActivity_restorationHandler(&self, application: &UIApplication,userActivity: &NSUserActivity,restorationHandler: &Block<(*mut NSArray, ), ()>,) -> bool; + + #[optional] + #[method(application:didFailToContinueUserActivityWithType:error:)] + pub unsafe fn application_didFailToContinueUserActivityWithType_error(&self, application: &UIApplication,userActivityType: &NSString,error: &NSError,); + + #[optional] + #[method(application:didUpdateUserActivity:)] + pub unsafe fn application_didUpdateUserActivity(&self, application: &UIApplication,userActivity: &NSUserActivity,); + + #[optional] + #[method(application:userDidAcceptCloudKitShareWithMetadata:)] + pub unsafe fn application_userDidAcceptCloudKitShareWithMetadata(&self, application: &UIApplication,cloudKitShareMetadata: &CKShareMetadata,); + + #[optional] + #[method_id(@__retain_semantics Other application:configurationForConnectingSceneSession:options:)] + pub unsafe fn application_configurationForConnectingSceneSession_options(&self, application: &UIApplication,connectingSceneSession: &UISceneSession,options: &UISceneConnectionOptions,) -> Id; + + #[optional] + #[method(application:didDiscardSceneSessions:)] + pub unsafe fn application_didDiscardSceneSessions(&self, application: &UIApplication,sceneSessions: &NSSet,); + + #[optional] + #[method(applicationShouldAutomaticallyLocalizeKeyCommands:)] + pub unsafe fn applicationShouldAutomaticallyLocalizeKeyCommands(&self, application: &UIApplication,) -> bool; + + } +); + +extern_methods!( + /// UIApplicationDeprecated + unsafe impl UIApplication { + #[method(isProximitySensingEnabled)] + pub unsafe fn isProximitySensingEnabled(&self, ) -> bool; + + #[method(setProximitySensingEnabled:)] + pub unsafe fn setProximitySensingEnabled(&self, proximitySensingEnabled: bool,); + + #[method(setStatusBarHidden:animated:)] + pub unsafe fn setStatusBarHidden_animated(&self, hidden: bool,animated: bool,); + + #[method(statusBarOrientation)] + pub unsafe fn statusBarOrientation(&self, ) -> UIInterfaceOrientation; + + #[method(setStatusBarOrientation:)] + pub unsafe fn setStatusBarOrientation(&self, statusBarOrientation: UIInterfaceOrientation,); + + #[method(setStatusBarOrientation:animated:)] + pub unsafe fn setStatusBarOrientation_animated(&self, interfaceOrientation: UIInterfaceOrientation,animated: bool,); + + #[method(statusBarStyle)] + pub unsafe fn statusBarStyle(&self, ) -> UIStatusBarStyle; + + #[method(setStatusBarStyle:)] + pub unsafe fn setStatusBarStyle(&self, statusBarStyle: UIStatusBarStyle,); + + #[method(setStatusBarStyle:animated:)] + pub unsafe fn setStatusBarStyle_animated(&self, statusBarStyle: UIStatusBarStyle,animated: bool,); + + #[method(isStatusBarHidden)] + pub unsafe fn isStatusBarHidden(&self, ) -> bool; + + #[method(setStatusBarHidden:)] + pub unsafe fn setStatusBarHidden(&self, statusBarHidden: bool,); + + #[method(setStatusBarHidden:withAnimation:)] + pub unsafe fn setStatusBarHidden_withAnimation(&self, hidden: bool,animation: UIStatusBarAnimation,); + + #[method(setKeepAliveTimeout:handler:)] + pub unsafe fn setKeepAliveTimeout_handler(&self, timeout: NSTimeInterval,keepAliveHandler: Option<&Block<(), ()>>,) -> bool; + + #[method(clearKeepAliveTimeout)] + pub unsafe fn clearKeepAliveTimeout(&self, ); + + } +); + +extern_fn!( + pub unsafe fn UIApplicationMain(argc: c_int,argv: NonNull<*mut c_char>,principalClassName: Option<&NSString>,delegateClassName: Option<&NSString>,) -> c_int; +); + +extern_static!(UITrackingRunLoopMode: &'static NSRunLoopMode); + +extern_static!(UIApplicationDidEnterBackgroundNotification: &'static NSNotificationName); + +extern_static!(UIApplicationWillEnterForegroundNotification: &'static NSNotificationName); + +extern_static!(UIApplicationDidFinishLaunchingNotification: &'static NSNotificationName); + +extern_static!(UIApplicationDidBecomeActiveNotification: &'static NSNotificationName); + +extern_static!(UIApplicationWillResignActiveNotification: &'static NSNotificationName); + +extern_static!(UIApplicationDidReceiveMemoryWarningNotification: &'static NSNotificationName); + +extern_static!(UIApplicationWillTerminateNotification: &'static NSNotificationName); + +extern_static!(UIApplicationSignificantTimeChangeNotification: &'static NSNotificationName); + +extern_static!(UIApplicationWillChangeStatusBarOrientationNotification: &'static NSNotificationName); + +extern_static!(UIApplicationDidChangeStatusBarOrientationNotification: &'static NSNotificationName); + +extern_static!(UIApplicationStatusBarOrientationUserInfoKey: &'static NSString); + +extern_static!(UIApplicationWillChangeStatusBarFrameNotification: &'static NSNotificationName); + +extern_static!(UIApplicationDidChangeStatusBarFrameNotification: &'static NSNotificationName); + +extern_static!(UIApplicationStatusBarFrameUserInfoKey: &'static NSString); + +extern_static!(UIApplicationBackgroundRefreshStatusDidChangeNotification: &'static NSNotificationName); + +extern_static!(UIApplicationProtectedDataWillBecomeUnavailable: &'static NSNotificationName); + +extern_static!(UIApplicationProtectedDataDidBecomeAvailable: &'static NSNotificationName); + +extern_static!(UIApplicationLaunchOptionsURLKey: &'static UIApplicationLaunchOptionsKey); + +extern_static!(UIApplicationLaunchOptionsSourceApplicationKey: &'static UIApplicationLaunchOptionsKey); + +extern_static!(UIApplicationLaunchOptionsRemoteNotificationKey: &'static UIApplicationLaunchOptionsKey); + +extern_static!(UIApplicationLaunchOptionsLocalNotificationKey: &'static UIApplicationLaunchOptionsKey); + +extern_static!(UIApplicationLaunchOptionsAnnotationKey: &'static UIApplicationLaunchOptionsKey); + +extern_static!(UIApplicationLaunchOptionsLocationKey: &'static UIApplicationLaunchOptionsKey); + +extern_static!(UIApplicationLaunchOptionsNewsstandDownloadsKey: &'static UIApplicationLaunchOptionsKey); + +extern_static!(UIApplicationLaunchOptionsBluetoothCentralsKey: &'static UIApplicationLaunchOptionsKey); + +extern_static!(UIApplicationLaunchOptionsBluetoothPeripheralsKey: &'static UIApplicationLaunchOptionsKey); + +extern_static!(UIApplicationLaunchOptionsShortcutItemKey: &'static UIApplicationLaunchOptionsKey); + +extern_static!(UIApplicationLaunchOptionsEventAttributionKey: &'static UIApplicationLaunchOptionsKey); + +extern_static!(UIApplicationLaunchOptionsUserActivityDictionaryKey: &'static UIApplicationLaunchOptionsKey); + +extern_static!(UIApplicationLaunchOptionsUserActivityTypeKey: &'static UIApplicationLaunchOptionsKey); + +extern_static!(UIApplicationLaunchOptionsCloudKitShareMetadataKey: &'static UIApplicationLaunchOptionsKey); + +extern_static!(UIApplicationOpenSettingsURLString: &'static NSString); + +extern_static!(UIApplicationOpenNotificationSettingsURLString: &'static NSString); + +extern_static!(UIApplicationOpenURLOptionsSourceApplicationKey: &'static UIApplicationOpenURLOptionsKey); + +extern_static!(UIApplicationOpenURLOptionsAnnotationKey: &'static UIApplicationOpenURLOptionsKey); + +extern_static!(UIApplicationOpenURLOptionsOpenInPlaceKey: &'static UIApplicationOpenURLOptionsKey); + +extern_static!(UIApplicationOpenURLOptionsEventAttributionKey: &'static UIApplicationOpenURLOptionsKey); + +extern_static!(UIApplicationUserDidTakeScreenshotNotification: &'static NSNotificationName); + +extern_static!(UIApplicationKeyboardExtensionPointIdentifier: &'static UIApplicationExtensionPointIdentifier); + +extern_static!(UIApplicationOpenURLOptionUniversalLinksOnly: &'static UIApplicationOpenExternalURLOptionsKey); + +extern_static!(UIApplicationOpenExternalURLOptionsEventAttributionKey: &'static UIApplicationOpenExternalURLOptionsKey); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIApplicationShortcutItem.rs b/crates/icrate-generated/src/UIKit/generated/UIApplicationShortcutItem.rs new file mode 100644 index 000000000..6f8f8f513 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIApplicationShortcutItem.rs @@ -0,0 +1,153 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIApplicationShortcutIconType { + UIApplicationShortcutIconTypeCompose = 0, + UIApplicationShortcutIconTypePlay = 1, + UIApplicationShortcutIconTypePause = 2, + UIApplicationShortcutIconTypeAdd = 3, + UIApplicationShortcutIconTypeLocation = 4, + UIApplicationShortcutIconTypeSearch = 5, + UIApplicationShortcutIconTypeShare = 6, + UIApplicationShortcutIconTypeProhibit = 7, + UIApplicationShortcutIconTypeContact = 8, + UIApplicationShortcutIconTypeHome = 9, + UIApplicationShortcutIconTypeMarkLocation = 10, + UIApplicationShortcutIconTypeFavorite = 11, + UIApplicationShortcutIconTypeLove = 12, + UIApplicationShortcutIconTypeCloud = 13, + UIApplicationShortcutIconTypeInvitation = 14, + UIApplicationShortcutIconTypeConfirmation = 15, + UIApplicationShortcutIconTypeMail = 16, + UIApplicationShortcutIconTypeMessage = 17, + UIApplicationShortcutIconTypeDate = 18, + UIApplicationShortcutIconTypeTime = 19, + UIApplicationShortcutIconTypeCapturePhoto = 20, + UIApplicationShortcutIconTypeCaptureVideo = 21, + UIApplicationShortcutIconTypeTask = 22, + UIApplicationShortcutIconTypeTaskCompleted = 23, + UIApplicationShortcutIconTypeAlarm = 24, + UIApplicationShortcutIconTypeBookmark = 25, + UIApplicationShortcutIconTypeShuffle = 26, + UIApplicationShortcutIconTypeAudio = 27, + UIApplicationShortcutIconTypeUpdate = 28, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIApplicationShortcutIcon; + + unsafe impl ClassType for UIApplicationShortcutIcon { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIApplicationShortcutIcon { + #[method_id(@__retain_semantics Other iconWithType:)] + pub unsafe fn iconWithType(type_: UIApplicationShortcutIconType,) -> Id; + + #[method_id(@__retain_semantics Other iconWithTemplateImageName:)] + pub unsafe fn iconWithTemplateImageName(templateImageName: &NSString,) -> Id; + + #[method_id(@__retain_semantics Other iconWithSystemImageName:)] + pub unsafe fn iconWithSystemImageName(systemImageName: &NSString,) -> Id; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIApplicationShortcutItem; + + unsafe impl ClassType for UIApplicationShortcutItem { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIApplicationShortcutItem { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics Init initWithType:localizedTitle:localizedSubtitle:icon:userInfo:)] + pub unsafe fn initWithType_localizedTitle_localizedSubtitle_icon_userInfo(this: Option>, type_: &NSString,localizedTitle: &NSString,localizedSubtitle: Option<&NSString>,icon: Option<&UIApplicationShortcutIcon>,userInfo: Option<&NSDictionary>,) -> Id; + + #[method_id(@__retain_semantics Init initWithType:localizedTitle:)] + pub unsafe fn initWithType_localizedTitle(this: Option>, type_: &NSString,localizedTitle: &NSString,) -> Id; + + #[method_id(@__retain_semantics Other type)] + pub unsafe fn type_(&self, ) -> Id; + + #[method_id(@__retain_semantics Other localizedTitle)] + pub unsafe fn localizedTitle(&self, ) -> Id; + + #[method_id(@__retain_semantics Other localizedSubtitle)] + pub unsafe fn localizedSubtitle(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other icon)] + pub unsafe fn icon(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other userInfo)] + pub unsafe fn userInfo(&self, ) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other targetContentIdentifier)] + pub unsafe fn targetContentIdentifier(&self, ) -> Option>; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIMutableApplicationShortcutItem; + + unsafe impl ClassType for UIMutableApplicationShortcutItem { + type Super = UIApplicationShortcutItem; + } +); + +extern_methods!( + unsafe impl UIMutableApplicationShortcutItem { + #[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 localizedTitle)] + pub unsafe fn localizedTitle(&self, ) -> Id; + + #[method(setLocalizedTitle:)] + pub unsafe fn setLocalizedTitle(&self, localizedTitle: &NSString,); + + #[method_id(@__retain_semantics Other localizedSubtitle)] + pub unsafe fn localizedSubtitle(&self, ) -> Option>; + + #[method(setLocalizedSubtitle:)] + pub unsafe fn setLocalizedSubtitle(&self, localizedSubtitle: Option<&NSString>,); + + #[method_id(@__retain_semantics Other icon)] + pub unsafe fn icon(&self, ) -> Option>; + + #[method(setIcon:)] + pub unsafe fn setIcon(&self, icon: Option<&UIApplicationShortcutIcon>,); + + #[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(@__retain_semantics Other targetContentIdentifier)] + pub unsafe fn targetContentIdentifier(&self, ) -> Option>; + + #[method(setTargetContentIdentifier:)] + pub unsafe fn setTargetContentIdentifier(&self, targetContentIdentifier: Option<&Object>,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIAttachmentBehavior.rs b/crates/icrate-generated/src/UIKit/generated/UIAttachmentBehavior.rs new file mode 100644 index 000000000..f171da7a9 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIAttachmentBehavior.rs @@ -0,0 +1,122 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIAttachmentBehaviorType { + UIAttachmentBehaviorTypeItems = 0, + UIAttachmentBehaviorTypeAnchor = 1, + } +); + +extern_struct!( + pub struct UIFloatRange { + pub minimum: CGFloat, + pub maximum: CGFloat, + } +); + +extern_static!(UIFloatRangeZero: UIFloatRange); + +extern_static!(UIFloatRangeInfinite: UIFloatRange); + +extern_fn!( + pub unsafe fn UIFloatRangeIsInfinite(range: UIFloatRange,) -> Bool; +); + +inline_fn!( + pub unsafe fn UIFloatRangeMake(minimum: CGFloat,maximum: CGFloat,) -> UIFloatRange { + todo!() + } +); + +inline_fn!( + pub unsafe fn UIFloatRangeIsEqualToRange(range: UIFloatRange,otherRange: UIFloatRange,) -> Bool { + todo!() + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIAttachmentBehavior; + + unsafe impl ClassType for UIAttachmentBehavior { + type Super = UIDynamicBehavior; + } +); + +extern_methods!( + unsafe impl UIAttachmentBehavior { + #[method_id(@__retain_semantics Init initWithItem:attachedToAnchor:)] + pub unsafe fn initWithItem_attachedToAnchor(this: Option>, item: &UIDynamicItem,point: CGPoint,) -> Id; + + #[method_id(@__retain_semantics Init initWithItem:offsetFromCenter:attachedToAnchor:)] + pub unsafe fn initWithItem_offsetFromCenter_attachedToAnchor(this: Option>, item: &UIDynamicItem,offset: UIOffset,point: CGPoint,) -> Id; + + #[method_id(@__retain_semantics Init initWithItem:attachedToItem:)] + pub unsafe fn initWithItem_attachedToItem(this: Option>, item1: &UIDynamicItem,item2: &UIDynamicItem,) -> Id; + + #[method_id(@__retain_semantics Init initWithItem:offsetFromCenter:attachedToItem:offsetFromCenter:)] + pub unsafe fn initWithItem_offsetFromCenter_attachedToItem_offsetFromCenter(this: Option>, item1: &UIDynamicItem,offset1: UIOffset,item2: &UIDynamicItem,offset2: UIOffset,) -> Id; + + #[method_id(@__retain_semantics Other slidingAttachmentWithItem:attachedToItem:attachmentAnchor:axisOfTranslation:)] + pub unsafe fn slidingAttachmentWithItem_attachedToItem_attachmentAnchor_axisOfTranslation(item1: &UIDynamicItem,item2: &UIDynamicItem,point: CGPoint,axis: CGVector,) -> Id; + + #[method_id(@__retain_semantics Other slidingAttachmentWithItem:attachmentAnchor:axisOfTranslation:)] + pub unsafe fn slidingAttachmentWithItem_attachmentAnchor_axisOfTranslation(item: &UIDynamicItem,point: CGPoint,axis: CGVector,) -> Id; + + #[method_id(@__retain_semantics Other limitAttachmentWithItem:offsetFromCenter:attachedToItem:offsetFromCenter:)] + pub unsafe fn limitAttachmentWithItem_offsetFromCenter_attachedToItem_offsetFromCenter(item1: &UIDynamicItem,offset1: UIOffset,item2: &UIDynamicItem,offset2: UIOffset,) -> Id; + + #[method_id(@__retain_semantics Other fixedAttachmentWithItem:attachedToItem:attachmentAnchor:)] + pub unsafe fn fixedAttachmentWithItem_attachedToItem_attachmentAnchor(item1: &UIDynamicItem,item2: &UIDynamicItem,point: CGPoint,) -> Id; + + #[method_id(@__retain_semantics Other pinAttachmentWithItem:attachedToItem:attachmentAnchor:)] + pub unsafe fn pinAttachmentWithItem_attachedToItem_attachmentAnchor(item1: &UIDynamicItem,item2: &UIDynamicItem,point: CGPoint,) -> Id; + + #[method_id(@__retain_semantics Other items)] + pub unsafe fn items(&self, ) -> Id, Shared>; + + #[method(attachedBehaviorType)] + pub unsafe fn attachedBehaviorType(&self, ) -> UIAttachmentBehaviorType; + + #[method(anchorPoint)] + pub unsafe fn anchorPoint(&self, ) -> CGPoint; + + #[method(setAnchorPoint:)] + pub unsafe fn setAnchorPoint(&self, anchorPoint: CGPoint,); + + #[method(length)] + pub unsafe fn length(&self, ) -> CGFloat; + + #[method(setLength:)] + pub unsafe fn setLength(&self, length: CGFloat,); + + #[method(damping)] + pub unsafe fn damping(&self, ) -> CGFloat; + + #[method(setDamping:)] + pub unsafe fn setDamping(&self, damping: CGFloat,); + + #[method(frequency)] + pub unsafe fn frequency(&self, ) -> CGFloat; + + #[method(setFrequency:)] + pub unsafe fn setFrequency(&self, frequency: CGFloat,); + + #[method(frictionTorque)] + pub unsafe fn frictionTorque(&self, ) -> CGFloat; + + #[method(setFrictionTorque:)] + pub unsafe fn setFrictionTorque(&self, frictionTorque: CGFloat,); + + #[method(attachmentRange)] + pub unsafe fn attachmentRange(&self, ) -> UIFloatRange; + + #[method(setAttachmentRange:)] + pub unsafe fn setAttachmentRange(&self, attachmentRange: UIFloatRange,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIBackgroundConfiguration.rs b/crates/icrate-generated/src/UIKit/generated/UIBackgroundConfiguration.rs new file mode 100644 index 000000000..e40fe3447 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIBackgroundConfiguration.rs @@ -0,0 +1,135 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIBackgroundConfiguration; + + unsafe impl ClassType for UIBackgroundConfiguration { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIBackgroundConfiguration { + #[method_id(@__retain_semantics Other clearConfiguration)] + pub unsafe fn clearConfiguration() -> Id; + + #[method_id(@__retain_semantics Other listPlainCellConfiguration)] + pub unsafe fn listPlainCellConfiguration() -> Id; + + #[method_id(@__retain_semantics Other listPlainHeaderFooterConfiguration)] + pub unsafe fn listPlainHeaderFooterConfiguration() -> Id; + + #[method_id(@__retain_semantics Other listGroupedCellConfiguration)] + pub unsafe fn listGroupedCellConfiguration() -> Id; + + #[method_id(@__retain_semantics Other listGroupedHeaderFooterConfiguration)] + pub unsafe fn listGroupedHeaderFooterConfiguration() -> Id; + + #[method_id(@__retain_semantics Other listSidebarHeaderConfiguration)] + pub unsafe fn listSidebarHeaderConfiguration() -> Id; + + #[method_id(@__retain_semantics Other listSidebarCellConfiguration)] + pub unsafe fn listSidebarCellConfiguration() -> Id; + + #[method_id(@__retain_semantics Other listAccompaniedSidebarCellConfiguration)] + pub unsafe fn listAccompaniedSidebarCellConfiguration() -> 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 updatedConfigurationForState:)] + pub unsafe fn updatedConfigurationForState(&self, state: &UIConfigurationState,) -> Id; + + #[method_id(@__retain_semantics Other customView)] + pub unsafe fn customView(&self, ) -> Option>; + + #[method(setCustomView:)] + pub unsafe fn setCustomView(&self, customView: Option<&UIView>,); + + #[method(cornerRadius)] + pub unsafe fn cornerRadius(&self, ) -> CGFloat; + + #[method(setCornerRadius:)] + pub unsafe fn setCornerRadius(&self, cornerRadius: CGFloat,); + + #[method(backgroundInsets)] + pub unsafe fn backgroundInsets(&self, ) -> NSDirectionalEdgeInsets; + + #[method(setBackgroundInsets:)] + pub unsafe fn setBackgroundInsets(&self, backgroundInsets: NSDirectionalEdgeInsets,); + + #[method(edgesAddingLayoutMarginsToBackgroundInsets)] + pub unsafe fn edgesAddingLayoutMarginsToBackgroundInsets(&self, ) -> NSDirectionalRectEdge; + + #[method(setEdgesAddingLayoutMarginsToBackgroundInsets:)] + pub unsafe fn setEdgesAddingLayoutMarginsToBackgroundInsets(&self, edgesAddingLayoutMarginsToBackgroundInsets: NSDirectionalRectEdge,); + + #[method_id(@__retain_semantics Other backgroundColor)] + pub unsafe fn backgroundColor(&self, ) -> Option>; + + #[method(setBackgroundColor:)] + pub unsafe fn setBackgroundColor(&self, backgroundColor: Option<&UIColor>,); + + #[method(backgroundColorTransformer)] + pub unsafe fn backgroundColorTransformer(&self, ) -> UIConfigurationColorTransformer; + + #[method(setBackgroundColorTransformer:)] + pub unsafe fn setBackgroundColorTransformer(&self, backgroundColorTransformer: UIConfigurationColorTransformer,); + + #[method_id(@__retain_semantics Other resolvedBackgroundColorForTintColor:)] + pub unsafe fn resolvedBackgroundColorForTintColor(&self, tintColor: &UIColor,) -> Id; + + #[method_id(@__retain_semantics Other visualEffect)] + pub unsafe fn visualEffect(&self, ) -> Option>; + + #[method(setVisualEffect:)] + pub unsafe fn setVisualEffect(&self, visualEffect: Option<&UIVisualEffect>,); + + #[method_id(@__retain_semantics Other image)] + pub unsafe fn image(&self, ) -> Option>; + + #[method(setImage:)] + pub unsafe fn setImage(&self, image: Option<&UIImage>,); + + #[method(imageContentMode)] + pub unsafe fn imageContentMode(&self, ) -> UIViewContentMode; + + #[method(setImageContentMode:)] + pub unsafe fn setImageContentMode(&self, imageContentMode: UIViewContentMode,); + + #[method_id(@__retain_semantics Other strokeColor)] + pub unsafe fn strokeColor(&self, ) -> Option>; + + #[method(setStrokeColor:)] + pub unsafe fn setStrokeColor(&self, strokeColor: Option<&UIColor>,); + + #[method(strokeColorTransformer)] + pub unsafe fn strokeColorTransformer(&self, ) -> UIConfigurationColorTransformer; + + #[method(setStrokeColorTransformer:)] + pub unsafe fn setStrokeColorTransformer(&self, strokeColorTransformer: UIConfigurationColorTransformer,); + + #[method_id(@__retain_semantics Other resolvedStrokeColorForTintColor:)] + pub unsafe fn resolvedStrokeColorForTintColor(&self, tintColor: &UIColor,) -> Id; + + #[method(strokeWidth)] + pub unsafe fn strokeWidth(&self, ) -> CGFloat; + + #[method(setStrokeWidth:)] + pub unsafe fn setStrokeWidth(&self, strokeWidth: CGFloat,); + + #[method(strokeOutset)] + pub unsafe fn strokeOutset(&self, ) -> CGFloat; + + #[method(setStrokeOutset:)] + pub unsafe fn setStrokeOutset(&self, strokeOutset: CGFloat,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIBandSelectionInteraction.rs b/crates/icrate-generated/src/UIKit/generated/UIBandSelectionInteraction.rs new file mode 100644 index 000000000..74b546f99 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIBandSelectionInteraction.rs @@ -0,0 +1,58 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIBandSelectionInteractionState { + UIBandSelectionInteractionStatePossible = 0, + UIBandSelectionInteractionStateBegan = 1, + UIBandSelectionInteractionStateSelecting = 2, + UIBandSelectionInteractionStateEnded = 3, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIBandSelectionInteraction; + + unsafe impl ClassType for UIBandSelectionInteraction { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIBandSelectionInteraction { + #[method(isEnabled)] + pub unsafe fn isEnabled(&self, ) -> bool; + + #[method(setEnabled:)] + pub unsafe fn setEnabled(&self, enabled: bool,); + + #[method(state)] + pub unsafe fn state(&self, ) -> UIBandSelectionInteractionState; + + #[method(selectionRect)] + pub unsafe fn selectionRect(&self, ) -> CGRect; + + #[method(initialModifierFlags)] + pub unsafe fn initialModifierFlags(&self, ) -> UIKeyModifierFlags; + + #[method(shouldBeginHandler)] + pub unsafe fn shouldBeginHandler(&self, ) -> *mut Block<(NonNull, CGPoint, ), Bool>; + + #[method(setShouldBeginHandler:)] + pub unsafe fn setShouldBeginHandler(&self, shouldBeginHandler: Option<&Block<(NonNull, CGPoint, ), Bool>>,); + + #[method_id(@__retain_semantics Init initWithSelectionHandler:)] + pub unsafe fn initWithSelectionHandler(this: Option>, selectionHandler: &Block<(NonNull, ), ()>,) -> 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-generated/src/UIKit/generated/UIBarAppearance.rs b/crates/icrate-generated/src/UIKit/generated/UIBarAppearance.rs new file mode 100644 index 000000000..5e1c76965 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIBarAppearance.rs @@ -0,0 +1,81 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIBarAppearance; + + unsafe impl ClassType for UIBarAppearance { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIBarAppearance { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics Init initWithIdiom:)] + pub unsafe fn initWithIdiom(this: Option>, idiom: UIUserInterfaceIdiom,) -> Id; + + #[method(idiom)] + pub unsafe fn idiom(&self, ) -> UIUserInterfaceIdiom; + + #[method_id(@__retain_semantics Init initWithBarAppearance:)] + pub unsafe fn initWithBarAppearance(this: Option>, barAppearance: &UIBarAppearance,) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Id; + + #[method_id(@__retain_semantics CopyOrMutCopy copy)] + pub unsafe fn copy(&self, ) -> Id; + + #[method(configureWithDefaultBackground)] + pub unsafe fn configureWithDefaultBackground(&self, ); + + #[method(configureWithOpaqueBackground)] + pub unsafe fn configureWithOpaqueBackground(&self, ); + + #[method(configureWithTransparentBackground)] + pub unsafe fn configureWithTransparentBackground(&self, ); + + #[method_id(@__retain_semantics Other backgroundEffect)] + pub unsafe fn backgroundEffect(&self, ) -> Option>; + + #[method(setBackgroundEffect:)] + pub unsafe fn setBackgroundEffect(&self, backgroundEffect: Option<&UIBlurEffect>,); + + #[method_id(@__retain_semantics Other backgroundColor)] + pub unsafe fn backgroundColor(&self, ) -> Option>; + + #[method(setBackgroundColor:)] + pub unsafe fn setBackgroundColor(&self, backgroundColor: Option<&UIColor>,); + + #[method_id(@__retain_semantics Other backgroundImage)] + pub unsafe fn backgroundImage(&self, ) -> Option>; + + #[method(setBackgroundImage:)] + pub unsafe fn setBackgroundImage(&self, backgroundImage: Option<&UIImage>,); + + #[method(backgroundImageContentMode)] + pub unsafe fn backgroundImageContentMode(&self, ) -> UIViewContentMode; + + #[method(setBackgroundImageContentMode:)] + pub unsafe fn setBackgroundImageContentMode(&self, backgroundImageContentMode: UIViewContentMode,); + + #[method_id(@__retain_semantics Other shadowColor)] + pub unsafe fn shadowColor(&self, ) -> Option>; + + #[method(setShadowColor:)] + pub unsafe fn setShadowColor(&self, shadowColor: Option<&UIColor>,); + + #[method_id(@__retain_semantics Other shadowImage)] + pub unsafe fn shadowImage(&self, ) -> Option>; + + #[method(setShadowImage:)] + pub unsafe fn setShadowImage(&self, shadowImage: Option<&UIImage>,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIBarButtonItem.rs b/crates/icrate-generated/src/UIKit/generated/UIBarButtonItem.rs new file mode 100644 index 000000000..19a39340c --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIBarButtonItem.rs @@ -0,0 +1,250 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIBarButtonItemStyle { + UIBarButtonItemStylePlain = 0, + UIBarButtonItemStyleBordered = 1, + UIBarButtonItemStyleDone = 2, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIBarButtonSystemItem { + UIBarButtonSystemItemDone = 0, + UIBarButtonSystemItemCancel = 1, + UIBarButtonSystemItemEdit = 2, + UIBarButtonSystemItemSave = 3, + UIBarButtonSystemItemAdd = 4, + UIBarButtonSystemItemFlexibleSpace = 5, + UIBarButtonSystemItemFixedSpace = 6, + UIBarButtonSystemItemCompose = 7, + UIBarButtonSystemItemReply = 8, + UIBarButtonSystemItemAction = 9, + UIBarButtonSystemItemOrganize = 10, + UIBarButtonSystemItemBookmarks = 11, + UIBarButtonSystemItemSearch = 12, + UIBarButtonSystemItemRefresh = 13, + UIBarButtonSystemItemStop = 14, + UIBarButtonSystemItemCamera = 15, + UIBarButtonSystemItemTrash = 16, + UIBarButtonSystemItemPlay = 17, + UIBarButtonSystemItemPause = 18, + UIBarButtonSystemItemRewind = 19, + UIBarButtonSystemItemFastForward = 20, + UIBarButtonSystemItemUndo = 21, + UIBarButtonSystemItemRedo = 22, + UIBarButtonSystemItemPageCurl = 23, + UIBarButtonSystemItemClose = 24, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIBarButtonItem; + + unsafe impl ClassType for UIBarButtonItem { + type Super = UIBarItem; + } +); + +extern_methods!( + unsafe impl UIBarButtonItem { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method_id(@__retain_semantics Init initWithImage:style:target:action:)] + pub unsafe fn initWithImage_style_target_action(this: Option>, image: Option<&UIImage>,style: UIBarButtonItemStyle,target: Option<&Object>,action: OptionSel,) -> Id; + + #[method_id(@__retain_semantics Init initWithImage:landscapeImagePhone:style:target:action:)] + pub unsafe fn initWithImage_landscapeImagePhone_style_target_action(this: Option>, image: Option<&UIImage>,landscapeImagePhone: Option<&UIImage>,style: UIBarButtonItemStyle,target: Option<&Object>,action: OptionSel,) -> Id; + + #[method_id(@__retain_semantics Init initWithTitle:style:target:action:)] + pub unsafe fn initWithTitle_style_target_action(this: Option>, title: Option<&NSString>,style: UIBarButtonItemStyle,target: Option<&Object>,action: OptionSel,) -> Id; + + #[method_id(@__retain_semantics Init initWithBarButtonSystemItem:target:action:)] + pub unsafe fn initWithBarButtonSystemItem_target_action(this: Option>, systemItem: UIBarButtonSystemItem,target: Option<&Object>,action: OptionSel,) -> Id; + + #[method_id(@__retain_semantics Init initWithCustomView:)] + pub unsafe fn initWithCustomView(this: Option>, customView: &UIView,) -> Id; + + #[method_id(@__retain_semantics Init initWithBarButtonSystemItem:primaryAction:)] + pub unsafe fn initWithBarButtonSystemItem_primaryAction(this: Option>, systemItem: UIBarButtonSystemItem,primaryAction: Option<&UIAction>,) -> Id; + + #[method_id(@__retain_semantics Init initWithPrimaryAction:)] + pub unsafe fn initWithPrimaryAction(this: Option>, primaryAction: Option<&UIAction>,) -> Id; + + #[method_id(@__retain_semantics Init initWithBarButtonSystemItem:menu:)] + pub unsafe fn initWithBarButtonSystemItem_menu(this: Option>, systemItem: UIBarButtonSystemItem,menu: Option<&UIMenu>,) -> Id; + + #[method_id(@__retain_semantics Init initWithTitle:menu:)] + pub unsafe fn initWithTitle_menu(this: Option>, title: Option<&NSString>,menu: Option<&UIMenu>,) -> Id; + + #[method_id(@__retain_semantics Init initWithImage:menu:)] + pub unsafe fn initWithImage_menu(this: Option>, image: Option<&UIImage>,menu: Option<&UIMenu>,) -> Id; + + #[method_id(@__retain_semantics Init initWithPrimaryAction:menu:)] + pub unsafe fn initWithPrimaryAction_menu(this: Option>, primaryAction: Option<&UIAction>,menu: Option<&UIMenu>,) -> Id; + + #[method_id(@__retain_semantics Init initWithBarButtonSystemItem:primaryAction:menu:)] + pub unsafe fn initWithBarButtonSystemItem_primaryAction_menu(this: Option>, systemItem: UIBarButtonSystemItem,primaryAction: Option<&UIAction>,menu: Option<&UIMenu>,) -> Id; + + #[method_id(@__retain_semantics Init initWithTitle:image:target:action:menu:)] + pub unsafe fn initWithTitle_image_target_action_menu(this: Option>, title: Option<&NSString>,image: Option<&UIImage>,target: Option<&Object>,action: OptionSel,menu: Option<&UIMenu>,) -> Id; + + #[method_id(@__retain_semantics Other fixedSpaceItemOfWidth:)] + pub unsafe fn fixedSpaceItemOfWidth(width: CGFloat,) -> Id; + + #[method_id(@__retain_semantics Other flexibleSpaceItem)] + pub unsafe fn flexibleSpaceItem() -> Id; + + #[method(style)] + pub unsafe fn style(&self, ) -> UIBarButtonItemStyle; + + #[method(setStyle:)] + pub unsafe fn setStyle(&self, style: UIBarButtonItemStyle,); + + #[method(width)] + pub unsafe fn width(&self, ) -> CGFloat; + + #[method(setWidth:)] + pub unsafe fn setWidth(&self, width: CGFloat,); + + #[method_id(@__retain_semantics Other possibleTitles)] + pub unsafe fn possibleTitles(&self, ) -> Option, Shared>>; + + #[method(setPossibleTitles:)] + pub unsafe fn setPossibleTitles(&self, possibleTitles: Option<&NSSet>,); + + #[method_id(@__retain_semantics Other customView)] + pub unsafe fn customView(&self, ) -> Option>; + + #[method(setCustomView:)] + pub unsafe fn setCustomView(&self, customView: Option<&UIView>,); + + #[method(action)] + pub unsafe fn action(&self, ) -> OptionSel; + + #[method(setAction:)] + pub unsafe fn setAction(&self, action: OptionSel,); + + #[method_id(@__retain_semantics Other target)] + pub unsafe fn target(&self, ) -> Option>; + + #[method(setTarget:)] + pub unsafe fn setTarget(&self, target: Option<&Object>,); + + #[method_id(@__retain_semantics Other primaryAction)] + pub unsafe fn primaryAction(&self, ) -> Option>; + + #[method(setPrimaryAction:)] + pub unsafe fn setPrimaryAction(&self, primaryAction: Option<&UIAction>,); + + #[method_id(@__retain_semantics Other menu)] + pub unsafe fn menu(&self, ) -> Option>; + + #[method(setMenu:)] + pub unsafe fn setMenu(&self, menu: Option<&UIMenu>,); + + #[method(preferredMenuElementOrder)] + pub unsafe fn preferredMenuElementOrder(&self, ) -> UIContextMenuConfigurationElementOrder; + + #[method(setPreferredMenuElementOrder:)] + pub unsafe fn setPreferredMenuElementOrder(&self, preferredMenuElementOrder: UIContextMenuConfigurationElementOrder,); + + #[method(changesSelectionAsPrimaryAction)] + pub unsafe fn changesSelectionAsPrimaryAction(&self, ) -> bool; + + #[method(setChangesSelectionAsPrimaryAction:)] + pub unsafe fn setChangesSelectionAsPrimaryAction(&self, changesSelectionAsPrimaryAction: bool,); + + #[method(isSelected)] + pub unsafe fn isSelected(&self, ) -> bool; + + #[method(setSelected:)] + pub unsafe fn setSelected(&self, selected: bool,); + + #[method(isHidden)] + pub unsafe fn isHidden(&self, ) -> bool; + + #[method(setHidden:)] + pub unsafe fn setHidden(&self, hidden: bool,); + + #[method_id(@__retain_semantics Other menuRepresentation)] + pub unsafe fn menuRepresentation(&self, ) -> Option>; + + #[method(setMenuRepresentation:)] + pub unsafe fn setMenuRepresentation(&self, menuRepresentation: Option<&UIMenuElement>,); + + #[method_id(@__retain_semantics Other creatingFixedGroup)] + pub unsafe fn creatingFixedGroup(&self, ) -> Id; + + #[method_id(@__retain_semantics Other creatingMovableGroupWithCustomizationIdentifier:)] + pub unsafe fn creatingMovableGroupWithCustomizationIdentifier(&self, customizationIdentifier: &NSString,) -> Id; + + #[method_id(@__retain_semantics Other creatingOptionalGroupWithCustomizationIdentifier:inDefaultCustomization:)] + pub unsafe fn creatingOptionalGroupWithCustomizationIdentifier_inDefaultCustomization(&self, customizationIdentifier: &NSString,inDefaultCustomization: bool,) -> Id; + + #[method(setBackgroundImage:forState:barMetrics:)] + pub unsafe fn setBackgroundImage_forState_barMetrics(&self, backgroundImage: Option<&UIImage>,state: UIControlState,barMetrics: UIBarMetrics,); + + #[method_id(@__retain_semantics Other backgroundImageForState:barMetrics:)] + pub unsafe fn backgroundImageForState_barMetrics(&self, state: UIControlState,barMetrics: UIBarMetrics,) -> Option>; + + #[method(setBackgroundImage:forState:style:barMetrics:)] + pub unsafe fn setBackgroundImage_forState_style_barMetrics(&self, backgroundImage: Option<&UIImage>,state: UIControlState,style: UIBarButtonItemStyle,barMetrics: UIBarMetrics,); + + #[method_id(@__retain_semantics Other backgroundImageForState:style:barMetrics:)] + pub unsafe fn backgroundImageForState_style_barMetrics(&self, state: UIControlState,style: UIBarButtonItemStyle,barMetrics: UIBarMetrics,) -> Option>; + + #[method_id(@__retain_semantics Other tintColor)] + pub unsafe fn tintColor(&self, ) -> Option>; + + #[method(setTintColor:)] + pub unsafe fn setTintColor(&self, tintColor: Option<&UIColor>,); + + #[method(setBackgroundVerticalPositionAdjustment:forBarMetrics:)] + pub unsafe fn setBackgroundVerticalPositionAdjustment_forBarMetrics(&self, adjustment: CGFloat,barMetrics: UIBarMetrics,); + + #[method(backgroundVerticalPositionAdjustmentForBarMetrics:)] + pub unsafe fn backgroundVerticalPositionAdjustmentForBarMetrics(&self, barMetrics: UIBarMetrics,) -> CGFloat; + + #[method(setTitlePositionAdjustment:forBarMetrics:)] + pub unsafe fn setTitlePositionAdjustment_forBarMetrics(&self, adjustment: UIOffset,barMetrics: UIBarMetrics,); + + #[method(titlePositionAdjustmentForBarMetrics:)] + pub unsafe fn titlePositionAdjustmentForBarMetrics(&self, barMetrics: UIBarMetrics,) -> UIOffset; + + #[method(setBackButtonBackgroundImage:forState:barMetrics:)] + pub unsafe fn setBackButtonBackgroundImage_forState_barMetrics(&self, backgroundImage: Option<&UIImage>,state: UIControlState,barMetrics: UIBarMetrics,); + + #[method_id(@__retain_semantics Other backButtonBackgroundImageForState:barMetrics:)] + pub unsafe fn backButtonBackgroundImageForState_barMetrics(&self, state: UIControlState,barMetrics: UIBarMetrics,) -> Option>; + + #[method(setBackButtonTitlePositionAdjustment:forBarMetrics:)] + pub unsafe fn setBackButtonTitlePositionAdjustment_forBarMetrics(&self, adjustment: UIOffset,barMetrics: UIBarMetrics,); + + #[method(backButtonTitlePositionAdjustmentForBarMetrics:)] + pub unsafe fn backButtonTitlePositionAdjustmentForBarMetrics(&self, barMetrics: UIBarMetrics,) -> UIOffset; + + #[method(setBackButtonBackgroundVerticalPositionAdjustment:forBarMetrics:)] + pub unsafe fn setBackButtonBackgroundVerticalPositionAdjustment_forBarMetrics(&self, adjustment: CGFloat,barMetrics: UIBarMetrics,); + + #[method(backButtonBackgroundVerticalPositionAdjustmentForBarMetrics:)] + pub unsafe fn backButtonBackgroundVerticalPositionAdjustmentForBarMetrics(&self, barMetrics: UIBarMetrics,) -> CGFloat; + + } +); + +extern_methods!( + /// SpringLoading + unsafe impl UIBarButtonItem { + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIBarButtonItemAppearance.rs b/crates/icrate-generated/src/UIKit/generated/UIBarButtonItemAppearance.rs new file mode 100644 index 000000000..f02a605f4 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIBarButtonItemAppearance.rs @@ -0,0 +1,89 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIBarButtonItemStateAppearance; + + unsafe impl ClassType for UIBarButtonItemStateAppearance { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIBarButtonItemStateAppearance { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics New new)] + pub unsafe fn new() -> Id; + + #[method_id(@__retain_semantics Other titleTextAttributes)] + pub unsafe fn titleTextAttributes(&self, ) -> Id, Shared>; + + #[method(setTitleTextAttributes:)] + pub unsafe fn setTitleTextAttributes(&self, titleTextAttributes: &NSDictionary,); + + #[method(titlePositionAdjustment)] + pub unsafe fn titlePositionAdjustment(&self, ) -> UIOffset; + + #[method(setTitlePositionAdjustment:)] + pub unsafe fn setTitlePositionAdjustment(&self, titlePositionAdjustment: UIOffset,); + + #[method_id(@__retain_semantics Other backgroundImage)] + pub unsafe fn backgroundImage(&self, ) -> Option>; + + #[method(setBackgroundImage:)] + pub unsafe fn setBackgroundImage(&self, backgroundImage: Option<&UIImage>,); + + #[method(backgroundImagePositionAdjustment)] + pub unsafe fn backgroundImagePositionAdjustment(&self, ) -> UIOffset; + + #[method(setBackgroundImagePositionAdjustment:)] + pub unsafe fn setBackgroundImagePositionAdjustment(&self, backgroundImagePositionAdjustment: UIOffset,); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIBarButtonItemAppearance; + + unsafe impl ClassType for UIBarButtonItemAppearance { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIBarButtonItemAppearance { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics Init initWithStyle:)] + pub unsafe fn initWithStyle(this: Option>, style: UIBarButtonItemStyle,) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Id; + + #[method_id(@__retain_semantics CopyOrMutCopy copy)] + pub unsafe fn copy(&self, ) -> Id; + + #[method(configureWithDefaultForStyle:)] + pub unsafe fn configureWithDefaultForStyle(&self, style: UIBarButtonItemStyle,); + + #[method_id(@__retain_semantics Other normal)] + pub unsafe fn normal(&self, ) -> Id; + + #[method_id(@__retain_semantics Other highlighted)] + pub unsafe fn highlighted(&self, ) -> Id; + + #[method_id(@__retain_semantics Other disabled)] + pub unsafe fn disabled(&self, ) -> Id; + + #[method_id(@__retain_semantics Other focused)] + pub unsafe fn focused(&self, ) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIBarButtonItemGroup.rs b/crates/icrate-generated/src/UIKit/generated/UIBarButtonItemGroup.rs new file mode 100644 index 000000000..5de2edde4 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIBarButtonItemGroup.rs @@ -0,0 +1,75 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIBarButtonItemGroup; + + unsafe impl ClassType for UIBarButtonItemGroup { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIBarButtonItemGroup { + #[method_id(@__retain_semantics Init initWithBarButtonItems:representativeItem:)] + pub unsafe fn initWithBarButtonItems_representativeItem(this: Option>, barButtonItems: &NSArray,representativeItem: Option<&UIBarButtonItem>,) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method_id(@__retain_semantics Other fixedGroupWithRepresentativeItem:items:)] + pub unsafe fn fixedGroupWithRepresentativeItem_items(representativeItem: Option<&UIBarButtonItem>,items: &NSArray,) -> Id; + + #[method_id(@__retain_semantics Other movableGroupWithCustomizationIdentifier:representativeItem:items:)] + pub unsafe fn movableGroupWithCustomizationIdentifier_representativeItem_items(customizationIdentifier: &NSString,representativeItem: Option<&UIBarButtonItem>,items: &NSArray,) -> Id; + + #[method_id(@__retain_semantics Other optionalGroupWithCustomizationIdentifier:inDefaultCustomization:representativeItem:items:)] + pub unsafe fn optionalGroupWithCustomizationIdentifier_inDefaultCustomization_representativeItem_items(customizationIdentifier: &NSString,inDefaultCustomization: bool,representativeItem: Option<&UIBarButtonItem>,items: &NSArray,) -> Id; + + #[method_id(@__retain_semantics Other barButtonItems)] + pub unsafe fn barButtonItems(&self, ) -> Id, Shared>; + + #[method(setBarButtonItems:)] + pub unsafe fn setBarButtonItems(&self, barButtonItems: &NSArray,); + + #[method_id(@__retain_semantics Other representativeItem)] + pub unsafe fn representativeItem(&self, ) -> Option>; + + #[method(setRepresentativeItem:)] + pub unsafe fn setRepresentativeItem(&self, representativeItem: Option<&UIBarButtonItem>,); + + #[method(isDisplayingRepresentativeItem)] + pub unsafe fn isDisplayingRepresentativeItem(&self, ) -> bool; + + #[method(alwaysAvailable)] + pub unsafe fn alwaysAvailable(&self, ) -> bool; + + #[method(setAlwaysAvailable:)] + pub unsafe fn setAlwaysAvailable(&self, alwaysAvailable: bool,); + + #[method_id(@__retain_semantics Other menuRepresentation)] + pub unsafe fn menuRepresentation(&self, ) -> Option>; + + #[method(setMenuRepresentation:)] + pub unsafe fn setMenuRepresentation(&self, menuRepresentation: Option<&UIMenuElement>,); + + #[method(isHidden)] + pub unsafe fn isHidden(&self, ) -> bool; + + #[method(setHidden:)] + pub unsafe fn setHidden(&self, hidden: bool,); + + } +); + +extern_methods!( + /// UIBarButtonItemGroup + unsafe impl UIBarButtonItem { + #[method_id(@__retain_semantics Other buttonGroup)] + pub unsafe fn buttonGroup(&self, ) -> Option>; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIBarCommon.rs b/crates/icrate-generated/src/UIKit/generated/UIBarCommon.rs new file mode 100644 index 000000000..4f1a44807 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIBarCommon.rs @@ -0,0 +1,47 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIBarMetrics { + UIBarMetricsDefault = 0, + UIBarMetricsCompact = 1, + UIBarMetricsDefaultPrompt = 101, + UIBarMetricsCompactPrompt = 102, + UIBarMetricsLandscapePhone = UIBarMetricsCompact, + UIBarMetricsLandscapePhonePrompt = UIBarMetricsCompactPrompt, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIBarPosition { + UIBarPositionAny = 0, + UIBarPositionBottom = 1, + UIBarPositionTop = 2, + UIBarPositionTopAttached = 3, + } +); + +extern_protocol!( + pub struct UIBarPositioning; + + unsafe impl UIBarPositioning { + #[method(barPosition)] + pub unsafe fn barPosition(&self, ) -> UIBarPosition; + + } +); + +extern_protocol!( + pub struct UIBarPositioningDelegate; + + unsafe impl UIBarPositioningDelegate { + #[optional] + #[method(positionForBar:)] + pub unsafe fn positionForBar(&self, bar: &UIBarPositioning,) -> UIBarPosition; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIBarItem.rs b/crates/icrate-generated/src/UIKit/generated/UIBarItem.rs new file mode 100644 index 000000000..f82cce91f --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIBarItem.rs @@ -0,0 +1,84 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIBarItem; + + unsafe impl ClassType for UIBarItem { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIBarItem { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method(isEnabled)] + pub unsafe fn isEnabled(&self, ) -> bool; + + #[method(setEnabled:)] + pub unsafe fn setEnabled(&self, enabled: bool,); + + #[method_id(@__retain_semantics Other title)] + pub unsafe fn title(&self, ) -> Option>; + + #[method(setTitle:)] + pub unsafe fn setTitle(&self, title: Option<&NSString>,); + + #[method_id(@__retain_semantics Other image)] + pub unsafe fn image(&self, ) -> Option>; + + #[method(setImage:)] + pub unsafe fn setImage(&self, image: Option<&UIImage>,); + + #[method_id(@__retain_semantics Other landscapeImagePhone)] + pub unsafe fn landscapeImagePhone(&self, ) -> Option>; + + #[method(setLandscapeImagePhone:)] + pub unsafe fn setLandscapeImagePhone(&self, landscapeImagePhone: Option<&UIImage>,); + + #[method_id(@__retain_semantics Other largeContentSizeImage)] + pub unsafe fn largeContentSizeImage(&self, ) -> Option>; + + #[method(setLargeContentSizeImage:)] + pub unsafe fn setLargeContentSizeImage(&self, largeContentSizeImage: Option<&UIImage>,); + + #[method(imageInsets)] + pub unsafe fn imageInsets(&self, ) -> UIEdgeInsets; + + #[method(setImageInsets:)] + pub unsafe fn setImageInsets(&self, imageInsets: UIEdgeInsets,); + + #[method(landscapeImagePhoneInsets)] + pub unsafe fn landscapeImagePhoneInsets(&self, ) -> UIEdgeInsets; + + #[method(setLandscapeImagePhoneInsets:)] + pub unsafe fn setLandscapeImagePhoneInsets(&self, landscapeImagePhoneInsets: UIEdgeInsets,); + + #[method(largeContentSizeImageInsets)] + pub unsafe fn largeContentSizeImageInsets(&self, ) -> UIEdgeInsets; + + #[method(setLargeContentSizeImageInsets:)] + pub unsafe fn setLargeContentSizeImageInsets(&self, largeContentSizeImageInsets: UIEdgeInsets,); + + #[method(tag)] + pub unsafe fn tag(&self, ) -> NSInteger; + + #[method(setTag:)] + pub unsafe fn setTag(&self, tag: NSInteger,); + + #[method(setTitleTextAttributes:forState:)] + pub unsafe fn setTitleTextAttributes_forState(&self, attributes: Option<&NSDictionary>,state: UIControlState,); + + #[method_id(@__retain_semantics Other titleTextAttributesForState:)] + pub unsafe fn titleTextAttributesForState(&self, state: UIControlState,) -> Option, Shared>>; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIBehavioralStyle.rs b/crates/icrate-generated/src/UIKit/generated/UIBehavioralStyle.rs new file mode 100644 index 000000000..4ea87967a --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIBehavioralStyle.rs @@ -0,0 +1,43 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSUInteger)] + pub enum UIBehavioralStyle { + UIBehavioralStyleAutomatic = 0, + UIBehavioralStylePad = 1, + UIBehavioralStyleMac = 2, + } +); + +extern_methods!( + /// UIBehavioralStyle + unsafe impl UIButton { + #[method(behavioralStyle)] + pub unsafe fn behavioralStyle(&self, ) -> UIBehavioralStyle; + + #[method(preferredBehavioralStyle)] + pub unsafe fn preferredBehavioralStyle(&self, ) -> UIBehavioralStyle; + + #[method(setPreferredBehavioralStyle:)] + pub unsafe fn setPreferredBehavioralStyle(&self, preferredBehavioralStyle: UIBehavioralStyle,); + + } +); + +extern_methods!( + /// UIBehavioralStyle + unsafe impl UISlider { + #[method(behavioralStyle)] + pub unsafe fn behavioralStyle(&self, ) -> UIBehavioralStyle; + + #[method(preferredBehavioralStyle)] + pub unsafe fn preferredBehavioralStyle(&self, ) -> UIBehavioralStyle; + + #[method(setPreferredBehavioralStyle:)] + pub unsafe fn setPreferredBehavioralStyle(&self, preferredBehavioralStyle: UIBehavioralStyle,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIBezierPath.rs b/crates/icrate-generated/src/UIKit/generated/UIBezierPath.rs new file mode 100644 index 000000000..bc528f2cb --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIBezierPath.rs @@ -0,0 +1,150 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIBezierPath; + + unsafe impl ClassType for UIBezierPath { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIBezierPath { + #[method_id(@__retain_semantics Other bezierPath)] + pub unsafe fn bezierPath() -> Id; + + #[method_id(@__retain_semantics Other bezierPathWithRect:)] + pub unsafe fn bezierPathWithRect(rect: CGRect,) -> Id; + + #[method_id(@__retain_semantics Other bezierPathWithOvalInRect:)] + pub unsafe fn bezierPathWithOvalInRect(rect: CGRect,) -> Id; + + #[method_id(@__retain_semantics Other bezierPathWithRoundedRect:cornerRadius:)] + pub unsafe fn bezierPathWithRoundedRect_cornerRadius(rect: CGRect,cornerRadius: CGFloat,) -> Id; + + #[method_id(@__retain_semantics Other bezierPathWithRoundedRect:byRoundingCorners:cornerRadii:)] + pub unsafe fn bezierPathWithRoundedRect_byRoundingCorners_cornerRadii(rect: CGRect,corners: UIRectCorner,cornerRadii: CGSize,) -> Id; + + #[method_id(@__retain_semantics Other bezierPathWithArcCenter:radius:startAngle:endAngle:clockwise:)] + pub unsafe fn bezierPathWithArcCenter_radius_startAngle_endAngle_clockwise(center: CGPoint,radius: CGFloat,startAngle: CGFloat,endAngle: CGFloat,clockwise: bool,) -> Id; + + #[method_id(@__retain_semantics Other bezierPathWithCGPath:)] + pub unsafe fn bezierPathWithCGPath(CGPath: CGPathRef,) -> Id; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method(CGPath)] + pub unsafe fn CGPath(&self, ) -> CGPathRef; + + #[method(setCGPath:)] + pub unsafe fn setCGPath(&self, CGPath: CGPathRef,); + + #[method(moveToPoint:)] + pub unsafe fn moveToPoint(&self, point: CGPoint,); + + #[method(addLineToPoint:)] + pub unsafe fn addLineToPoint(&self, point: CGPoint,); + + #[method(addCurveToPoint:controlPoint1:controlPoint2:)] + pub unsafe fn addCurveToPoint_controlPoint1_controlPoint2(&self, endPoint: CGPoint,controlPoint1: CGPoint,controlPoint2: CGPoint,); + + #[method(addQuadCurveToPoint:controlPoint:)] + pub unsafe fn addQuadCurveToPoint_controlPoint(&self, endPoint: CGPoint,controlPoint: CGPoint,); + + #[method(addArcWithCenter:radius:startAngle:endAngle:clockwise:)] + pub unsafe fn addArcWithCenter_radius_startAngle_endAngle_clockwise(&self, center: CGPoint,radius: CGFloat,startAngle: CGFloat,endAngle: CGFloat,clockwise: bool,); + + #[method(closePath)] + pub unsafe fn closePath(&self, ); + + #[method(removeAllPoints)] + pub unsafe fn removeAllPoints(&self, ); + + #[method(appendPath:)] + pub unsafe fn appendPath(&self, bezierPath: &UIBezierPath,); + + #[method_id(@__retain_semantics Other bezierPathByReversingPath)] + pub unsafe fn bezierPathByReversingPath(&self, ) -> Id; + + #[method(applyTransform:)] + pub unsafe fn applyTransform(&self, transform: CGAffineTransform,); + + #[method(isEmpty)] + pub unsafe fn isEmpty(&self, ) -> bool; + + #[method(bounds)] + pub unsafe fn bounds(&self, ) -> CGRect; + + #[method(currentPoint)] + pub unsafe fn currentPoint(&self, ) -> CGPoint; + + #[method(containsPoint:)] + pub unsafe fn containsPoint(&self, point: CGPoint,) -> bool; + + #[method(lineWidth)] + pub unsafe fn lineWidth(&self, ) -> CGFloat; + + #[method(setLineWidth:)] + pub unsafe fn setLineWidth(&self, lineWidth: CGFloat,); + + #[method(lineCapStyle)] + pub unsafe fn lineCapStyle(&self, ) -> CGLineCap; + + #[method(setLineCapStyle:)] + pub unsafe fn setLineCapStyle(&self, lineCapStyle: CGLineCap,); + + #[method(lineJoinStyle)] + pub unsafe fn lineJoinStyle(&self, ) -> CGLineJoin; + + #[method(setLineJoinStyle:)] + pub unsafe fn setLineJoinStyle(&self, lineJoinStyle: CGLineJoin,); + + #[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(usesEvenOddFillRule)] + pub unsafe fn usesEvenOddFillRule(&self, ) -> bool; + + #[method(setUsesEvenOddFillRule:)] + pub unsafe fn setUsesEvenOddFillRule(&self, usesEvenOddFillRule: bool,); + + #[method(setLineDash:count:phase:)] + pub unsafe fn setLineDash_count_phase(&self, pattern: *mut CGFloat,count: NSInteger,phase: CGFloat,); + + #[method(getLineDash:count:phase:)] + pub unsafe fn getLineDash_count_phase(&self, pattern: *mut CGFloat,count: *mut NSInteger,phase: *mut CGFloat,); + + #[method(fill)] + pub unsafe fn fill(&self, ); + + #[method(stroke)] + pub unsafe fn stroke(&self, ); + + #[method(fillWithBlendMode:alpha:)] + pub unsafe fn fillWithBlendMode_alpha(&self, blendMode: CGBlendMode,alpha: CGFloat,); + + #[method(strokeWithBlendMode:alpha:)] + pub unsafe fn strokeWithBlendMode_alpha(&self, blendMode: CGBlendMode,alpha: CGFloat,); + + #[method(addClip)] + pub unsafe fn addClip(&self, ); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIBlurEffect.rs b/crates/icrate-generated/src/UIKit/generated/UIBlurEffect.rs new file mode 100644 index 000000000..8a358c4ca --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIBlurEffect.rs @@ -0,0 +1,48 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIBlurEffectStyle { + UIBlurEffectStyleExtraLight = 0, + UIBlurEffectStyleLight = 1, + UIBlurEffectStyleDark = 2, + UIBlurEffectStyleExtraDark = 3, + UIBlurEffectStyleRegular = 4, + UIBlurEffectStyleProminent = 5, + UIBlurEffectStyleSystemUltraThinMaterial = 6, + UIBlurEffectStyleSystemThinMaterial = 7, + UIBlurEffectStyleSystemMaterial = 8, + UIBlurEffectStyleSystemThickMaterial = 9, + UIBlurEffectStyleSystemChromeMaterial = 10, + UIBlurEffectStyleSystemUltraThinMaterialLight = 11, + UIBlurEffectStyleSystemThinMaterialLight = 12, + UIBlurEffectStyleSystemMaterialLight = 13, + UIBlurEffectStyleSystemThickMaterialLight = 14, + UIBlurEffectStyleSystemChromeMaterialLight = 15, + UIBlurEffectStyleSystemUltraThinMaterialDark = 16, + UIBlurEffectStyleSystemThinMaterialDark = 17, + UIBlurEffectStyleSystemMaterialDark = 18, + UIBlurEffectStyleSystemThickMaterialDark = 19, + UIBlurEffectStyleSystemChromeMaterialDark = 20, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIBlurEffect; + + unsafe impl ClassType for UIBlurEffect { + type Super = UIVisualEffect; + } +); + +extern_methods!( + unsafe impl UIBlurEffect { + #[method_id(@__retain_semantics Other effectWithStyle:)] + pub unsafe fn effectWithStyle(style: UIBlurEffectStyle,) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIButton.rs b/crates/icrate-generated/src/UIKit/generated/UIButton.rs new file mode 100644 index 000000000..530f6b0cc --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIButton.rs @@ -0,0 +1,301 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIButtonType { + UIButtonTypeCustom = 0, + UIButtonTypeSystem = 1, + UIButtonTypeDetailDisclosure = 2, + UIButtonTypeInfoLight = 3, + UIButtonTypeInfoDark = 4, + UIButtonTypeContactAdd = 5, + UIButtonTypePlain = 6, + UIButtonTypeClose = 7, + UIButtonTypeRoundedRect = UIButtonTypeSystem, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIButtonRole { + UIButtonRoleNormal = 0, + UIButtonRolePrimary = 1, + UIButtonRoleCancel = 2, + UIButtonRoleDestructive = 3, + } +); + +pub type UIButtonPointerStyleProvider = *mut Block<(NonNull, NonNull, NonNull, ), *mut UIPointerStyle>; + +pub type UIButtonConfigurationUpdateHandler = *mut Block<(NonNull, ), ()>; + +extern_class!( + #[derive(Debug)] + pub struct UIButton; + + unsafe impl ClassType for UIButton { + type Super = UIControl; + } +); + +extern_methods!( + unsafe impl UIButton { + #[method_id(@__retain_semantics Init initWithFrame:)] + pub unsafe fn initWithFrame(this: Option>, frame: CGRect,) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method_id(@__retain_semantics Init initWithFrame:primaryAction:)] + pub unsafe fn initWithFrame_primaryAction(this: Option>, frame: CGRect,primaryAction: Option<&UIAction>,) -> Id; + + #[method_id(@__retain_semantics Other buttonWithType:)] + pub unsafe fn buttonWithType(buttonType: UIButtonType,) -> Id; + + #[method_id(@__retain_semantics Other systemButtonWithImage:target:action:)] + pub unsafe fn systemButtonWithImage_target_action(image: &UIImage,target: Option<&Object>,action: OptionSel,) -> Id; + + #[method_id(@__retain_semantics Other systemButtonWithPrimaryAction:)] + pub unsafe fn systemButtonWithPrimaryAction(primaryAction: Option<&UIAction>,) -> Id; + + #[method_id(@__retain_semantics Other buttonWithType:primaryAction:)] + pub unsafe fn buttonWithType_primaryAction(buttonType: UIButtonType,primaryAction: Option<&UIAction>,) -> Id; + + #[method_id(@__retain_semantics Other buttonWithConfiguration:primaryAction:)] + pub unsafe fn buttonWithConfiguration_primaryAction(configuration: &UIButtonConfiguration,primaryAction: Option<&UIAction>,) -> Id; + + #[method_id(@__retain_semantics Other configuration)] + pub unsafe fn configuration(&self, ) -> Option>; + + #[method(setConfiguration:)] + pub unsafe fn setConfiguration(&self, configuration: Option<&UIButtonConfiguration>,); + + #[method(setNeedsUpdateConfiguration)] + pub unsafe fn setNeedsUpdateConfiguration(&self, ); + + #[method(updateConfiguration)] + pub unsafe fn updateConfiguration(&self, ); + + #[method(configurationUpdateHandler)] + pub unsafe fn configurationUpdateHandler(&self, ) -> UIButtonConfigurationUpdateHandler; + + #[method(setConfigurationUpdateHandler:)] + pub unsafe fn setConfigurationUpdateHandler(&self, configurationUpdateHandler: UIButtonConfigurationUpdateHandler,); + + #[method(automaticallyUpdatesConfiguration)] + pub unsafe fn automaticallyUpdatesConfiguration(&self, ) -> bool; + + #[method(setAutomaticallyUpdatesConfiguration:)] + pub unsafe fn setAutomaticallyUpdatesConfiguration(&self, automaticallyUpdatesConfiguration: bool,); + + #[method_id(@__retain_semantics Other tintColor)] + pub unsafe fn tintColor(&self, ) -> Option>; + + #[method(setTintColor:)] + pub unsafe fn setTintColor(&self, tintColor: Option<&UIColor>,); + + #[method(buttonType)] + pub unsafe fn buttonType(&self, ) -> UIButtonType; + + #[method(isHovered)] + pub unsafe fn isHovered(&self, ) -> bool; + + #[method(isHeld)] + pub unsafe fn isHeld(&self, ) -> bool; + + #[method(role)] + pub unsafe fn role(&self, ) -> UIButtonRole; + + #[method(setRole:)] + pub unsafe fn setRole(&self, role: UIButtonRole,); + + #[method(isPointerInteractionEnabled)] + pub unsafe fn isPointerInteractionEnabled(&self, ) -> bool; + + #[method(setPointerInteractionEnabled:)] + pub unsafe fn setPointerInteractionEnabled(&self, pointerInteractionEnabled: bool,); + + #[method(pointerStyleProvider)] + pub unsafe fn pointerStyleProvider(&self, ) -> UIButtonPointerStyleProvider; + + #[method(setPointerStyleProvider:)] + pub unsafe fn setPointerStyleProvider(&self, pointerStyleProvider: UIButtonPointerStyleProvider,); + + #[method_id(@__retain_semantics Other menu)] + pub unsafe fn menu(&self, ) -> Option>; + + #[method(setMenu:)] + pub unsafe fn setMenu(&self, menu: Option<&UIMenu>,); + + #[method(preferredMenuElementOrder)] + pub unsafe fn preferredMenuElementOrder(&self, ) -> UIContextMenuConfigurationElementOrder; + + #[method(setPreferredMenuElementOrder:)] + pub unsafe fn setPreferredMenuElementOrder(&self, preferredMenuElementOrder: UIContextMenuConfigurationElementOrder,); + + #[method(changesSelectionAsPrimaryAction)] + pub unsafe fn changesSelectionAsPrimaryAction(&self, ) -> bool; + + #[method(setChangesSelectionAsPrimaryAction:)] + pub unsafe fn setChangesSelectionAsPrimaryAction(&self, changesSelectionAsPrimaryAction: bool,); + + #[method(setTitle:forState:)] + pub unsafe fn setTitle_forState(&self, title: Option<&NSString>,state: UIControlState,); + + #[method(setTitleColor:forState:)] + pub unsafe fn setTitleColor_forState(&self, color: Option<&UIColor>,state: UIControlState,); + + #[method(setTitleShadowColor:forState:)] + pub unsafe fn setTitleShadowColor_forState(&self, color: Option<&UIColor>,state: UIControlState,); + + #[method(setImage:forState:)] + pub unsafe fn setImage_forState(&self, image: Option<&UIImage>,state: UIControlState,); + + #[method(setBackgroundImage:forState:)] + pub unsafe fn setBackgroundImage_forState(&self, image: Option<&UIImage>,state: UIControlState,); + + #[method(setPreferredSymbolConfiguration:forImageInState:)] + pub unsafe fn setPreferredSymbolConfiguration_forImageInState(&self, configuration: Option<&UIImageSymbolConfiguration>,state: UIControlState,); + + #[method(setAttributedTitle:forState:)] + pub unsafe fn setAttributedTitle_forState(&self, title: Option<&NSAttributedString>,state: UIControlState,); + + #[method_id(@__retain_semantics Other titleForState:)] + pub unsafe fn titleForState(&self, state: UIControlState,) -> Option>; + + #[method_id(@__retain_semantics Other titleColorForState:)] + pub unsafe fn titleColorForState(&self, state: UIControlState,) -> Option>; + + #[method_id(@__retain_semantics Other titleShadowColorForState:)] + pub unsafe fn titleShadowColorForState(&self, state: UIControlState,) -> Option>; + + #[method_id(@__retain_semantics Other imageForState:)] + pub unsafe fn imageForState(&self, state: UIControlState,) -> Option>; + + #[method_id(@__retain_semantics Other backgroundImageForState:)] + pub unsafe fn backgroundImageForState(&self, state: UIControlState,) -> Option>; + + #[method_id(@__retain_semantics Other preferredSymbolConfigurationForImageInState:)] + pub unsafe fn preferredSymbolConfigurationForImageInState(&self, state: UIControlState,) -> Option>; + + #[method_id(@__retain_semantics Other attributedTitleForState:)] + pub unsafe fn attributedTitleForState(&self, state: UIControlState,) -> Option>; + + #[method_id(@__retain_semantics Other currentTitle)] + pub unsafe fn currentTitle(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other currentTitleColor)] + pub unsafe fn currentTitleColor(&self, ) -> Id; + + #[method_id(@__retain_semantics Other currentTitleShadowColor)] + pub unsafe fn currentTitleShadowColor(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other currentImage)] + pub unsafe fn currentImage(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other currentBackgroundImage)] + pub unsafe fn currentBackgroundImage(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other currentPreferredSymbolConfiguration)] + pub unsafe fn currentPreferredSymbolConfiguration(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other currentAttributedTitle)] + pub unsafe fn currentAttributedTitle(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other titleLabel)] + pub unsafe fn titleLabel(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other imageView)] + pub unsafe fn imageView(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other subtitleLabel)] + pub unsafe fn subtitleLabel(&self, ) -> Option>; + + } +); + +extern_methods!( + unsafe impl UIButton { + #[method_id(@__retain_semantics Other font)] + pub unsafe fn font(&self, ) -> Id; + + #[method(setFont:)] + pub unsafe fn setFont(&self, font: &UIFont,); + + #[method(lineBreakMode)] + pub unsafe fn lineBreakMode(&self, ) -> NSLineBreakMode; + + #[method(setLineBreakMode:)] + pub unsafe fn setLineBreakMode(&self, lineBreakMode: NSLineBreakMode,); + + #[method(titleShadowOffset)] + pub unsafe fn titleShadowOffset(&self, ) -> CGSize; + + #[method(setTitleShadowOffset:)] + pub unsafe fn setTitleShadowOffset(&self, titleShadowOffset: CGSize,); + + #[method(contentEdgeInsets)] + pub unsafe fn contentEdgeInsets(&self, ) -> UIEdgeInsets; + + #[method(setContentEdgeInsets:)] + pub unsafe fn setContentEdgeInsets(&self, contentEdgeInsets: UIEdgeInsets,); + + #[method(titleEdgeInsets)] + pub unsafe fn titleEdgeInsets(&self, ) -> UIEdgeInsets; + + #[method(setTitleEdgeInsets:)] + pub unsafe fn setTitleEdgeInsets(&self, titleEdgeInsets: UIEdgeInsets,); + + #[method(imageEdgeInsets)] + pub unsafe fn imageEdgeInsets(&self, ) -> UIEdgeInsets; + + #[method(setImageEdgeInsets:)] + pub unsafe fn setImageEdgeInsets(&self, imageEdgeInsets: UIEdgeInsets,); + + #[method(reversesTitleShadowWhenHighlighted)] + pub unsafe fn reversesTitleShadowWhenHighlighted(&self, ) -> bool; + + #[method(setReversesTitleShadowWhenHighlighted:)] + pub unsafe fn setReversesTitleShadowWhenHighlighted(&self, reversesTitleShadowWhenHighlighted: bool,); + + #[method(adjustsImageWhenHighlighted)] + pub unsafe fn adjustsImageWhenHighlighted(&self, ) -> bool; + + #[method(setAdjustsImageWhenHighlighted:)] + pub unsafe fn setAdjustsImageWhenHighlighted(&self, adjustsImageWhenHighlighted: bool,); + + #[method(adjustsImageWhenDisabled)] + pub unsafe fn adjustsImageWhenDisabled(&self, ) -> bool; + + #[method(setAdjustsImageWhenDisabled:)] + pub unsafe fn setAdjustsImageWhenDisabled(&self, adjustsImageWhenDisabled: bool,); + + #[method(showsTouchWhenHighlighted)] + pub unsafe fn showsTouchWhenHighlighted(&self, ) -> bool; + + #[method(setShowsTouchWhenHighlighted:)] + pub unsafe fn setShowsTouchWhenHighlighted(&self, showsTouchWhenHighlighted: bool,); + + #[method(backgroundRectForBounds:)] + pub unsafe fn backgroundRectForBounds(&self, bounds: CGRect,) -> CGRect; + + #[method(contentRectForBounds:)] + pub unsafe fn contentRectForBounds(&self, bounds: CGRect,) -> CGRect; + + #[method(titleRectForContentRect:)] + pub unsafe fn titleRectForContentRect(&self, contentRect: CGRect,) -> CGRect; + + #[method(imageRectForContentRect:)] + pub unsafe fn imageRectForContentRect(&self, contentRect: CGRect,) -> CGRect; + + } +); + +extern_methods!( + /// SpringLoading + unsafe impl UIButton { + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIButtonConfiguration.rs b/crates/icrate-generated/src/UIKit/generated/UIButtonConfiguration.rs new file mode 100644 index 000000000..1487c7f5e --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIButtonConfiguration.rs @@ -0,0 +1,257 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +pub type UIConfigurationTextAttributesTransformer = *mut Block<(NonNull>, ), NonNull>>; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIButtonConfigurationSize { + UIButtonConfigurationSizeMedium = 0, + UIButtonConfigurationSizeSmall = 1, + UIButtonConfigurationSizeMini = 2, + UIButtonConfigurationSizeLarge = 3, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIButtonConfigurationTitleAlignment { + UIButtonConfigurationTitleAlignmentAutomatic = 0, + UIButtonConfigurationTitleAlignmentLeading = 1, + UIButtonConfigurationTitleAlignmentCenter = 2, + UIButtonConfigurationTitleAlignmentTrailing = 3, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIButtonConfigurationCornerStyle { + UIButtonConfigurationCornerStyleFixed = -1, + UIButtonConfigurationCornerStyleDynamic = 0, + UIButtonConfigurationCornerStyleSmall = 1, + UIButtonConfigurationCornerStyleMedium = 2, + UIButtonConfigurationCornerStyleLarge = 3, + UIButtonConfigurationCornerStyleCapsule = 4, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIButtonConfigurationMacIdiomStyle { + UIButtonConfigurationMacIdiomStyleAutomatic = 0, + UIButtonConfigurationMacIdiomStyleBordered = 1, + UIButtonConfigurationMacIdiomStyleBorderless = 2, + UIButtonConfigurationMacIdiomStyleBorderlessTinted = 3, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIButtonConfigurationIndicator { + UIButtonConfigurationIndicatorAutomatic = 0, + UIButtonConfigurationIndicatorNone = 1, + UIButtonConfigurationIndicatorPopup = 2, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIButtonConfiguration; + + unsafe impl ClassType for UIButtonConfiguration { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIButtonConfiguration { + #[method_id(@__retain_semantics Other plainButtonConfiguration)] + pub unsafe fn plainButtonConfiguration() -> Id; + + #[method_id(@__retain_semantics Other tintedButtonConfiguration)] + pub unsafe fn tintedButtonConfiguration() -> Id; + + #[method_id(@__retain_semantics Other grayButtonConfiguration)] + pub unsafe fn grayButtonConfiguration() -> Id; + + #[method_id(@__retain_semantics Other filledButtonConfiguration)] + pub unsafe fn filledButtonConfiguration() -> Id; + + #[method_id(@__retain_semantics Other borderlessButtonConfiguration)] + pub unsafe fn borderlessButtonConfiguration() -> Id; + + #[method_id(@__retain_semantics Other borderedButtonConfiguration)] + pub unsafe fn borderedButtonConfiguration() -> Id; + + #[method_id(@__retain_semantics Other borderedTintedButtonConfiguration)] + pub unsafe fn borderedTintedButtonConfiguration() -> Id; + + #[method_id(@__retain_semantics Other borderedProminentButtonConfiguration)] + pub unsafe fn borderedProminentButtonConfiguration() -> 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 updatedConfigurationForButton:)] + pub unsafe fn updatedConfigurationForButton(&self, button: &UIButton,) -> Id; + + #[method_id(@__retain_semantics Other background)] + pub unsafe fn background(&self, ) -> Id; + + #[method(setBackground:)] + pub unsafe fn setBackground(&self, background: &UIBackgroundConfiguration,); + + #[method(cornerStyle)] + pub unsafe fn cornerStyle(&self, ) -> UIButtonConfigurationCornerStyle; + + #[method(setCornerStyle:)] + pub unsafe fn setCornerStyle(&self, cornerStyle: UIButtonConfigurationCornerStyle,); + + #[method(buttonSize)] + pub unsafe fn buttonSize(&self, ) -> UIButtonConfigurationSize; + + #[method(setButtonSize:)] + pub unsafe fn setButtonSize(&self, buttonSize: UIButtonConfigurationSize,); + + #[method(macIdiomStyle)] + pub unsafe fn macIdiomStyle(&self, ) -> UIButtonConfigurationMacIdiomStyle; + + #[method(setMacIdiomStyle:)] + pub unsafe fn setMacIdiomStyle(&self, macIdiomStyle: UIButtonConfigurationMacIdiomStyle,); + + #[method_id(@__retain_semantics Other baseForegroundColor)] + pub unsafe fn baseForegroundColor(&self, ) -> Option>; + + #[method(setBaseForegroundColor:)] + pub unsafe fn setBaseForegroundColor(&self, baseForegroundColor: Option<&UIColor>,); + + #[method_id(@__retain_semantics Other baseBackgroundColor)] + pub unsafe fn baseBackgroundColor(&self, ) -> Option>; + + #[method(setBaseBackgroundColor:)] + pub unsafe fn setBaseBackgroundColor(&self, baseBackgroundColor: Option<&UIColor>,); + + #[method_id(@__retain_semantics Other image)] + pub unsafe fn image(&self, ) -> Option>; + + #[method(setImage:)] + pub unsafe fn setImage(&self, image: Option<&UIImage>,); + + #[method(imageColorTransformer)] + pub unsafe fn imageColorTransformer(&self, ) -> UIConfigurationColorTransformer; + + #[method(setImageColorTransformer:)] + pub unsafe fn setImageColorTransformer(&self, imageColorTransformer: UIConfigurationColorTransformer,); + + #[method_id(@__retain_semantics Other preferredSymbolConfigurationForImage)] + pub unsafe fn preferredSymbolConfigurationForImage(&self, ) -> Option>; + + #[method(setPreferredSymbolConfigurationForImage:)] + pub unsafe fn setPreferredSymbolConfigurationForImage(&self, preferredSymbolConfigurationForImage: Option<&UIImageSymbolConfiguration>,); + + #[method(showsActivityIndicator)] + pub unsafe fn showsActivityIndicator(&self, ) -> bool; + + #[method(setShowsActivityIndicator:)] + pub unsafe fn setShowsActivityIndicator(&self, showsActivityIndicator: bool,); + + #[method(activityIndicatorColorTransformer)] + pub unsafe fn activityIndicatorColorTransformer(&self, ) -> UIConfigurationColorTransformer; + + #[method(setActivityIndicatorColorTransformer:)] + pub unsafe fn setActivityIndicatorColorTransformer(&self, activityIndicatorColorTransformer: UIConfigurationColorTransformer,); + + #[method_id(@__retain_semantics Other title)] + pub unsafe fn title(&self, ) -> Option>; + + #[method(setTitle:)] + pub unsafe fn setTitle(&self, title: Option<&NSString>,); + + #[method_id(@__retain_semantics Other attributedTitle)] + pub unsafe fn attributedTitle(&self, ) -> Option>; + + #[method(setAttributedTitle:)] + pub unsafe fn setAttributedTitle(&self, attributedTitle: Option<&NSAttributedString>,); + + #[method(titleTextAttributesTransformer)] + pub unsafe fn titleTextAttributesTransformer(&self, ) -> UIConfigurationTextAttributesTransformer; + + #[method(setTitleTextAttributesTransformer:)] + pub unsafe fn setTitleTextAttributesTransformer(&self, titleTextAttributesTransformer: UIConfigurationTextAttributesTransformer,); + + #[method_id(@__retain_semantics Other subtitle)] + pub unsafe fn subtitle(&self, ) -> Option>; + + #[method(setSubtitle:)] + pub unsafe fn setSubtitle(&self, subtitle: Option<&NSString>,); + + #[method_id(@__retain_semantics Other attributedSubtitle)] + pub unsafe fn attributedSubtitle(&self, ) -> Option>; + + #[method(setAttributedSubtitle:)] + pub unsafe fn setAttributedSubtitle(&self, attributedSubtitle: Option<&NSAttributedString>,); + + #[method(subtitleTextAttributesTransformer)] + pub unsafe fn subtitleTextAttributesTransformer(&self, ) -> UIConfigurationTextAttributesTransformer; + + #[method(setSubtitleTextAttributesTransformer:)] + pub unsafe fn setSubtitleTextAttributesTransformer(&self, subtitleTextAttributesTransformer: UIConfigurationTextAttributesTransformer,); + + #[method(indicator)] + pub unsafe fn indicator(&self, ) -> UIButtonConfigurationIndicator; + + #[method(setIndicator:)] + pub unsafe fn setIndicator(&self, indicator: UIButtonConfigurationIndicator,); + + #[method(indicatorColorTransformer)] + pub unsafe fn indicatorColorTransformer(&self, ) -> UIConfigurationColorTransformer; + + #[method(setIndicatorColorTransformer:)] + pub unsafe fn setIndicatorColorTransformer(&self, indicatorColorTransformer: UIConfigurationColorTransformer,); + + #[method(contentInsets)] + pub unsafe fn contentInsets(&self, ) -> NSDirectionalEdgeInsets; + + #[method(setContentInsets:)] + pub unsafe fn setContentInsets(&self, contentInsets: NSDirectionalEdgeInsets,); + + #[method(setDefaultContentInsets)] + pub unsafe fn setDefaultContentInsets(&self, ); + + #[method(imagePlacement)] + pub unsafe fn imagePlacement(&self, ) -> NSDirectionalRectEdge; + + #[method(setImagePlacement:)] + pub unsafe fn setImagePlacement(&self, imagePlacement: NSDirectionalRectEdge,); + + #[method(imagePadding)] + pub unsafe fn imagePadding(&self, ) -> CGFloat; + + #[method(setImagePadding:)] + pub unsafe fn setImagePadding(&self, imagePadding: CGFloat,); + + #[method(titlePadding)] + pub unsafe fn titlePadding(&self, ) -> CGFloat; + + #[method(setTitlePadding:)] + pub unsafe fn setTitlePadding(&self, titlePadding: CGFloat,); + + #[method(titleAlignment)] + pub unsafe fn titleAlignment(&self, ) -> UIButtonConfigurationTitleAlignment; + + #[method(setTitleAlignment:)] + pub unsafe fn setTitleAlignment(&self, titleAlignment: UIButtonConfigurationTitleAlignment,); + + #[method(automaticallyUpdateForSelection)] + pub unsafe fn automaticallyUpdateForSelection(&self, ) -> bool; + + #[method(setAutomaticallyUpdateForSelection:)] + pub unsafe fn setAutomaticallyUpdateForSelection(&self, automaticallyUpdateForSelection: bool,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UICalendarSelection.rs b/crates/icrate-generated/src/UIKit/generated/UICalendarSelection.rs new file mode 100644 index 000000000..f4b8bfc29 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UICalendarSelection.rs @@ -0,0 +1,27 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UICalendarSelection; + + unsafe impl ClassType for UICalendarSelection { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UICalendarSelection { + #[method(updateSelectableDates)] + pub unsafe fn updateSelectableDates(&self, ); + + #[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-generated/src/UIKit/generated/UICalendarSelectionMultiDate.rs b/crates/icrate-generated/src/UIKit/generated/UICalendarSelectionMultiDate.rs new file mode 100644 index 000000000..f8a56af3f --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UICalendarSelectionMultiDate.rs @@ -0,0 +1,54 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UICalendarSelectionMultiDate; + + unsafe impl ClassType for UICalendarSelectionMultiDate { + type Super = UICalendarSelection; + } +); + +extern_methods!( + unsafe impl UICalendarSelectionMultiDate { + #[method_id(@__retain_semantics Other selectedDates)] + pub unsafe fn selectedDates(&self, ) -> Id, Shared>; + + #[method(setSelectedDates:)] + pub unsafe fn setSelectedDates(&self, selectedDates: &NSArray,); + + #[method(setSelectedDates:animated:)] + pub unsafe fn setSelectedDates_animated(&self, selectedDates: &NSArray,animated: bool,); + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method_id(@__retain_semantics Init initWithDelegate:)] + pub unsafe fn initWithDelegate(this: Option>, delegate: Option<&UICalendarSelectionMultiDateDelegate>,) -> Id; + + } +); + +extern_protocol!( + pub struct UICalendarSelectionMultiDateDelegate; + + unsafe impl UICalendarSelectionMultiDateDelegate { + #[method(multiDateSelection:didSelectDate:)] + pub unsafe fn multiDateSelection_didSelectDate(&self, selection: &UICalendarSelectionMultiDate,dateComponents: &NSDateComponents,); + + #[method(multiDateSelection:didDeselectDate:)] + pub unsafe fn multiDateSelection_didDeselectDate(&self, selection: &UICalendarSelectionMultiDate,dateComponents: &NSDateComponents,); + + #[optional] + #[method(multiDateSelection:canSelectDate:)] + pub unsafe fn multiDateSelection_canSelectDate(&self, selection: &UICalendarSelectionMultiDate,dateComponents: &NSDateComponents,) -> bool; + + #[optional] + #[method(multiDateSelection:canDeselectDate:)] + pub unsafe fn multiDateSelection_canDeselectDate(&self, selection: &UICalendarSelectionMultiDate,dateComponents: &NSDateComponents,) -> bool; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UICalendarSelectionSingleDate.rs b/crates/icrate-generated/src/UIKit/generated/UICalendarSelectionSingleDate.rs new file mode 100644 index 000000000..1bf0be3d6 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UICalendarSelectionSingleDate.rs @@ -0,0 +1,47 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UICalendarSelectionSingleDate; + + unsafe impl ClassType for UICalendarSelectionSingleDate { + type Super = UICalendarSelection; + } +); + +extern_methods!( + unsafe impl UICalendarSelectionSingleDate { + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other selectedDate)] + pub unsafe fn selectedDate(&self, ) -> Option>; + + #[method(setSelectedDate:)] + pub unsafe fn setSelectedDate(&self, selectedDate: Option<&NSDateComponents>,); + + #[method(setSelectedDate:animated:)] + pub unsafe fn setSelectedDate_animated(&self, selectedDate: Option<&NSDateComponents>,animated: bool,); + + #[method_id(@__retain_semantics Init initWithDelegate:)] + pub unsafe fn initWithDelegate(this: Option>, delegate: Option<&UICalendarSelectionSingleDateDelegate>,) -> Id; + + } +); + +extern_protocol!( + pub struct UICalendarSelectionSingleDateDelegate; + + unsafe impl UICalendarSelectionSingleDateDelegate { + #[method(dateSelection:didSelectDate:)] + pub unsafe fn dateSelection_didSelectDate(&self, selection: &UICalendarSelectionSingleDate,dateComponents: Option<&NSDateComponents>,); + + #[optional] + #[method(dateSelection:canSelectDate:)] + pub unsafe fn dateSelection_canSelectDate(&self, selection: &UICalendarSelectionSingleDate,dateComponents: Option<&NSDateComponents>,) -> bool; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UICalendarView.rs b/crates/icrate-generated/src/UIKit/generated/UICalendarView.rs new file mode 100644 index 000000000..8762904c0 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UICalendarView.rs @@ -0,0 +1,88 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UICalendarView; + + unsafe impl ClassType for UICalendarView { + type Super = UIView; + } +); + +extern_methods!( + unsafe impl UICalendarView { + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&UICalendarViewDelegate>,); + + #[method_id(@__retain_semantics Other selectionBehavior)] + pub unsafe fn selectionBehavior(&self, ) -> Option>; + + #[method(setSelectionBehavior:)] + pub unsafe fn setSelectionBehavior(&self, selectionBehavior: Option<&UICalendarSelection>,); + + #[method_id(@__retain_semantics Other locale)] + pub unsafe fn locale(&self, ) -> Id; + + #[method(setLocale:)] + pub unsafe fn setLocale(&self, locale: &NSLocale,); + + #[method_id(@__retain_semantics Other calendar)] + pub unsafe fn calendar(&self, ) -> Id; + + #[method(setCalendar:)] + pub unsafe fn setCalendar(&self, calendar: &NSCalendar,); + + #[method_id(@__retain_semantics Other timeZone)] + pub unsafe fn timeZone(&self, ) -> Option>; + + #[method(setTimeZone:)] + pub unsafe fn setTimeZone(&self, timeZone: Option<&NSTimeZone>,); + + #[method_id(@__retain_semantics Other fontDesign)] + pub unsafe fn fontDesign(&self, ) -> Id; + + #[method(setFontDesign:)] + pub unsafe fn setFontDesign(&self, fontDesign: &UIFontDescriptorSystemDesign,); + + #[method_id(@__retain_semantics Other availableDateRange)] + pub unsafe fn availableDateRange(&self, ) -> Id; + + #[method(setAvailableDateRange:)] + pub unsafe fn setAvailableDateRange(&self, availableDateRange: &NSDateInterval,); + + #[method_id(@__retain_semantics Other visibleDateComponents)] + pub unsafe fn visibleDateComponents(&self, ) -> Id; + + #[method(setVisibleDateComponents:)] + pub unsafe fn setVisibleDateComponents(&self, visibleDateComponents: &NSDateComponents,); + + #[method(setVisibleDateComponents:animated:)] + pub unsafe fn setVisibleDateComponents_animated(&self, dateComponents: &NSDateComponents,animated: bool,); + + #[method(wantsDateDecorations)] + pub unsafe fn wantsDateDecorations(&self, ) -> bool; + + #[method(setWantsDateDecorations:)] + pub unsafe fn setWantsDateDecorations(&self, wantsDateDecorations: bool,); + + #[method(reloadDecorationsForDateComponents:animated:)] + pub unsafe fn reloadDecorationsForDateComponents_animated(&self, dates: &NSArray,animated: bool,); + + } +); + +extern_protocol!( + pub struct UICalendarViewDelegate; + + unsafe impl UICalendarViewDelegate { + #[method_id(@__retain_semantics Other calendarView:decorationForDateComponents:)] + pub unsafe fn calendarView_decorationForDateComponents(&self, calendarView: &UICalendarView,dateComponents: &NSDateComponents,) -> Option>; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UICalendarViewDecoration.rs b/crates/icrate-generated/src/UIKit/generated/UICalendarViewDecoration.rs new file mode 100644 index 000000000..cb20c2d6b --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UICalendarViewDecoration.rs @@ -0,0 +1,48 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UICalendarViewDecorationSize { + UICalendarViewDecorationSizeSmall = 0, + UICalendarViewDecorationSizeMedium = 1, + UICalendarViewDecorationSizeLarge = 2, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UICalendarViewDecoration; + + unsafe impl ClassType for UICalendarViewDecoration { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UICalendarViewDecoration { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics Init initWithImage:color:size:)] + pub unsafe fn initWithImage_color_size(this: Option>, image: Option<&UIImage>,color: Option<&UIColor>,size: UICalendarViewDecorationSize,) -> Id; + + #[method_id(@__retain_semantics Init initWithCustomViewProvider:)] + pub unsafe fn initWithCustomViewProvider(this: Option>, customViewProvider: &Block<(), NonNull>,) -> Id; + + #[method_id(@__retain_semantics Other decorationWithColor:size:)] + pub unsafe fn decorationWithColor_size(color: Option<&UIColor>,size: UICalendarViewDecorationSize,) -> Id; + + #[method_id(@__retain_semantics Other decorationWithImage:)] + pub unsafe fn decorationWithImage(image: Option<&UIImage>,) -> Id; + + #[method_id(@__retain_semantics Other decorationWithImage:color:size:)] + pub unsafe fn decorationWithImage_color_size(image: Option<&UIImage>,color: Option<&UIColor>,size: UICalendarViewDecorationSize,) -> Id; + + #[method_id(@__retain_semantics Other decorationWithCustomViewProvider:)] + pub unsafe fn decorationWithCustomViewProvider(customViewProvider: &Block<(), NonNull>,) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UICellAccessory.rs b/crates/icrate-generated/src/UIKit/generated/UICellAccessory.rs new file mode 100644 index 000000000..c83a33dfc --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UICellAccessory.rs @@ -0,0 +1,372 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UICellAccessoryDisplayedState { + UICellAccessoryDisplayedAlways = 0, + UICellAccessoryDisplayedWhenEditing = 1, + UICellAccessoryDisplayedWhenNotEditing = 2, + } +); + +extern_static!(UICellAccessoryStandardDimension: CGFloat); + +extern_class!( + #[derive(Debug)] + pub struct UICellAccessory; + + unsafe impl ClassType for UICellAccessory { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UICellAccessory { + #[method(displayedState)] + pub unsafe fn displayedState(&self, ) -> UICellAccessoryDisplayedState; + + #[method(setDisplayedState:)] + pub unsafe fn setDisplayedState(&self, displayedState: UICellAccessoryDisplayedState,); + + #[method(isHidden)] + pub unsafe fn isHidden(&self, ) -> bool; + + #[method(setHidden:)] + pub unsafe fn setHidden(&self, hidden: bool,); + + #[method(reservedLayoutWidth)] + pub unsafe fn reservedLayoutWidth(&self, ) -> CGFloat; + + #[method(setReservedLayoutWidth:)] + pub unsafe fn setReservedLayoutWidth(&self, reservedLayoutWidth: CGFloat,); + + #[method_id(@__retain_semantics Other tintColor)] + pub unsafe fn tintColor(&self, ) -> Option>; + + #[method(setTintColor:)] + pub unsafe fn setTintColor(&self, tintColor: Option<&UIColor>,); + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UICellAccessoryDisclosureIndicator; + + unsafe impl ClassType for UICellAccessoryDisclosureIndicator { + type Super = UICellAccessory; + } +); + +extern_methods!( + unsafe impl UICellAccessoryDisclosureIndicator { + } +); + +extern_class!( + #[derive(Debug)] + pub struct UICellAccessoryDetail; + + unsafe impl ClassType for UICellAccessoryDetail { + type Super = UICellAccessory; + } +); + +extern_methods!( + unsafe impl UICellAccessoryDetail { + #[method(actionHandler)] + pub unsafe fn actionHandler(&self, ) -> *mut Block<(), ()>; + + #[method(setActionHandler:)] + pub unsafe fn setActionHandler(&self, actionHandler: Option<&Block<(), ()>>,); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UICellAccessoryCheckmark; + + unsafe impl ClassType for UICellAccessoryCheckmark { + type Super = UICellAccessory; + } +); + +extern_methods!( + unsafe impl UICellAccessoryCheckmark { + } +); + +extern_class!( + #[derive(Debug)] + pub struct UICellAccessoryDelete; + + unsafe impl ClassType for UICellAccessoryDelete { + type Super = UICellAccessory; + } +); + +extern_methods!( + unsafe impl UICellAccessoryDelete { + #[method_id(@__retain_semantics Other backgroundColor)] + pub unsafe fn backgroundColor(&self, ) -> Option>; + + #[method(setBackgroundColor:)] + pub unsafe fn setBackgroundColor(&self, backgroundColor: Option<&UIColor>,); + + #[method(actionHandler)] + pub unsafe fn actionHandler(&self, ) -> *mut Block<(), ()>; + + #[method(setActionHandler:)] + pub unsafe fn setActionHandler(&self, actionHandler: Option<&Block<(), ()>>,); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UICellAccessoryInsert; + + unsafe impl ClassType for UICellAccessoryInsert { + type Super = UICellAccessory; + } +); + +extern_methods!( + unsafe impl UICellAccessoryInsert { + #[method_id(@__retain_semantics Other backgroundColor)] + pub unsafe fn backgroundColor(&self, ) -> Option>; + + #[method(setBackgroundColor:)] + pub unsafe fn setBackgroundColor(&self, backgroundColor: Option<&UIColor>,); + + #[method(actionHandler)] + pub unsafe fn actionHandler(&self, ) -> *mut Block<(), ()>; + + #[method(setActionHandler:)] + pub unsafe fn setActionHandler(&self, actionHandler: Option<&Block<(), ()>>,); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UICellAccessoryReorder; + + unsafe impl ClassType for UICellAccessoryReorder { + type Super = UICellAccessory; + } +); + +extern_methods!( + unsafe impl UICellAccessoryReorder { + #[method(showsVerticalSeparator)] + pub unsafe fn showsVerticalSeparator(&self, ) -> bool; + + #[method(setShowsVerticalSeparator:)] + pub unsafe fn setShowsVerticalSeparator(&self, showsVerticalSeparator: bool,); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UICellAccessoryMultiselect; + + unsafe impl ClassType for UICellAccessoryMultiselect { + type Super = UICellAccessory; + } +); + +extern_methods!( + unsafe impl UICellAccessoryMultiselect { + #[method_id(@__retain_semantics Other backgroundColor)] + pub unsafe fn backgroundColor(&self, ) -> Option>; + + #[method(setBackgroundColor:)] + pub unsafe fn setBackgroundColor(&self, backgroundColor: Option<&UIColor>,); + + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UICellAccessoryOutlineDisclosureStyle { + UICellAccessoryOutlineDisclosureStyleAutomatic = 0, + UICellAccessoryOutlineDisclosureStyleHeader = 1, + UICellAccessoryOutlineDisclosureStyleCell = 2, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UICellAccessoryOutlineDisclosure; + + unsafe impl ClassType for UICellAccessoryOutlineDisclosure { + type Super = UICellAccessory; + } +); + +extern_methods!( + unsafe impl UICellAccessoryOutlineDisclosure { + #[method(style)] + pub unsafe fn style(&self, ) -> UICellAccessoryOutlineDisclosureStyle; + + #[method(setStyle:)] + pub unsafe fn setStyle(&self, style: UICellAccessoryOutlineDisclosureStyle,); + + #[method(actionHandler)] + pub unsafe fn actionHandler(&self, ) -> *mut Block<(), ()>; + + #[method(setActionHandler:)] + pub unsafe fn setActionHandler(&self, actionHandler: Option<&Block<(), ()>>,); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UICellAccessoryPopUpMenu; + + unsafe impl ClassType for UICellAccessoryPopUpMenu { + type Super = UICellAccessory; + } +); + +extern_methods!( + unsafe impl UICellAccessoryPopUpMenu { + #[method_id(@__retain_semantics Init initWithMenu:)] + pub unsafe fn initWithMenu(this: Option>, menu: &UIMenu,) -> Id; + + #[method_id(@__retain_semantics Other menu)] + pub unsafe fn menu(&self, ) -> Id; + + #[method(selectedElementDidChangeHandler)] + pub unsafe fn selectedElementDidChangeHandler(&self, ) -> *mut Block<(NonNull, ), ()>; + + #[method(setSelectedElementDidChangeHandler:)] + pub unsafe fn setSelectedElementDidChangeHandler(&self, selectedElementDidChangeHandler: Option<&Block<(NonNull, ), ()>>,); + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics New new)] + pub unsafe fn new() -> Id; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UICellAccessoryLabel; + + unsafe impl ClassType for UICellAccessoryLabel { + type Super = UICellAccessory; + } +); + +extern_methods!( + unsafe impl UICellAccessoryLabel { + #[method_id(@__retain_semantics Init initWithText:)] + pub unsafe fn initWithText(this: Option>, text: &NSString,) -> Id; + + #[method_id(@__retain_semantics Other text)] + pub unsafe fn text(&self, ) -> Id; + + #[method_id(@__retain_semantics Other font)] + pub unsafe fn font(&self, ) -> Id; + + #[method(setFont:)] + pub unsafe fn setFont(&self, font: &UIFont,); + + #[method(adjustsFontForContentSizeCategory)] + pub unsafe fn adjustsFontForContentSizeCategory(&self, ) -> bool; + + #[method(setAdjustsFontForContentSizeCategory:)] + pub unsafe fn setAdjustsFontForContentSizeCategory(&self, adjustsFontForContentSizeCategory: bool,); + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics New new)] + pub unsafe fn new() -> Id; + + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UICellAccessoryPlacement { + UICellAccessoryPlacementLeading = 0, + UICellAccessoryPlacementTrailing = 1, + } +); + +pub type UICellAccessoryPosition = *mut Block<(NonNull>, ), NSUInteger>; + +extern_fn!( + pub unsafe fn UICellAccessoryPositionBeforeAccessoryOfClass(accessoryClass: &Class,) -> UICellAccessoryPosition; +); + +extern_fn!( + pub unsafe fn UICellAccessoryPositionAfterAccessoryOfClass(accessoryClass: &Class,) -> UICellAccessoryPosition; +); + +extern_class!( + #[derive(Debug)] + pub struct UICellAccessoryCustomView; + + unsafe impl ClassType for UICellAccessoryCustomView { + type Super = UICellAccessory; + } +); + +extern_methods!( + unsafe impl UICellAccessoryCustomView { + #[method_id(@__retain_semantics Init initWithCustomView:placement:)] + pub unsafe fn initWithCustomView_placement(this: Option>, customView: &UIView,placement: UICellAccessoryPlacement,) -> Id; + + #[method_id(@__retain_semantics Other customView)] + pub unsafe fn customView(&self, ) -> Id; + + #[method(placement)] + pub unsafe fn placement(&self, ) -> UICellAccessoryPlacement; + + #[method(maintainsFixedSize)] + pub unsafe fn maintainsFixedSize(&self, ) -> bool; + + #[method(setMaintainsFixedSize:)] + pub unsafe fn setMaintainsFixedSize(&self, maintainsFixedSize: bool,); + + #[method(position)] + pub unsafe fn position(&self, ) -> UICellAccessoryPosition; + + #[method(setPosition:)] + pub unsafe fn setPosition(&self, position: UICellAccessoryPosition,); + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[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-generated/src/UIKit/generated/UICellConfigurationState.rs b/crates/icrate-generated/src/UIKit/generated/UICellConfigurationState.rs new file mode 100644 index 000000000..22edc9e9f --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UICellConfigurationState.rs @@ -0,0 +1,72 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UICellConfigurationDragState { + UICellConfigurationDragStateNone = 0, + UICellConfigurationDragStateLifting = 1, + UICellConfigurationDragStateDragging = 2, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UICellConfigurationDropState { + UICellConfigurationDropStateNone = 0, + UICellConfigurationDropStateNotTargeted = 1, + UICellConfigurationDropStateTargeted = 2, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UICellConfigurationState; + + unsafe impl ClassType for UICellConfigurationState { + type Super = UIViewConfigurationState; + } +); + +extern_methods!( + unsafe impl UICellConfigurationState { + #[method(isEditing)] + pub unsafe fn isEditing(&self, ) -> bool; + + #[method(setEditing:)] + pub unsafe fn setEditing(&self, editing: bool,); + + #[method(isExpanded)] + pub unsafe fn isExpanded(&self, ) -> bool; + + #[method(setExpanded:)] + pub unsafe fn setExpanded(&self, expanded: bool,); + + #[method(isSwiped)] + pub unsafe fn isSwiped(&self, ) -> bool; + + #[method(setSwiped:)] + pub unsafe fn setSwiped(&self, swiped: bool,); + + #[method(isReordering)] + pub unsafe fn isReordering(&self, ) -> bool; + + #[method(setReordering:)] + pub unsafe fn setReordering(&self, reordering: bool,); + + #[method(cellDragState)] + pub unsafe fn cellDragState(&self, ) -> UICellConfigurationDragState; + + #[method(setCellDragState:)] + pub unsafe fn setCellDragState(&self, cellDragState: UICellConfigurationDragState,); + + #[method(cellDropState)] + pub unsafe fn cellDropState(&self, ) -> UICellConfigurationDropState; + + #[method(setCellDropState:)] + pub unsafe fn setCellDropState(&self, cellDropState: UICellConfigurationDropState,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UICloudSharingController.rs b/crates/icrate-generated/src/UIKit/generated/UICloudSharingController.rs new file mode 100644 index 000000000..1911421f9 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UICloudSharingController.rs @@ -0,0 +1,88 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_options!( + #[underlying(NSUInteger)] + pub enum UICloudSharingPermissionOptions { + UICloudSharingPermissionStandard = 0, + UICloudSharingPermissionAllowPublic = 1<<0, + UICloudSharingPermissionAllowPrivate = 1<<1, + UICloudSharingPermissionAllowReadOnly = 1<<2, + UICloudSharingPermissionAllowReadWrite = 1<<3, + } +); + +extern_protocol!( + pub struct UICloudSharingControllerDelegate; + + unsafe impl UICloudSharingControllerDelegate { + #[method(cloudSharingController:failedToSaveShareWithError:)] + pub unsafe fn cloudSharingController_failedToSaveShareWithError(&self, csc: &UICloudSharingController,error: &NSError,); + + #[method_id(@__retain_semantics Other itemTitleForCloudSharingController:)] + pub unsafe fn itemTitleForCloudSharingController(&self, csc: &UICloudSharingController,) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other itemThumbnailDataForCloudSharingController:)] + pub unsafe fn itemThumbnailDataForCloudSharingController(&self, csc: &UICloudSharingController,) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other itemTypeForCloudSharingController:)] + pub unsafe fn itemTypeForCloudSharingController(&self, csc: &UICloudSharingController,) -> Option>; + + #[optional] + #[method(cloudSharingControllerDidSaveShare:)] + pub unsafe fn cloudSharingControllerDidSaveShare(&self, csc: &UICloudSharingController,); + + #[optional] + #[method(cloudSharingControllerDidStopSharing:)] + pub unsafe fn cloudSharingControllerDidStopSharing(&self, csc: &UICloudSharingController,); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UICloudSharingController; + + unsafe impl ClassType for UICloudSharingController { + type Super = UIViewController; + } +); + +extern_methods!( + unsafe impl UICloudSharingController { + #[method_id(@__retain_semantics Init initWithNibName:bundle:)] + pub unsafe fn initWithNibName_bundle(this: Option>, nibNameOrNil: Option<&NSString>,nibBundleOrNil: Option<&NSBundle>,) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method_id(@__retain_semantics Init initWithPreparationHandler:)] + pub unsafe fn initWithPreparationHandler(this: Option>, preparationHandler: &Block<(NonNull, NonNull>, ), ()>,) -> Id; + + #[method_id(@__retain_semantics Init initWithShare:container:)] + pub unsafe fn initWithShare_container(this: Option>, share: &CKShare,container: &CKContainer,) -> Id; + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&UICloudSharingControllerDelegate>,); + + #[method_id(@__retain_semantics Other share)] + pub unsafe fn share(&self, ) -> Option>; + + #[method(availablePermissions)] + pub unsafe fn availablePermissions(&self, ) -> UICloudSharingPermissionOptions; + + #[method(setAvailablePermissions:)] + pub unsafe fn setAvailablePermissions(&self, availablePermissions: UICloudSharingPermissionOptions,); + + #[method_id(@__retain_semantics Other activityItemSource)] + pub unsafe fn activityItemSource(&self, ) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UICollectionLayoutList.rs b/crates/icrate-generated/src/UIKit/generated/UICollectionLayoutList.rs new file mode 100644 index 000000000..0df2122eb --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UICollectionLayoutList.rs @@ -0,0 +1,134 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UICollectionLayoutListAppearance { + UICollectionLayoutListAppearancePlain = 0, + UICollectionLayoutListAppearanceGrouped = 1, + UICollectionLayoutListAppearanceInsetGrouped = 2, + UICollectionLayoutListAppearanceSidebar = 3, + UICollectionLayoutListAppearanceSidebarPlain = 4, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UICollectionLayoutListHeaderMode { + UICollectionLayoutListHeaderModeNone = 0, + UICollectionLayoutListHeaderModeSupplementary = 1, + UICollectionLayoutListHeaderModeFirstItemInSection = 2, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UICollectionLayoutListFooterMode { + UICollectionLayoutListFooterModeNone = 0, + UICollectionLayoutListFooterModeSupplementary = 1, + } +); + +pub type UICollectionLayoutListSwipeActionsConfigurationProvider = *mut Block<(NonNull, ), *mut UISwipeActionsConfiguration>; + +pub type UICollectionLayoutListItemSeparatorHandler = *mut Block<(NonNull, NonNull, ), NonNull>; + +extern_class!( + #[derive(Debug)] + pub struct UICollectionLayoutListConfiguration; + + unsafe impl ClassType for UICollectionLayoutListConfiguration { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UICollectionLayoutListConfiguration { + #[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 initWithAppearance:)] + pub unsafe fn initWithAppearance(this: Option>, appearance: UICollectionLayoutListAppearance,) -> Id; + + #[method(appearance)] + pub unsafe fn appearance(&self, ) -> UICollectionLayoutListAppearance; + + #[method(showsSeparators)] + pub unsafe fn showsSeparators(&self, ) -> bool; + + #[method(setShowsSeparators:)] + pub unsafe fn setShowsSeparators(&self, showsSeparators: bool,); + + #[method_id(@__retain_semantics Other separatorConfiguration)] + pub unsafe fn separatorConfiguration(&self, ) -> Id; + + #[method(setSeparatorConfiguration:)] + pub unsafe fn setSeparatorConfiguration(&self, separatorConfiguration: &UIListSeparatorConfiguration,); + + #[method(itemSeparatorHandler)] + pub unsafe fn itemSeparatorHandler(&self, ) -> UICollectionLayoutListItemSeparatorHandler; + + #[method(setItemSeparatorHandler:)] + pub unsafe fn setItemSeparatorHandler(&self, itemSeparatorHandler: UICollectionLayoutListItemSeparatorHandler,); + + #[method_id(@__retain_semantics Other backgroundColor)] + pub unsafe fn backgroundColor(&self, ) -> Option>; + + #[method(setBackgroundColor:)] + pub unsafe fn setBackgroundColor(&self, backgroundColor: Option<&UIColor>,); + + #[method(leadingSwipeActionsConfigurationProvider)] + pub unsafe fn leadingSwipeActionsConfigurationProvider(&self, ) -> UICollectionLayoutListSwipeActionsConfigurationProvider; + + #[method(setLeadingSwipeActionsConfigurationProvider:)] + pub unsafe fn setLeadingSwipeActionsConfigurationProvider(&self, leadingSwipeActionsConfigurationProvider: UICollectionLayoutListSwipeActionsConfigurationProvider,); + + #[method(trailingSwipeActionsConfigurationProvider)] + pub unsafe fn trailingSwipeActionsConfigurationProvider(&self, ) -> UICollectionLayoutListSwipeActionsConfigurationProvider; + + #[method(setTrailingSwipeActionsConfigurationProvider:)] + pub unsafe fn setTrailingSwipeActionsConfigurationProvider(&self, trailingSwipeActionsConfigurationProvider: UICollectionLayoutListSwipeActionsConfigurationProvider,); + + #[method(headerMode)] + pub unsafe fn headerMode(&self, ) -> UICollectionLayoutListHeaderMode; + + #[method(setHeaderMode:)] + pub unsafe fn setHeaderMode(&self, headerMode: UICollectionLayoutListHeaderMode,); + + #[method(footerMode)] + pub unsafe fn footerMode(&self, ) -> UICollectionLayoutListFooterMode; + + #[method(setFooterMode:)] + pub unsafe fn setFooterMode(&self, footerMode: UICollectionLayoutListFooterMode,); + + #[method(headerTopPadding)] + pub unsafe fn headerTopPadding(&self, ) -> CGFloat; + + #[method(setHeaderTopPadding:)] + pub unsafe fn setHeaderTopPadding(&self, headerTopPadding: CGFloat,); + + } +); + +extern_methods!( + /// UICollectionLayoutListSection + unsafe impl NSCollectionLayoutSection { + #[method_id(@__retain_semantics Other sectionWithListConfiguration:layoutEnvironment:)] + pub unsafe fn sectionWithListConfiguration_layoutEnvironment(configuration: &UICollectionLayoutListConfiguration,layoutEnvironment: &NSCollectionLayoutEnvironment,) -> Id; + + } +); + +extern_methods!( + /// UICollectionLayoutListSection + unsafe impl UICollectionViewCompositionalLayout { + #[method_id(@__retain_semantics Other layoutWithListConfiguration:)] + pub unsafe fn layoutWithListConfiguration(configuration: &UICollectionLayoutListConfiguration,) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UICollectionView.rs b/crates/icrate-generated/src/UIKit/generated/UICollectionView.rs new file mode 100644 index 000000000..bedaf6954 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UICollectionView.rs @@ -0,0 +1,777 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_options!( + #[underlying(NSUInteger)] + pub enum UICollectionViewScrollPosition { + UICollectionViewScrollPositionNone = 0, + UICollectionViewScrollPositionTop = 1<<0, + UICollectionViewScrollPositionCenteredVertically = 1<<1, + UICollectionViewScrollPositionBottom = 1<<2, + UICollectionViewScrollPositionLeft = 1<<3, + UICollectionViewScrollPositionCenteredHorizontally = 1<<4, + UICollectionViewScrollPositionRight = 1<<5, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UICollectionViewReorderingCadence { + UICollectionViewReorderingCadenceImmediate = 0, + UICollectionViewReorderingCadenceFast = 1, + UICollectionViewReorderingCadenceSlow = 2, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UICollectionViewSelfSizingInvalidation { + UICollectionViewSelfSizingInvalidationDisabled = 0, + UICollectionViewSelfSizingInvalidationEnabled = 1, + UICollectionViewSelfSizingInvalidationEnabledIncludingConstraints = 2, + } +); + +pub type UICollectionViewLayoutInteractiveTransitionCompletion = *mut Block<(Bool, Bool, ), ()>; + +extern_class!( + #[derive(Debug)] + pub struct UICollectionViewFocusUpdateContext; + + unsafe impl ClassType for UICollectionViewFocusUpdateContext { + type Super = UIFocusUpdateContext; + } +); + +extern_methods!( + unsafe impl UICollectionViewFocusUpdateContext { + #[method_id(@__retain_semantics Other previouslyFocusedIndexPath)] + pub unsafe fn previouslyFocusedIndexPath(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other nextFocusedIndexPath)] + pub unsafe fn nextFocusedIndexPath(&self, ) -> Option>; + + } +); + +extern_protocol!( + pub struct UICollectionViewDataSource; + + unsafe impl UICollectionViewDataSource { + #[method(collectionView:numberOfItemsInSection:)] + pub unsafe fn collectionView_numberOfItemsInSection(&self, collectionView: &UICollectionView,section: NSInteger,) -> NSInteger; + + #[method_id(@__retain_semantics Other collectionView:cellForItemAtIndexPath:)] + pub unsafe fn collectionView_cellForItemAtIndexPath(&self, collectionView: &UICollectionView,indexPath: &NSIndexPath,) -> Id; + + #[optional] + #[method(numberOfSectionsInCollectionView:)] + pub unsafe fn numberOfSectionsInCollectionView(&self, collectionView: &UICollectionView,) -> NSInteger; + + #[optional] + #[method_id(@__retain_semantics Other collectionView:viewForSupplementaryElementOfKind:atIndexPath:)] + pub unsafe fn collectionView_viewForSupplementaryElementOfKind_atIndexPath(&self, collectionView: &UICollectionView,kind: &NSString,indexPath: &NSIndexPath,) -> Id; + + #[optional] + #[method(collectionView:canMoveItemAtIndexPath:)] + pub unsafe fn collectionView_canMoveItemAtIndexPath(&self, collectionView: &UICollectionView,indexPath: &NSIndexPath,) -> bool; + + #[optional] + #[method(collectionView:moveItemAtIndexPath:toIndexPath:)] + pub unsafe fn collectionView_moveItemAtIndexPath_toIndexPath(&self, collectionView: &UICollectionView,sourceIndexPath: &NSIndexPath,destinationIndexPath: &NSIndexPath,); + + #[optional] + #[method_id(@__retain_semantics Other indexTitlesForCollectionView:)] + pub unsafe fn indexTitlesForCollectionView(&self, collectionView: &UICollectionView,) -> Option, Shared>>; + + #[optional] + #[method_id(@__retain_semantics Other collectionView:indexPathForIndexTitle:atIndex:)] + pub unsafe fn collectionView_indexPathForIndexTitle_atIndex(&self, collectionView: &UICollectionView,title: &NSString,index: NSInteger,) -> Id; + + } +); + +extern_protocol!( + pub struct UICollectionViewDataSourcePrefetching; + + unsafe impl UICollectionViewDataSourcePrefetching { + #[method(collectionView:prefetchItemsAtIndexPaths:)] + pub unsafe fn collectionView_prefetchItemsAtIndexPaths(&self, collectionView: &UICollectionView,indexPaths: &NSArray,); + + #[optional] + #[method(collectionView:cancelPrefetchingForItemsAtIndexPaths:)] + pub unsafe fn collectionView_cancelPrefetchingForItemsAtIndexPaths(&self, collectionView: &UICollectionView,indexPaths: &NSArray,); + + } +); + +extern_protocol!( + pub struct UICollectionViewDelegate; + + unsafe impl UICollectionViewDelegate { + #[optional] + #[method(collectionView:shouldHighlightItemAtIndexPath:)] + pub unsafe fn collectionView_shouldHighlightItemAtIndexPath(&self, collectionView: &UICollectionView,indexPath: &NSIndexPath,) -> bool; + + #[optional] + #[method(collectionView:didHighlightItemAtIndexPath:)] + pub unsafe fn collectionView_didHighlightItemAtIndexPath(&self, collectionView: &UICollectionView,indexPath: &NSIndexPath,); + + #[optional] + #[method(collectionView:didUnhighlightItemAtIndexPath:)] + pub unsafe fn collectionView_didUnhighlightItemAtIndexPath(&self, collectionView: &UICollectionView,indexPath: &NSIndexPath,); + + #[optional] + #[method(collectionView:shouldSelectItemAtIndexPath:)] + pub unsafe fn collectionView_shouldSelectItemAtIndexPath(&self, collectionView: &UICollectionView,indexPath: &NSIndexPath,) -> bool; + + #[optional] + #[method(collectionView:shouldDeselectItemAtIndexPath:)] + pub unsafe fn collectionView_shouldDeselectItemAtIndexPath(&self, collectionView: &UICollectionView,indexPath: &NSIndexPath,) -> bool; + + #[optional] + #[method(collectionView:didSelectItemAtIndexPath:)] + pub unsafe fn collectionView_didSelectItemAtIndexPath(&self, collectionView: &UICollectionView,indexPath: &NSIndexPath,); + + #[optional] + #[method(collectionView:didDeselectItemAtIndexPath:)] + pub unsafe fn collectionView_didDeselectItemAtIndexPath(&self, collectionView: &UICollectionView,indexPath: &NSIndexPath,); + + #[optional] + #[method(collectionView:canPerformPrimaryActionForItemAtIndexPath:)] + pub unsafe fn collectionView_canPerformPrimaryActionForItemAtIndexPath(&self, collectionView: &UICollectionView,indexPath: &NSIndexPath,) -> bool; + + #[optional] + #[method(collectionView:performPrimaryActionForItemAtIndexPath:)] + pub unsafe fn collectionView_performPrimaryActionForItemAtIndexPath(&self, collectionView: &UICollectionView,indexPath: &NSIndexPath,); + + #[optional] + #[method(collectionView:willDisplayCell:forItemAtIndexPath:)] + pub unsafe fn collectionView_willDisplayCell_forItemAtIndexPath(&self, collectionView: &UICollectionView,cell: &UICollectionViewCell,indexPath: &NSIndexPath,); + + #[optional] + #[method(collectionView:willDisplaySupplementaryView:forElementKind:atIndexPath:)] + pub unsafe fn collectionView_willDisplaySupplementaryView_forElementKind_atIndexPath(&self, collectionView: &UICollectionView,view: &UICollectionReusableView,elementKind: &NSString,indexPath: &NSIndexPath,); + + #[optional] + #[method(collectionView:didEndDisplayingCell:forItemAtIndexPath:)] + pub unsafe fn collectionView_didEndDisplayingCell_forItemAtIndexPath(&self, collectionView: &UICollectionView,cell: &UICollectionViewCell,indexPath: &NSIndexPath,); + + #[optional] + #[method(collectionView:didEndDisplayingSupplementaryView:forElementOfKind:atIndexPath:)] + pub unsafe fn collectionView_didEndDisplayingSupplementaryView_forElementOfKind_atIndexPath(&self, collectionView: &UICollectionView,view: &UICollectionReusableView,elementKind: &NSString,indexPath: &NSIndexPath,); + + #[optional] + #[method(collectionView:shouldShowMenuForItemAtIndexPath:)] + pub unsafe fn collectionView_shouldShowMenuForItemAtIndexPath(&self, collectionView: &UICollectionView,indexPath: &NSIndexPath,) -> bool; + + #[optional] + #[method(collectionView:canPerformAction:forItemAtIndexPath:withSender:)] + pub unsafe fn collectionView_canPerformAction_forItemAtIndexPath_withSender(&self, collectionView: &UICollectionView,action: Sel,indexPath: &NSIndexPath,sender: Option<&Object>,) -> bool; + + #[optional] + #[method(collectionView:performAction:forItemAtIndexPath:withSender:)] + pub unsafe fn collectionView_performAction_forItemAtIndexPath_withSender(&self, collectionView: &UICollectionView,action: Sel,indexPath: &NSIndexPath,sender: Option<&Object>,); + + #[optional] + #[method_id(@__retain_semantics Other collectionView:transitionLayoutForOldLayout:newLayout:)] + pub unsafe fn collectionView_transitionLayoutForOldLayout_newLayout(&self, collectionView: &UICollectionView,fromLayout: &UICollectionViewLayout,toLayout: &UICollectionViewLayout,) -> Id; + + #[optional] + #[method(collectionView:canFocusItemAtIndexPath:)] + pub unsafe fn collectionView_canFocusItemAtIndexPath(&self, collectionView: &UICollectionView,indexPath: &NSIndexPath,) -> bool; + + #[optional] + #[method(collectionView:shouldUpdateFocusInContext:)] + pub unsafe fn collectionView_shouldUpdateFocusInContext(&self, collectionView: &UICollectionView,context: &UICollectionViewFocusUpdateContext,) -> bool; + + #[optional] + #[method(collectionView:didUpdateFocusInContext:withAnimationCoordinator:)] + pub unsafe fn collectionView_didUpdateFocusInContext_withAnimationCoordinator(&self, collectionView: &UICollectionView,context: &UICollectionViewFocusUpdateContext,coordinator: &UIFocusAnimationCoordinator,); + + #[optional] + #[method_id(@__retain_semantics Other indexPathForPreferredFocusedViewInCollectionView:)] + pub unsafe fn indexPathForPreferredFocusedViewInCollectionView(&self, collectionView: &UICollectionView,) -> Option>; + + #[optional] + #[method(collectionView:selectionFollowsFocusForItemAtIndexPath:)] + pub unsafe fn collectionView_selectionFollowsFocusForItemAtIndexPath(&self, collectionView: &UICollectionView,indexPath: &NSIndexPath,) -> bool; + + #[optional] + #[method_id(@__retain_semantics Other collectionView:targetIndexPathForMoveOfItemFromOriginalIndexPath:atCurrentIndexPath:toProposedIndexPath:)] + pub unsafe fn collectionView_targetIndexPathForMoveOfItemFromOriginalIndexPath_atCurrentIndexPath_toProposedIndexPath(&self, collectionView: &UICollectionView,originalIndexPath: &NSIndexPath,currentIndexPath: &NSIndexPath,proposedIndexPath: &NSIndexPath,) -> Id; + + #[optional] + #[method_id(@__retain_semantics Other collectionView:targetIndexPathForMoveFromItemAtIndexPath:toProposedIndexPath:)] + pub unsafe fn collectionView_targetIndexPathForMoveFromItemAtIndexPath_toProposedIndexPath(&self, collectionView: &UICollectionView,currentIndexPath: &NSIndexPath,proposedIndexPath: &NSIndexPath,) -> Id; + + #[optional] + #[method(collectionView:targetContentOffsetForProposedContentOffset:)] + pub unsafe fn collectionView_targetContentOffsetForProposedContentOffset(&self, collectionView: &UICollectionView,proposedContentOffset: CGPoint,) -> CGPoint; + + #[optional] + #[method(collectionView:canEditItemAtIndexPath:)] + pub unsafe fn collectionView_canEditItemAtIndexPath(&self, collectionView: &UICollectionView,indexPath: &NSIndexPath,) -> bool; + + #[optional] + #[method(collectionView:shouldSpringLoadItemAtIndexPath:withContext:)] + pub unsafe fn collectionView_shouldSpringLoadItemAtIndexPath_withContext(&self, collectionView: &UICollectionView,indexPath: &NSIndexPath,context: &UISpringLoadedInteractionContext,) -> bool; + + #[optional] + #[method(collectionView:shouldBeginMultipleSelectionInteractionAtIndexPath:)] + pub unsafe fn collectionView_shouldBeginMultipleSelectionInteractionAtIndexPath(&self, collectionView: &UICollectionView,indexPath: &NSIndexPath,) -> bool; + + #[optional] + #[method(collectionView:didBeginMultipleSelectionInteractionAtIndexPath:)] + pub unsafe fn collectionView_didBeginMultipleSelectionInteractionAtIndexPath(&self, collectionView: &UICollectionView,indexPath: &NSIndexPath,); + + #[optional] + #[method(collectionViewDidEndMultipleSelectionInteraction:)] + pub unsafe fn collectionViewDidEndMultipleSelectionInteraction(&self, collectionView: &UICollectionView,); + + #[optional] + #[method_id(@__retain_semantics Other collectionView:contextMenuConfigurationForItemsAtIndexPaths:point:)] + pub unsafe fn collectionView_contextMenuConfigurationForItemsAtIndexPaths_point(&self, collectionView: &UICollectionView,indexPaths: &NSArray,point: CGPoint,) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other collectionView:contextMenuConfiguration:highlightPreviewForItemAtIndexPath:)] + pub unsafe fn collectionView_contextMenuConfiguration_highlightPreviewForItemAtIndexPath(&self, collectionView: &UICollectionView,configuration: &UIContextMenuConfiguration,indexPath: &NSIndexPath,) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other collectionView:contextMenuConfiguration:dismissalPreviewForItemAtIndexPath:)] + pub unsafe fn collectionView_contextMenuConfiguration_dismissalPreviewForItemAtIndexPath(&self, collectionView: &UICollectionView,configuration: &UIContextMenuConfiguration,indexPath: &NSIndexPath,) -> Option>; + + #[optional] + #[method(collectionView:willPerformPreviewActionForMenuWithConfiguration:animator:)] + pub unsafe fn collectionView_willPerformPreviewActionForMenuWithConfiguration_animator(&self, collectionView: &UICollectionView,configuration: &UIContextMenuConfiguration,animator: &UIContextMenuInteractionCommitAnimating,); + + #[optional] + #[method(collectionView:willDisplayContextMenuWithConfiguration:animator:)] + pub unsafe fn collectionView_willDisplayContextMenuWithConfiguration_animator(&self, collectionView: &UICollectionView,configuration: &UIContextMenuConfiguration,animator: Option<&UIContextMenuInteractionAnimating>,); + + #[optional] + #[method(collectionView:willEndContextMenuInteractionWithConfiguration:animator:)] + pub unsafe fn collectionView_willEndContextMenuInteractionWithConfiguration_animator(&self, collectionView: &UICollectionView,configuration: &UIContextMenuConfiguration,animator: Option<&UIContextMenuInteractionAnimating>,); + + #[optional] + #[method_id(@__retain_semantics Other collectionView:sceneActivationConfigurationForItemAtIndexPath:point:)] + pub unsafe fn collectionView_sceneActivationConfigurationForItemAtIndexPath_point(&self, collectionView: &UICollectionView,indexPath: &NSIndexPath,point: CGPoint,) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other collectionView:contextMenuConfigurationForItemAtIndexPath:point:)] + pub unsafe fn collectionView_contextMenuConfigurationForItemAtIndexPath_point(&self, collectionView: &UICollectionView,indexPath: &NSIndexPath,point: CGPoint,) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other collectionView:previewForHighlightingContextMenuWithConfiguration:)] + pub unsafe fn collectionView_previewForHighlightingContextMenuWithConfiguration(&self, collectionView: &UICollectionView,configuration: &UIContextMenuConfiguration,) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other collectionView:previewForDismissingContextMenuWithConfiguration:)] + pub unsafe fn collectionView_previewForDismissingContextMenuWithConfiguration(&self, collectionView: &UICollectionView,configuration: &UIContextMenuConfiguration,) -> Option>; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UICollectionView; + + unsafe impl ClassType for UICollectionView { + type Super = UIScrollView; + } +); + +extern_methods!( + unsafe impl UICollectionView { + #[method_id(@__retain_semantics Init initWithFrame:collectionViewLayout:)] + pub unsafe fn initWithFrame_collectionViewLayout(this: Option>, frame: CGRect,layout: &UICollectionViewLayout,) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method_id(@__retain_semantics Other collectionViewLayout)] + pub unsafe fn collectionViewLayout(&self, ) -> Id; + + #[method(setCollectionViewLayout:)] + pub unsafe fn setCollectionViewLayout(&self, collectionViewLayout: &UICollectionViewLayout,); + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&UICollectionViewDelegate>,); + + #[method_id(@__retain_semantics Other dataSource)] + pub unsafe fn dataSource(&self, ) -> Option>; + + #[method(setDataSource:)] + pub unsafe fn setDataSource(&self, dataSource: Option<&UICollectionViewDataSource>,); + + #[method_id(@__retain_semantics Other prefetchDataSource)] + pub unsafe fn prefetchDataSource(&self, ) -> Option>; + + #[method(setPrefetchDataSource:)] + pub unsafe fn setPrefetchDataSource(&self, prefetchDataSource: Option<&UICollectionViewDataSourcePrefetching>,); + + #[method(isPrefetchingEnabled)] + pub unsafe fn isPrefetchingEnabled(&self, ) -> bool; + + #[method(setPrefetchingEnabled:)] + pub unsafe fn setPrefetchingEnabled(&self, prefetchingEnabled: bool,); + + #[method_id(@__retain_semantics Other dragDelegate)] + pub unsafe fn dragDelegate(&self, ) -> Option>; + + #[method(setDragDelegate:)] + pub unsafe fn setDragDelegate(&self, dragDelegate: Option<&UICollectionViewDragDelegate>,); + + #[method_id(@__retain_semantics Other dropDelegate)] + pub unsafe fn dropDelegate(&self, ) -> Option>; + + #[method(setDropDelegate:)] + pub unsafe fn setDropDelegate(&self, dropDelegate: Option<&UICollectionViewDropDelegate>,); + + #[method(dragInteractionEnabled)] + pub unsafe fn dragInteractionEnabled(&self, ) -> bool; + + #[method(setDragInteractionEnabled:)] + pub unsafe fn setDragInteractionEnabled(&self, dragInteractionEnabled: bool,); + + #[method_id(@__retain_semantics Other contextMenuInteraction)] + pub unsafe fn contextMenuInteraction(&self, ) -> Option>; + + #[method(reorderingCadence)] + pub unsafe fn reorderingCadence(&self, ) -> UICollectionViewReorderingCadence; + + #[method(setReorderingCadence:)] + pub unsafe fn setReorderingCadence(&self, reorderingCadence: UICollectionViewReorderingCadence,); + + #[method(selfSizingInvalidation)] + pub unsafe fn selfSizingInvalidation(&self, ) -> UICollectionViewSelfSizingInvalidation; + + #[method(setSelfSizingInvalidation:)] + pub unsafe fn setSelfSizingInvalidation(&self, selfSizingInvalidation: UICollectionViewSelfSizingInvalidation,); + + #[method_id(@__retain_semantics Other backgroundView)] + pub unsafe fn backgroundView(&self, ) -> Option>; + + #[method(setBackgroundView:)] + pub unsafe fn setBackgroundView(&self, backgroundView: Option<&UIView>,); + + #[method(registerClass:forCellWithReuseIdentifier:)] + pub unsafe fn registerClass_forCellWithReuseIdentifier(&self, cellClass: Option<&Class>,identifier: &NSString,); + + #[method(registerNib:forCellWithReuseIdentifier:)] + pub unsafe fn registerNib_forCellWithReuseIdentifier(&self, nib: Option<&UINib>,identifier: &NSString,); + + #[method(registerClass:forSupplementaryViewOfKind:withReuseIdentifier:)] + pub unsafe fn registerClass_forSupplementaryViewOfKind_withReuseIdentifier(&self, viewClass: Option<&Class>,elementKind: &NSString,identifier: &NSString,); + + #[method(registerNib:forSupplementaryViewOfKind:withReuseIdentifier:)] + pub unsafe fn registerNib_forSupplementaryViewOfKind_withReuseIdentifier(&self, nib: Option<&UINib>,kind: &NSString,identifier: &NSString,); + + #[method_id(@__retain_semantics Other dequeueReusableCellWithReuseIdentifier:forIndexPath:)] + pub unsafe fn dequeueReusableCellWithReuseIdentifier_forIndexPath(&self, identifier: &NSString,indexPath: &NSIndexPath,) -> Id; + + #[method_id(@__retain_semantics Other dequeueReusableSupplementaryViewOfKind:withReuseIdentifier:forIndexPath:)] + pub unsafe fn dequeueReusableSupplementaryViewOfKind_withReuseIdentifier_forIndexPath(&self, elementKind: &NSString,identifier: &NSString,indexPath: &NSIndexPath,) -> Id; + + #[method_id(@__retain_semantics Other dequeueConfiguredReusableCellWithRegistration:forIndexPath:item:)] + pub unsafe fn dequeueConfiguredReusableCellWithRegistration_forIndexPath_item(&self, registration: &UICollectionViewCellRegistration,indexPath: &NSIndexPath,item: &Object,) -> Id; + + #[method_id(@__retain_semantics Other dequeueConfiguredReusableSupplementaryViewWithRegistration:forIndexPath:)] + pub unsafe fn dequeueConfiguredReusableSupplementaryViewWithRegistration_forIndexPath(&self, registration: &UICollectionViewSupplementaryRegistration,indexPath: &NSIndexPath,) -> Id; + + #[method(allowsSelection)] + pub unsafe fn allowsSelection(&self, ) -> bool; + + #[method(setAllowsSelection:)] + pub unsafe fn setAllowsSelection(&self, allowsSelection: bool,); + + #[method(allowsMultipleSelection)] + pub unsafe fn allowsMultipleSelection(&self, ) -> bool; + + #[method(setAllowsMultipleSelection:)] + pub unsafe fn setAllowsMultipleSelection(&self, allowsMultipleSelection: bool,); + + #[method_id(@__retain_semantics Other indexPathsForSelectedItems)] + pub unsafe fn indexPathsForSelectedItems(&self, ) -> Option, Shared>>; + + #[method(selectItemAtIndexPath:animated:scrollPosition:)] + pub unsafe fn selectItemAtIndexPath_animated_scrollPosition(&self, indexPath: Option<&NSIndexPath>,animated: bool,scrollPosition: UICollectionViewScrollPosition,); + + #[method(deselectItemAtIndexPath:animated:)] + pub unsafe fn deselectItemAtIndexPath_animated(&self, indexPath: &NSIndexPath,animated: bool,); + + #[method(hasUncommittedUpdates)] + pub unsafe fn hasUncommittedUpdates(&self, ) -> bool; + + #[method(reloadData)] + pub unsafe fn reloadData(&self, ); + + #[method(setCollectionViewLayout:animated:)] + pub unsafe fn setCollectionViewLayout_animated(&self, layout: &UICollectionViewLayout,animated: bool,); + + #[method(setCollectionViewLayout:animated:completion:)] + pub unsafe fn setCollectionViewLayout_animated_completion(&self, layout: &UICollectionViewLayout,animated: bool,completion: Option<&Block<(Bool, ), ()>>,); + + #[method_id(@__retain_semantics Other startInteractiveTransitionToCollectionViewLayout:completion:)] + pub unsafe fn startInteractiveTransitionToCollectionViewLayout_completion(&self, layout: &UICollectionViewLayout,completion: UICollectionViewLayoutInteractiveTransitionCompletion,) -> Id; + + #[method(finishInteractiveTransition)] + pub unsafe fn finishInteractiveTransition(&self, ); + + #[method(cancelInteractiveTransition)] + pub unsafe fn cancelInteractiveTransition(&self, ); + + #[method(numberOfSections)] + pub unsafe fn numberOfSections(&self, ) -> NSInteger; + + #[method(numberOfItemsInSection:)] + pub unsafe fn numberOfItemsInSection(&self, section: NSInteger,) -> NSInteger; + + #[method_id(@__retain_semantics Other layoutAttributesForItemAtIndexPath:)] + pub unsafe fn layoutAttributesForItemAtIndexPath(&self, indexPath: &NSIndexPath,) -> Option>; + + #[method_id(@__retain_semantics Other layoutAttributesForSupplementaryElementOfKind:atIndexPath:)] + pub unsafe fn layoutAttributesForSupplementaryElementOfKind_atIndexPath(&self, kind: &NSString,indexPath: &NSIndexPath,) -> Option>; + + #[method_id(@__retain_semantics Other indexPathForItemAtPoint:)] + pub unsafe fn indexPathForItemAtPoint(&self, point: CGPoint,) -> Option>; + + #[method_id(@__retain_semantics Other indexPathForCell:)] + pub unsafe fn indexPathForCell(&self, cell: &UICollectionViewCell,) -> Option>; + + #[method_id(@__retain_semantics Other cellForItemAtIndexPath:)] + pub unsafe fn cellForItemAtIndexPath(&self, indexPath: &NSIndexPath,) -> Option>; + + #[method_id(@__retain_semantics Other visibleCells)] + pub unsafe fn visibleCells(&self, ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other indexPathsForVisibleItems)] + pub unsafe fn indexPathsForVisibleItems(&self, ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other supplementaryViewForElementKind:atIndexPath:)] + pub unsafe fn supplementaryViewForElementKind_atIndexPath(&self, elementKind: &NSString,indexPath: &NSIndexPath,) -> Option>; + + #[method_id(@__retain_semantics Other visibleSupplementaryViewsOfKind:)] + pub unsafe fn visibleSupplementaryViewsOfKind(&self, elementKind: &NSString,) -> Id, Shared>; + + #[method_id(@__retain_semantics Other indexPathsForVisibleSupplementaryElementsOfKind:)] + pub unsafe fn indexPathsForVisibleSupplementaryElementsOfKind(&self, elementKind: &NSString,) -> Id, Shared>; + + #[method(scrollToItemAtIndexPath:atScrollPosition:animated:)] + pub unsafe fn scrollToItemAtIndexPath_atScrollPosition_animated(&self, indexPath: &NSIndexPath,scrollPosition: UICollectionViewScrollPosition,animated: bool,); + + #[method(insertSections:)] + pub unsafe fn insertSections(&self, sections: &NSIndexSet,); + + #[method(deleteSections:)] + pub unsafe fn deleteSections(&self, sections: &NSIndexSet,); + + #[method(moveSection:toSection:)] + pub unsafe fn moveSection_toSection(&self, section: NSInteger,newSection: NSInteger,); + + #[method(reloadSections:)] + pub unsafe fn reloadSections(&self, sections: &NSIndexSet,); + + #[method(insertItemsAtIndexPaths:)] + pub unsafe fn insertItemsAtIndexPaths(&self, indexPaths: &NSArray,); + + #[method(deleteItemsAtIndexPaths:)] + pub unsafe fn deleteItemsAtIndexPaths(&self, indexPaths: &NSArray,); + + #[method(moveItemAtIndexPath:toIndexPath:)] + pub unsafe fn moveItemAtIndexPath_toIndexPath(&self, indexPath: &NSIndexPath,newIndexPath: &NSIndexPath,); + + #[method(reloadItemsAtIndexPaths:)] + pub unsafe fn reloadItemsAtIndexPaths(&self, indexPaths: &NSArray,); + + #[method(reconfigureItemsAtIndexPaths:)] + pub unsafe fn reconfigureItemsAtIndexPaths(&self, indexPaths: &NSArray,); + + #[method(performBatchUpdates:completion:)] + pub unsafe fn performBatchUpdates_completion(&self, updates: Option<&Block<(), ()>>,completion: Option<&Block<(Bool, ), ()>>,); + + #[method(beginInteractiveMovementForItemAtIndexPath:)] + pub unsafe fn beginInteractiveMovementForItemAtIndexPath(&self, indexPath: &NSIndexPath,) -> bool; + + #[method(updateInteractiveMovementTargetPosition:)] + pub unsafe fn updateInteractiveMovementTargetPosition(&self, targetPosition: CGPoint,); + + #[method(endInteractiveMovement)] + pub unsafe fn endInteractiveMovement(&self, ); + + #[method(cancelInteractiveMovement)] + pub unsafe fn cancelInteractiveMovement(&self, ); + + #[method(remembersLastFocusedIndexPath)] + pub unsafe fn remembersLastFocusedIndexPath(&self, ) -> bool; + + #[method(setRemembersLastFocusedIndexPath:)] + pub unsafe fn setRemembersLastFocusedIndexPath(&self, remembersLastFocusedIndexPath: bool,); + + #[method(selectionFollowsFocus)] + pub unsafe fn selectionFollowsFocus(&self, ) -> bool; + + #[method(setSelectionFollowsFocus:)] + pub unsafe fn setSelectionFollowsFocus(&self, selectionFollowsFocus: bool,); + + #[method(allowsFocus)] + pub unsafe fn allowsFocus(&self, ) -> bool; + + #[method(setAllowsFocus:)] + pub unsafe fn setAllowsFocus(&self, allowsFocus: bool,); + + #[method(allowsFocusDuringEditing)] + pub unsafe fn allowsFocusDuringEditing(&self, ) -> bool; + + #[method(setAllowsFocusDuringEditing:)] + pub unsafe fn setAllowsFocusDuringEditing(&self, allowsFocusDuringEditing: bool,); + + #[method(hasActiveDrag)] + pub unsafe fn hasActiveDrag(&self, ) -> bool; + + #[method(hasActiveDrop)] + pub unsafe fn hasActiveDrop(&self, ) -> bool; + + #[method(isEditing)] + pub unsafe fn isEditing(&self, ) -> bool; + + #[method(setEditing:)] + pub unsafe fn setEditing(&self, editing: bool,); + + #[method(allowsSelectionDuringEditing)] + pub unsafe fn allowsSelectionDuringEditing(&self, ) -> bool; + + #[method(setAllowsSelectionDuringEditing:)] + pub unsafe fn setAllowsSelectionDuringEditing(&self, allowsSelectionDuringEditing: bool,); + + #[method(allowsMultipleSelectionDuringEditing)] + pub unsafe fn allowsMultipleSelectionDuringEditing(&self, ) -> bool; + + #[method(setAllowsMultipleSelectionDuringEditing:)] + pub unsafe fn setAllowsMultipleSelectionDuringEditing(&self, allowsMultipleSelectionDuringEditing: bool,); + + } +); + +extern_methods!( + /// UIDragAndDrop + unsafe impl UICollectionView { + } +); + +extern_protocol!( + pub struct UICollectionViewDragDelegate; + + unsafe impl UICollectionViewDragDelegate { + #[method_id(@__retain_semantics Other collectionView:itemsForBeginningDragSession:atIndexPath:)] + pub unsafe fn collectionView_itemsForBeginningDragSession_atIndexPath(&self, collectionView: &UICollectionView,session: &UIDragSession,indexPath: &NSIndexPath,) -> Id, Shared>; + + #[optional] + #[method_id(@__retain_semantics Other collectionView:itemsForAddingToDragSession:atIndexPath:point:)] + pub unsafe fn collectionView_itemsForAddingToDragSession_atIndexPath_point(&self, collectionView: &UICollectionView,session: &UIDragSession,indexPath: &NSIndexPath,point: CGPoint,) -> Id, Shared>; + + #[optional] + #[method_id(@__retain_semantics Other collectionView:dragPreviewParametersForItemAtIndexPath:)] + pub unsafe fn collectionView_dragPreviewParametersForItemAtIndexPath(&self, collectionView: &UICollectionView,indexPath: &NSIndexPath,) -> Option>; + + #[optional] + #[method(collectionView:dragSessionWillBegin:)] + pub unsafe fn collectionView_dragSessionWillBegin(&self, collectionView: &UICollectionView,session: &UIDragSession,); + + #[optional] + #[method(collectionView:dragSessionDidEnd:)] + pub unsafe fn collectionView_dragSessionDidEnd(&self, collectionView: &UICollectionView,session: &UIDragSession,); + + #[optional] + #[method(collectionView:dragSessionAllowsMoveOperation:)] + pub unsafe fn collectionView_dragSessionAllowsMoveOperation(&self, collectionView: &UICollectionView,session: &UIDragSession,) -> bool; + + #[optional] + #[method(collectionView:dragSessionIsRestrictedToDraggingApplication:)] + pub unsafe fn collectionView_dragSessionIsRestrictedToDraggingApplication(&self, collectionView: &UICollectionView,session: &UIDragSession,) -> bool; + + } +); + +extern_protocol!( + pub struct UICollectionViewDropDelegate; + + unsafe impl UICollectionViewDropDelegate { + #[method(collectionView:performDropWithCoordinator:)] + pub unsafe fn collectionView_performDropWithCoordinator(&self, collectionView: &UICollectionView,coordinator: &UICollectionViewDropCoordinator,); + + #[optional] + #[method(collectionView:canHandleDropSession:)] + pub unsafe fn collectionView_canHandleDropSession(&self, collectionView: &UICollectionView,session: &UIDropSession,) -> bool; + + #[optional] + #[method(collectionView:dropSessionDidEnter:)] + pub unsafe fn collectionView_dropSessionDidEnter(&self, collectionView: &UICollectionView,session: &UIDropSession,); + + #[optional] + #[method_id(@__retain_semantics Other collectionView:dropSessionDidUpdate:withDestinationIndexPath:)] + pub unsafe fn collectionView_dropSessionDidUpdate_withDestinationIndexPath(&self, collectionView: &UICollectionView,session: &UIDropSession,destinationIndexPath: Option<&NSIndexPath>,) -> Id; + + #[optional] + #[method(collectionView:dropSessionDidExit:)] + pub unsafe fn collectionView_dropSessionDidExit(&self, collectionView: &UICollectionView,session: &UIDropSession,); + + #[optional] + #[method(collectionView:dropSessionDidEnd:)] + pub unsafe fn collectionView_dropSessionDidEnd(&self, collectionView: &UICollectionView,session: &UIDropSession,); + + #[optional] + #[method_id(@__retain_semantics Other collectionView:dropPreviewParametersForItemAtIndexPath:)] + pub unsafe fn collectionView_dropPreviewParametersForItemAtIndexPath(&self, collectionView: &UICollectionView,indexPath: &NSIndexPath,) -> Option>; + + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UICollectionViewDropIntent { + UICollectionViewDropIntentUnspecified = 0, + UICollectionViewDropIntentInsertAtDestinationIndexPath = 1, + UICollectionViewDropIntentInsertIntoDestinationIndexPath = 2, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UICollectionViewDropProposal; + + unsafe impl ClassType for UICollectionViewDropProposal { + type Super = UIDropProposal; + } +); + +extern_methods!( + unsafe impl UICollectionViewDropProposal { + #[method_id(@__retain_semantics Init initWithDropOperation:intent:)] + pub unsafe fn initWithDropOperation_intent(this: Option>, operation: UIDropOperation,intent: UICollectionViewDropIntent,) -> Id; + + #[method(intent)] + pub unsafe fn intent(&self, ) -> UICollectionViewDropIntent; + + } +); + +extern_protocol!( + pub struct UICollectionViewDropCoordinator; + + unsafe impl UICollectionViewDropCoordinator { + #[method_id(@__retain_semantics Other items)] + pub unsafe fn items(&self, ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other destinationIndexPath)] + pub unsafe fn destinationIndexPath(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other proposal)] + pub unsafe fn proposal(&self, ) -> Id; + + #[method_id(@__retain_semantics Other session)] + pub unsafe fn session(&self, ) -> Id; + + #[method_id(@__retain_semantics Other dropItem:toPlaceholder:)] + pub unsafe fn dropItem_toPlaceholder(&self, dragItem: &UIDragItem,placeholder: &UICollectionViewDropPlaceholder,) -> Id; + + #[method_id(@__retain_semantics Other dropItem:toItemAtIndexPath:)] + pub unsafe fn dropItem_toItemAtIndexPath(&self, dragItem: &UIDragItem,indexPath: &NSIndexPath,) -> Id; + + #[method_id(@__retain_semantics Other dropItem:intoItemAtIndexPath:rect:)] + pub unsafe fn dropItem_intoItemAtIndexPath_rect(&self, dragItem: &UIDragItem,indexPath: &NSIndexPath,rect: CGRect,) -> Id; + + #[method_id(@__retain_semantics Other dropItem:toTarget:)] + pub unsafe fn dropItem_toTarget(&self, dragItem: &UIDragItem,target: &UIDragPreviewTarget,) -> Id; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UICollectionViewPlaceholder; + + unsafe impl ClassType for UICollectionViewPlaceholder { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UICollectionViewPlaceholder { + #[method_id(@__retain_semantics Init initWithInsertionIndexPath:reuseIdentifier:)] + pub unsafe fn initWithInsertionIndexPath_reuseIdentifier(this: Option>, insertionIndexPath: &NSIndexPath,reuseIdentifier: &NSString,) -> 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; + + #[method(cellUpdateHandler)] + pub unsafe fn cellUpdateHandler(&self, ) -> *mut Block<(NonNull, ), ()>; + + #[method(setCellUpdateHandler:)] + pub unsafe fn setCellUpdateHandler(&self, cellUpdateHandler: Option<&Block<(NonNull, ), ()>>,); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UICollectionViewDropPlaceholder; + + unsafe impl ClassType for UICollectionViewDropPlaceholder { + type Super = UICollectionViewPlaceholder; + } +); + +extern_methods!( + unsafe impl UICollectionViewDropPlaceholder { + #[method(previewParametersProvider)] + pub unsafe fn previewParametersProvider(&self, ) -> *mut Block<(NonNull, ), *mut UIDragPreviewParameters>; + + #[method(setPreviewParametersProvider:)] + pub unsafe fn setPreviewParametersProvider(&self, previewParametersProvider: Option<&Block<(NonNull, ), *mut UIDragPreviewParameters>>,); + + } +); + +extern_protocol!( + pub struct UICollectionViewDropItem; + + unsafe impl UICollectionViewDropItem { + #[method_id(@__retain_semantics Other dragItem)] + pub unsafe fn dragItem(&self, ) -> Id; + + #[method_id(@__retain_semantics Other sourceIndexPath)] + pub unsafe fn sourceIndexPath(&self, ) -> Option>; + + #[method(previewSize)] + pub unsafe fn previewSize(&self, ) -> CGSize; + + } +); + +extern_protocol!( + pub struct UICollectionViewDropPlaceholderContext; + + unsafe impl UICollectionViewDropPlaceholderContext { + #[method_id(@__retain_semantics Other dragItem)] + pub unsafe fn dragItem(&self, ) -> Id; + + #[method(commitInsertionWithDataSourceUpdates:)] + pub unsafe fn commitInsertionWithDataSourceUpdates(&self, dataSourceUpdates: &Block<(NonNull, ), ()>,) -> bool; + + #[method(deletePlaceholder)] + pub unsafe fn deletePlaceholder(&self, ) -> bool; + + #[method(setNeedsCellUpdate)] + pub unsafe fn setNeedsCellUpdate(&self, ); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UICollectionViewCell.rs b/crates/icrate-generated/src/UIKit/generated/UICollectionViewCell.rs new file mode 100644 index 000000000..e1b05802a --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UICollectionViewCell.rs @@ -0,0 +1,133 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UICollectionViewCellDragState { + UICollectionViewCellDragStateNone = 0, + UICollectionViewCellDragStateLifting = 1, + UICollectionViewCellDragStateDragging = 2, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UICollectionReusableView; + + unsafe impl ClassType for UICollectionReusableView { + type Super = UIView; + } +); + +extern_methods!( + unsafe impl UICollectionReusableView { + #[method_id(@__retain_semantics Other reuseIdentifier)] + pub unsafe fn reuseIdentifier(&self, ) -> Option>; + + #[method(prepareForReuse)] + pub unsafe fn prepareForReuse(&self, ); + + #[method(applyLayoutAttributes:)] + pub unsafe fn applyLayoutAttributes(&self, layoutAttributes: &UICollectionViewLayoutAttributes,); + + #[method(willTransitionFromLayout:toLayout:)] + pub unsafe fn willTransitionFromLayout_toLayout(&self, oldLayout: &UICollectionViewLayout,newLayout: &UICollectionViewLayout,); + + #[method(didTransitionFromLayout:toLayout:)] + pub unsafe fn didTransitionFromLayout_toLayout(&self, oldLayout: &UICollectionViewLayout,newLayout: &UICollectionViewLayout,); + + #[method_id(@__retain_semantics Other preferredLayoutAttributesFittingAttributes:)] + pub unsafe fn preferredLayoutAttributesFittingAttributes(&self, layoutAttributes: &UICollectionViewLayoutAttributes,) -> Id; + + } +); + +pub type UICollectionViewCellConfigurationUpdateHandler = *mut Block<(NonNull, NonNull, ), ()>; + +extern_class!( + #[derive(Debug)] + pub struct UICollectionViewCell; + + unsafe impl ClassType for UICollectionViewCell { + type Super = UICollectionReusableView; + } +); + +extern_methods!( + unsafe impl UICollectionViewCell { + #[method_id(@__retain_semantics Other configurationState)] + pub unsafe fn configurationState(&self, ) -> Id; + + #[method(setNeedsUpdateConfiguration)] + pub unsafe fn setNeedsUpdateConfiguration(&self, ); + + #[method(updateConfigurationUsingState:)] + pub unsafe fn updateConfigurationUsingState(&self, state: &UICellConfigurationState,); + + #[method(configurationUpdateHandler)] + pub unsafe fn configurationUpdateHandler(&self, ) -> UICollectionViewCellConfigurationUpdateHandler; + + #[method(setConfigurationUpdateHandler:)] + pub unsafe fn setConfigurationUpdateHandler(&self, configurationUpdateHandler: UICollectionViewCellConfigurationUpdateHandler,); + + #[method_id(@__retain_semantics Other contentConfiguration)] + pub unsafe fn contentConfiguration(&self, ) -> Option>; + + #[method(setContentConfiguration:)] + pub unsafe fn setContentConfiguration(&self, contentConfiguration: Option<&UIContentConfiguration>,); + + #[method(automaticallyUpdatesContentConfiguration)] + pub unsafe fn automaticallyUpdatesContentConfiguration(&self, ) -> bool; + + #[method(setAutomaticallyUpdatesContentConfiguration:)] + pub unsafe fn setAutomaticallyUpdatesContentConfiguration(&self, automaticallyUpdatesContentConfiguration: bool,); + + #[method_id(@__retain_semantics Other contentView)] + pub unsafe fn contentView(&self, ) -> Id; + + #[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(dragStateDidChange:)] + pub unsafe fn dragStateDidChange(&self, dragState: UICollectionViewCellDragState,); + + #[method_id(@__retain_semantics Other defaultBackgroundConfiguration)] + pub unsafe fn defaultBackgroundConfiguration(&self, ) -> Id; + + #[method_id(@__retain_semantics Other backgroundConfiguration)] + pub unsafe fn backgroundConfiguration(&self, ) -> Option>; + + #[method(setBackgroundConfiguration:)] + pub unsafe fn setBackgroundConfiguration(&self, backgroundConfiguration: Option<&UIBackgroundConfiguration>,); + + #[method(automaticallyUpdatesBackgroundConfiguration)] + pub unsafe fn automaticallyUpdatesBackgroundConfiguration(&self, ) -> bool; + + #[method(setAutomaticallyUpdatesBackgroundConfiguration:)] + pub unsafe fn setAutomaticallyUpdatesBackgroundConfiguration(&self, automaticallyUpdatesBackgroundConfiguration: bool,); + + #[method_id(@__retain_semantics Other backgroundView)] + pub unsafe fn backgroundView(&self, ) -> Option>; + + #[method(setBackgroundView:)] + pub unsafe fn setBackgroundView(&self, backgroundView: Option<&UIView>,); + + #[method_id(@__retain_semantics Other selectedBackgroundView)] + pub unsafe fn selectedBackgroundView(&self, ) -> Option>; + + #[method(setSelectedBackgroundView:)] + pub unsafe fn setSelectedBackgroundView(&self, selectedBackgroundView: Option<&UIView>,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UICollectionViewCompositionalLayout.rs b/crates/icrate-generated/src/UIKit/generated/UICollectionViewCompositionalLayout.rs new file mode 100644 index 000000000..29fe65601 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UICollectionViewCompositionalLayout.rs @@ -0,0 +1,730 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIContentInsetsReference { + UIContentInsetsReferenceAutomatic = 0, + UIContentInsetsReferenceNone = 1, + UIContentInsetsReferenceSafeArea = 2, + UIContentInsetsReferenceLayoutMargins = 3, + UIContentInsetsReferenceReadableContent = 4, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UICollectionViewCompositionalLayoutConfiguration; + + unsafe impl ClassType for UICollectionViewCompositionalLayoutConfiguration { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UICollectionViewCompositionalLayoutConfiguration { + #[method(scrollDirection)] + pub unsafe fn scrollDirection(&self, ) -> UICollectionViewScrollDirection; + + #[method(setScrollDirection:)] + pub unsafe fn setScrollDirection(&self, scrollDirection: UICollectionViewScrollDirection,); + + #[method(interSectionSpacing)] + pub unsafe fn interSectionSpacing(&self, ) -> CGFloat; + + #[method(setInterSectionSpacing:)] + pub unsafe fn setInterSectionSpacing(&self, interSectionSpacing: CGFloat,); + + #[method_id(@__retain_semantics Other boundarySupplementaryItems)] + pub unsafe fn boundarySupplementaryItems(&self, ) -> Id, Shared>; + + #[method(setBoundarySupplementaryItems:)] + pub unsafe fn setBoundarySupplementaryItems(&self, boundarySupplementaryItems: &NSArray,); + + #[method(contentInsetsReference)] + pub unsafe fn contentInsetsReference(&self, ) -> UIContentInsetsReference; + + #[method(setContentInsetsReference:)] + pub unsafe fn setContentInsetsReference(&self, contentInsetsReference: UIContentInsetsReference,); + + } +); + +pub type UICollectionViewCompositionalLayoutSectionProvider = *mut Block<(NSInteger, NonNull, ), *mut NSCollectionLayoutSection>; + +extern_class!( + #[derive(Debug)] + pub struct UICollectionViewCompositionalLayout; + + unsafe impl ClassType for UICollectionViewCompositionalLayout { + type Super = UICollectionViewLayout; + } +); + +extern_methods!( + unsafe impl UICollectionViewCompositionalLayout { + #[method_id(@__retain_semantics Init initWithSection:)] + pub unsafe fn initWithSection(this: Option>, section: &NSCollectionLayoutSection,) -> Id; + + #[method_id(@__retain_semantics Init initWithSection:configuration:)] + pub unsafe fn initWithSection_configuration(this: Option>, section: &NSCollectionLayoutSection,configuration: &UICollectionViewCompositionalLayoutConfiguration,) -> Id; + + #[method_id(@__retain_semantics Init initWithSectionProvider:)] + pub unsafe fn initWithSectionProvider(this: Option>, sectionProvider: UICollectionViewCompositionalLayoutSectionProvider,) -> Id; + + #[method_id(@__retain_semantics Init initWithSectionProvider:configuration:)] + pub unsafe fn initWithSectionProvider_configuration(this: Option>, sectionProvider: UICollectionViewCompositionalLayoutSectionProvider,configuration: &UICollectionViewCompositionalLayoutConfiguration,) -> 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; + + #[method_id(@__retain_semantics Other configuration)] + pub unsafe fn configuration(&self, ) -> Id; + + #[method(setConfiguration:)] + pub unsafe fn setConfiguration(&self, configuration: &UICollectionViewCompositionalLayoutConfiguration,); + + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UICollectionLayoutSectionOrthogonalScrollingBehavior { + UICollectionLayoutSectionOrthogonalScrollingBehaviorNone = 0, + UICollectionLayoutSectionOrthogonalScrollingBehaviorContinuous = 1, + UICollectionLayoutSectionOrthogonalScrollingBehaviorContinuousGroupLeadingBoundary = 2, + UICollectionLayoutSectionOrthogonalScrollingBehaviorPaging = 3, + UICollectionLayoutSectionOrthogonalScrollingBehaviorGroupPaging = 4, + UICollectionLayoutSectionOrthogonalScrollingBehaviorGroupPagingCentered = 5, + } +); + +pub type NSCollectionLayoutSectionVisibleItemsInvalidationHandler = *mut Block<(NonNull>, CGPoint, NonNull, ), ()>; + +extern_class!( + #[derive(Debug)] + pub struct NSCollectionLayoutSection; + + unsafe impl ClassType for NSCollectionLayoutSection { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSCollectionLayoutSection { + #[method_id(@__retain_semantics Other sectionWithGroup:)] + pub unsafe fn sectionWithGroup(group: &NSCollectionLayoutGroup,) -> 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; + + #[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(contentInsetsReference)] + pub unsafe fn contentInsetsReference(&self, ) -> UIContentInsetsReference; + + #[method(setContentInsetsReference:)] + pub unsafe fn setContentInsetsReference(&self, contentInsetsReference: UIContentInsetsReference,); + + #[method(supplementaryContentInsetsReference)] + pub unsafe fn supplementaryContentInsetsReference(&self, ) -> UIContentInsetsReference; + + #[method(setSupplementaryContentInsetsReference:)] + pub unsafe fn setSupplementaryContentInsetsReference(&self, supplementaryContentInsetsReference: UIContentInsetsReference,); + + #[method(orthogonalScrollingBehavior)] + pub unsafe fn orthogonalScrollingBehavior(&self, ) -> UICollectionLayoutSectionOrthogonalScrollingBehavior; + + #[method(setOrthogonalScrollingBehavior:)] + pub unsafe fn setOrthogonalScrollingBehavior(&self, orthogonalScrollingBehavior: UICollectionLayoutSectionOrthogonalScrollingBehavior,); + + #[method_id(@__retain_semantics Other boundarySupplementaryItems)] + pub unsafe fn boundarySupplementaryItems(&self, ) -> Id, Shared>; + + #[method(setBoundarySupplementaryItems:)] + pub unsafe fn setBoundarySupplementaryItems(&self, boundarySupplementaryItems: &NSArray,); + + #[method(visibleItemsInvalidationHandler)] + pub unsafe fn visibleItemsInvalidationHandler(&self, ) -> NSCollectionLayoutSectionVisibleItemsInvalidationHandler; + + #[method(setVisibleItemsInvalidationHandler:)] + pub unsafe fn setVisibleItemsInvalidationHandler(&self, visibleItemsInvalidationHandler: NSCollectionLayoutSectionVisibleItemsInvalidationHandler,); + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other itemWithLayoutSize:)] + pub unsafe fn itemWithLayoutSize(layoutSize: &NSCollectionLayoutSize,) -> Id; + + #[method_id(@__retain_semantics Other itemWithLayoutSize:supplementaryItems:)] + pub unsafe fn itemWithLayoutSize_supplementaryItems(layoutSize: &NSCollectionLayoutSize,supplementaryItems: &NSArray,) -> 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; + + #[method(contentInsets)] + pub unsafe fn contentInsets(&self, ) -> NSDirectionalEdgeInsets; + + #[method(setContentInsets:)] + pub unsafe fn setContentInsets(&self, contentInsets: NSDirectionalEdgeInsets,); + + #[method_id(@__retain_semantics Other edgeSpacing)] + pub unsafe fn edgeSpacing(&self, ) -> Option>; + + #[method(setEdgeSpacing:)] + pub unsafe fn setEdgeSpacing(&self, edgeSpacing: Option<&NSCollectionLayoutEdgeSpacing>,); + + #[method_id(@__retain_semantics Other layoutSize)] + pub unsafe fn layoutSize(&self, ) -> Id; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other customItemWithFrame:)] + pub unsafe fn customItemWithFrame(frame: CGRect,) -> Id; + + #[method_id(@__retain_semantics Other customItemWithFrame:zIndex:)] + pub unsafe fn customItemWithFrame_zIndex(frame: CGRect,zIndex: NSInteger,) -> 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; + + #[method(frame)] + pub unsafe fn frame(&self, ) -> CGRect; + + #[method(zIndex)] + pub unsafe fn zIndex(&self, ) -> NSInteger; + + } +); + +pub type NSCollectionLayoutGroupCustomItemProvider = *mut Block<(NonNull, ), NonNull>>; + +extern_class!( + #[derive(Debug)] + pub struct NSCollectionLayoutGroup; + + unsafe impl ClassType for NSCollectionLayoutGroup { + type Super = NSCollectionLayoutItem; + } +); + +extern_methods!( + unsafe impl NSCollectionLayoutGroup { + #[method_id(@__retain_semantics Other horizontalGroupWithLayoutSize:repeatingSubitem:count:)] + pub unsafe fn horizontalGroupWithLayoutSize_repeatingSubitem_count(layoutSize: &NSCollectionLayoutSize,subitem: &NSCollectionLayoutItem,count: NSInteger,) -> Id; + + #[method_id(@__retain_semantics Other horizontalGroupWithLayoutSize:subitems:)] + pub unsafe fn horizontalGroupWithLayoutSize_subitems(layoutSize: &NSCollectionLayoutSize,subitems: &NSArray,) -> Id; + + #[method_id(@__retain_semantics Other verticalGroupWithLayoutSize:repeatingSubitem:count:)] + pub unsafe fn verticalGroupWithLayoutSize_repeatingSubitem_count(layoutSize: &NSCollectionLayoutSize,subitem: &NSCollectionLayoutItem,count: NSInteger,) -> Id; + + #[method_id(@__retain_semantics Other verticalGroupWithLayoutSize:subitems:)] + pub unsafe fn verticalGroupWithLayoutSize_subitems(layoutSize: &NSCollectionLayoutSize,subitems: &NSArray,) -> Id; + + #[method_id(@__retain_semantics Other customGroupWithLayoutSize:itemProvider:)] + pub unsafe fn customGroupWithLayoutSize_itemProvider(layoutSize: &NSCollectionLayoutSize,itemProvider: NSCollectionLayoutGroupCustomItemProvider,) -> 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; + + #[method_id(@__retain_semantics Other supplementaryItems)] + pub unsafe fn supplementaryItems(&self, ) -> Id, Shared>; + + #[method(setSupplementaryItems:)] + pub unsafe fn setSupplementaryItems(&self, supplementaryItems: &NSArray,); + + #[method_id(@__retain_semantics Other interItemSpacing)] + pub unsafe fn interItemSpacing(&self, ) -> Option>; + + #[method(setInterItemSpacing:)] + pub unsafe fn setInterItemSpacing(&self, interItemSpacing: Option<&NSCollectionLayoutSpacing>,); + + #[method_id(@__retain_semantics Other subitems)] + pub unsafe fn subitems(&self, ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other fractionalWidthDimension:)] + pub unsafe fn fractionalWidthDimension(fractionalWidth: CGFloat,) -> Id; + + #[method_id(@__retain_semantics Other fractionalHeightDimension:)] + pub unsafe fn fractionalHeightDimension(fractionalHeight: CGFloat,) -> Id; + + #[method_id(@__retain_semantics Other absoluteDimension:)] + pub unsafe fn absoluteDimension(absoluteDimension: CGFloat,) -> Id; + + #[method_id(@__retain_semantics Other estimatedDimension:)] + pub unsafe fn estimatedDimension(estimatedDimension: CGFloat,) -> 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; + + #[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(@__retain_semantics Other sizeWithWidthDimension:heightDimension:)] + pub unsafe fn sizeWithWidthDimension_heightDimension(width: &NSCollectionLayoutDimension,height: &NSCollectionLayoutDimension,) -> 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; + + #[method_id(@__retain_semantics Other widthDimension)] + pub unsafe fn widthDimension(&self, ) -> Id; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other flexibleSpacing:)] + pub unsafe fn flexibleSpacing(flexibleSpacing: CGFloat,) -> Id; + + #[method_id(@__retain_semantics Other fixedSpacing:)] + pub unsafe fn fixedSpacing(fixedSpacing: CGFloat,) -> 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; + + #[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(@__retain_semantics Other 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(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics New new)] + pub unsafe fn new() -> Id; + + #[method_id(@__retain_semantics Other leading)] + pub unsafe fn leading(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other top)] + pub unsafe fn top(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other trailing)] + pub unsafe fn trailing(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other supplementaryItemWithLayoutSize:elementKind:containerAnchor:)] + pub unsafe fn supplementaryItemWithLayoutSize_elementKind_containerAnchor(layoutSize: &NSCollectionLayoutSize,elementKind: &NSString,containerAnchor: &NSCollectionLayoutAnchor,) -> Id; + + #[method_id(@__retain_semantics Other supplementaryItemWithLayoutSize:elementKind:containerAnchor:itemAnchor:)] + pub unsafe fn supplementaryItemWithLayoutSize_elementKind_containerAnchor_itemAnchor(layoutSize: &NSCollectionLayoutSize,elementKind: &NSString,containerAnchor: &NSCollectionLayoutAnchor,itemAnchor: &NSCollectionLayoutAnchor,) -> 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; + + #[method(zIndex)] + pub unsafe fn zIndex(&self, ) -> NSInteger; + + #[method(setZIndex:)] + pub unsafe fn setZIndex(&self, zIndex: NSInteger,); + + #[method_id(@__retain_semantics Other elementKind)] + pub unsafe fn elementKind(&self, ) -> Id; + + #[method_id(@__retain_semantics Other containerAnchor)] + pub unsafe fn containerAnchor(&self, ) -> Id; + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other boundarySupplementaryItemWithLayoutSize:elementKind:alignment:)] + pub unsafe fn boundarySupplementaryItemWithLayoutSize_elementKind_alignment(layoutSize: &NSCollectionLayoutSize,elementKind: &NSString,alignment: NSRectAlignment,) -> Id; + + #[method_id(@__retain_semantics Other boundarySupplementaryItemWithLayoutSize:elementKind:alignment:absoluteOffset:)] + pub unsafe fn boundarySupplementaryItemWithLayoutSize_elementKind_alignment_absoluteOffset(layoutSize: &NSCollectionLayoutSize,elementKind: &NSString,alignment: NSRectAlignment,absoluteOffset: CGPoint,) -> 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; + + #[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, ) -> CGPoint; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct NSCollectionLayoutDecorationItem; + + unsafe impl ClassType for NSCollectionLayoutDecorationItem { + type Super = NSCollectionLayoutItem; + } +); + +extern_methods!( + unsafe impl NSCollectionLayoutDecorationItem { + #[method_id(@__retain_semantics Other backgroundDecorationItemWithElementKind:)] + pub unsafe fn backgroundDecorationItemWithElementKind(elementKind: &NSString,) -> 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; + + #[method(zIndex)] + pub unsafe fn zIndex(&self, ) -> NSInteger; + + #[method(setZIndex:)] + pub unsafe fn setZIndex(&self, zIndex: NSInteger,); + + #[method_id(@__retain_semantics Other 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(@__retain_semantics Other layoutAnchorWithEdges:)] + pub unsafe fn layoutAnchorWithEdges(edges: NSDirectionalRectEdge,) -> Id; + + #[method_id(@__retain_semantics Other layoutAnchorWithEdges:absoluteOffset:)] + pub unsafe fn layoutAnchorWithEdges_absoluteOffset(edges: NSDirectionalRectEdge,absoluteOffset: CGPoint,) -> Id; + + #[method_id(@__retain_semantics Other layoutAnchorWithEdges:fractionalOffset:)] + pub unsafe fn layoutAnchorWithEdges_fractionalOffset(edges: NSDirectionalRectEdge,fractionalOffset: CGPoint,) -> 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; + + #[method(edges)] + pub unsafe fn edges(&self, ) -> NSDirectionalRectEdge; + + #[method(offset)] + pub unsafe fn offset(&self, ) -> CGPoint; + + #[method(isAbsoluteOffset)] + pub unsafe fn isAbsoluteOffset(&self, ) -> bool; + + #[method(isFractionalOffset)] + pub unsafe fn isFractionalOffset(&self, ) -> bool; + + } +); + +extern_protocol!( + pub struct NSCollectionLayoutContainer; + + unsafe impl NSCollectionLayoutContainer { + #[method(contentSize)] + pub unsafe fn contentSize(&self, ) -> CGSize; + + #[method(effectiveContentSize)] + pub unsafe fn effectiveContentSize(&self, ) -> CGSize; + + #[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; + + #[method_id(@__retain_semantics Other traitCollection)] + pub unsafe fn traitCollection(&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, ) -> CGPoint; + + #[method(setCenter:)] + pub unsafe fn setCenter(&self, center: CGPoint,); + + #[method(transform)] + pub unsafe fn transform(&self, ) -> CGAffineTransform; + + #[method(setTransform:)] + pub unsafe fn setTransform(&self, transform: CGAffineTransform,); + + #[method(transform3D)] + pub unsafe fn transform3D(&self, ) -> CATransform3D; + + #[method(setTransform3D:)] + pub unsafe fn setTransform3D(&self, transform3D: CATransform3D,); + + #[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, ) -> CGRect; + + #[method(bounds)] + pub unsafe fn bounds(&self, ) -> CGRect; + + #[method(representedElementCategory)] + pub unsafe fn representedElementCategory(&self, ) -> UICollectionElementCategory; + + #[method_id(@__retain_semantics Other representedElementKind)] + pub unsafe fn representedElementKind(&self, ) -> Option>; + + } +); + +extern_methods!( + /// Deprecated + unsafe impl NSCollectionLayoutSection { + #[method(supplementariesFollowContentInsets)] + pub unsafe fn supplementariesFollowContentInsets(&self, ) -> bool; + + #[method(setSupplementariesFollowContentInsets:)] + pub unsafe fn setSupplementariesFollowContentInsets(&self, supplementariesFollowContentInsets: bool,); + + } +); + +extern_methods!( + /// Deprecated + unsafe impl NSCollectionLayoutGroup { + #[method_id(@__retain_semantics Other horizontalGroupWithLayoutSize:subitem:count:)] + pub unsafe fn horizontalGroupWithLayoutSize_subitem_count(layoutSize: &NSCollectionLayoutSize,subitem: &NSCollectionLayoutItem,count: NSInteger,) -> Id; + + #[method_id(@__retain_semantics Other verticalGroupWithLayoutSize:subitem:count:)] + pub unsafe fn verticalGroupWithLayoutSize_subitem_count(layoutSize: &NSCollectionLayoutSize,subitem: &NSCollectionLayoutItem,count: NSInteger,) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UICollectionViewController.rs b/crates/icrate-generated/src/UIKit/generated/UICollectionViewController.rs new file mode 100644 index 000000000..0e2261d18 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UICollectionViewController.rs @@ -0,0 +1,54 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UICollectionViewController; + + unsafe impl ClassType for UICollectionViewController { + type Super = UIViewController; + } +); + +extern_methods!( + unsafe impl UICollectionViewController { + #[method_id(@__retain_semantics Init initWithCollectionViewLayout:)] + pub unsafe fn initWithCollectionViewLayout(this: Option>, layout: &UICollectionViewLayout,) -> Id; + + #[method_id(@__retain_semantics Init initWithNibName:bundle:)] + pub unsafe fn initWithNibName_bundle(this: Option>, nibNameOrNil: Option<&NSString>,nibBundleOrNil: Option<&NSBundle>,) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method_id(@__retain_semantics Other collectionView)] + pub unsafe fn collectionView(&self, ) -> Option>; + + #[method(setCollectionView:)] + pub unsafe fn setCollectionView(&self, collectionView: Option<&UICollectionView>,); + + #[method(clearsSelectionOnViewWillAppear)] + pub unsafe fn clearsSelectionOnViewWillAppear(&self, ) -> bool; + + #[method(setClearsSelectionOnViewWillAppear:)] + pub unsafe fn setClearsSelectionOnViewWillAppear(&self, clearsSelectionOnViewWillAppear: bool,); + + #[method(useLayoutToLayoutNavigationTransitions)] + pub unsafe fn useLayoutToLayoutNavigationTransitions(&self, ) -> bool; + + #[method(setUseLayoutToLayoutNavigationTransitions:)] + pub unsafe fn setUseLayoutToLayoutNavigationTransitions(&self, useLayoutToLayoutNavigationTransitions: bool,); + + #[method_id(@__retain_semantics Other collectionViewLayout)] + pub unsafe fn collectionViewLayout(&self, ) -> Id; + + #[method(installsStandardGestureForInteractiveMovement)] + pub unsafe fn installsStandardGestureForInteractiveMovement(&self, ) -> bool; + + #[method(setInstallsStandardGestureForInteractiveMovement:)] + pub unsafe fn setInstallsStandardGestureForInteractiveMovement(&self, installsStandardGestureForInteractiveMovement: bool,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UICollectionViewFlowLayout.rs b/crates/icrate-generated/src/UIKit/generated/UICollectionViewFlowLayout.rs new file mode 100644 index 000000000..905e91f40 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UICollectionViewFlowLayout.rs @@ -0,0 +1,152 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_static!(UICollectionViewFlowLayoutAutomaticSize: CGSize); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UICollectionViewFlowLayoutSectionInsetReference { + UICollectionViewFlowLayoutSectionInsetFromContentInset = 0, + UICollectionViewFlowLayoutSectionInsetFromSafeArea = 1, + UICollectionViewFlowLayoutSectionInsetFromLayoutMargins = 2, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UICollectionViewFlowLayoutInvalidationContext; + + unsafe impl ClassType for UICollectionViewFlowLayoutInvalidationContext { + type Super = UICollectionViewLayoutInvalidationContext; + } +); + +extern_methods!( + unsafe impl UICollectionViewFlowLayoutInvalidationContext { + #[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,); + + } +); + +extern_protocol!( + pub struct UICollectionViewDelegateFlowLayout; + + unsafe impl UICollectionViewDelegateFlowLayout { + #[optional] + #[method(collectionView:layout:sizeForItemAtIndexPath:)] + pub unsafe fn collectionView_layout_sizeForItemAtIndexPath(&self, collectionView: &UICollectionView,collectionViewLayout: &UICollectionViewLayout,indexPath: &NSIndexPath,) -> CGSize; + + #[optional] + #[method(collectionView:layout:insetForSectionAtIndex:)] + pub unsafe fn collectionView_layout_insetForSectionAtIndex(&self, collectionView: &UICollectionView,collectionViewLayout: &UICollectionViewLayout,section: NSInteger,) -> UIEdgeInsets; + + #[optional] + #[method(collectionView:layout:minimumLineSpacingForSectionAtIndex:)] + pub unsafe fn collectionView_layout_minimumLineSpacingForSectionAtIndex(&self, collectionView: &UICollectionView,collectionViewLayout: &UICollectionViewLayout,section: NSInteger,) -> CGFloat; + + #[optional] + #[method(collectionView:layout:minimumInteritemSpacingForSectionAtIndex:)] + pub unsafe fn collectionView_layout_minimumInteritemSpacingForSectionAtIndex(&self, collectionView: &UICollectionView,collectionViewLayout: &UICollectionViewLayout,section: NSInteger,) -> CGFloat; + + #[optional] + #[method(collectionView:layout:referenceSizeForHeaderInSection:)] + pub unsafe fn collectionView_layout_referenceSizeForHeaderInSection(&self, collectionView: &UICollectionView,collectionViewLayout: &UICollectionViewLayout,section: NSInteger,) -> CGSize; + + #[optional] + #[method(collectionView:layout:referenceSizeForFooterInSection:)] + pub unsafe fn collectionView_layout_referenceSizeForFooterInSection(&self, collectionView: &UICollectionView,collectionViewLayout: &UICollectionViewLayout,section: NSInteger,) -> CGSize; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UICollectionViewFlowLayout; + + unsafe impl ClassType for UICollectionViewFlowLayout { + type Super = UICollectionViewLayout; + } +); + +extern_methods!( + unsafe impl UICollectionViewFlowLayout { + #[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, ) -> CGSize; + + #[method(setItemSize:)] + pub unsafe fn setItemSize(&self, itemSize: CGSize,); + + #[method(estimatedItemSize)] + pub unsafe fn estimatedItemSize(&self, ) -> CGSize; + + #[method(setEstimatedItemSize:)] + pub unsafe fn setEstimatedItemSize(&self, estimatedItemSize: CGSize,); + + #[method(scrollDirection)] + pub unsafe fn scrollDirection(&self, ) -> UICollectionViewScrollDirection; + + #[method(setScrollDirection:)] + pub unsafe fn setScrollDirection(&self, scrollDirection: UICollectionViewScrollDirection,); + + #[method(headerReferenceSize)] + pub unsafe fn headerReferenceSize(&self, ) -> CGSize; + + #[method(setHeaderReferenceSize:)] + pub unsafe fn setHeaderReferenceSize(&self, headerReferenceSize: CGSize,); + + #[method(footerReferenceSize)] + pub unsafe fn footerReferenceSize(&self, ) -> CGSize; + + #[method(setFooterReferenceSize:)] + pub unsafe fn setFooterReferenceSize(&self, footerReferenceSize: CGSize,); + + #[method(sectionInset)] + pub unsafe fn sectionInset(&self, ) -> UIEdgeInsets; + + #[method(setSectionInset:)] + pub unsafe fn setSectionInset(&self, sectionInset: UIEdgeInsets,); + + #[method(sectionInsetReference)] + pub unsafe fn sectionInsetReference(&self, ) -> UICollectionViewFlowLayoutSectionInsetReference; + + #[method(setSectionInsetReference:)] + pub unsafe fn setSectionInsetReference(&self, sectionInsetReference: UICollectionViewFlowLayoutSectionInsetReference,); + + #[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,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UICollectionViewItemRegistration.rs b/crates/icrate-generated/src/UIKit/generated/UICollectionViewItemRegistration.rs new file mode 100644 index 000000000..1199fd52d --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UICollectionViewItemRegistration.rs @@ -0,0 +1,69 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +pub type UICollectionViewCellRegistrationConfigurationHandler = *mut Block<(NonNull, NonNull, NonNull, ), ()>; + +extern_class!( + #[derive(Debug)] + pub struct UICollectionViewCellRegistration; + + unsafe impl ClassType for UICollectionViewCellRegistration { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UICollectionViewCellRegistration { + #[method_id(@__retain_semantics Other registrationWithCellClass:configurationHandler:)] + pub unsafe fn registrationWithCellClass_configurationHandler(cellClass: &Class,configurationHandler: UICollectionViewCellRegistrationConfigurationHandler,) -> Id; + + #[method_id(@__retain_semantics Other registrationWithCellNib:configurationHandler:)] + pub unsafe fn registrationWithCellNib_configurationHandler(cellNib: &UINib,configurationHandler: UICollectionViewCellRegistrationConfigurationHandler,) -> Id; + + #[method(cellClass)] + pub unsafe fn cellClass(&self, ) -> Option<&'static Class>; + + #[method_id(@__retain_semantics Other cellNib)] + pub unsafe fn cellNib(&self, ) -> Option>; + + #[method(configurationHandler)] + pub unsafe fn configurationHandler(&self, ) -> UICollectionViewCellRegistrationConfigurationHandler; + + } +); + +pub type UICollectionViewSupplementaryRegistrationConfigurationHandler = *mut Block<(NonNull, NonNull, NonNull, ), ()>; + +extern_class!( + #[derive(Debug)] + pub struct UICollectionViewSupplementaryRegistration; + + unsafe impl ClassType for UICollectionViewSupplementaryRegistration { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UICollectionViewSupplementaryRegistration { + #[method_id(@__retain_semantics Other registrationWithSupplementaryClass:elementKind:configurationHandler:)] + pub unsafe fn registrationWithSupplementaryClass_elementKind_configurationHandler(supplementaryClass: &Class,elementKind: &NSString,configurationHandler: UICollectionViewSupplementaryRegistrationConfigurationHandler,) -> Id; + + #[method_id(@__retain_semantics Other registrationWithSupplementaryNib:elementKind:configurationHandler:)] + pub unsafe fn registrationWithSupplementaryNib_elementKind_configurationHandler(supplementaryNib: &UINib,elementKind: &NSString,configurationHandler: UICollectionViewSupplementaryRegistrationConfigurationHandler,) -> Id; + + #[method(supplementaryClass)] + pub unsafe fn supplementaryClass(&self, ) -> Option<&'static Class>; + + #[method_id(@__retain_semantics Other supplementaryNib)] + pub unsafe fn supplementaryNib(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other elementKind)] + pub unsafe fn elementKind(&self, ) -> Id; + + #[method(configurationHandler)] + pub unsafe fn configurationHandler(&self, ) -> UICollectionViewSupplementaryRegistrationConfigurationHandler; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UICollectionViewLayout.rs b/crates/icrate-generated/src/UIKit/generated/UICollectionViewLayout.rs new file mode 100644 index 000000000..a30c58a8d --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UICollectionViewLayout.rs @@ -0,0 +1,339 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_static!(UICollectionViewLayoutAutomaticDimension: CGFloat); + +extern_static!(UICollectionElementKindSectionHeader: &'static NSString); + +extern_static!(UICollectionElementKindSectionFooter: &'static NSString); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UICollectionViewScrollDirection { + UICollectionViewScrollDirectionVertical = 0, + UICollectionViewScrollDirectionHorizontal = 1, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum UICollectionElementCategory { + UICollectionElementCategoryCell = 0, + UICollectionElementCategorySupplementaryView = 1, + UICollectionElementCategoryDecorationView = 2, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UICollectionViewLayoutAttributes; + + unsafe impl ClassType for UICollectionViewLayoutAttributes { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UICollectionViewLayoutAttributes { + #[method(frame)] + pub unsafe fn frame(&self, ) -> CGRect; + + #[method(setFrame:)] + pub unsafe fn setFrame(&self, frame: CGRect,); + + #[method(center)] + pub unsafe fn center(&self, ) -> CGPoint; + + #[method(setCenter:)] + pub unsafe fn setCenter(&self, center: CGPoint,); + + #[method(size)] + pub unsafe fn size(&self, ) -> CGSize; + + #[method(setSize:)] + pub unsafe fn setSize(&self, size: CGSize,); + + #[method(transform3D)] + pub unsafe fn transform3D(&self, ) -> CATransform3D; + + #[method(setTransform3D:)] + pub unsafe fn setTransform3D(&self, transform3D: CATransform3D,); + + #[method(bounds)] + pub unsafe fn bounds(&self, ) -> CGRect; + + #[method(setBounds:)] + pub unsafe fn setBounds(&self, bounds: CGRect,); + + #[method(transform)] + pub unsafe fn transform(&self, ) -> CGAffineTransform; + + #[method(setTransform:)] + pub unsafe fn setTransform(&self, transform: CGAffineTransform,); + + #[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(@__retain_semantics Other indexPath)] + pub unsafe fn indexPath(&self, ) -> Id; + + #[method(setIndexPath:)] + pub unsafe fn setIndexPath(&self, indexPath: &NSIndexPath,); + + #[method(representedElementCategory)] + pub unsafe fn representedElementCategory(&self, ) -> UICollectionElementCategory; + + #[method_id(@__retain_semantics Other representedElementKind)] + pub unsafe fn representedElementKind(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other layoutAttributesForCellWithIndexPath:)] + pub unsafe fn layoutAttributesForCellWithIndexPath(indexPath: &NSIndexPath,) -> Id; + + #[method_id(@__retain_semantics Other layoutAttributesForSupplementaryViewOfKind:withIndexPath:)] + pub unsafe fn layoutAttributesForSupplementaryViewOfKind_withIndexPath(elementKind: &NSString,indexPath: &NSIndexPath,) -> Id; + + #[method_id(@__retain_semantics Other layoutAttributesForDecorationViewOfKind:withIndexPath:)] + pub unsafe fn layoutAttributesForDecorationViewOfKind_withIndexPath(decorationViewKind: &NSString,indexPath: &NSIndexPath,) -> Id; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UICollectionViewLayoutInvalidationContext; + + unsafe impl ClassType for UICollectionViewLayoutInvalidationContext { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UICollectionViewLayoutInvalidationContext { + #[method(invalidateEverything)] + pub unsafe fn invalidateEverything(&self, ) -> bool; + + #[method(invalidateDataSourceCounts)] + pub unsafe fn invalidateDataSourceCounts(&self, ) -> bool; + + #[method(invalidateItemsAtIndexPaths:)] + pub unsafe fn invalidateItemsAtIndexPaths(&self, indexPaths: &NSArray,); + + #[method(invalidateSupplementaryElementsOfKind:atIndexPaths:)] + pub unsafe fn invalidateSupplementaryElementsOfKind_atIndexPaths(&self, elementKind: &NSString,indexPaths: &NSArray,); + + #[method(invalidateDecorationElementsOfKind:atIndexPaths:)] + pub unsafe fn invalidateDecorationElementsOfKind_atIndexPaths(&self, elementKind: &NSString,indexPaths: &NSArray,); + + #[method_id(@__retain_semantics Other invalidatedItemIndexPaths)] + pub unsafe fn invalidatedItemIndexPaths(&self, ) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other invalidatedSupplementaryIndexPaths)] + pub unsafe fn invalidatedSupplementaryIndexPaths(&self, ) -> Option,>, Shared>>; + + #[method_id(@__retain_semantics Other invalidatedDecorationIndexPaths)] + pub unsafe fn invalidatedDecorationIndexPaths(&self, ) -> Option,>, Shared>>; + + #[method(contentOffsetAdjustment)] + pub unsafe fn contentOffsetAdjustment(&self, ) -> CGPoint; + + #[method(setContentOffsetAdjustment:)] + pub unsafe fn setContentOffsetAdjustment(&self, contentOffsetAdjustment: CGPoint,); + + #[method(contentSizeAdjustment)] + pub unsafe fn contentSizeAdjustment(&self, ) -> CGSize; + + #[method(setContentSizeAdjustment:)] + pub unsafe fn setContentSizeAdjustment(&self, contentSizeAdjustment: CGSize,); + + #[method_id(@__retain_semantics Other previousIndexPathsForInteractivelyMovingItems)] + pub unsafe fn previousIndexPathsForInteractivelyMovingItems(&self, ) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other targetIndexPathsForInteractivelyMovingItems)] + pub unsafe fn targetIndexPathsForInteractivelyMovingItems(&self, ) -> Option, Shared>>; + + #[method(interactiveMovementTarget)] + pub unsafe fn interactiveMovementTarget(&self, ) -> CGPoint; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UICollectionViewLayout; + + unsafe impl ClassType for UICollectionViewLayout { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UICollectionViewLayout { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method_id(@__retain_semantics Other collectionView)] + pub unsafe fn collectionView(&self, ) -> Option>; + + #[method(invalidateLayout)] + pub unsafe fn invalidateLayout(&self, ); + + #[method(invalidateLayoutWithContext:)] + pub unsafe fn invalidateLayoutWithContext(&self, context: &UICollectionViewLayoutInvalidationContext,); + + #[method(registerClass:forDecorationViewOfKind:)] + pub unsafe fn registerClass_forDecorationViewOfKind(&self, viewClass: Option<&Class>,elementKind: &NSString,); + + #[method(registerNib:forDecorationViewOfKind:)] + pub unsafe fn registerNib_forDecorationViewOfKind(&self, nib: Option<&UINib>,elementKind: &NSString,); + + } +); + +extern_methods!( + /// UISubclassingHooks + unsafe impl UICollectionViewLayout { + #[method(layoutAttributesClass)] + pub unsafe fn layoutAttributesClass() -> &'static Class; + + #[method(invalidationContextClass)] + pub unsafe fn invalidationContextClass() -> &'static Class; + + #[method(prepareLayout)] + pub unsafe fn prepareLayout(&self, ); + + #[method_id(@__retain_semantics Other layoutAttributesForElementsInRect:)] + pub unsafe fn layoutAttributesForElementsInRect(&self, rect: CGRect,) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other layoutAttributesForItemAtIndexPath:)] + pub unsafe fn layoutAttributesForItemAtIndexPath(&self, indexPath: &NSIndexPath,) -> Option>; + + #[method_id(@__retain_semantics Other layoutAttributesForSupplementaryViewOfKind:atIndexPath:)] + pub unsafe fn layoutAttributesForSupplementaryViewOfKind_atIndexPath(&self, elementKind: &NSString,indexPath: &NSIndexPath,) -> Option>; + + #[method_id(@__retain_semantics Other layoutAttributesForDecorationViewOfKind:atIndexPath:)] + pub unsafe fn layoutAttributesForDecorationViewOfKind_atIndexPath(&self, elementKind: &NSString,indexPath: &NSIndexPath,) -> Option>; + + #[method(shouldInvalidateLayoutForBoundsChange:)] + pub unsafe fn shouldInvalidateLayoutForBoundsChange(&self, newBounds: CGRect,) -> bool; + + #[method_id(@__retain_semantics Other invalidationContextForBoundsChange:)] + pub unsafe fn invalidationContextForBoundsChange(&self, newBounds: CGRect,) -> Id; + + #[method(shouldInvalidateLayoutForPreferredLayoutAttributes:withOriginalAttributes:)] + pub unsafe fn shouldInvalidateLayoutForPreferredLayoutAttributes_withOriginalAttributes(&self, preferredAttributes: &UICollectionViewLayoutAttributes,originalAttributes: &UICollectionViewLayoutAttributes,) -> bool; + + #[method_id(@__retain_semantics Other invalidationContextForPreferredLayoutAttributes:withOriginalAttributes:)] + pub unsafe fn invalidationContextForPreferredLayoutAttributes_withOriginalAttributes(&self, preferredAttributes: &UICollectionViewLayoutAttributes,originalAttributes: &UICollectionViewLayoutAttributes,) -> Id; + + #[method(targetContentOffsetForProposedContentOffset:withScrollingVelocity:)] + pub unsafe fn targetContentOffsetForProposedContentOffset_withScrollingVelocity(&self, proposedContentOffset: CGPoint,velocity: CGPoint,) -> CGPoint; + + #[method(targetContentOffsetForProposedContentOffset:)] + pub unsafe fn targetContentOffsetForProposedContentOffset(&self, proposedContentOffset: CGPoint,) -> CGPoint; + + #[method(collectionViewContentSize)] + pub unsafe fn collectionViewContentSize(&self, ) -> CGSize; + + #[method(developmentLayoutDirection)] + pub unsafe fn developmentLayoutDirection(&self, ) -> UIUserInterfaceLayoutDirection; + + #[method(flipsHorizontallyInOppositeLayoutDirection)] + pub unsafe fn flipsHorizontallyInOppositeLayoutDirection(&self, ) -> bool; + + } +); + +extern_methods!( + /// UIUpdateSupportHooks + unsafe impl UICollectionViewLayout { + #[method(prepareForCollectionViewUpdates:)] + pub unsafe fn prepareForCollectionViewUpdates(&self, updateItems: &NSArray,); + + #[method(finalizeCollectionViewUpdates)] + pub unsafe fn finalizeCollectionViewUpdates(&self, ); + + #[method(prepareForAnimatedBoundsChange:)] + pub unsafe fn prepareForAnimatedBoundsChange(&self, oldBounds: CGRect,); + + #[method(finalizeAnimatedBoundsChange)] + pub unsafe fn finalizeAnimatedBoundsChange(&self, ); + + #[method(prepareForTransitionToLayout:)] + pub unsafe fn prepareForTransitionToLayout(&self, newLayout: &UICollectionViewLayout,); + + #[method(prepareForTransitionFromLayout:)] + pub unsafe fn prepareForTransitionFromLayout(&self, oldLayout: &UICollectionViewLayout,); + + #[method(finalizeLayoutTransition)] + pub unsafe fn finalizeLayoutTransition(&self, ); + + #[method_id(@__retain_semantics Other initialLayoutAttributesForAppearingItemAtIndexPath:)] + pub unsafe fn initialLayoutAttributesForAppearingItemAtIndexPath(&self, itemIndexPath: &NSIndexPath,) -> Option>; + + #[method_id(@__retain_semantics Other finalLayoutAttributesForDisappearingItemAtIndexPath:)] + pub unsafe fn finalLayoutAttributesForDisappearingItemAtIndexPath(&self, itemIndexPath: &NSIndexPath,) -> Option>; + + #[method_id(@__retain_semantics Other initialLayoutAttributesForAppearingSupplementaryElementOfKind:atIndexPath:)] + pub unsafe fn initialLayoutAttributesForAppearingSupplementaryElementOfKind_atIndexPath(&self, elementKind: &NSString,elementIndexPath: &NSIndexPath,) -> Option>; + + #[method_id(@__retain_semantics Other finalLayoutAttributesForDisappearingSupplementaryElementOfKind:atIndexPath:)] + pub unsafe fn finalLayoutAttributesForDisappearingSupplementaryElementOfKind_atIndexPath(&self, elementKind: &NSString,elementIndexPath: &NSIndexPath,) -> Option>; + + #[method_id(@__retain_semantics Other initialLayoutAttributesForAppearingDecorationElementOfKind:atIndexPath:)] + pub unsafe fn initialLayoutAttributesForAppearingDecorationElementOfKind_atIndexPath(&self, elementKind: &NSString,decorationIndexPath: &NSIndexPath,) -> Option>; + + #[method_id(@__retain_semantics Other finalLayoutAttributesForDisappearingDecorationElementOfKind:atIndexPath:)] + pub unsafe fn finalLayoutAttributesForDisappearingDecorationElementOfKind_atIndexPath(&self, elementKind: &NSString,decorationIndexPath: &NSIndexPath,) -> Option>; + + #[method_id(@__retain_semantics Other indexPathsToDeleteForSupplementaryViewOfKind:)] + pub unsafe fn indexPathsToDeleteForSupplementaryViewOfKind(&self, elementKind: &NSString,) -> Id, Shared>; + + #[method_id(@__retain_semantics Other indexPathsToDeleteForDecorationViewOfKind:)] + pub unsafe fn indexPathsToDeleteForDecorationViewOfKind(&self, elementKind: &NSString,) -> Id, Shared>; + + #[method_id(@__retain_semantics Other indexPathsToInsertForSupplementaryViewOfKind:)] + pub unsafe fn indexPathsToInsertForSupplementaryViewOfKind(&self, elementKind: &NSString,) -> Id, Shared>; + + #[method_id(@__retain_semantics Other indexPathsToInsertForDecorationViewOfKind:)] + pub unsafe fn indexPathsToInsertForDecorationViewOfKind(&self, elementKind: &NSString,) -> Id, Shared>; + + } +); + +extern_methods!( + /// UIReorderingSupportHooks + unsafe impl UICollectionViewLayout { + #[method_id(@__retain_semantics Other targetIndexPathForInteractivelyMovingItem:withPosition:)] + pub unsafe fn targetIndexPathForInteractivelyMovingItem_withPosition(&self, previousIndexPath: &NSIndexPath,position: CGPoint,) -> Id; + + #[method_id(@__retain_semantics Other layoutAttributesForInteractivelyMovingItemAtIndexPath:withTargetPosition:)] + pub unsafe fn layoutAttributesForInteractivelyMovingItemAtIndexPath_withTargetPosition(&self, indexPath: &NSIndexPath,position: CGPoint,) -> Id; + + #[method_id(@__retain_semantics Other invalidationContextForInteractivelyMovingItems:withTargetPosition:previousIndexPaths:previousPosition:)] + pub unsafe fn invalidationContextForInteractivelyMovingItems_withTargetPosition_previousIndexPaths_previousPosition(&self, targetIndexPaths: &NSArray,targetPosition: CGPoint,previousIndexPaths: &NSArray,previousPosition: CGPoint,) -> Id; + + #[method_id(@__retain_semantics Other invalidationContextForEndingInteractiveMovementOfItemsToFinalIndexPaths:previousIndexPaths:movementCancelled:)] + pub unsafe fn invalidationContextForEndingInteractiveMovementOfItemsToFinalIndexPaths_previousIndexPaths_movementCancelled(&self, indexPaths: &NSArray,previousIndexPaths: &NSArray,movementCancelled: bool,) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UICollectionViewListCell.rs b/crates/icrate-generated/src/UIKit/generated/UICollectionViewListCell.rs new file mode 100644 index 000000000..e9ce32206 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UICollectionViewListCell.rs @@ -0,0 +1,48 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UICollectionViewListCell; + + unsafe impl ClassType for UICollectionViewListCell { + type Super = UICollectionViewCell; + } +); + +extern_methods!( + unsafe impl UICollectionViewListCell { + #[method_id(@__retain_semantics Other defaultContentConfiguration)] + pub unsafe fn defaultContentConfiguration(&self, ) -> Id; + + #[method(indentationLevel)] + pub unsafe fn indentationLevel(&self, ) -> NSInteger; + + #[method(setIndentationLevel:)] + pub unsafe fn setIndentationLevel(&self, indentationLevel: NSInteger,); + + #[method(indentationWidth)] + pub unsafe fn indentationWidth(&self, ) -> CGFloat; + + #[method(setIndentationWidth:)] + pub unsafe fn setIndentationWidth(&self, indentationWidth: CGFloat,); + + #[method(indentsAccessories)] + pub unsafe fn indentsAccessories(&self, ) -> bool; + + #[method(setIndentsAccessories:)] + pub unsafe fn setIndentsAccessories(&self, indentsAccessories: bool,); + + #[method_id(@__retain_semantics Other accessories)] + pub unsafe fn accessories(&self, ) -> Id, Shared>; + + #[method(setAccessories:)] + pub unsafe fn setAccessories(&self, accessories: &NSArray,); + + #[method_id(@__retain_semantics Other separatorLayoutGuide)] + pub unsafe fn separatorLayoutGuide(&self, ) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UICollectionViewTransitionLayout.rs b/crates/icrate-generated/src/UIKit/generated/UICollectionViewTransitionLayout.rs new file mode 100644 index 000000000..c815a2163 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UICollectionViewTransitionLayout.rs @@ -0,0 +1,45 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UICollectionViewTransitionLayout; + + unsafe impl ClassType for UICollectionViewTransitionLayout { + type Super = UICollectionViewLayout; + } +); + +extern_methods!( + unsafe impl UICollectionViewTransitionLayout { + #[method(transitionProgress)] + pub unsafe fn transitionProgress(&self, ) -> CGFloat; + + #[method(setTransitionProgress:)] + pub unsafe fn setTransitionProgress(&self, transitionProgress: CGFloat,); + + #[method_id(@__retain_semantics Other currentLayout)] + pub unsafe fn currentLayout(&self, ) -> Id; + + #[method_id(@__retain_semantics Other nextLayout)] + pub unsafe fn nextLayout(&self, ) -> Id; + + #[method_id(@__retain_semantics Init initWithCurrentLayout:nextLayout:)] + pub unsafe fn initWithCurrentLayout_nextLayout(this: Option>, currentLayout: &UICollectionViewLayout,newLayout: &UICollectionViewLayout,) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method(updateValue:forAnimatedKey:)] + pub unsafe fn updateValue_forAnimatedKey(&self, value: CGFloat,key: &NSString,); + + #[method(valueForAnimatedKey:)] + pub unsafe fn valueForAnimatedKey(&self, key: &NSString,) -> CGFloat; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UICollectionViewUpdateItem.rs b/crates/icrate-generated/src/UIKit/generated/UICollectionViewUpdateItem.rs new file mode 100644 index 000000000..57b61e0cf --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UICollectionViewUpdateItem.rs @@ -0,0 +1,38 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UICollectionUpdateAction { + UICollectionUpdateActionInsert = 0, + UICollectionUpdateActionDelete = 1, + UICollectionUpdateActionReload = 2, + UICollectionUpdateActionMove = 3, + UICollectionUpdateActionNone = 4, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UICollectionViewUpdateItem; + + unsafe impl ClassType for UICollectionViewUpdateItem { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UICollectionViewUpdateItem { + #[method_id(@__retain_semantics Other indexPathBeforeUpdate)] + pub unsafe fn indexPathBeforeUpdate(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other indexPathAfterUpdate)] + pub unsafe fn indexPathAfterUpdate(&self, ) -> Option>; + + #[method(updateAction)] + pub unsafe fn updateAction(&self, ) -> UICollectionUpdateAction; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UICollisionBehavior.rs b/crates/icrate-generated/src/UIKit/generated/UICollisionBehavior.rs new file mode 100644 index 000000000..caddb5ea6 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UICollisionBehavior.rs @@ -0,0 +1,101 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_options!( + #[underlying(NSUInteger)] + pub enum UICollisionBehaviorMode { + UICollisionBehaviorModeItems = 1<<0, + UICollisionBehaviorModeBoundaries = 1<<1, + UICollisionBehaviorModeEverything = 18446744073709551615, + } +); + +extern_protocol!( + pub struct UICollisionBehaviorDelegate; + + unsafe impl UICollisionBehaviorDelegate { + #[optional] + #[method(collisionBehavior:beganContactForItem:withItem:atPoint:)] + pub unsafe fn collisionBehavior_beganContactForItem_withItem_atPoint(&self, behavior: &UICollisionBehavior,item1: &UIDynamicItem,item2: &UIDynamicItem,p: CGPoint,); + + #[optional] + #[method(collisionBehavior:endedContactForItem:withItem:)] + pub unsafe fn collisionBehavior_endedContactForItem_withItem(&self, behavior: &UICollisionBehavior,item1: &UIDynamicItem,item2: &UIDynamicItem,); + + #[optional] + #[method(collisionBehavior:beganContactForItem:withBoundaryIdentifier:atPoint:)] + pub unsafe fn collisionBehavior_beganContactForItem_withBoundaryIdentifier_atPoint(&self, behavior: &UICollisionBehavior,item: &UIDynamicItem,identifier: Option<&NSCopying>,p: CGPoint,); + + #[optional] + #[method(collisionBehavior:endedContactForItem:withBoundaryIdentifier:)] + pub unsafe fn collisionBehavior_endedContactForItem_withBoundaryIdentifier(&self, behavior: &UICollisionBehavior,item: &UIDynamicItem,identifier: Option<&NSCopying>,); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UICollisionBehavior; + + unsafe impl ClassType for UICollisionBehavior { + type Super = UIDynamicBehavior; + } +); + +extern_methods!( + unsafe impl UICollisionBehavior { + #[method_id(@__retain_semantics Init initWithItems:)] + pub unsafe fn initWithItems(this: Option>, items: &NSArray,) -> Id; + + #[method(addItem:)] + pub unsafe fn addItem(&self, item: &UIDynamicItem,); + + #[method(removeItem:)] + pub unsafe fn removeItem(&self, item: &UIDynamicItem,); + + #[method_id(@__retain_semantics Other items)] + pub unsafe fn items(&self, ) -> Id, Shared>; + + #[method(collisionMode)] + pub unsafe fn collisionMode(&self, ) -> UICollisionBehaviorMode; + + #[method(setCollisionMode:)] + pub unsafe fn setCollisionMode(&self, collisionMode: UICollisionBehaviorMode,); + + #[method(translatesReferenceBoundsIntoBoundary)] + pub unsafe fn translatesReferenceBoundsIntoBoundary(&self, ) -> bool; + + #[method(setTranslatesReferenceBoundsIntoBoundary:)] + pub unsafe fn setTranslatesReferenceBoundsIntoBoundary(&self, translatesReferenceBoundsIntoBoundary: bool,); + + #[method(setTranslatesReferenceBoundsIntoBoundaryWithInsets:)] + pub unsafe fn setTranslatesReferenceBoundsIntoBoundaryWithInsets(&self, insets: UIEdgeInsets,); + + #[method(addBoundaryWithIdentifier:forPath:)] + pub unsafe fn addBoundaryWithIdentifier_forPath(&self, identifier: &NSCopying,bezierPath: &UIBezierPath,); + + #[method(addBoundaryWithIdentifier:fromPoint:toPoint:)] + pub unsafe fn addBoundaryWithIdentifier_fromPoint_toPoint(&self, identifier: &NSCopying,p1: CGPoint,p2: CGPoint,); + + #[method_id(@__retain_semantics Other boundaryWithIdentifier:)] + pub unsafe fn boundaryWithIdentifier(&self, identifier: &NSCopying,) -> Option>; + + #[method(removeBoundaryWithIdentifier:)] + pub unsafe fn removeBoundaryWithIdentifier(&self, identifier: &NSCopying,); + + #[method_id(@__retain_semantics Other boundaryIdentifiers)] + pub unsafe fn boundaryIdentifiers(&self, ) -> Option, Shared>>; + + #[method(removeAllBoundaries)] + pub unsafe fn removeAllBoundaries(&self, ); + + #[method_id(@__retain_semantics Other collisionDelegate)] + pub unsafe fn collisionDelegate(&self, ) -> Option>; + + #[method(setCollisionDelegate:)] + pub unsafe fn setCollisionDelegate(&self, collisionDelegate: Option<&UICollisionBehaviorDelegate>,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIColor.rs b/crates/icrate-generated/src/UIKit/generated/UIColor.rs new file mode 100644 index 000000000..7d3c9d599 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIColor.rs @@ -0,0 +1,174 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIColor; + + unsafe impl ClassType for UIColor { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIColor { + #[method_id(@__retain_semantics Other colorWithWhite:alpha:)] + pub unsafe fn colorWithWhite_alpha(white: CGFloat,alpha: CGFloat,) -> Id; + + #[method_id(@__retain_semantics Other colorWithHue:saturation:brightness:alpha:)] + pub unsafe fn colorWithHue_saturation_brightness_alpha(hue: CGFloat,saturation: CGFloat,brightness: CGFloat,alpha: CGFloat,) -> Id; + + #[method_id(@__retain_semantics Other colorWithRed:green:blue:alpha:)] + pub unsafe fn colorWithRed_green_blue_alpha(red: CGFloat,green: CGFloat,blue: CGFloat,alpha: CGFloat,) -> Id; + + #[method_id(@__retain_semantics Other colorWithDisplayP3Red:green:blue:alpha:)] + pub unsafe fn colorWithDisplayP3Red_green_blue_alpha(displayP3Red: CGFloat,green: CGFloat,blue: CGFloat,alpha: CGFloat,) -> Id; + + #[method_id(@__retain_semantics Other colorWithCGColor:)] + pub unsafe fn colorWithCGColor(cgColor: CGColorRef,) -> Id; + + #[method_id(@__retain_semantics Other colorWithPatternImage:)] + pub unsafe fn colorWithPatternImage(image: &UIImage,) -> Id; + + #[method_id(@__retain_semantics Other colorWithCIColor:)] + pub unsafe fn colorWithCIColor(ciColor: &CIColor,) -> Id; + + #[method_id(@__retain_semantics Init initWithWhite:alpha:)] + pub unsafe fn initWithWhite_alpha(this: Option>, white: CGFloat,alpha: CGFloat,) -> Id; + + #[method_id(@__retain_semantics Init initWithHue:saturation:brightness:alpha:)] + pub unsafe fn initWithHue_saturation_brightness_alpha(this: Option>, hue: CGFloat,saturation: CGFloat,brightness: CGFloat,alpha: CGFloat,) -> Id; + + #[method_id(@__retain_semantics Init initWithRed:green:blue:alpha:)] + pub unsafe fn initWithRed_green_blue_alpha(this: Option>, red: CGFloat,green: CGFloat,blue: CGFloat,alpha: CGFloat,) -> Id; + + #[method_id(@__retain_semantics Init initWithDisplayP3Red:green:blue:alpha:)] + pub unsafe fn initWithDisplayP3Red_green_blue_alpha(this: Option>, displayP3Red: CGFloat,green: CGFloat,blue: CGFloat,alpha: CGFloat,) -> Id; + + #[method_id(@__retain_semantics Init initWithCGColor:)] + pub unsafe fn initWithCGColor(this: Option>, cgColor: CGColorRef,) -> Id; + + #[method_id(@__retain_semantics Init initWithPatternImage:)] + pub unsafe fn initWithPatternImage(this: Option>, image: &UIImage,) -> Id; + + #[method_id(@__retain_semantics Init initWithCIColor:)] + pub unsafe fn initWithCIColor(this: Option>, ciColor: &CIColor,) -> Id; + + #[method_id(@__retain_semantics Other blackColor)] + pub unsafe fn blackColor() -> Id; + + #[method_id(@__retain_semantics Other darkGrayColor)] + pub unsafe fn darkGrayColor() -> Id; + + #[method_id(@__retain_semantics Other lightGrayColor)] + pub unsafe fn lightGrayColor() -> Id; + + #[method_id(@__retain_semantics Other whiteColor)] + pub unsafe fn whiteColor() -> Id; + + #[method_id(@__retain_semantics Other grayColor)] + pub unsafe fn grayColor() -> Id; + + #[method_id(@__retain_semantics Other redColor)] + pub unsafe fn redColor() -> Id; + + #[method_id(@__retain_semantics Other greenColor)] + pub unsafe fn greenColor() -> Id; + + #[method_id(@__retain_semantics Other blueColor)] + pub unsafe fn blueColor() -> Id; + + #[method_id(@__retain_semantics Other cyanColor)] + pub unsafe fn cyanColor() -> Id; + + #[method_id(@__retain_semantics Other yellowColor)] + pub unsafe fn yellowColor() -> Id; + + #[method_id(@__retain_semantics Other magentaColor)] + pub unsafe fn magentaColor() -> Id; + + #[method_id(@__retain_semantics Other orangeColor)] + pub unsafe fn orangeColor() -> Id; + + #[method_id(@__retain_semantics Other purpleColor)] + pub unsafe fn purpleColor() -> Id; + + #[method_id(@__retain_semantics Other brownColor)] + pub unsafe fn brownColor() -> Id; + + #[method_id(@__retain_semantics Other clearColor)] + pub unsafe fn clearColor() -> Id; + + #[method(set)] + pub unsafe fn set(&self, ); + + #[method(setFill)] + pub unsafe fn setFill(&self, ); + + #[method(setStroke)] + pub unsafe fn setStroke(&self, ); + + #[method(getWhite:alpha:)] + pub unsafe fn getWhite_alpha(&self, white: *mut CGFloat,alpha: *mut CGFloat,) -> bool; + + #[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,) -> bool; + + #[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,) -> bool; + + #[method_id(@__retain_semantics Other colorWithAlphaComponent:)] + pub unsafe fn colorWithAlphaComponent(&self, alpha: CGFloat,) -> Id; + + #[method(CGColor)] + pub unsafe fn CGColor(&self, ) -> CGColorRef; + + #[method_id(@__retain_semantics Other CIColor)] + pub unsafe fn CIColor(&self, ) -> Id; + + } +); + +extern_methods!( + /// UINSItemProvider + unsafe impl UIColor { + } +); + +extern_methods!( + /// UIKitAdditions + unsafe impl CIColor { + #[method_id(@__retain_semantics Init initWithColor:)] + pub unsafe fn initWithColor(this: Option>, color: &UIColor,) -> Id; + + } +); + +extern_methods!( + /// UIColorNamedColors + unsafe impl UIColor { + #[method_id(@__retain_semantics Other colorNamed:)] + pub unsafe fn colorNamed(name: &NSString,) -> Option>; + + #[method_id(@__retain_semantics Other colorNamed:inBundle:compatibleWithTraitCollection:)] + pub unsafe fn colorNamed_inBundle_compatibleWithTraitCollection(name: &NSString,bundle: Option<&NSBundle>,traitCollection: Option<&UITraitCollection>,) -> Option>; + + } +); + +extern_methods!( + /// DynamicColors + unsafe impl UIColor { + #[method_id(@__retain_semantics Other colorWithDynamicProvider:)] + pub unsafe fn colorWithDynamicProvider(dynamicProvider: &Block<(NonNull, ), NonNull>,) -> Id; + + #[method_id(@__retain_semantics Init initWithDynamicProvider:)] + pub unsafe fn initWithDynamicProvider(this: Option>, dynamicProvider: &Block<(NonNull, ), NonNull>,) -> Id; + + #[method_id(@__retain_semantics Other resolvedColorWithTraitCollection:)] + pub unsafe fn resolvedColorWithTraitCollection(&self, traitCollection: &UITraitCollection,) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIColorPickerViewController.rs b/crates/icrate-generated/src/UIKit/generated/UIColorPickerViewController.rs new file mode 100644 index 000000000..04f84fd41 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIColorPickerViewController.rs @@ -0,0 +1,61 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_protocol!( + pub struct UIColorPickerViewControllerDelegate; + + unsafe impl UIColorPickerViewControllerDelegate { + #[optional] + #[method(colorPickerViewControllerDidSelectColor:)] + pub unsafe fn colorPickerViewControllerDidSelectColor(&self, viewController: &UIColorPickerViewController,); + + #[optional] + #[method(colorPickerViewController:didSelectColor:continuously:)] + pub unsafe fn colorPickerViewController_didSelectColor_continuously(&self, viewController: &UIColorPickerViewController,color: &UIColor,continuously: bool,); + + #[optional] + #[method(colorPickerViewControllerDidFinish:)] + pub unsafe fn colorPickerViewControllerDidFinish(&self, viewController: &UIColorPickerViewController,); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIColorPickerViewController; + + unsafe impl ClassType for UIColorPickerViewController { + type Super = UIViewController; + } +); + +extern_methods!( + unsafe impl UIColorPickerViewController { + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&UIColorPickerViewControllerDelegate>,); + + #[method_id(@__retain_semantics Other selectedColor)] + pub unsafe fn selectedColor(&self, ) -> Id; + + #[method(setSelectedColor:)] + pub unsafe fn setSelectedColor(&self, selectedColor: &UIColor,); + + #[method(supportsAlpha)] + pub unsafe fn supportsAlpha(&self, ) -> bool; + + #[method(setSupportsAlpha:)] + pub unsafe fn setSupportsAlpha(&self, supportsAlpha: bool,); + + #[method_id(@__retain_semantics Init initWithNibName:bundle:)] + pub unsafe fn initWithNibName_bundle(this: Option>, nibNameOrNil: Option<&NSString>,nibBundleOrNil: Option<&NSBundle>,) -> Id; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIColorWell.rs b/crates/icrate-generated/src/UIKit/generated/UIColorWell.rs new file mode 100644 index 000000000..f77ea3c6a --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIColorWell.rs @@ -0,0 +1,36 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIColorWell; + + unsafe impl ClassType for UIColorWell { + type Super = UIControl; + } +); + +extern_methods!( + unsafe impl UIColorWell { + #[method_id(@__retain_semantics Other title)] + pub unsafe fn title(&self, ) -> Option>; + + #[method(setTitle:)] + pub unsafe fn setTitle(&self, title: Option<&NSString>,); + + #[method(supportsAlpha)] + pub unsafe fn supportsAlpha(&self, ) -> bool; + + #[method(setSupportsAlpha:)] + pub unsafe fn setSupportsAlpha(&self, supportsAlpha: bool,); + + #[method_id(@__retain_semantics Other selectedColor)] + pub unsafe fn selectedColor(&self, ) -> Option>; + + #[method(setSelectedColor:)] + pub unsafe fn setSelectedColor(&self, selectedColor: Option<&UIColor>,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UICommand.rs b/crates/icrate-generated/src/UIKit/generated/UICommand.rs new file mode 100644 index 000000000..50b4df583 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UICommand.rs @@ -0,0 +1,121 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_options!( + #[underlying(NSInteger)] + pub enum UIKeyModifierFlags { + UIKeyModifierAlphaShift = 1<<16, + UIKeyModifierShift = 1<<17, + UIKeyModifierControl = 1<<18, + UIKeyModifierAlternate = 1<<19, + UIKeyModifierCommand = 1<<20, + UIKeyModifierNumericPad = 1<<21, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UICommandAlternate; + + unsafe impl ClassType for UICommandAlternate { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UICommandAlternate { + #[method_id(@__retain_semantics Other title)] + pub unsafe fn title(&self, ) -> Id; + + #[method(action)] + pub unsafe fn action(&self, ) -> Sel; + + #[method(modifierFlags)] + pub unsafe fn modifierFlags(&self, ) -> UIKeyModifierFlags; + + #[method_id(@__retain_semantics Other alternateWithTitle:action:modifierFlags:)] + pub unsafe fn alternateWithTitle_action_modifierFlags(title: &NSString,action: Sel,modifierFlags: UIKeyModifierFlags,) -> 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 Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UICommand; + + unsafe impl ClassType for UICommand { + type Super = UIMenuElement; + } +); + +extern_methods!( + unsafe impl UICommand { + #[method_id(@__retain_semantics Other title)] + pub unsafe fn title(&self, ) -> Id; + + #[method(setTitle:)] + pub unsafe fn setTitle(&self, title: &NSString,); + + #[method_id(@__retain_semantics Other image)] + pub unsafe fn image(&self, ) -> Option>; + + #[method(setImage:)] + pub unsafe fn setImage(&self, image: Option<&UIImage>,); + + #[method_id(@__retain_semantics Other discoverabilityTitle)] + pub unsafe fn discoverabilityTitle(&self, ) -> Option>; + + #[method(setDiscoverabilityTitle:)] + pub unsafe fn setDiscoverabilityTitle(&self, discoverabilityTitle: Option<&NSString>,); + + #[method(action)] + pub unsafe fn action(&self, ) -> Sel; + + #[method_id(@__retain_semantics Other propertyList)] + pub unsafe fn propertyList(&self, ) -> Option>; + + #[method(attributes)] + pub unsafe fn attributes(&self, ) -> UIMenuElementAttributes; + + #[method(setAttributes:)] + pub unsafe fn setAttributes(&self, attributes: UIMenuElementAttributes,); + + #[method(state)] + pub unsafe fn state(&self, ) -> UIMenuElementState; + + #[method(setState:)] + pub unsafe fn setState(&self, state: UIMenuElementState,); + + #[method_id(@__retain_semantics Other alternates)] + pub unsafe fn alternates(&self, ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other commandWithTitle:image:action:propertyList:)] + pub unsafe fn commandWithTitle_image_action_propertyList(title: &NSString,image: Option<&UIImage>,action: Sel,propertyList: Option<&Object>,) -> Id; + + #[method_id(@__retain_semantics Other commandWithTitle:image:action:propertyList:alternates:)] + pub unsafe fn commandWithTitle_image_action_propertyList_alternates(title: &NSString,image: Option<&UIImage>,action: Sel,propertyList: Option<&Object>,alternates: &NSArray,) -> 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 Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + } +); + +extern_static!(UICommandTagShare: &'static NSString); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIConfigurationColorTransformer.rs b/crates/icrate-generated/src/UIKit/generated/UIConfigurationColorTransformer.rs new file mode 100644 index 000000000..f4c039b48 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIConfigurationColorTransformer.rs @@ -0,0 +1,12 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +pub type UIConfigurationColorTransformer = *mut Block<(NonNull, ), NonNull>; + +extern_static!(UIConfigurationColorTransformerGrayscale: UIConfigurationColorTransformer); + +extern_static!(UIConfigurationColorTransformerPreferredTint: UIConfigurationColorTransformer); + +extern_static!(UIConfigurationColorTransformerMonochromeTint: UIConfigurationColorTransformer); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIConfigurationState.rs b/crates/icrate-generated/src/UIKit/generated/UIConfigurationState.rs new file mode 100644 index 000000000..019e434f3 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIConfigurationState.rs @@ -0,0 +1,34 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +pub type UIConfigurationStateCustomKey = NSString; + +extern_protocol!( + pub struct UIConfigurationState; + + unsafe impl UIConfigurationState { + #[method_id(@__retain_semantics Init initWithTraitCollection:)] + pub unsafe fn initWithTraitCollection(this: Option>, traitCollection: &UITraitCollection,) -> Id; + + #[method_id(@__retain_semantics Other traitCollection)] + pub unsafe fn traitCollection(&self, ) -> Id; + + #[method(setTraitCollection:)] + pub unsafe fn setTraitCollection(&self, traitCollection: &UITraitCollection,); + + #[method_id(@__retain_semantics Other customStateForKey:)] + pub unsafe fn customStateForKey(&self, key: &UIConfigurationStateCustomKey,) -> Option>; + + #[method(setCustomState:forKey:)] + pub unsafe fn setCustomState_forKey(&self, customState: Option<&Object>,key: &UIConfigurationStateCustomKey,); + + #[method_id(@__retain_semantics Other objectForKeyedSubscript:)] + pub unsafe fn objectForKeyedSubscript(&self, key: &UIConfigurationStateCustomKey,) -> Option>; + + #[method(setObject:forKeyedSubscript:)] + pub unsafe fn setObject_forKeyedSubscript(&self, obj: Option<&Object>,key: &UIConfigurationStateCustomKey,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIContentConfiguration.rs b/crates/icrate-generated/src/UIKit/generated/UIContentConfiguration.rs new file mode 100644 index 000000000..9bf3de238 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIContentConfiguration.rs @@ -0,0 +1,34 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_protocol!( + pub struct UIContentConfiguration; + + unsafe impl UIContentConfiguration { + #[method_id(@__retain_semantics Other makeContentView)] + pub unsafe fn makeContentView(&self, ) -> Id; + + #[method_id(@__retain_semantics Other updatedConfigurationForState:)] + pub unsafe fn updatedConfigurationForState(&self, state: &UIConfigurationState,) -> Id; + + } +); + +extern_protocol!( + pub struct UIContentView; + + unsafe impl UIContentView { + #[method_id(@__retain_semantics Other configuration)] + pub unsafe fn configuration(&self, ) -> Id; + + #[method(setConfiguration:)] + pub unsafe fn setConfiguration(&self, configuration: &UIContentConfiguration,); + + #[optional] + #[method(supportsConfiguration:)] + pub unsafe fn supportsConfiguration(&self, configuration: &UIContentConfiguration,) -> bool; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIContentSizeCategory.rs b/crates/icrate-generated/src/UIKit/generated/UIContentSizeCategory.rs new file mode 100644 index 000000000..f807c7624 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIContentSizeCategory.rs @@ -0,0 +1,44 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +pub type UIContentSizeCategory = NSString; + +extern_static!(UIContentSizeCategoryUnspecified: &'static UIContentSizeCategory); + +extern_static!(UIContentSizeCategoryExtraSmall: &'static UIContentSizeCategory); + +extern_static!(UIContentSizeCategorySmall: &'static UIContentSizeCategory); + +extern_static!(UIContentSizeCategoryMedium: &'static UIContentSizeCategory); + +extern_static!(UIContentSizeCategoryLarge: &'static UIContentSizeCategory); + +extern_static!(UIContentSizeCategoryExtraLarge: &'static UIContentSizeCategory); + +extern_static!(UIContentSizeCategoryExtraExtraLarge: &'static UIContentSizeCategory); + +extern_static!(UIContentSizeCategoryExtraExtraExtraLarge: &'static UIContentSizeCategory); + +extern_static!(UIContentSizeCategoryAccessibilityMedium: &'static UIContentSizeCategory); + +extern_static!(UIContentSizeCategoryAccessibilityLarge: &'static UIContentSizeCategory); + +extern_static!(UIContentSizeCategoryAccessibilityExtraLarge: &'static UIContentSizeCategory); + +extern_static!(UIContentSizeCategoryAccessibilityExtraExtraLarge: &'static UIContentSizeCategory); + +extern_static!(UIContentSizeCategoryAccessibilityExtraExtraExtraLarge: &'static UIContentSizeCategory); + +extern_static!(UIContentSizeCategoryDidChangeNotification: &'static NSNotificationName); + +extern_static!(UIContentSizeCategoryNewValueKey: &'static NSString); + +extern_fn!( + pub unsafe fn UIContentSizeCategoryIsAccessibilityCategory(category: &UIContentSizeCategory,) -> Bool; +); + +extern_fn!( + pub unsafe fn UIContentSizeCategoryCompareToCategory(lhs: &UIContentSizeCategory,rhs: &UIContentSizeCategory,) -> NSComparisonResult; +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIContentSizeCategoryAdjusting.rs b/crates/icrate-generated/src/UIKit/generated/UIContentSizeCategoryAdjusting.rs new file mode 100644 index 000000000..aa27012b9 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIContentSizeCategoryAdjusting.rs @@ -0,0 +1,17 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_protocol!( + pub struct UIContentSizeCategoryAdjusting; + + unsafe impl UIContentSizeCategoryAdjusting { + #[method(adjustsFontForContentSizeCategory)] + pub unsafe fn adjustsFontForContentSizeCategory(&self, ) -> bool; + + #[method(setAdjustsFontForContentSizeCategory:)] + pub unsafe fn setAdjustsFontForContentSizeCategory(&self, adjustsFontForContentSizeCategory: bool,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIContextMenuConfiguration.rs b/crates/icrate-generated/src/UIKit/generated/UIContextMenuConfiguration.rs new file mode 100644 index 000000000..3e835630a --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIContextMenuConfiguration.rs @@ -0,0 +1,55 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIContextMenuConfigurationElementOrder { + UIContextMenuConfigurationElementOrderAutomatic = 0, + UIContextMenuConfigurationElementOrderPriority = 1, + UIContextMenuConfigurationElementOrderFixed = 2, + } +); + +pub type UIContextMenuActionProvider = *mut Block<(NonNull>, ), *mut UIMenu>; + +pub type UIContextMenuContentPreviewProvider = *mut Block<(), *mut UIViewController>; + +extern_class!( + #[derive(Debug)] + pub struct UIContextMenuConfiguration; + + unsafe impl ClassType for UIContextMenuConfiguration { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIContextMenuConfiguration { + #[method_id(@__retain_semantics Other identifier)] + pub unsafe fn identifier(&self, ) -> Id; + + #[method_id(@__retain_semantics Other secondaryItemIdentifiers)] + pub unsafe fn secondaryItemIdentifiers(&self, ) -> Id, Shared>; + + #[method(setSecondaryItemIdentifiers:)] + pub unsafe fn setSecondaryItemIdentifiers(&self, secondaryItemIdentifiers: &NSSet,); + + #[method(badgeCount)] + pub unsafe fn badgeCount(&self, ) -> NSInteger; + + #[method(setBadgeCount:)] + pub unsafe fn setBadgeCount(&self, badgeCount: NSInteger,); + + #[method(preferredMenuElementOrder)] + pub unsafe fn preferredMenuElementOrder(&self, ) -> UIContextMenuConfigurationElementOrder; + + #[method(setPreferredMenuElementOrder:)] + pub unsafe fn setPreferredMenuElementOrder(&self, preferredMenuElementOrder: UIContextMenuConfigurationElementOrder,); + + #[method_id(@__retain_semantics Other configurationWithIdentifier:previewProvider:actionProvider:)] + pub unsafe fn configurationWithIdentifier_previewProvider_actionProvider(identifier: Option<&NSCopying>,previewProvider: UIContextMenuContentPreviewProvider,actionProvider: UIContextMenuActionProvider,) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIContextMenuInteraction.rs b/crates/icrate-generated/src/UIKit/generated/UIContextMenuInteraction.rs new file mode 100644 index 000000000..62212541f --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIContextMenuInteraction.rs @@ -0,0 +1,126 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIContextMenuInteractionCommitStyle { + UIContextMenuInteractionCommitStyleDismiss = 0, + UIContextMenuInteractionCommitStylePop = 1, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIContextMenuInteractionAppearance { + UIContextMenuInteractionAppearanceUnknown = 0, + UIContextMenuInteractionAppearanceRich = 1, + UIContextMenuInteractionAppearanceCompact = 2, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIContextMenuInteraction; + + unsafe impl ClassType for UIContextMenuInteraction { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIContextMenuInteraction { + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(menuAppearance)] + pub unsafe fn menuAppearance(&self, ) -> UIContextMenuInteractionAppearance; + + #[method_id(@__retain_semantics Init initWithDelegate:)] + pub unsafe fn initWithDelegate(this: Option>, delegate: &UIContextMenuInteractionDelegate,) -> 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; + + #[method(locationInView:)] + pub unsafe fn locationInView(&self, view: Option<&UIView>,) -> CGPoint; + + #[method(updateVisibleMenuWithBlock:)] + pub unsafe fn updateVisibleMenuWithBlock(&self, block: &Block<(NonNull, ), NonNull>,); + + #[method(dismissMenu)] + pub unsafe fn dismissMenu(&self, ); + + } +); + +extern_protocol!( + pub struct UIContextMenuInteractionAnimating; + + unsafe impl UIContextMenuInteractionAnimating { + #[method_id(@__retain_semantics Other previewViewController)] + pub unsafe fn previewViewController(&self, ) -> Option>; + + #[method(addAnimations:)] + pub unsafe fn addAnimations(&self, animations: &Block<(), ()>,); + + #[method(addCompletion:)] + pub unsafe fn addCompletion(&self, completion: &Block<(), ()>,); + + } +); + +extern_protocol!( + pub struct UIContextMenuInteractionCommitAnimating; + + unsafe impl UIContextMenuInteractionCommitAnimating { + #[method(preferredCommitStyle)] + pub unsafe fn preferredCommitStyle(&self, ) -> UIContextMenuInteractionCommitStyle; + + #[method(setPreferredCommitStyle:)] + pub unsafe fn setPreferredCommitStyle(&self, preferredCommitStyle: UIContextMenuInteractionCommitStyle,); + + } +); + +extern_protocol!( + pub struct UIContextMenuInteractionDelegate; + + unsafe impl UIContextMenuInteractionDelegate { + #[method_id(@__retain_semantics Other contextMenuInteraction:configurationForMenuAtLocation:)] + pub unsafe fn contextMenuInteraction_configurationForMenuAtLocation(&self, interaction: &UIContextMenuInteraction,location: CGPoint,) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other contextMenuInteraction:configuration:highlightPreviewForItemWithIdentifier:)] + pub unsafe fn contextMenuInteraction_configuration_highlightPreviewForItemWithIdentifier(&self, interaction: &UIContextMenuInteraction,configuration: &UIContextMenuConfiguration,identifier: &NSCopying,) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other contextMenuInteraction:configuration:dismissalPreviewForItemWithIdentifier:)] + pub unsafe fn contextMenuInteraction_configuration_dismissalPreviewForItemWithIdentifier(&self, interaction: &UIContextMenuInteraction,configuration: &UIContextMenuConfiguration,identifier: &NSCopying,) -> Option>; + + #[optional] + #[method(contextMenuInteraction:willPerformPreviewActionForMenuWithConfiguration:animator:)] + pub unsafe fn contextMenuInteraction_willPerformPreviewActionForMenuWithConfiguration_animator(&self, interaction: &UIContextMenuInteraction,configuration: &UIContextMenuConfiguration,animator: &UIContextMenuInteractionCommitAnimating,); + + #[optional] + #[method(contextMenuInteraction:willDisplayMenuForConfiguration:animator:)] + pub unsafe fn contextMenuInteraction_willDisplayMenuForConfiguration_animator(&self, interaction: &UIContextMenuInteraction,configuration: &UIContextMenuConfiguration,animator: Option<&UIContextMenuInteractionAnimating>,); + + #[optional] + #[method(contextMenuInteraction:willEndForConfiguration:animator:)] + pub unsafe fn contextMenuInteraction_willEndForConfiguration_animator(&self, interaction: &UIContextMenuInteraction,configuration: &UIContextMenuConfiguration,animator: Option<&UIContextMenuInteractionAnimating>,); + + #[optional] + #[method_id(@__retain_semantics Other contextMenuInteraction:previewForHighlightingMenuWithConfiguration:)] + pub unsafe fn contextMenuInteraction_previewForHighlightingMenuWithConfiguration(&self, interaction: &UIContextMenuInteraction,configuration: &UIContextMenuConfiguration,) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other contextMenuInteraction:previewForDismissingMenuWithConfiguration:)] + pub unsafe fn contextMenuInteraction_previewForDismissingMenuWithConfiguration(&self, interaction: &UIContextMenuInteraction,configuration: &UIContextMenuConfiguration,) -> Option>; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIContextualAction.rs b/crates/icrate-generated/src/UIKit/generated/UIContextualAction.rs new file mode 100644 index 000000000..e4d082def --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIContextualAction.rs @@ -0,0 +1,55 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +pub type UIContextualActionHandler = *mut Block<(NonNull, NonNull, NonNull>, ), ()>; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIContextualActionStyle { + UIContextualActionStyleNormal = 0, + UIContextualActionStyleDestructive = 1, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIContextualAction; + + unsafe impl ClassType for UIContextualAction { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIContextualAction { + #[method_id(@__retain_semantics Other contextualActionWithStyle:title:handler:)] + pub unsafe fn contextualActionWithStyle_title_handler(style: UIContextualActionStyle,title: Option<&NSString>,handler: UIContextualActionHandler,) -> Id; + + #[method(style)] + pub unsafe fn style(&self, ) -> UIContextualActionStyle; + + #[method(handler)] + pub unsafe fn handler(&self, ) -> UIContextualActionHandler; + + #[method_id(@__retain_semantics Other title)] + pub unsafe fn title(&self, ) -> Option>; + + #[method(setTitle:)] + pub unsafe fn setTitle(&self, title: Option<&NSString>,); + + #[method_id(@__retain_semantics Other backgroundColor)] + pub unsafe fn backgroundColor(&self, ) -> Id; + + #[method(setBackgroundColor:)] + pub unsafe fn setBackgroundColor(&self, backgroundColor: Option<&UIColor>,); + + #[method_id(@__retain_semantics Other image)] + pub unsafe fn image(&self, ) -> Option>; + + #[method(setImage:)] + pub unsafe fn setImage(&self, image: Option<&UIImage>,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIControl.rs b/crates/icrate-generated/src/UIKit/generated/UIControl.rs new file mode 100644 index 000000000..46cf8723e --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIControl.rs @@ -0,0 +1,229 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_options!( + #[underlying(NSUInteger)] + pub enum UIControlEvents { + UIControlEventTouchDown = 1<<0, + UIControlEventTouchDownRepeat = 1<<1, + UIControlEventTouchDragInside = 1<<2, + UIControlEventTouchDragOutside = 1<<3, + UIControlEventTouchDragEnter = 1<<4, + UIControlEventTouchDragExit = 1<<5, + UIControlEventTouchUpInside = 1<<6, + UIControlEventTouchUpOutside = 1<<7, + UIControlEventTouchCancel = 1<<8, + UIControlEventValueChanged = 1<<12, + UIControlEventPrimaryActionTriggered = 1<<13, + UIControlEventMenuActionTriggered = 1<<14, + UIControlEventEditingDidBegin = 1<<16, + UIControlEventEditingChanged = 1<<17, + UIControlEventEditingDidEnd = 1<<18, + UIControlEventEditingDidEndOnExit = 1<<19, + UIControlEventAllTouchEvents = 0x00000FFF, + UIControlEventAllEditingEvents = 0x000F0000, + UIControlEventApplicationReserved = 0x0F000000, + UIControlEventSystemReserved = 0xF0000000, + UIControlEventAllEvents = 0xFFFFFFFF, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIControlContentVerticalAlignment { + UIControlContentVerticalAlignmentCenter = 0, + UIControlContentVerticalAlignmentTop = 1, + UIControlContentVerticalAlignmentBottom = 2, + UIControlContentVerticalAlignmentFill = 3, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIControlContentHorizontalAlignment { + UIControlContentHorizontalAlignmentCenter = 0, + UIControlContentHorizontalAlignmentLeft = 1, + UIControlContentHorizontalAlignmentRight = 2, + UIControlContentHorizontalAlignmentFill = 3, + UIControlContentHorizontalAlignmentLeading = 4, + UIControlContentHorizontalAlignmentTrailing = 5, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum UIControlState { + UIControlStateNormal = 0, + UIControlStateHighlighted = 1<<0, + UIControlStateDisabled = 1<<1, + UIControlStateSelected = 1<<2, + UIControlStateFocused = 1<<3, + UIControlStateApplication = 0x00FF0000, + UIControlStateReserved = 0xFF000000, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIControl; + + unsafe impl ClassType for UIControl { + type Super = UIView; + } +); + +extern_methods!( + unsafe impl UIControl { + #[method_id(@__retain_semantics Init initWithFrame:)] + pub unsafe fn initWithFrame(this: Option>, frame: CGRect,) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method_id(@__retain_semantics Init initWithFrame:primaryAction:)] + pub unsafe fn initWithFrame_primaryAction(this: Option>, frame: CGRect,primaryAction: Option<&UIAction>,) -> Id; + + #[method(isEnabled)] + pub unsafe fn isEnabled(&self, ) -> bool; + + #[method(setEnabled:)] + pub unsafe fn setEnabled(&self, enabled: bool,); + + #[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(contentVerticalAlignment)] + pub unsafe fn contentVerticalAlignment(&self, ) -> UIControlContentVerticalAlignment; + + #[method(setContentVerticalAlignment:)] + pub unsafe fn setContentVerticalAlignment(&self, contentVerticalAlignment: UIControlContentVerticalAlignment,); + + #[method(contentHorizontalAlignment)] + pub unsafe fn contentHorizontalAlignment(&self, ) -> UIControlContentHorizontalAlignment; + + #[method(setContentHorizontalAlignment:)] + pub unsafe fn setContentHorizontalAlignment(&self, contentHorizontalAlignment: UIControlContentHorizontalAlignment,); + + #[method(effectiveContentHorizontalAlignment)] + pub unsafe fn effectiveContentHorizontalAlignment(&self, ) -> UIControlContentHorizontalAlignment; + + #[method(state)] + pub unsafe fn state(&self, ) -> UIControlState; + + #[method(isTracking)] + pub unsafe fn isTracking(&self, ) -> bool; + + #[method(isTouchInside)] + pub unsafe fn isTouchInside(&self, ) -> bool; + + #[method(beginTrackingWithTouch:withEvent:)] + pub unsafe fn beginTrackingWithTouch_withEvent(&self, touch: &UITouch,event: Option<&UIEvent>,) -> bool; + + #[method(continueTrackingWithTouch:withEvent:)] + pub unsafe fn continueTrackingWithTouch_withEvent(&self, touch: &UITouch,event: Option<&UIEvent>,) -> bool; + + #[method(endTrackingWithTouch:withEvent:)] + pub unsafe fn endTrackingWithTouch_withEvent(&self, touch: Option<&UITouch>,event: Option<&UIEvent>,); + + #[method(cancelTrackingWithEvent:)] + pub unsafe fn cancelTrackingWithEvent(&self, event: Option<&UIEvent>,); + + #[method(addTarget:action:forControlEvents:)] + pub unsafe fn addTarget_action_forControlEvents(&self, target: Option<&Object>,action: Sel,controlEvents: UIControlEvents,); + + #[method(removeTarget:action:forControlEvents:)] + pub unsafe fn removeTarget_action_forControlEvents(&self, target: Option<&Object>,action: OptionSel,controlEvents: UIControlEvents,); + + #[method(addAction:forControlEvents:)] + pub unsafe fn addAction_forControlEvents(&self, action: &UIAction,controlEvents: UIControlEvents,); + + #[method(removeAction:forControlEvents:)] + pub unsafe fn removeAction_forControlEvents(&self, action: &UIAction,controlEvents: UIControlEvents,); + + #[method(removeActionForIdentifier:forControlEvents:)] + pub unsafe fn removeActionForIdentifier_forControlEvents(&self, actionIdentifier: &UIActionIdentifier,controlEvents: UIControlEvents,); + + #[method_id(@__retain_semantics Other allTargets)] + pub unsafe fn allTargets(&self, ) -> Id; + + #[method(allControlEvents)] + pub unsafe fn allControlEvents(&self, ) -> UIControlEvents; + + #[method_id(@__retain_semantics Other actionsForTarget:forControlEvent:)] + pub unsafe fn actionsForTarget_forControlEvent(&self, target: Option<&Object>,controlEvent: UIControlEvents,) -> Option, Shared>>; + + #[method(enumerateEventHandlers:)] + pub unsafe fn enumerateEventHandlers(&self, iterator: &Block<(*mut UIAction, *mut Object, OptionSel, UIControlEvents, NonNull, ), ()>,); + + #[method(sendAction:to:forEvent:)] + pub unsafe fn sendAction_to_forEvent(&self, action: Sel,target: Option<&Object>,event: Option<&UIEvent>,); + + #[method(sendAction:)] + pub unsafe fn sendAction(&self, action: &UIAction,); + + #[method(sendActionsForControlEvents:)] + pub unsafe fn sendActionsForControlEvents(&self, controlEvents: UIControlEvents,); + + #[method_id(@__retain_semantics Other contextMenuInteraction)] + pub unsafe fn contextMenuInteraction(&self, ) -> Option>; + + #[method(isContextMenuInteractionEnabled)] + pub unsafe fn isContextMenuInteractionEnabled(&self, ) -> bool; + + #[method(setContextMenuInteractionEnabled:)] + pub unsafe fn setContextMenuInteractionEnabled(&self, contextMenuInteractionEnabled: bool,); + + #[method(showsMenuAsPrimaryAction)] + pub unsafe fn showsMenuAsPrimaryAction(&self, ) -> bool; + + #[method(setShowsMenuAsPrimaryAction:)] + pub unsafe fn setShowsMenuAsPrimaryAction(&self, showsMenuAsPrimaryAction: bool,); + + #[method(menuAttachmentPointForConfiguration:)] + pub unsafe fn menuAttachmentPointForConfiguration(&self, configuration: &UIContextMenuConfiguration,) -> CGPoint; + + #[method_id(@__retain_semantics Other toolTip)] + pub unsafe fn toolTip(&self, ) -> Option>; + + #[method(setToolTip:)] + pub unsafe fn setToolTip(&self, toolTip: Option<&NSString>,); + + #[method_id(@__retain_semantics Other toolTipInteraction)] + pub unsafe fn toolTipInteraction(&self, ) -> Option>; + + } +); + +extern_methods!( + unsafe impl UIControl { + #[method_id(@__retain_semantics Other contextMenuInteraction:configurationForMenuAtLocation:)] + pub unsafe fn contextMenuInteraction_configurationForMenuAtLocation(&self, interaction: &UIContextMenuInteraction,location: CGPoint,) -> Option>; + + #[method_id(@__retain_semantics Other contextMenuInteraction:previewForHighlightingMenuWithConfiguration:)] + pub unsafe fn contextMenuInteraction_previewForHighlightingMenuWithConfiguration(&self, interaction: &UIContextMenuInteraction,configuration: &UIContextMenuConfiguration,) -> Option>; + + #[method_id(@__retain_semantics Other contextMenuInteraction:previewForDismissingMenuWithConfiguration:)] + pub unsafe fn contextMenuInteraction_previewForDismissingMenuWithConfiguration(&self, interaction: &UIContextMenuInteraction,configuration: &UIContextMenuConfiguration,) -> Option>; + + #[method(contextMenuInteraction:willDisplayMenuForConfiguration:animator:)] + pub unsafe fn contextMenuInteraction_willDisplayMenuForConfiguration_animator(&self, interaction: &UIContextMenuInteraction,configuration: &UIContextMenuConfiguration,animator: Option<&UIContextMenuInteractionAnimating>,); + + #[method(contextMenuInteraction:willEndForConfiguration:animator:)] + pub unsafe fn contextMenuInteraction_willEndForConfiguration_animator(&self, interaction: &UIContextMenuInteraction,configuration: &UIContextMenuConfiguration,animator: Option<&UIContextMenuInteractionAnimating>,); + + #[method(contextMenuInteraction:willPerformPreviewActionForMenuWithConfiguration:animator:)] + pub unsafe fn contextMenuInteraction_willPerformPreviewActionForMenuWithConfiguration_animator(&self, interaction: &UIContextMenuInteraction,configuration: &UIContextMenuConfiguration,animator: &UIContextMenuInteractionCommitAnimating,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIDataDetectors.rs b/crates/icrate-generated/src/UIKit/generated/UIDataDetectors.rs new file mode 100644 index 000000000..ee6b0887f --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIDataDetectors.rs @@ -0,0 +1,21 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_options!( + #[underlying(NSUInteger)] + pub enum UIDataDetectorTypes { + UIDataDetectorTypePhoneNumber = 1<<0, + UIDataDetectorTypeLink = 1<<1, + UIDataDetectorTypeAddress = 1<<2, + UIDataDetectorTypeCalendarEvent = 1<<3, + UIDataDetectorTypeShipmentTrackingNumber = 1<<4, + UIDataDetectorTypeFlightNumber = 1<<5, + UIDataDetectorTypeLookupSuggestion = 1<<6, + UIDataDetectorTypeMoney = 1<<7, + UIDataDetectorTypePhysicalValue = 1<<8, + UIDataDetectorTypeNone = 0, + UIDataDetectorTypeAll = 18446744073709551615, + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIDataSourceTranslating.rs b/crates/icrate-generated/src/UIKit/generated/UIDataSourceTranslating.rs new file mode 100644 index 000000000..8b7f1c279 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIDataSourceTranslating.rs @@ -0,0 +1,26 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_protocol!( + pub struct UIDataSourceTranslating; + + unsafe impl UIDataSourceTranslating { + #[method(presentationSectionIndexForDataSourceSectionIndex:)] + pub unsafe fn presentationSectionIndexForDataSourceSectionIndex(&self, dataSourceSectionIndex: NSInteger,) -> NSInteger; + + #[method(dataSourceSectionIndexForPresentationSectionIndex:)] + pub unsafe fn dataSourceSectionIndexForPresentationSectionIndex(&self, presentationSectionIndex: NSInteger,) -> NSInteger; + + #[method_id(@__retain_semantics Other presentationIndexPathForDataSourceIndexPath:)] + pub unsafe fn presentationIndexPathForDataSourceIndexPath(&self, dataSourceIndexPath: Option<&NSIndexPath>,) -> Option>; + + #[method_id(@__retain_semantics Other dataSourceIndexPathForPresentationIndexPath:)] + pub unsafe fn dataSourceIndexPathForPresentationIndexPath(&self, presentationIndexPath: Option<&NSIndexPath>,) -> Option>; + + #[method(performUsingPresentationValues:)] + pub unsafe fn performUsingPresentationValues(&self, actionsToTranslate: &Block<(), ()>,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIDatePicker.rs b/crates/icrate-generated/src/UIKit/generated/UIDatePicker.rs new file mode 100644 index 000000000..fd03b6726 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIDatePicker.rs @@ -0,0 +1,110 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIDatePickerMode { + UIDatePickerModeTime = 0, + UIDatePickerModeDate = 1, + UIDatePickerModeDateAndTime = 2, + UIDatePickerModeCountDownTimer = 3, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIDatePickerStyle { + UIDatePickerStyleAutomatic = 0, + UIDatePickerStyleWheels = 1, + UIDatePickerStyleCompact = 2, + UIDatePickerStyleInline = 3, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIDatePicker; + + unsafe impl ClassType for UIDatePicker { + type Super = UIControl; + } +); + +extern_methods!( + unsafe impl UIDatePicker { + #[method(datePickerMode)] + pub unsafe fn datePickerMode(&self, ) -> UIDatePickerMode; + + #[method(setDatePickerMode:)] + pub unsafe fn setDatePickerMode(&self, datePickerMode: UIDatePickerMode,); + + #[method_id(@__retain_semantics Other locale)] + pub unsafe fn locale(&self, ) -> Option>; + + #[method(setLocale:)] + pub unsafe fn setLocale(&self, locale: Option<&NSLocale>,); + + #[method_id(@__retain_semantics Other calendar)] + pub unsafe fn calendar(&self, ) -> Id; + + #[method(setCalendar:)] + pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>,); + + #[method_id(@__retain_semantics Other timeZone)] + pub unsafe fn timeZone(&self, ) -> Option>; + + #[method(setTimeZone:)] + pub unsafe fn setTimeZone(&self, timeZone: Option<&NSTimeZone>,); + + #[method_id(@__retain_semantics Other date)] + pub unsafe fn date(&self, ) -> Id; + + #[method(setDate:)] + pub unsafe fn setDate(&self, date: &NSDate,); + + #[method_id(@__retain_semantics Other minimumDate)] + pub unsafe fn minimumDate(&self, ) -> Option>; + + #[method(setMinimumDate:)] + pub unsafe fn setMinimumDate(&self, minimumDate: Option<&NSDate>,); + + #[method_id(@__retain_semantics Other maximumDate)] + pub unsafe fn maximumDate(&self, ) -> Option>; + + #[method(setMaximumDate:)] + pub unsafe fn setMaximumDate(&self, maximumDate: Option<&NSDate>,); + + #[method(countDownDuration)] + pub unsafe fn countDownDuration(&self, ) -> NSTimeInterval; + + #[method(setCountDownDuration:)] + pub unsafe fn setCountDownDuration(&self, countDownDuration: NSTimeInterval,); + + #[method(minuteInterval)] + pub unsafe fn minuteInterval(&self, ) -> NSInteger; + + #[method(setMinuteInterval:)] + pub unsafe fn setMinuteInterval(&self, minuteInterval: NSInteger,); + + #[method(setDate:animated:)] + pub unsafe fn setDate_animated(&self, date: &NSDate,animated: bool,); + + #[method(preferredDatePickerStyle)] + pub unsafe fn preferredDatePickerStyle(&self, ) -> UIDatePickerStyle; + + #[method(setPreferredDatePickerStyle:)] + pub unsafe fn setPreferredDatePickerStyle(&self, preferredDatePickerStyle: UIDatePickerStyle,); + + #[method(datePickerStyle)] + pub unsafe fn datePickerStyle(&self, ) -> UIDatePickerStyle; + + #[method(roundsToMinuteInterval)] + pub unsafe fn roundsToMinuteInterval(&self, ) -> bool; + + #[method(setRoundsToMinuteInterval:)] + pub unsafe fn setRoundsToMinuteInterval(&self, roundsToMinuteInterval: bool,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIDeferredMenuElement.rs b/crates/icrate-generated/src/UIKit/generated/UIDeferredMenuElement.rs new file mode 100644 index 000000000..f07af0ef0 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIDeferredMenuElement.rs @@ -0,0 +1,24 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIDeferredMenuElement; + + unsafe impl ClassType for UIDeferredMenuElement { + type Super = UIMenuElement; + } +); + +extern_methods!( + unsafe impl UIDeferredMenuElement { + #[method_id(@__retain_semantics Other elementWithProvider:)] + pub unsafe fn elementWithProvider(elementProvider: &Block<(NonNull>, ), ()>>, ), ()>,) -> Id; + + #[method_id(@__retain_semantics Other elementWithUncachedProvider:)] + pub unsafe fn elementWithUncachedProvider(elementProvider: &Block<(NonNull>, ), ()>>, ), ()>,) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIDevice.rs b/crates/icrate-generated/src/UIKit/generated/UIDevice.rs new file mode 100644 index 000000000..51bdf68d2 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIDevice.rs @@ -0,0 +1,165 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIDeviceOrientation { + UIDeviceOrientationUnknown = 0, + UIDeviceOrientationPortrait = 1, + UIDeviceOrientationPortraitUpsideDown = 2, + UIDeviceOrientationLandscapeLeft = 3, + UIDeviceOrientationLandscapeRight = 4, + UIDeviceOrientationFaceUp = 5, + UIDeviceOrientationFaceDown = 6, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIDeviceBatteryState { + UIDeviceBatteryStateUnknown = 0, + UIDeviceBatteryStateUnplugged = 1, + UIDeviceBatteryStateCharging = 2, + UIDeviceBatteryStateFull = 3, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIUserInterfaceIdiom { + UIUserInterfaceIdiomUnspecified = -1, + UIUserInterfaceIdiomPhone = 0, + UIUserInterfaceIdiomPad = 1, + UIUserInterfaceIdiomTV = 2, + UIUserInterfaceIdiomCarPlay = 3, + UIUserInterfaceIdiomMac = 5, + } +); + +inline_fn!( + pub unsafe fn UIDeviceOrientationIsPortrait(orientation: UIDeviceOrientation,) -> Bool { + todo!() + } +); + +inline_fn!( + pub unsafe fn UIDeviceOrientationIsLandscape(orientation: UIDeviceOrientation,) -> Bool { + todo!() + } +); + +inline_fn!( + pub unsafe fn UIDeviceOrientationIsFlat(orientation: UIDeviceOrientation,) -> Bool { + todo!() + } +); + +inline_fn!( + pub unsafe fn UIDeviceOrientationIsValidInterfaceOrientation(orientation: UIDeviceOrientation,) -> Bool { + todo!() + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIDevice; + + unsafe impl ClassType for UIDevice { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIDevice { + #[method_id(@__retain_semantics Other currentDevice)] + pub unsafe fn currentDevice() -> Id; + + #[method_id(@__retain_semantics Other name)] + pub unsafe fn name(&self, ) -> Id; + + #[method_id(@__retain_semantics Other model)] + pub unsafe fn model(&self, ) -> Id; + + #[method_id(@__retain_semantics Other localizedModel)] + pub unsafe fn localizedModel(&self, ) -> Id; + + #[method_id(@__retain_semantics Other systemName)] + pub unsafe fn systemName(&self, ) -> Id; + + #[method_id(@__retain_semantics Other systemVersion)] + pub unsafe fn systemVersion(&self, ) -> Id; + + #[method(orientation)] + pub unsafe fn orientation(&self, ) -> UIDeviceOrientation; + + #[method_id(@__retain_semantics Other identifierForVendor)] + pub unsafe fn identifierForVendor(&self, ) -> Option>; + + #[method(isGeneratingDeviceOrientationNotifications)] + pub unsafe fn isGeneratingDeviceOrientationNotifications(&self, ) -> bool; + + #[method(beginGeneratingDeviceOrientationNotifications)] + pub unsafe fn beginGeneratingDeviceOrientationNotifications(&self, ); + + #[method(endGeneratingDeviceOrientationNotifications)] + pub unsafe fn endGeneratingDeviceOrientationNotifications(&self, ); + + #[method(isBatteryMonitoringEnabled)] + pub unsafe fn isBatteryMonitoringEnabled(&self, ) -> bool; + + #[method(setBatteryMonitoringEnabled:)] + pub unsafe fn setBatteryMonitoringEnabled(&self, batteryMonitoringEnabled: bool,); + + #[method(batteryState)] + pub unsafe fn batteryState(&self, ) -> UIDeviceBatteryState; + + #[method(batteryLevel)] + pub unsafe fn batteryLevel(&self, ) -> c_float; + + #[method(isProximityMonitoringEnabled)] + pub unsafe fn isProximityMonitoringEnabled(&self, ) -> bool; + + #[method(setProximityMonitoringEnabled:)] + pub unsafe fn setProximityMonitoringEnabled(&self, proximityMonitoringEnabled: bool,); + + #[method(proximityState)] + pub unsafe fn proximityState(&self, ) -> bool; + + #[method(isMultitaskingSupported)] + pub unsafe fn isMultitaskingSupported(&self, ) -> bool; + + #[method(userInterfaceIdiom)] + pub unsafe fn userInterfaceIdiom(&self, ) -> UIUserInterfaceIdiom; + + #[method(playInputClick)] + pub unsafe fn playInputClick(&self, ); + + } +); + +extern_protocol!( + pub struct UIInputViewAudioFeedback; + + unsafe impl UIInputViewAudioFeedback { + #[optional] + #[method(enableInputClicksWhenVisible)] + pub unsafe fn enableInputClicksWhenVisible(&self, ) -> bool; + + } +); + +inline_fn!( + pub unsafe fn UI_USER_INTERFACE_IDIOM() -> UIUserInterfaceIdiom { + todo!() + } +); + +extern_static!(UIDeviceOrientationDidChangeNotification: &'static NSNotificationName); + +extern_static!(UIDeviceBatteryStateDidChangeNotification: &'static NSNotificationName); + +extern_static!(UIDeviceBatteryLevelDidChangeNotification: &'static NSNotificationName); + +extern_static!(UIDeviceProximityStateDidChangeNotification: &'static NSNotificationName); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIDiffableDataSource.rs b/crates/icrate-generated/src/UIKit/generated/UIDiffableDataSource.rs new file mode 100644 index 000000000..8d5090bfe --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIDiffableDataSource.rs @@ -0,0 +1,392 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +__inner_extern_class!( + #[derive(Debug)] + pub struct NSDiffableDataSourceSnapshot { +_inner0: PhantomData<*mut SectionIdentifierType>, +_inner1: PhantomData<*mut ItemIdentifierType>, +} + + 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(@__retain_semantics Other sectionIdentifiers)] + pub unsafe fn sectionIdentifiers(&self, ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other itemIdentifiers)] + pub unsafe fn itemIdentifiers(&self, ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other reloadedSectionIdentifiers)] + pub unsafe fn reloadedSectionIdentifiers(&self, ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other reloadedItemIdentifiers)] + pub unsafe fn reloadedItemIdentifiers(&self, ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other reconfiguredItemIdentifiers)] + pub unsafe fn reconfiguredItemIdentifiers(&self, ) -> Id, Shared>; + + #[method(numberOfItemsInSection:)] + pub unsafe fn numberOfItemsInSection(&self, sectionIdentifier: &SectionIdentifierType,) -> NSInteger; + + #[method_id(@__retain_semantics Other itemIdentifiersInSectionWithIdentifier:)] + pub unsafe fn itemIdentifiersInSectionWithIdentifier(&self, sectionIdentifier: &SectionIdentifierType,) -> Id, Shared>; + + #[method_id(@__retain_semantics Other 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(reconfigureItemsWithIdentifiers:)] + pub unsafe fn reconfigureItemsWithIdentifiers(&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,); + + } +); + +pub type UICollectionViewDiffableDataSourceCellProvider = *mut Block<(NonNull, NonNull, NonNull, ), *mut UICollectionViewCell>; + +pub type UICollectionViewDiffableDataSourceSupplementaryViewProvider = *mut Block<(NonNull, NonNull, NonNull, ), *mut UICollectionReusableView>; + +__inner_extern_class!( + #[derive(Debug)] + pub struct NSDiffableDataSourceSectionTransaction { +_inner0: PhantomData<*mut SectionIdentifierType>, +_inner1: PhantomData<*mut ItemIdentifierType>, +} + + unsafe impl ClassType for NSDiffableDataSourceSectionTransaction { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSDiffableDataSourceSectionTransaction { + #[method_id(@__retain_semantics Other sectionIdentifier)] + pub unsafe fn sectionIdentifier(&self, ) -> Id; + + #[method_id(@__retain_semantics Other initialSnapshot)] + pub unsafe fn initialSnapshot(&self, ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other finalSnapshot)] + pub unsafe fn finalSnapshot(&self, ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other difference)] + pub unsafe fn difference(&self, ) -> Id, Shared>; + + } +); + +__inner_extern_class!( + #[derive(Debug)] + pub struct NSDiffableDataSourceTransaction { +_inner0: PhantomData<*mut SectionIdentifierType>, +_inner1: PhantomData<*mut ItemIdentifierType>, +} + + unsafe impl ClassType for NSDiffableDataSourceTransaction { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSDiffableDataSourceTransaction { + #[method_id(@__retain_semantics Other initialSnapshot)] + pub unsafe fn initialSnapshot(&self, ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other finalSnapshot)] + pub unsafe fn finalSnapshot(&self, ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other difference)] + pub unsafe fn difference(&self, ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other sectionTransactions)] + pub unsafe fn sectionTransactions(&self, ) -> Id,>, Shared>; + + } +); + +__inner_extern_class!( + #[derive(Debug)] + pub struct UICollectionViewDiffableDataSourceReorderingHandlers { +_inner0: PhantomData<*mut SectionType>, +_inner1: PhantomData<*mut ItemType>, +} + + unsafe impl ClassType for UICollectionViewDiffableDataSourceReorderingHandlers { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UICollectionViewDiffableDataSourceReorderingHandlers { + #[method(canReorderItemHandler)] + pub unsafe fn canReorderItemHandler(&self, ) -> *mut Block<(NonNull, ), Bool>; + + #[method(setCanReorderItemHandler:)] + pub unsafe fn setCanReorderItemHandler(&self, canReorderItemHandler: Option<&Block<(NonNull, ), Bool>>,); + + #[method(willReorderHandler)] + pub unsafe fn willReorderHandler(&self, ) -> *mut Block<(NonNull>, ), ()>; + + #[method(setWillReorderHandler:)] + pub unsafe fn setWillReorderHandler(&self, willReorderHandler: Option<&Block<(NonNull>, ), ()>>,); + + #[method(didReorderHandler)] + pub unsafe fn didReorderHandler(&self, ) -> *mut Block<(NonNull>, ), ()>; + + #[method(setDidReorderHandler:)] + pub unsafe fn setDidReorderHandler(&self, didReorderHandler: Option<&Block<(NonNull>, ), ()>>,); + + } +); + +__inner_extern_class!( + #[derive(Debug)] + pub struct UICollectionViewDiffableDataSourceSectionSnapshotHandlers { +_inner0: PhantomData<*mut ItemType>, +} + + unsafe impl ClassType for UICollectionViewDiffableDataSourceSectionSnapshotHandlers { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UICollectionViewDiffableDataSourceSectionSnapshotHandlers { + #[method(shouldExpandItemHandler)] + pub unsafe fn shouldExpandItemHandler(&self, ) -> *mut Block<(NonNull, ), Bool>; + + #[method(setShouldExpandItemHandler:)] + pub unsafe fn setShouldExpandItemHandler(&self, shouldExpandItemHandler: Option<&Block<(NonNull, ), Bool>>,); + + #[method(willExpandItemHandler)] + pub unsafe fn willExpandItemHandler(&self, ) -> *mut Block<(NonNull, ), ()>; + + #[method(setWillExpandItemHandler:)] + pub unsafe fn setWillExpandItemHandler(&self, willExpandItemHandler: Option<&Block<(NonNull, ), ()>>,); + + #[method(shouldCollapseItemHandler)] + pub unsafe fn shouldCollapseItemHandler(&self, ) -> *mut Block<(NonNull, ), Bool>; + + #[method(setShouldCollapseItemHandler:)] + pub unsafe fn setShouldCollapseItemHandler(&self, shouldCollapseItemHandler: Option<&Block<(NonNull, ), Bool>>,); + + #[method(willCollapseItemHandler)] + pub unsafe fn willCollapseItemHandler(&self, ) -> *mut Block<(NonNull, ), ()>; + + #[method(setWillCollapseItemHandler:)] + pub unsafe fn setWillCollapseItemHandler(&self, willCollapseItemHandler: Option<&Block<(NonNull, ), ()>>,); + + #[method(snapshotForExpandingParentItemHandler)] + pub unsafe fn snapshotForExpandingParentItemHandler(&self, ) -> *mut Block<(NonNull, NonNull>, ), NonNull>>; + + #[method(setSnapshotForExpandingParentItemHandler:)] + pub unsafe fn setSnapshotForExpandingParentItemHandler(&self, snapshotForExpandingParentItemHandler: Option<&Block<(NonNull, NonNull>, ), NonNull>>>,); + + } +); + +__inner_extern_class!( + #[derive(Debug)] + pub struct UICollectionViewDiffableDataSource { +_inner0: PhantomData<*mut SectionIdentifierType>, +_inner1: PhantomData<*mut ItemIdentifierType>, +} + + unsafe impl ClassType for UICollectionViewDiffableDataSource { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UICollectionViewDiffableDataSource { + #[method_id(@__retain_semantics Init initWithCollectionView:cellProvider:)] + pub unsafe fn initWithCollectionView_cellProvider(this: Option>, collectionView: &UICollectionView,cellProvider: UICollectionViewDiffableDataSourceCellProvider,) -> 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; + + #[method(supplementaryViewProvider)] + pub unsafe fn supplementaryViewProvider(&self, ) -> UICollectionViewDiffableDataSourceSupplementaryViewProvider; + + #[method(setSupplementaryViewProvider:)] + pub unsafe fn setSupplementaryViewProvider(&self, supplementaryViewProvider: UICollectionViewDiffableDataSourceSupplementaryViewProvider,); + + #[method_id(@__retain_semantics Other 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: Option<&Block<(), ()>>,); + + #[method(applySnapshotUsingReloadData:)] + pub unsafe fn applySnapshotUsingReloadData(&self, snapshot: &NSDiffableDataSourceSnapshot,); + + #[method(applySnapshotUsingReloadData:completion:)] + pub unsafe fn applySnapshotUsingReloadData_completion(&self, snapshot: &NSDiffableDataSourceSnapshot,completion: Option<&Block<(), ()>>,); + + #[method_id(@__retain_semantics Other sectionIdentifierForIndex:)] + pub unsafe fn sectionIdentifierForIndex(&self, index: NSInteger,) -> Option>; + + #[method(indexForSectionIdentifier:)] + pub unsafe fn indexForSectionIdentifier(&self, identifier: &SectionIdentifierType,) -> NSInteger; + + #[method_id(@__retain_semantics Other itemIdentifierForIndexPath:)] + pub unsafe fn itemIdentifierForIndexPath(&self, indexPath: &NSIndexPath,) -> Option>; + + #[method_id(@__retain_semantics Other indexPathForItemIdentifier:)] + pub unsafe fn indexPathForItemIdentifier(&self, identifier: &ItemIdentifierType,) -> Option>; + + #[method_id(@__retain_semantics Other reorderingHandlers)] + pub unsafe fn reorderingHandlers(&self, ) -> Id, Shared>; + + #[method(setReorderingHandlers:)] + pub unsafe fn setReorderingHandlers(&self, reorderingHandlers: &UICollectionViewDiffableDataSourceReorderingHandlers,); + + #[method(applySnapshot:toSection:animatingDifferences:)] + pub unsafe fn applySnapshot_toSection_animatingDifferences(&self, snapshot: &NSDiffableDataSourceSectionSnapshot,sectionIdentifier: &SectionIdentifierType,animatingDifferences: bool,); + + #[method(applySnapshot:toSection:animatingDifferences:completion:)] + pub unsafe fn applySnapshot_toSection_animatingDifferences_completion(&self, snapshot: &NSDiffableDataSourceSectionSnapshot,sectionIdentifier: &SectionIdentifierType,animatingDifferences: bool,completion: Option<&Block<(), ()>>,); + + #[method_id(@__retain_semantics Other snapshotForSection:)] + pub unsafe fn snapshotForSection(&self, section: &SectionIdentifierType,) -> Id, Shared>; + + #[method_id(@__retain_semantics Other sectionSnapshotHandlers)] + pub unsafe fn sectionSnapshotHandlers(&self, ) -> Id, Shared>; + + #[method(setSectionSnapshotHandlers:)] + pub unsafe fn setSectionSnapshotHandlers(&self, sectionSnapshotHandlers: &UICollectionViewDiffableDataSourceSectionSnapshotHandlers,); + + } +); + +pub type UITableViewDiffableDataSourceCellProvider = *mut Block<(NonNull, NonNull, NonNull, ), *mut UITableViewCell>; + +__inner_extern_class!( + #[derive(Debug)] + pub struct UITableViewDiffableDataSource { +_inner0: PhantomData<*mut SectionIdentifierType>, +_inner1: PhantomData<*mut ItemIdentifierType>, +} + + unsafe impl ClassType for UITableViewDiffableDataSource { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UITableViewDiffableDataSource { + #[method_id(@__retain_semantics Init initWithTableView:cellProvider:)] + pub unsafe fn initWithTableView_cellProvider(this: Option>, tableView: &UITableView,cellProvider: UITableViewDiffableDataSourceCellProvider,) -> 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; + + #[method_id(@__retain_semantics Other 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: Option<&Block<(), ()>>,); + + #[method(applySnapshotUsingReloadData:)] + pub unsafe fn applySnapshotUsingReloadData(&self, snapshot: &NSDiffableDataSourceSnapshot,); + + #[method(applySnapshotUsingReloadData:completion:)] + pub unsafe fn applySnapshotUsingReloadData_completion(&self, snapshot: &NSDiffableDataSourceSnapshot,completion: Option<&Block<(), ()>>,); + + #[method_id(@__retain_semantics Other sectionIdentifierForIndex:)] + pub unsafe fn sectionIdentifierForIndex(&self, index: NSInteger,) -> Option>; + + #[method(indexForSectionIdentifier:)] + pub unsafe fn indexForSectionIdentifier(&self, identifier: &SectionIdentifierType,) -> NSInteger; + + #[method_id(@__retain_semantics Other itemIdentifierForIndexPath:)] + pub unsafe fn itemIdentifierForIndexPath(&self, indexPath: &NSIndexPath,) -> Option>; + + #[method_id(@__retain_semantics Other indexPathForItemIdentifier:)] + pub unsafe fn indexPathForItemIdentifier(&self, identifier: &ItemIdentifierType,) -> Option>; + + #[method(defaultRowAnimation)] + pub unsafe fn defaultRowAnimation(&self, ) -> UITableViewRowAnimation; + + #[method(setDefaultRowAnimation:)] + pub unsafe fn setDefaultRowAnimation(&self, defaultRowAnimation: UITableViewRowAnimation,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIDocument.rs b/crates/icrate-generated/src/UIKit/generated/UIDocument.rs new file mode 100644 index 000000000..977efd545 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIDocument.rs @@ -0,0 +1,169 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIDocumentChangeKind { + UIDocumentChangeDone = 0, + UIDocumentChangeUndone = 1, + UIDocumentChangeRedone = 2, + UIDocumentChangeCleared = 3, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIDocumentSaveOperation { + UIDocumentSaveForCreating = 0, + UIDocumentSaveForOverwriting = 1, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum UIDocumentState { + UIDocumentStateNormal = 0, + UIDocumentStateClosed = 1<<0, + UIDocumentStateInConflict = 1<<1, + UIDocumentStateSavingError = 1<<2, + UIDocumentStateEditingDisabled = 1<<3, + UIDocumentStateProgressAvailable = 1<<4, + } +); + +extern_static!(UIDocumentStateChangedNotification: &'static NSNotificationName); + +extern_class!( + #[derive(Debug)] + pub struct UIDocument; + + unsafe impl ClassType for UIDocument { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIDocument { + #[method_id(@__retain_semantics Init initWithFileURL:)] + pub unsafe fn initWithFileURL(this: Option>, url: &NSURL,) -> Id; + + #[method_id(@__retain_semantics Other fileURL)] + pub unsafe fn fileURL(&self, ) -> Id; + + #[method_id(@__retain_semantics Other localizedName)] + pub unsafe fn localizedName(&self, ) -> Id; + + #[method_id(@__retain_semantics Other fileType)] + pub unsafe fn fileType(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other fileModificationDate)] + pub unsafe fn fileModificationDate(&self, ) -> Option>; + + #[method(setFileModificationDate:)] + pub unsafe fn setFileModificationDate(&self, fileModificationDate: Option<&NSDate>,); + + #[method(documentState)] + pub unsafe fn documentState(&self, ) -> UIDocumentState; + + #[method_id(@__retain_semantics Other progress)] + pub unsafe fn progress(&self, ) -> Option>; + + #[method(openWithCompletionHandler:)] + pub unsafe fn openWithCompletionHandler(&self, completionHandler: Option<&Block<(Bool, ), ()>>,); + + #[method(closeWithCompletionHandler:)] + pub unsafe fn closeWithCompletionHandler(&self, completionHandler: Option<&Block<(Bool, ), ()>>,); + + #[method(loadFromContents:ofType:error:)] + pub unsafe fn loadFromContents_ofType_error(&self, contents: &Object,typeName: Option<&NSString>,) -> Result<(), Id>; + + #[method_id(@__retain_semantics Other contentsForType:error:)] + pub unsafe fn contentsForType_error(&self, typeName: &NSString,) -> Result, Id>; + + #[method(disableEditing)] + pub unsafe fn disableEditing(&self, ); + + #[method(enableEditing)] + pub unsafe fn enableEditing(&self, ); + + #[method_id(@__retain_semantics Other undoManager)] + pub unsafe fn undoManager(&self, ) -> Option>; + + #[method(setUndoManager:)] + pub unsafe fn setUndoManager(&self, undoManager: Option<&NSUndoManager>,); + + #[method(hasUnsavedChanges)] + pub unsafe fn hasUnsavedChanges(&self, ) -> bool; + + #[method(updateChangeCount:)] + pub unsafe fn updateChangeCount(&self, change: UIDocumentChangeKind,); + + #[method_id(@__retain_semantics Other changeCountTokenForSaveOperation:)] + pub unsafe fn changeCountTokenForSaveOperation(&self, saveOperation: UIDocumentSaveOperation,) -> Id; + + #[method(updateChangeCountWithToken:forSaveOperation:)] + pub unsafe fn updateChangeCountWithToken_forSaveOperation(&self, changeCountToken: &Object,saveOperation: UIDocumentSaveOperation,); + + #[method(saveToURL:forSaveOperation:completionHandler:)] + pub unsafe fn saveToURL_forSaveOperation_completionHandler(&self, url: &NSURL,saveOperation: UIDocumentSaveOperation,completionHandler: Option<&Block<(Bool, ), ()>>,); + + #[method(autosaveWithCompletionHandler:)] + pub unsafe fn autosaveWithCompletionHandler(&self, completionHandler: Option<&Block<(Bool, ), ()>>,); + + #[method_id(@__retain_semantics Other savingFileType)] + pub unsafe fn savingFileType(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other fileNameExtensionForType:saveOperation:)] + pub unsafe fn fileNameExtensionForType_saveOperation(&self, typeName: Option<&NSString>,saveOperation: UIDocumentSaveOperation,) -> Id; + + #[method(writeContents:andAttributes:safelyToURL:forSaveOperation:error:)] + pub unsafe fn writeContents_andAttributes_safelyToURL_forSaveOperation_error(&self, contents: &Object,additionalFileAttributes: Option<&NSDictionary>,url: &NSURL,saveOperation: UIDocumentSaveOperation,) -> Result<(), Id>; + + #[method(writeContents:toURL:forSaveOperation:originalContentsURL:error:)] + pub unsafe fn writeContents_toURL_forSaveOperation_originalContentsURL_error(&self, contents: &Object,url: &NSURL,saveOperation: UIDocumentSaveOperation,originalContentsURL: Option<&NSURL>,) -> Result<(), Id>; + + #[method_id(@__retain_semantics Other fileAttributesToWriteToURL:forSaveOperation:error:)] + pub unsafe fn fileAttributesToWriteToURL_forSaveOperation_error(&self, url: &NSURL,saveOperation: UIDocumentSaveOperation,) -> Result, Id>; + + #[method(readFromURL:error:)] + pub unsafe fn readFromURL_error(&self, url: &NSURL,) -> Result<(), Id>; + + #[method(performAsynchronousFileAccessUsingBlock:)] + pub unsafe fn performAsynchronousFileAccessUsingBlock(&self, block: &Block<(), ()>,); + + #[method(handleError:userInteractionPermitted:)] + pub unsafe fn handleError_userInteractionPermitted(&self, error: &NSError,userInteractionPermitted: bool,); + + #[method(finishedHandlingError:recovered:)] + pub unsafe fn finishedHandlingError_recovered(&self, error: &NSError,recovered: bool,); + + #[method(userInteractionNoLongerPermittedForError:)] + pub unsafe fn userInteractionNoLongerPermittedForError(&self, error: &NSError,); + + #[method(revertToContentsOfURL:completionHandler:)] + pub unsafe fn revertToContentsOfURL_completionHandler(&self, url: &NSURL,completionHandler: Option<&Block<(Bool, ), ()>>,); + + } +); + +extern_static!(NSUserActivityDocumentURLKey: &'static NSString); + +extern_methods!( + /// ActivityContinuation + unsafe impl UIDocument { + #[method_id(@__retain_semantics Other 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,); + + #[method(restoreUserActivityState:)] + pub unsafe fn restoreUserActivityState(&self, userActivity: &NSUserActivity,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIDocumentBrowserAction.rs b/crates/icrate-generated/src/UIKit/generated/UIDocumentBrowserAction.rs new file mode 100644 index 000000000..2d0475e19 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIDocumentBrowserAction.rs @@ -0,0 +1,59 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_options!( + #[underlying(NSInteger)] + pub enum UIDocumentBrowserActionAvailability { + UIDocumentBrowserActionAvailabilityMenu = 1, + UIDocumentBrowserActionAvailabilityNavigationBar = 1<<1, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIDocumentBrowserAction; + + unsafe impl ClassType for UIDocumentBrowserAction { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIDocumentBrowserAction { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics Init initWithIdentifier:localizedTitle:availability:handler:)] + pub unsafe fn initWithIdentifier_localizedTitle_availability_handler(this: Option>, identifier: &NSString,localizedTitle: &NSString,availability: UIDocumentBrowserActionAvailability,handler: &Block<(NonNull>, ), ()>,) -> Id; + + #[method_id(@__retain_semantics Other identifier)] + pub unsafe fn identifier(&self, ) -> Id; + + #[method_id(@__retain_semantics Other localizedTitle)] + pub unsafe fn localizedTitle(&self, ) -> Id; + + #[method(availability)] + pub unsafe fn availability(&self, ) -> UIDocumentBrowserActionAvailability; + + #[method_id(@__retain_semantics Other image)] + pub unsafe fn image(&self, ) -> Option>; + + #[method(setImage:)] + pub unsafe fn setImage(&self, image: Option<&UIImage>,); + + #[method_id(@__retain_semantics Other supportedContentTypes)] + pub unsafe fn supportedContentTypes(&self, ) -> Id, Shared>; + + #[method(setSupportedContentTypes:)] + pub unsafe fn setSupportedContentTypes(&self, supportedContentTypes: &NSArray,); + + #[method(supportsMultipleItems)] + pub unsafe fn supportsMultipleItems(&self, ) -> bool; + + #[method(setSupportsMultipleItems:)] + pub unsafe fn setSupportsMultipleItems(&self, supportsMultipleItems: bool,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIDocumentBrowserViewController.rs b/crates/icrate-generated/src/UIKit/generated/UIDocumentBrowserViewController.rs new file mode 100644 index 000000000..092191b73 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIDocumentBrowserViewController.rs @@ -0,0 +1,203 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_static!(UIDocumentBrowserErrorDomain: &'static NSErrorDomain); + +ns_error_enum!( + #[underlying(NSInteger)] + pub enum UIDocumentBrowserErrorCode { + UIDocumentBrowserErrorGeneric = 1, + UIDocumentBrowserErrorNoLocationAvailable = 2, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum UIDocumentBrowserImportMode { + UIDocumentBrowserImportModeNone = 0, + UIDocumentBrowserImportModeCopy = 1, + UIDocumentBrowserImportModeMove = 2, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum UIDocumentBrowserUserInterfaceStyle { + UIDocumentBrowserUserInterfaceStyleWhite = 0, + UIDocumentBrowserUserInterfaceStyleLight = 1, + UIDocumentBrowserUserInterfaceStyleDark = 2, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIDocumentBrowserViewController; + + unsafe impl ClassType for UIDocumentBrowserViewController { + type Super = UIViewController; + } +); + +extern_methods!( + unsafe impl UIDocumentBrowserViewController { + #[method_id(@__retain_semantics Init initForOpeningFilesWithContentTypes:)] + pub unsafe fn initForOpeningFilesWithContentTypes(this: Option>, allowedContentTypes: Option<&NSArray>,) -> Id; + + #[method_id(@__retain_semantics Init initForOpeningContentTypes:)] + pub unsafe fn initForOpeningContentTypes(this: Option>, contentTypes: Option<&NSArray>,) -> Id; + + #[method_id(@__retain_semantics Init initWithNibName:bundle:)] + pub unsafe fn initWithNibName_bundle(this: Option>, nibName: Option<&NSString>,bundle: Option<&NSBundle>,) -> Id; + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&UIDocumentBrowserViewControllerDelegate>,); + + #[method(allowsDocumentCreation)] + pub unsafe fn allowsDocumentCreation(&self, ) -> bool; + + #[method(setAllowsDocumentCreation:)] + pub unsafe fn setAllowsDocumentCreation(&self, allowsDocumentCreation: bool,); + + #[method(allowsPickingMultipleItems)] + pub unsafe fn allowsPickingMultipleItems(&self, ) -> bool; + + #[method(setAllowsPickingMultipleItems:)] + pub unsafe fn setAllowsPickingMultipleItems(&self, allowsPickingMultipleItems: bool,); + + #[method_id(@__retain_semantics Other allowedContentTypes)] + pub unsafe fn allowedContentTypes(&self, ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other recentDocumentsContentTypes)] + pub unsafe fn recentDocumentsContentTypes(&self, ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other contentTypesForRecentDocuments)] + pub unsafe fn contentTypesForRecentDocuments(&self, ) -> Id, Shared>; + + #[method(shouldShowFileExtensions)] + pub unsafe fn shouldShowFileExtensions(&self, ) -> bool; + + #[method(setShouldShowFileExtensions:)] + pub unsafe fn setShouldShowFileExtensions(&self, shouldShowFileExtensions: bool,); + + #[method_id(@__retain_semantics Other additionalLeadingNavigationBarButtonItems)] + pub unsafe fn additionalLeadingNavigationBarButtonItems(&self, ) -> Id, Shared>; + + #[method(setAdditionalLeadingNavigationBarButtonItems:)] + pub unsafe fn setAdditionalLeadingNavigationBarButtonItems(&self, additionalLeadingNavigationBarButtonItems: &NSArray,); + + #[method_id(@__retain_semantics Other additionalTrailingNavigationBarButtonItems)] + pub unsafe fn additionalTrailingNavigationBarButtonItems(&self, ) -> Id, Shared>; + + #[method(setAdditionalTrailingNavigationBarButtonItems:)] + pub unsafe fn setAdditionalTrailingNavigationBarButtonItems(&self, additionalTrailingNavigationBarButtonItems: &NSArray,); + + #[method(revealDocumentAtURL:importIfNeeded:completion:)] + pub unsafe fn revealDocumentAtURL_importIfNeeded_completion(&self, url: &NSURL,importIfNeeded: bool,completion: Option<&Block<(*mut NSURL, *mut NSError, ), ()>>,); + + #[method(importDocumentAtURL:nextToDocumentAtURL:mode:completionHandler:)] + pub unsafe fn importDocumentAtURL_nextToDocumentAtURL_mode_completionHandler(&self, documentURL: &NSURL,neighbourURL: &NSURL,importMode: UIDocumentBrowserImportMode,completion: &Block<(*mut NSURL, *mut NSError, ), ()>,); + + #[method(renameDocumentAtURL:proposedName:completionHandler:)] + pub unsafe fn renameDocumentAtURL_proposedName_completionHandler(&self, documentURL: &NSURL,proposedName: &NSString,completionHandler: &Block<(*mut NSURL, *mut NSError, ), ()>,); + + #[method_id(@__retain_semantics Other transitionControllerForDocumentAtURL:)] + pub unsafe fn transitionControllerForDocumentAtURL(&self, documentURL: &NSURL,) -> Id; + + #[method_id(@__retain_semantics Other transitionControllerForDocumentURL:)] + pub unsafe fn transitionControllerForDocumentURL(&self, documentURL: &NSURL,) -> Id; + + #[method_id(@__retain_semantics Other customActions)] + pub unsafe fn customActions(&self, ) -> Id, Shared>; + + #[method(setCustomActions:)] + pub unsafe fn setCustomActions(&self, customActions: &NSArray,); + + #[method(browserUserInterfaceStyle)] + pub unsafe fn browserUserInterfaceStyle(&self, ) -> UIDocumentBrowserUserInterfaceStyle; + + #[method(setBrowserUserInterfaceStyle:)] + pub unsafe fn setBrowserUserInterfaceStyle(&self, browserUserInterfaceStyle: UIDocumentBrowserUserInterfaceStyle,); + + #[method_id(@__retain_semantics Other localizedCreateDocumentActionTitle)] + pub unsafe fn localizedCreateDocumentActionTitle(&self, ) -> Id; + + #[method(setLocalizedCreateDocumentActionTitle:)] + pub unsafe fn setLocalizedCreateDocumentActionTitle(&self, localizedCreateDocumentActionTitle: &NSString,); + + #[method(defaultDocumentAspectRatio)] + pub unsafe fn defaultDocumentAspectRatio(&self, ) -> CGFloat; + + #[method(setDefaultDocumentAspectRatio:)] + pub unsafe fn setDefaultDocumentAspectRatio(&self, defaultDocumentAspectRatio: CGFloat,); + + } +); + +extern_protocol!( + pub struct UIDocumentBrowserViewControllerDelegate; + + unsafe impl UIDocumentBrowserViewControllerDelegate { + #[optional] + #[method(documentBrowser:didPickDocumentURLs:)] + pub unsafe fn documentBrowser_didPickDocumentURLs(&self, controller: &UIDocumentBrowserViewController,documentURLs: &NSArray,); + + #[optional] + #[method(documentBrowser:didPickDocumentsAtURLs:)] + pub unsafe fn documentBrowser_didPickDocumentsAtURLs(&self, controller: &UIDocumentBrowserViewController,documentURLs: &NSArray,); + + #[optional] + #[method(documentBrowser:didRequestDocumentCreationWithHandler:)] + pub unsafe fn documentBrowser_didRequestDocumentCreationWithHandler(&self, controller: &UIDocumentBrowserViewController,importHandler: &Block<(*mut NSURL, UIDocumentBrowserImportMode, ), ()>,); + + #[optional] + #[method(documentBrowser:didImportDocumentAtURL:toDestinationURL:)] + pub unsafe fn documentBrowser_didImportDocumentAtURL_toDestinationURL(&self, controller: &UIDocumentBrowserViewController,sourceURL: &NSURL,destinationURL: &NSURL,); + + #[optional] + #[method(documentBrowser:failedToImportDocumentAtURL:error:)] + pub unsafe fn documentBrowser_failedToImportDocumentAtURL_error(&self, controller: &UIDocumentBrowserViewController,documentURL: &NSURL,error: Option<&NSError>,); + + #[optional] + #[method_id(@__retain_semantics Other documentBrowser:applicationActivitiesForDocumentURLs:)] + pub unsafe fn documentBrowser_applicationActivitiesForDocumentURLs(&self, controller: &UIDocumentBrowserViewController,documentURLs: &NSArray,) -> Id, Shared>; + + #[optional] + #[method(documentBrowser:willPresentActivityViewController:)] + pub unsafe fn documentBrowser_willPresentActivityViewController(&self, controller: &UIDocumentBrowserViewController,activityViewController: &UIActivityViewController,); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIDocumentBrowserTransitionController; + + unsafe impl ClassType for UIDocumentBrowserTransitionController { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIDocumentBrowserTransitionController { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics Other loadingProgress)] + pub unsafe fn loadingProgress(&self, ) -> Option>; + + #[method(setLoadingProgress:)] + pub unsafe fn setLoadingProgress(&self, loadingProgress: Option<&NSProgress>,); + + #[method_id(@__retain_semantics Other targetView)] + pub unsafe fn targetView(&self, ) -> Option>; + + #[method(setTargetView:)] + pub unsafe fn setTargetView(&self, targetView: Option<&UIView>,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIDocumentInteractionController.rs b/crates/icrate-generated/src/UIKit/generated/UIDocumentInteractionController.rs new file mode 100644 index 000000000..4631248e2 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIDocumentInteractionController.rs @@ -0,0 +1,137 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIDocumentInteractionController; + + unsafe impl ClassType for UIDocumentInteractionController { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIDocumentInteractionController { + #[method_id(@__retain_semantics Other interactionControllerWithURL:)] + pub unsafe fn interactionControllerWithURL(url: &NSURL,) -> Id; + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&UIDocumentInteractionControllerDelegate>,); + + #[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 UTI)] + pub unsafe fn UTI(&self, ) -> Option>; + + #[method(setUTI:)] + pub unsafe fn setUTI(&self, UTI: 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_id(@__retain_semantics Other icons)] + pub unsafe fn icons(&self, ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other annotation)] + pub unsafe fn annotation(&self, ) -> Option>; + + #[method(setAnnotation:)] + pub unsafe fn setAnnotation(&self, annotation: Option<&Object>,); + + #[method(presentOptionsMenuFromRect:inView:animated:)] + pub unsafe fn presentOptionsMenuFromRect_inView_animated(&self, rect: CGRect,view: &UIView,animated: bool,) -> bool; + + #[method(presentOptionsMenuFromBarButtonItem:animated:)] + pub unsafe fn presentOptionsMenuFromBarButtonItem_animated(&self, item: &UIBarButtonItem,animated: bool,) -> bool; + + #[method(presentPreviewAnimated:)] + pub unsafe fn presentPreviewAnimated(&self, animated: bool,) -> bool; + + #[method(presentOpenInMenuFromRect:inView:animated:)] + pub unsafe fn presentOpenInMenuFromRect_inView_animated(&self, rect: CGRect,view: &UIView,animated: bool,) -> bool; + + #[method(presentOpenInMenuFromBarButtonItem:animated:)] + pub unsafe fn presentOpenInMenuFromBarButtonItem_animated(&self, item: &UIBarButtonItem,animated: bool,) -> bool; + + #[method(dismissPreviewAnimated:)] + pub unsafe fn dismissPreviewAnimated(&self, animated: bool,); + + #[method(dismissMenuAnimated:)] + pub unsafe fn dismissMenuAnimated(&self, animated: bool,); + + #[method_id(@__retain_semantics Other gestureRecognizers)] + pub unsafe fn gestureRecognizers(&self, ) -> Id, Shared>; + + } +); + +extern_protocol!( + pub struct UIDocumentInteractionControllerDelegate; + + unsafe impl UIDocumentInteractionControllerDelegate { + #[optional] + #[method_id(@__retain_semantics Other documentInteractionControllerViewControllerForPreview:)] + pub unsafe fn documentInteractionControllerViewControllerForPreview(&self, controller: &UIDocumentInteractionController,) -> Id; + + #[optional] + #[method(documentInteractionControllerRectForPreview:)] + pub unsafe fn documentInteractionControllerRectForPreview(&self, controller: &UIDocumentInteractionController,) -> CGRect; + + #[optional] + #[method_id(@__retain_semantics Other documentInteractionControllerViewForPreview:)] + pub unsafe fn documentInteractionControllerViewForPreview(&self, controller: &UIDocumentInteractionController,) -> Option>; + + #[optional] + #[method(documentInteractionControllerWillBeginPreview:)] + pub unsafe fn documentInteractionControllerWillBeginPreview(&self, controller: &UIDocumentInteractionController,); + + #[optional] + #[method(documentInteractionControllerDidEndPreview:)] + pub unsafe fn documentInteractionControllerDidEndPreview(&self, controller: &UIDocumentInteractionController,); + + #[optional] + #[method(documentInteractionControllerWillPresentOptionsMenu:)] + pub unsafe fn documentInteractionControllerWillPresentOptionsMenu(&self, controller: &UIDocumentInteractionController,); + + #[optional] + #[method(documentInteractionControllerDidDismissOptionsMenu:)] + pub unsafe fn documentInteractionControllerDidDismissOptionsMenu(&self, controller: &UIDocumentInteractionController,); + + #[optional] + #[method(documentInteractionControllerWillPresentOpenInMenu:)] + pub unsafe fn documentInteractionControllerWillPresentOpenInMenu(&self, controller: &UIDocumentInteractionController,); + + #[optional] + #[method(documentInteractionControllerDidDismissOpenInMenu:)] + pub unsafe fn documentInteractionControllerDidDismissOpenInMenu(&self, controller: &UIDocumentInteractionController,); + + #[optional] + #[method(documentInteractionController:willBeginSendingToApplication:)] + pub unsafe fn documentInteractionController_willBeginSendingToApplication(&self, controller: &UIDocumentInteractionController,application: Option<&NSString>,); + + #[optional] + #[method(documentInteractionController:didEndSendingToApplication:)] + pub unsafe fn documentInteractionController_didEndSendingToApplication(&self, controller: &UIDocumentInteractionController,application: Option<&NSString>,); + + #[optional] + #[method(documentInteractionController:canPerformAction:)] + pub unsafe fn documentInteractionController_canPerformAction(&self, controller: &UIDocumentInteractionController,action: OptionSel,) -> bool; + + #[optional] + #[method(documentInteractionController:performAction:)] + pub unsafe fn documentInteractionController_performAction(&self, controller: &UIDocumentInteractionController,action: OptionSel,) -> bool; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIDocumentMenuViewController.rs b/crates/icrate-generated/src/UIKit/generated/UIDocumentMenuViewController.rs new file mode 100644 index 000000000..96505b92e --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIDocumentMenuViewController.rs @@ -0,0 +1,58 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSUInteger)] + pub enum UIDocumentMenuOrder { + UIDocumentMenuOrderFirst = 0, + UIDocumentMenuOrderLast = 1, + } +); + +extern_protocol!( + pub struct UIDocumentMenuDelegate; + + unsafe impl UIDocumentMenuDelegate { + #[method(documentMenu:didPickDocumentPicker:)] + pub unsafe fn documentMenu_didPickDocumentPicker(&self, documentMenu: &UIDocumentMenuViewController,documentPicker: &UIDocumentPickerViewController,); + + #[optional] + #[method(documentMenuWasCancelled:)] + pub unsafe fn documentMenuWasCancelled(&self, documentMenu: &UIDocumentMenuViewController,); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIDocumentMenuViewController; + + unsafe impl ClassType for UIDocumentMenuViewController { + type Super = UIViewController; + } +); + +extern_methods!( + unsafe impl UIDocumentMenuViewController { + #[method_id(@__retain_semantics Init initWithDocumentTypes:inMode:)] + pub unsafe fn initWithDocumentTypes_inMode(this: Option>, allowedUTIs: &NSArray,mode: UIDocumentPickerMode,) -> Id; + + #[method_id(@__retain_semantics Init initWithURL:inMode:)] + pub unsafe fn initWithURL_inMode(this: Option>, url: &NSURL,mode: UIDocumentPickerMode,) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method(addOptionWithTitle:image:order:handler:)] + pub unsafe fn addOptionWithTitle_image_order_handler(&self, title: &NSString,image: Option<&UIImage>,order: UIDocumentMenuOrder,handler: &Block<(), ()>,); + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&UIDocumentMenuDelegate>,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIDocumentPickerExtensionViewController.rs b/crates/icrate-generated/src/UIKit/generated/UIDocumentPickerExtensionViewController.rs new file mode 100644 index 000000000..2545a41b0 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIDocumentPickerExtensionViewController.rs @@ -0,0 +1,39 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIDocumentPickerExtensionViewController; + + unsafe impl ClassType for UIDocumentPickerExtensionViewController { + type Super = UIViewController; + } +); + +extern_methods!( + unsafe impl UIDocumentPickerExtensionViewController { + #[method(dismissGrantingAccessToURL:)] + pub unsafe fn dismissGrantingAccessToURL(&self, url: Option<&NSURL>,); + + #[method(prepareForPresentationInMode:)] + pub unsafe fn prepareForPresentationInMode(&self, mode: UIDocumentPickerMode,); + + #[method(documentPickerMode)] + pub unsafe fn documentPickerMode(&self, ) -> UIDocumentPickerMode; + + #[method_id(@__retain_semantics Other originalURL)] + pub unsafe fn originalURL(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other validTypes)] + pub unsafe fn validTypes(&self, ) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other providerIdentifier)] + pub unsafe fn providerIdentifier(&self, ) -> Id; + + #[method_id(@__retain_semantics Other documentStorageURL)] + pub unsafe fn documentStorageURL(&self, ) -> Option>; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIDocumentPickerViewController.rs b/crates/icrate-generated/src/UIKit/generated/UIDocumentPickerViewController.rs new file mode 100644 index 000000000..285fa0b25 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIDocumentPickerViewController.rs @@ -0,0 +1,98 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_protocol!( + pub struct UIDocumentPickerDelegate; + + unsafe impl UIDocumentPickerDelegate { + #[optional] + #[method(documentPicker:didPickDocumentsAtURLs:)] + pub unsafe fn documentPicker_didPickDocumentsAtURLs(&self, controller: &UIDocumentPickerViewController,urls: &NSArray,); + + #[optional] + #[method(documentPickerWasCancelled:)] + pub unsafe fn documentPickerWasCancelled(&self, controller: &UIDocumentPickerViewController,); + + #[optional] + #[method(documentPicker:didPickDocumentAtURL:)] + pub unsafe fn documentPicker_didPickDocumentAtURL(&self, controller: &UIDocumentPickerViewController,url: &NSURL,); + + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum UIDocumentPickerMode { + UIDocumentPickerModeImport = 0, + UIDocumentPickerModeOpen = 1, + UIDocumentPickerModeExportToService = 2, + UIDocumentPickerModeMoveToService = 3, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIDocumentPickerViewController; + + unsafe impl ClassType for UIDocumentPickerViewController { + type Super = UIViewController; + } +); + +extern_methods!( + unsafe impl UIDocumentPickerViewController { + #[method_id(@__retain_semantics Init initWithDocumentTypes:inMode:)] + pub unsafe fn initWithDocumentTypes_inMode(this: Option>, allowedUTIs: &NSArray,mode: UIDocumentPickerMode,) -> Id; + + #[method_id(@__retain_semantics Init initForOpeningContentTypes:asCopy:)] + pub unsafe fn initForOpeningContentTypes_asCopy(this: Option>, contentTypes: &NSArray,asCopy: bool,) -> Id; + + #[method_id(@__retain_semantics Init initForOpeningContentTypes:)] + pub unsafe fn initForOpeningContentTypes(this: Option>, contentTypes: &NSArray,) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method_id(@__retain_semantics Init initWithURL:inMode:)] + pub unsafe fn initWithURL_inMode(this: Option>, url: &NSURL,mode: UIDocumentPickerMode,) -> Id; + + #[method_id(@__retain_semantics Init initWithURLs:inMode:)] + pub unsafe fn initWithURLs_inMode(this: Option>, urls: &NSArray,mode: UIDocumentPickerMode,) -> Id; + + #[method_id(@__retain_semantics Init initForExportingURLs:asCopy:)] + pub unsafe fn initForExportingURLs_asCopy(this: Option>, urls: &NSArray,asCopy: bool,) -> Id; + + #[method_id(@__retain_semantics Init initForExportingURLs:)] + pub unsafe fn initForExportingURLs(this: Option>, urls: &NSArray,) -> Id; + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&UIDocumentPickerDelegate>,); + + #[method(documentPickerMode)] + pub unsafe fn documentPickerMode(&self, ) -> UIDocumentPickerMode; + + #[method(allowsMultipleSelection)] + pub unsafe fn allowsMultipleSelection(&self, ) -> bool; + + #[method(setAllowsMultipleSelection:)] + pub unsafe fn setAllowsMultipleSelection(&self, allowsMultipleSelection: bool,); + + #[method(shouldShowFileExtensions)] + pub unsafe fn shouldShowFileExtensions(&self, ) -> bool; + + #[method(setShouldShowFileExtensions:)] + pub unsafe fn setShouldShowFileExtensions(&self, shouldShowFileExtensions: bool,); + + #[method_id(@__retain_semantics Other directoryURL)] + pub unsafe fn directoryURL(&self, ) -> Option>; + + #[method(setDirectoryURL:)] + pub unsafe fn setDirectoryURL(&self, directoryURL: Option<&NSURL>,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIDocumentProperties.rs b/crates/icrate-generated/src/UIKit/generated/UIDocumentProperties.rs new file mode 100644 index 000000000..dfd3335cd --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIDocumentProperties.rs @@ -0,0 +1,54 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIDocumentProperties; + + unsafe impl ClassType for UIDocumentProperties { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIDocumentProperties { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics New new)] + pub unsafe fn new() -> Id; + + #[method_id(@__retain_semantics Init initWithURL:)] + pub unsafe fn initWithURL(this: Option>, url: &NSURL,) -> Id; + + #[method_id(@__retain_semantics Init initWithMetadata:)] + pub unsafe fn initWithMetadata(this: Option>, metadata: &LPLinkMetadata,) -> Id; + + #[method_id(@__retain_semantics Other metadata)] + pub unsafe fn metadata(&self, ) -> Id; + + #[method(setMetadata:)] + pub unsafe fn setMetadata(&self, metadata: &LPLinkMetadata,); + + #[method(dragItemsProvider)] + pub unsafe fn dragItemsProvider(&self, ) -> *mut Block<(NonNull, ), NonNull>>; + + #[method(setDragItemsProvider:)] + pub unsafe fn setDragItemsProvider(&self, dragItemsProvider: Option<&Block<(NonNull, ), NonNull>>>,); + + #[method(activityViewControllerProvider)] + pub unsafe fn activityViewControllerProvider(&self, ) -> *mut Block<(), NonNull>; + + #[method(setActivityViewControllerProvider:)] + pub unsafe fn setActivityViewControllerProvider(&self, activityViewControllerProvider: Option<&Block<(), NonNull>>,); + + #[method(wantsIconRepresentation)] + pub unsafe fn wantsIconRepresentation(&self, ) -> bool; + + #[method(setWantsIconRepresentation:)] + pub unsafe fn setWantsIconRepresentation(&self, wantsIconRepresentation: bool,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIDragInteraction.rs b/crates/icrate-generated/src/UIKit/generated/UIDragInteraction.rs new file mode 100644 index 000000000..0ffadd9bc --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIDragInteraction.rs @@ -0,0 +1,128 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_protocol!( + pub struct UIDragAnimating; + + unsafe impl UIDragAnimating { + #[method(addAnimations:)] + pub unsafe fn addAnimations(&self, animations: &Block<(), ()>,); + + #[method(addCompletion:)] + pub unsafe fn addCompletion(&self, completion: &Block<(UIViewAnimatingPosition, ), ()>,); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIDragInteraction; + + unsafe impl ClassType for UIDragInteraction { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIDragInteraction { + #[method_id(@__retain_semantics Init initWithDelegate:)] + pub unsafe fn initWithDelegate(this: Option>, delegate: &UIDragInteractionDelegate,) -> 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; + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(allowsSimultaneousRecognitionDuringLift)] + pub unsafe fn allowsSimultaneousRecognitionDuringLift(&self, ) -> bool; + + #[method(setAllowsSimultaneousRecognitionDuringLift:)] + pub unsafe fn setAllowsSimultaneousRecognitionDuringLift(&self, allowsSimultaneousRecognitionDuringLift: bool,); + + #[method(isEnabled)] + pub unsafe fn isEnabled(&self, ) -> bool; + + #[method(setEnabled:)] + pub unsafe fn setEnabled(&self, enabled: bool,); + + #[method(isEnabledByDefault)] + pub unsafe fn isEnabledByDefault() -> bool; + + } +); + +extern_protocol!( + pub struct UIDragInteractionDelegate; + + unsafe impl UIDragInteractionDelegate { + #[method_id(@__retain_semantics Other dragInteraction:itemsForBeginningSession:)] + pub unsafe fn dragInteraction_itemsForBeginningSession(&self, interaction: &UIDragInteraction,session: &UIDragSession,) -> Id, Shared>; + + #[optional] + #[method_id(@__retain_semantics Other dragInteraction:previewForLiftingItem:session:)] + pub unsafe fn dragInteraction_previewForLiftingItem_session(&self, interaction: &UIDragInteraction,item: &UIDragItem,session: &UIDragSession,) -> Option>; + + #[optional] + #[method(dragInteraction:willAnimateLiftWithAnimator:session:)] + pub unsafe fn dragInteraction_willAnimateLiftWithAnimator_session(&self, interaction: &UIDragInteraction,animator: &UIDragAnimating,session: &UIDragSession,); + + #[optional] + #[method(dragInteraction:sessionWillBegin:)] + pub unsafe fn dragInteraction_sessionWillBegin(&self, interaction: &UIDragInteraction,session: &UIDragSession,); + + #[optional] + #[method(dragInteraction:sessionAllowsMoveOperation:)] + pub unsafe fn dragInteraction_sessionAllowsMoveOperation(&self, interaction: &UIDragInteraction,session: &UIDragSession,) -> bool; + + #[optional] + #[method(dragInteraction:sessionIsRestrictedToDraggingApplication:)] + pub unsafe fn dragInteraction_sessionIsRestrictedToDraggingApplication(&self, interaction: &UIDragInteraction,session: &UIDragSession,) -> bool; + + #[optional] + #[method(dragInteraction:prefersFullSizePreviewsForSession:)] + pub unsafe fn dragInteraction_prefersFullSizePreviewsForSession(&self, interaction: &UIDragInteraction,session: &UIDragSession,) -> bool; + + #[optional] + #[method(dragInteraction:sessionDidMove:)] + pub unsafe fn dragInteraction_sessionDidMove(&self, interaction: &UIDragInteraction,session: &UIDragSession,); + + #[optional] + #[method(dragInteraction:session:willEndWithOperation:)] + pub unsafe fn dragInteraction_session_willEndWithOperation(&self, interaction: &UIDragInteraction,session: &UIDragSession,operation: UIDropOperation,); + + #[optional] + #[method(dragInteraction:session:didEndWithOperation:)] + pub unsafe fn dragInteraction_session_didEndWithOperation(&self, interaction: &UIDragInteraction,session: &UIDragSession,operation: UIDropOperation,); + + #[optional] + #[method(dragInteraction:sessionDidTransferItems:)] + pub unsafe fn dragInteraction_sessionDidTransferItems(&self, interaction: &UIDragInteraction,session: &UIDragSession,); + + #[optional] + #[method_id(@__retain_semantics Other dragInteraction:itemsForAddingToSession:withTouchAtPoint:)] + pub unsafe fn dragInteraction_itemsForAddingToSession_withTouchAtPoint(&self, interaction: &UIDragInteraction,session: &UIDragSession,point: CGPoint,) -> Id, Shared>; + + #[optional] + #[method_id(@__retain_semantics Other dragInteraction:sessionForAddingItems:withTouchAtPoint:)] + pub unsafe fn dragInteraction_sessionForAddingItems_withTouchAtPoint(&self, interaction: &UIDragInteraction,sessions: &NSArray,point: CGPoint,) -> Option>; + + #[optional] + #[method(dragInteraction:session:willAddItems:forInteraction:)] + pub unsafe fn dragInteraction_session_willAddItems_forInteraction(&self, interaction: &UIDragInteraction,session: &UIDragSession,items: &NSArray,addingInteraction: &UIDragInteraction,); + + #[optional] + #[method_id(@__retain_semantics Other dragInteraction:previewForCancellingItem:withDefault:)] + pub unsafe fn dragInteraction_previewForCancellingItem_withDefault(&self, interaction: &UIDragInteraction,item: &UIDragItem,defaultPreview: &UITargetedDragPreview,) -> Option>; + + #[optional] + #[method(dragInteraction:item:willAnimateCancelWithAnimator:)] + pub unsafe fn dragInteraction_item_willAnimateCancelWithAnimator(&self, interaction: &UIDragInteraction,item: &UIDragItem,animator: &UIDragAnimating,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIDragItem.rs b/crates/icrate-generated/src/UIKit/generated/UIDragItem.rs new file mode 100644 index 000000000..ac6464b4d --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIDragItem.rs @@ -0,0 +1,42 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIDragItem; + + unsafe impl ClassType for UIDragItem { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIDragItem { + #[method_id(@__retain_semantics Init initWithItemProvider:)] + pub unsafe fn initWithItemProvider(this: Option>, itemProvider: &NSItemProvider,) -> 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; + + #[method_id(@__retain_semantics Other itemProvider)] + pub unsafe fn itemProvider(&self, ) -> Id; + + #[method_id(@__retain_semantics Other localObject)] + pub unsafe fn localObject(&self, ) -> Option>; + + #[method(setLocalObject:)] + pub unsafe fn setLocalObject(&self, localObject: Option<&Object>,); + + #[method(previewProvider)] + pub unsafe fn previewProvider(&self, ) -> *mut Block<(), *mut UIDragPreview>; + + #[method(setPreviewProvider:)] + pub unsafe fn setPreviewProvider(&self, previewProvider: Option<&Block<(), *mut UIDragPreview>>,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIDragPreview.rs b/crates/icrate-generated/src/UIKit/generated/UIDragPreview.rs new file mode 100644 index 000000000..45a79020a --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIDragPreview.rs @@ -0,0 +1,36 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIDragPreview; + + unsafe impl ClassType for UIDragPreview { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIDragPreview { + #[method_id(@__retain_semantics Init initWithView:parameters:)] + pub unsafe fn initWithView_parameters(this: Option>, view: &UIView,parameters: &UIDragPreviewParameters,) -> Id; + + #[method_id(@__retain_semantics Init initWithView:)] + pub unsafe fn initWithView(this: Option>, view: &UIView,) -> 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; + + #[method_id(@__retain_semantics Other view)] + pub unsafe fn view(&self, ) -> Id; + + #[method_id(@__retain_semantics Other parameters)] + pub unsafe fn parameters(&self, ) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIDragPreviewParameters.rs b/crates/icrate-generated/src/UIKit/generated/UIDragPreviewParameters.rs new file mode 100644 index 000000000..4b74df765 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIDragPreviewParameters.rs @@ -0,0 +1,18 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIDragPreviewParameters; + + unsafe impl ClassType for UIDragPreviewParameters { + type Super = UIPreviewParameters; + } +); + +extern_methods!( + unsafe impl UIDragPreviewParameters { + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIDragSession.rs b/crates/icrate-generated/src/UIKit/generated/UIDragSession.rs new file mode 100644 index 000000000..80d012a60 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIDragSession.rs @@ -0,0 +1,69 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_protocol!( + pub struct UIDragDropSession; + + unsafe impl UIDragDropSession { + #[method_id(@__retain_semantics Other items)] + pub unsafe fn items(&self, ) -> Id, Shared>; + + #[method(locationInView:)] + pub unsafe fn locationInView(&self, view: &UIView,) -> CGPoint; + + #[method(allowsMoveOperation)] + pub unsafe fn allowsMoveOperation(&self, ) -> bool; + + #[method(isRestrictedToDraggingApplication)] + pub unsafe fn isRestrictedToDraggingApplication(&self, ) -> bool; + + #[method(hasItemsConformingToTypeIdentifiers:)] + pub unsafe fn hasItemsConformingToTypeIdentifiers(&self, typeIdentifiers: &NSArray,) -> bool; + + #[method(canLoadObjectsOfClass:)] + pub unsafe fn canLoadObjectsOfClass(&self, aClass: NonNull,) -> bool; + + } +); + +extern_protocol!( + pub struct UIDragSession; + + unsafe impl UIDragSession { + #[method_id(@__retain_semantics Other localContext)] + pub unsafe fn localContext(&self, ) -> Option>; + + #[method(setLocalContext:)] + pub unsafe fn setLocalContext(&self, localContext: Option<&Object>,); + + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum UIDropSessionProgressIndicatorStyle { + UIDropSessionProgressIndicatorStyleNone = 0, + UIDropSessionProgressIndicatorStyleDefault = 1, + } +); + +extern_protocol!( + pub struct UIDropSession; + + unsafe impl UIDropSession { + #[method_id(@__retain_semantics Other localDragSession)] + pub unsafe fn localDragSession(&self, ) -> Option>; + + #[method(progressIndicatorStyle)] + pub unsafe fn progressIndicatorStyle(&self, ) -> UIDropSessionProgressIndicatorStyle; + + #[method(setProgressIndicatorStyle:)] + pub unsafe fn setProgressIndicatorStyle(&self, progressIndicatorStyle: UIDropSessionProgressIndicatorStyle,); + + #[method_id(@__retain_semantics Other loadObjectsOfClass:completion:)] + pub unsafe fn loadObjectsOfClass_completion(&self, aClass: NonNull,completion: &Block<(NonNull>, ), ()>,) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIDropInteraction.rs b/crates/icrate-generated/src/UIKit/generated/UIDropInteraction.rs new file mode 100644 index 000000000..c7fbbd2bd --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIDropInteraction.rs @@ -0,0 +1,127 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIDropInteraction; + + unsafe impl ClassType for UIDropInteraction { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIDropInteraction { + #[method_id(@__retain_semantics Init initWithDelegate:)] + pub unsafe fn initWithDelegate(this: Option>, delegate: &UIDropInteractionDelegate,) -> 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; + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(allowsSimultaneousDropSessions)] + pub unsafe fn allowsSimultaneousDropSessions(&self, ) -> bool; + + #[method(setAllowsSimultaneousDropSessions:)] + pub unsafe fn setAllowsSimultaneousDropSessions(&self, allowsSimultaneousDropSessions: bool,); + + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum UIDropOperation { + UIDropOperationCancel = 0, + UIDropOperationForbidden = 1, + UIDropOperationCopy = 2, + UIDropOperationMove = 3, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIDropProposal; + + unsafe impl ClassType for UIDropProposal { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIDropProposal { + #[method_id(@__retain_semantics Init initWithDropOperation:)] + pub unsafe fn initWithDropOperation(this: Option>, operation: UIDropOperation,) -> 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; + + #[method(operation)] + pub unsafe fn operation(&self, ) -> UIDropOperation; + + #[method(isPrecise)] + pub unsafe fn isPrecise(&self, ) -> bool; + + #[method(setPrecise:)] + pub unsafe fn setPrecise(&self, precise: bool,); + + #[method(prefersFullSizePreview)] + pub unsafe fn prefersFullSizePreview(&self, ) -> bool; + + #[method(setPrefersFullSizePreview:)] + pub unsafe fn setPrefersFullSizePreview(&self, prefersFullSizePreview: bool,); + + } +); + +extern_protocol!( + pub struct UIDropInteractionDelegate; + + unsafe impl UIDropInteractionDelegate { + #[optional] + #[method(dropInteraction:canHandleSession:)] + pub unsafe fn dropInteraction_canHandleSession(&self, interaction: &UIDropInteraction,session: &UIDropSession,) -> bool; + + #[optional] + #[method(dropInteraction:sessionDidEnter:)] + pub unsafe fn dropInteraction_sessionDidEnter(&self, interaction: &UIDropInteraction,session: &UIDropSession,); + + #[optional] + #[method_id(@__retain_semantics Other dropInteraction:sessionDidUpdate:)] + pub unsafe fn dropInteraction_sessionDidUpdate(&self, interaction: &UIDropInteraction,session: &UIDropSession,) -> Id; + + #[optional] + #[method(dropInteraction:sessionDidExit:)] + pub unsafe fn dropInteraction_sessionDidExit(&self, interaction: &UIDropInteraction,session: &UIDropSession,); + + #[optional] + #[method(dropInteraction:performDrop:)] + pub unsafe fn dropInteraction_performDrop(&self, interaction: &UIDropInteraction,session: &UIDropSession,); + + #[optional] + #[method(dropInteraction:concludeDrop:)] + pub unsafe fn dropInteraction_concludeDrop(&self, interaction: &UIDropInteraction,session: &UIDropSession,); + + #[optional] + #[method(dropInteraction:sessionDidEnd:)] + pub unsafe fn dropInteraction_sessionDidEnd(&self, interaction: &UIDropInteraction,session: &UIDropSession,); + + #[optional] + #[method_id(@__retain_semantics Other dropInteraction:previewForDroppingItem:withDefault:)] + pub unsafe fn dropInteraction_previewForDroppingItem_withDefault(&self, interaction: &UIDropInteraction,item: &UIDragItem,defaultPreview: &UITargetedDragPreview,) -> Option>; + + #[optional] + #[method(dropInteraction:item:willAnimateDropWithAnimator:)] + pub unsafe fn dropInteraction_item_willAnimateDropWithAnimator(&self, interaction: &UIDropInteraction,item: &UIDragItem,animator: &UIDragAnimating,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIDynamicAnimator.rs b/crates/icrate-generated/src/UIKit/generated/UIDynamicAnimator.rs new file mode 100644 index 000000000..8737cdea7 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIDynamicAnimator.rs @@ -0,0 +1,87 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_protocol!( + pub struct UIDynamicAnimatorDelegate; + + unsafe impl UIDynamicAnimatorDelegate { + #[optional] + #[method(dynamicAnimatorWillResume:)] + pub unsafe fn dynamicAnimatorWillResume(&self, animator: &UIDynamicAnimator,); + + #[optional] + #[method(dynamicAnimatorDidPause:)] + pub unsafe fn dynamicAnimatorDidPause(&self, animator: &UIDynamicAnimator,); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIDynamicAnimator; + + unsafe impl ClassType for UIDynamicAnimator { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIDynamicAnimator { + #[method_id(@__retain_semantics Init initWithReferenceView:)] + pub unsafe fn initWithReferenceView(this: Option>, view: &UIView,) -> Id; + + #[method(addBehavior:)] + pub unsafe fn addBehavior(&self, behavior: &UIDynamicBehavior,); + + #[method(removeBehavior:)] + pub unsafe fn removeBehavior(&self, behavior: &UIDynamicBehavior,); + + #[method(removeAllBehaviors)] + pub unsafe fn removeAllBehaviors(&self, ); + + #[method_id(@__retain_semantics Other referenceView)] + pub unsafe fn referenceView(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other behaviors)] + pub unsafe fn behaviors(&self, ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other itemsInRect:)] + pub unsafe fn itemsInRect(&self, rect: CGRect,) -> Id, Shared>; + + #[method(updateItemUsingCurrentState:)] + pub unsafe fn updateItemUsingCurrentState(&self, item: &UIDynamicItem,); + + #[method(isRunning)] + pub unsafe fn isRunning(&self, ) -> bool; + + #[method(elapsedTime)] + pub unsafe fn elapsedTime(&self, ) -> NSTimeInterval; + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&UIDynamicAnimatorDelegate>,); + + } +); + +extern_methods!( + /// UICollectionViewAdditions + unsafe impl UIDynamicAnimator { + #[method_id(@__retain_semantics Init initWithCollectionViewLayout:)] + pub unsafe fn initWithCollectionViewLayout(this: Option>, layout: &UICollectionViewLayout,) -> Id; + + #[method_id(@__retain_semantics Other layoutAttributesForCellAtIndexPath:)] + pub unsafe fn layoutAttributesForCellAtIndexPath(&self, indexPath: &NSIndexPath,) -> Option>; + + #[method_id(@__retain_semantics Other layoutAttributesForSupplementaryViewOfKind:atIndexPath:)] + pub unsafe fn layoutAttributesForSupplementaryViewOfKind_atIndexPath(&self, kind: &NSString,indexPath: &NSIndexPath,) -> Option>; + + #[method_id(@__retain_semantics Other layoutAttributesForDecorationViewOfKind:atIndexPath:)] + pub unsafe fn layoutAttributesForDecorationViewOfKind_atIndexPath(&self, decorationViewKind: &NSString,indexPath: &NSIndexPath,) -> Option>; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIDynamicBehavior.rs b/crates/icrate-generated/src/UIKit/generated/UIDynamicBehavior.rs new file mode 100644 index 000000000..cbd78c71c --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIDynamicBehavior.rs @@ -0,0 +1,98 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSUInteger)] + pub enum UIDynamicItemCollisionBoundsType { + UIDynamicItemCollisionBoundsTypeRectangle = 0, + UIDynamicItemCollisionBoundsTypeEllipse = 1, + UIDynamicItemCollisionBoundsTypePath = 2, + } +); + +extern_protocol!( + pub struct UIDynamicItem; + + unsafe impl UIDynamicItem { + #[method(center)] + pub unsafe fn center(&self, ) -> CGPoint; + + #[method(setCenter:)] + pub unsafe fn setCenter(&self, center: CGPoint,); + + #[method(bounds)] + pub unsafe fn bounds(&self, ) -> CGRect; + + #[method(transform)] + pub unsafe fn transform(&self, ) -> CGAffineTransform; + + #[method(setTransform:)] + pub unsafe fn setTransform(&self, transform: CGAffineTransform,); + + #[optional] + #[method(collisionBoundsType)] + pub unsafe fn collisionBoundsType(&self, ) -> UIDynamicItemCollisionBoundsType; + + #[optional] + #[method_id(@__retain_semantics Other collisionBoundingPath)] + pub unsafe fn collisionBoundingPath(&self, ) -> Id; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIDynamicItemGroup; + + unsafe impl ClassType for UIDynamicItemGroup { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIDynamicItemGroup { + #[method_id(@__retain_semantics Init initWithItems:)] + pub unsafe fn initWithItems(this: Option>, items: &NSArray,) -> Id; + + #[method_id(@__retain_semantics Other items)] + pub unsafe fn items(&self, ) -> Id, Shared>; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIDynamicBehavior; + + unsafe impl ClassType for UIDynamicBehavior { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIDynamicBehavior { + #[method(addChildBehavior:)] + pub unsafe fn addChildBehavior(&self, behavior: &UIDynamicBehavior,); + + #[method(removeChildBehavior:)] + pub unsafe fn removeChildBehavior(&self, behavior: &UIDynamicBehavior,); + + #[method_id(@__retain_semantics Other childBehaviors)] + pub unsafe fn childBehaviors(&self, ) -> Id, Shared>; + + #[method(action)] + pub unsafe fn action(&self, ) -> *mut Block<(), ()>; + + #[method(setAction:)] + pub unsafe fn setAction(&self, action: Option<&Block<(), ()>>,); + + #[method(willMoveToAnimator:)] + pub unsafe fn willMoveToAnimator(&self, dynamicAnimator: Option<&UIDynamicAnimator>,); + + #[method_id(@__retain_semantics Other dynamicAnimator)] + pub unsafe fn dynamicAnimator(&self, ) -> Option>; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIDynamicItemBehavior.rs b/crates/icrate-generated/src/UIKit/generated/UIDynamicItemBehavior.rs new file mode 100644 index 000000000..d97fd4750 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIDynamicItemBehavior.rs @@ -0,0 +1,90 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIDynamicItemBehavior; + + unsafe impl ClassType for UIDynamicItemBehavior { + type Super = UIDynamicBehavior; + } +); + +extern_methods!( + unsafe impl UIDynamicItemBehavior { + #[method_id(@__retain_semantics Init initWithItems:)] + pub unsafe fn initWithItems(this: Option>, items: &NSArray,) -> Id; + + #[method(addItem:)] + pub unsafe fn addItem(&self, item: &UIDynamicItem,); + + #[method(removeItem:)] + pub unsafe fn removeItem(&self, item: &UIDynamicItem,); + + #[method_id(@__retain_semantics Other items)] + pub unsafe fn items(&self, ) -> Id, Shared>; + + #[method(elasticity)] + pub unsafe fn elasticity(&self, ) -> CGFloat; + + #[method(setElasticity:)] + pub unsafe fn setElasticity(&self, elasticity: CGFloat,); + + #[method(friction)] + pub unsafe fn friction(&self, ) -> CGFloat; + + #[method(setFriction:)] + pub unsafe fn setFriction(&self, friction: CGFloat,); + + #[method(density)] + pub unsafe fn density(&self, ) -> CGFloat; + + #[method(setDensity:)] + pub unsafe fn setDensity(&self, density: CGFloat,); + + #[method(resistance)] + pub unsafe fn resistance(&self, ) -> CGFloat; + + #[method(setResistance:)] + pub unsafe fn setResistance(&self, resistance: CGFloat,); + + #[method(angularResistance)] + pub unsafe fn angularResistance(&self, ) -> CGFloat; + + #[method(setAngularResistance:)] + pub unsafe fn setAngularResistance(&self, angularResistance: CGFloat,); + + #[method(charge)] + pub unsafe fn charge(&self, ) -> CGFloat; + + #[method(setCharge:)] + pub unsafe fn setCharge(&self, charge: CGFloat,); + + #[method(isAnchored)] + pub unsafe fn isAnchored(&self, ) -> bool; + + #[method(setAnchored:)] + pub unsafe fn setAnchored(&self, anchored: bool,); + + #[method(allowsRotation)] + pub unsafe fn allowsRotation(&self, ) -> bool; + + #[method(setAllowsRotation:)] + pub unsafe fn setAllowsRotation(&self, allowsRotation: bool,); + + #[method(addLinearVelocity:forItem:)] + pub unsafe fn addLinearVelocity_forItem(&self, velocity: CGPoint,item: &UIDynamicItem,); + + #[method(linearVelocityForItem:)] + pub unsafe fn linearVelocityForItem(&self, item: &UIDynamicItem,) -> CGPoint; + + #[method(addAngularVelocity:forItem:)] + pub unsafe fn addAngularVelocity_forItem(&self, velocity: CGFloat,item: &UIDynamicItem,); + + #[method(angularVelocityForItem:)] + pub unsafe fn angularVelocityForItem(&self, item: &UIDynamicItem,) -> CGFloat; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIEditMenuInteraction.rs b/crates/icrate-generated/src/UIKit/generated/UIEditMenuInteraction.rs new file mode 100644 index 000000000..e477dd3b7 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIEditMenuInteraction.rs @@ -0,0 +1,127 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIEditMenuArrowDirection { + UIEditMenuArrowDirectionAutomatic = 0, + UIEditMenuArrowDirectionUp = 1, + UIEditMenuArrowDirectionDown = 2, + UIEditMenuArrowDirectionLeft = 3, + UIEditMenuArrowDirectionRight = 4, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIEditMenuConfiguration; + + unsafe impl ClassType for UIEditMenuConfiguration { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIEditMenuConfiguration { + #[method_id(@__retain_semantics Other identifier)] + pub unsafe fn identifier(&self, ) -> Id; + + #[method(sourcePoint)] + pub unsafe fn sourcePoint(&self, ) -> CGPoint; + + #[method(preferredArrowDirection)] + pub unsafe fn preferredArrowDirection(&self, ) -> UIEditMenuArrowDirection; + + #[method(setPreferredArrowDirection:)] + pub unsafe fn setPreferredArrowDirection(&self, preferredArrowDirection: UIEditMenuArrowDirection,); + + #[method_id(@__retain_semantics Other configurationWithIdentifier:sourcePoint:)] + pub unsafe fn configurationWithIdentifier_sourcePoint(identifier: Option<&NSCopying>,sourcePoint: CGPoint,) -> 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; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIEditMenuInteraction; + + unsafe impl ClassType for UIEditMenuInteraction { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIEditMenuInteraction { + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method_id(@__retain_semantics Init initWithDelegate:)] + pub unsafe fn initWithDelegate(this: Option>, delegate: Option<&UIEditMenuInteractionDelegate>,) -> Id; + + #[method(presentEditMenuWithConfiguration:)] + pub unsafe fn presentEditMenuWithConfiguration(&self, configuration: &UIEditMenuConfiguration,); + + #[method(dismissMenu)] + pub unsafe fn dismissMenu(&self, ); + + #[method(reloadVisibleMenu)] + pub unsafe fn reloadVisibleMenu(&self, ); + + #[method(updateVisibleMenuPositionAnimated:)] + pub unsafe fn updateVisibleMenuPositionAnimated(&self, animated: bool,); + + #[method(locationInView:)] + pub unsafe fn locationInView(&self, view: Option<&UIView>,) -> CGPoint; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics New new)] + pub unsafe fn new() -> Id; + + } +); + +extern_protocol!( + pub struct UIEditMenuInteractionAnimating; + + unsafe impl UIEditMenuInteractionAnimating { + #[method(addAnimations:)] + pub unsafe fn addAnimations(&self, animations: &Block<(), ()>,); + + #[method(addCompletion:)] + pub unsafe fn addCompletion(&self, completion: &Block<(), ()>,); + + } +); + +extern_protocol!( + pub struct UIEditMenuInteractionDelegate; + + unsafe impl UIEditMenuInteractionDelegate { + #[optional] + #[method_id(@__retain_semantics Other editMenuInteraction:menuForConfiguration:suggestedActions:)] + pub unsafe fn editMenuInteraction_menuForConfiguration_suggestedActions(&self, interaction: &UIEditMenuInteraction,configuration: &UIEditMenuConfiguration,suggestedActions: &NSArray,) -> Option>; + + #[optional] + #[method(editMenuInteraction:targetRectForConfiguration:)] + pub unsafe fn editMenuInteraction_targetRectForConfiguration(&self, interaction: &UIEditMenuInteraction,configuration: &UIEditMenuConfiguration,) -> CGRect; + + #[optional] + #[method(editMenuInteraction:willPresentMenuForConfiguration:animator:)] + pub unsafe fn editMenuInteraction_willPresentMenuForConfiguration_animator(&self, interaction: &UIEditMenuInteraction,configuration: &UIEditMenuConfiguration,animator: &UIEditMenuInteractionAnimating,); + + #[optional] + #[method(editMenuInteraction:willDismissMenuForConfiguration:animator:)] + pub unsafe fn editMenuInteraction_willDismissMenuForConfiguration_animator(&self, interaction: &UIEditMenuInteraction,configuration: &UIEditMenuConfiguration,animator: &UIEditMenuInteractionAnimating,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIEvent.rs b/crates/icrate-generated/src/UIKit/generated/UIEvent.rs new file mode 100644 index 000000000..461c148f8 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIEvent.rs @@ -0,0 +1,94 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIEventType { + UIEventTypeTouches = 0, + UIEventTypeMotion = 1, + UIEventTypeRemoteControl = 2, + UIEventTypePresses = 3, + UIEventTypeScroll = 10, + UIEventTypeHover = 11, + UIEventTypeTransform = 14, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIEventSubtype { + UIEventSubtypeNone = 0, + UIEventSubtypeMotionShake = 1, + UIEventSubtypeRemoteControlPlay = 100, + UIEventSubtypeRemoteControlPause = 101, + UIEventSubtypeRemoteControlStop = 102, + UIEventSubtypeRemoteControlTogglePlayPause = 103, + UIEventSubtypeRemoteControlNextTrack = 104, + UIEventSubtypeRemoteControlPreviousTrack = 105, + UIEventSubtypeRemoteControlBeginSeekingBackward = 106, + UIEventSubtypeRemoteControlEndSeekingBackward = 107, + UIEventSubtypeRemoteControlBeginSeekingForward = 108, + UIEventSubtypeRemoteControlEndSeekingForward = 109, + } +); + +ns_options!( + #[underlying(NSInteger)] + pub enum UIEventButtonMask { + UIEventButtonMaskPrimary = 1<<0, + UIEventButtonMaskSecondary = 1<<1, + } +); + +extern_fn!( + pub unsafe fn UIEventButtonMaskForButtonNumber(buttonNumber: NSInteger,) -> UIEventButtonMask; +); + +extern_class!( + #[derive(Debug)] + pub struct UIEvent; + + unsafe impl ClassType for UIEvent { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIEvent { + #[method(type)] + pub unsafe fn type_(&self, ) -> UIEventType; + + #[method(subtype)] + pub unsafe fn subtype(&self, ) -> UIEventSubtype; + + #[method(timestamp)] + pub unsafe fn timestamp(&self, ) -> NSTimeInterval; + + #[method(modifierFlags)] + pub unsafe fn modifierFlags(&self, ) -> UIKeyModifierFlags; + + #[method(buttonMask)] + pub unsafe fn buttonMask(&self, ) -> UIEventButtonMask; + + #[method_id(@__retain_semantics Other allTouches)] + pub unsafe fn allTouches(&self, ) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other touchesForWindow:)] + pub unsafe fn touchesForWindow(&self, window: &UIWindow,) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other touchesForView:)] + pub unsafe fn touchesForView(&self, view: &UIView,) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other touchesForGestureRecognizer:)] + pub unsafe fn touchesForGestureRecognizer(&self, gesture: &UIGestureRecognizer,) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other coalescedTouchesForTouch:)] + pub unsafe fn coalescedTouchesForTouch(&self, touch: &UITouch,) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other predictedTouchesForTouch:)] + pub unsafe fn predictedTouchesForTouch(&self, touch: &UITouch,) -> Option, Shared>>; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIEventAttribution.rs b/crates/icrate-generated/src/UIKit/generated/UIEventAttribution.rs new file mode 100644 index 000000000..1766976d6 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIEventAttribution.rs @@ -0,0 +1,42 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIEventAttribution; + + unsafe impl ClassType for UIEventAttribution { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIEventAttribution { + #[method(sourceIdentifier)] + pub unsafe fn sourceIdentifier(&self, ) -> u8; + + #[method_id(@__retain_semantics Other destinationURL)] + pub unsafe fn destinationURL(&self, ) -> Id; + + #[method_id(@__retain_semantics Other reportEndpoint)] + pub unsafe fn reportEndpoint(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other sourceDescription)] + pub unsafe fn sourceDescription(&self, ) -> Id; + + #[method_id(@__retain_semantics Other purchaser)] + pub unsafe fn purchaser(&self, ) -> Id; + + #[method_id(@__retain_semantics Init initWithSourceIdentifier:destinationURL:sourceDescription:purchaser:)] + pub unsafe fn initWithSourceIdentifier_destinationURL_sourceDescription_purchaser(this: Option>, sourceIdentifier: u8,destinationURL: &NSURL,sourceDescription: &NSString,purchaser: &NSString,) -> 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-generated/src/UIKit/generated/UIEventAttributionView.rs b/crates/icrate-generated/src/UIKit/generated/UIEventAttributionView.rs new file mode 100644 index 000000000..36ed272e1 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIEventAttributionView.rs @@ -0,0 +1,18 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIEventAttributionView; + + unsafe impl ClassType for UIEventAttributionView { + type Super = UIView; + } +); + +extern_methods!( + unsafe impl UIEventAttributionView { + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIFeedbackGenerator.rs b/crates/icrate-generated/src/UIKit/generated/UIFeedbackGenerator.rs new file mode 100644 index 000000000..6cea429ba --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIFeedbackGenerator.rs @@ -0,0 +1,21 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIFeedbackGenerator; + + unsafe impl ClassType for UIFeedbackGenerator { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIFeedbackGenerator { + #[method(prepare)] + pub unsafe fn prepare(&self, ); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIFieldBehavior.rs b/crates/icrate-generated/src/UIKit/generated/UIFieldBehavior.rs new file mode 100644 index 000000000..77beb109b --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIFieldBehavior.rs @@ -0,0 +1,111 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIFieldBehavior; + + unsafe impl ClassType for UIFieldBehavior { + type Super = UIDynamicBehavior; + } +); + +extern_methods!( + unsafe impl UIFieldBehavior { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method(addItem:)] + pub unsafe fn addItem(&self, item: &UIDynamicItem,); + + #[method(removeItem:)] + pub unsafe fn removeItem(&self, item: &UIDynamicItem,); + + #[method_id(@__retain_semantics Other items)] + pub unsafe fn items(&self, ) -> Id, Shared>; + + #[method(position)] + pub unsafe fn position(&self, ) -> CGPoint; + + #[method(setPosition:)] + pub unsafe fn setPosition(&self, position: CGPoint,); + + #[method_id(@__retain_semantics Other region)] + pub unsafe fn region(&self, ) -> Id; + + #[method(setRegion:)] + pub unsafe fn setRegion(&self, region: &UIRegion,); + + #[method(strength)] + pub unsafe fn strength(&self, ) -> CGFloat; + + #[method(setStrength:)] + pub unsafe fn setStrength(&self, strength: CGFloat,); + + #[method(falloff)] + pub unsafe fn falloff(&self, ) -> CGFloat; + + #[method(setFalloff:)] + pub unsafe fn setFalloff(&self, falloff: CGFloat,); + + #[method(minimumRadius)] + pub unsafe fn minimumRadius(&self, ) -> CGFloat; + + #[method(setMinimumRadius:)] + pub unsafe fn setMinimumRadius(&self, minimumRadius: CGFloat,); + + #[method(direction)] + pub unsafe fn direction(&self, ) -> CGVector; + + #[method(setDirection:)] + pub unsafe fn setDirection(&self, direction: CGVector,); + + #[method(smoothness)] + pub unsafe fn smoothness(&self, ) -> CGFloat; + + #[method(setSmoothness:)] + pub unsafe fn setSmoothness(&self, smoothness: CGFloat,); + + #[method(animationSpeed)] + pub unsafe fn animationSpeed(&self, ) -> CGFloat; + + #[method(setAnimationSpeed:)] + pub unsafe fn setAnimationSpeed(&self, animationSpeed: CGFloat,); + + #[method_id(@__retain_semantics Other dragField)] + pub unsafe fn dragField() -> Id; + + #[method_id(@__retain_semantics Other vortexField)] + pub unsafe fn vortexField() -> Id; + + #[method_id(@__retain_semantics Other radialGravityFieldWithPosition:)] + pub unsafe fn radialGravityFieldWithPosition(position: CGPoint,) -> Id; + + #[method_id(@__retain_semantics Other linearGravityFieldWithVector:)] + pub unsafe fn linearGravityFieldWithVector(direction: CGVector,) -> Id; + + #[method_id(@__retain_semantics Other velocityFieldWithVector:)] + pub unsafe fn velocityFieldWithVector(direction: CGVector,) -> Id; + + #[method_id(@__retain_semantics Other noiseFieldWithSmoothness:animationSpeed:)] + pub unsafe fn noiseFieldWithSmoothness_animationSpeed(smoothness: CGFloat,speed: CGFloat,) -> Id; + + #[method_id(@__retain_semantics Other turbulenceFieldWithSmoothness:animationSpeed:)] + pub unsafe fn turbulenceFieldWithSmoothness_animationSpeed(smoothness: CGFloat,speed: CGFloat,) -> Id; + + #[method_id(@__retain_semantics Other springField)] + pub unsafe fn springField() -> Id; + + #[method_id(@__retain_semantics Other electricField)] + pub unsafe fn electricField() -> Id; + + #[method_id(@__retain_semantics Other magneticField)] + pub unsafe fn magneticField() -> Id; + + #[method_id(@__retain_semantics Other fieldWithEvaluationBlock:)] + pub unsafe fn fieldWithEvaluationBlock(block: &Block<(NonNull, CGPoint, CGVector, CGFloat, CGFloat, NSTimeInterval, ), CGVector>,) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIFindInteraction.rs b/crates/icrate-generated/src/UIKit/generated/UIFindInteraction.rs new file mode 100644 index 000000000..6e540ee8a --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIFindInteraction.rs @@ -0,0 +1,87 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_protocol!( + pub struct UIFindInteractionDelegate; + + unsafe impl UIFindInteractionDelegate { + #[method_id(@__retain_semantics Other findInteraction:sessionForView:)] + pub unsafe fn findInteraction_sessionForView(&self, interaction: &UIFindInteraction,view: &UIView,) -> Option>; + + #[optional] + #[method(findInteraction:didBeginFindSession:)] + pub unsafe fn findInteraction_didBeginFindSession(&self, interaction: &UIFindInteraction,session: &UIFindSession,); + + #[optional] + #[method(findInteraction:didEndFindSession:)] + pub unsafe fn findInteraction_didEndFindSession(&self, interaction: &UIFindInteraction,session: &UIFindSession,); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIFindInteraction; + + unsafe impl ClassType for UIFindInteraction { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIFindInteraction { + #[method(isFindNavigatorVisible)] + pub unsafe fn isFindNavigatorVisible(&self, ) -> bool; + + #[method_id(@__retain_semantics Other activeFindSession)] + pub unsafe fn activeFindSession(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other searchText)] + pub unsafe fn searchText(&self, ) -> Option>; + + #[method(setSearchText:)] + pub unsafe fn setSearchText(&self, searchText: Option<&NSString>,); + + #[method_id(@__retain_semantics Other replacementText)] + pub unsafe fn replacementText(&self, ) -> Option>; + + #[method(setReplacementText:)] + pub unsafe fn setReplacementText(&self, replacementText: Option<&NSString>,); + + #[method(optionsMenuProvider)] + pub unsafe fn optionsMenuProvider(&self, ) -> *mut Block<(NonNull>, ), *mut UIMenu>; + + #[method(setOptionsMenuProvider:)] + pub unsafe fn setOptionsMenuProvider(&self, optionsMenuProvider: Option<&Block<(NonNull>, ), *mut UIMenu>>,); + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method_id(@__retain_semantics Init initWithSessionDelegate:)] + pub unsafe fn initWithSessionDelegate(this: Option>, sessionDelegate: &UIFindInteractionDelegate,) -> Id; + + #[method(presentFindNavigatorShowingReplace:)] + pub unsafe fn presentFindNavigatorShowingReplace(&self, showingReplace: bool,); + + #[method(dismissFindNavigator)] + pub unsafe fn dismissFindNavigator(&self, ); + + #[method(findNext)] + pub unsafe fn findNext(&self, ); + + #[method(findPrevious)] + pub unsafe fn findPrevious(&self, ); + + #[method(updateResultCount)] + pub unsafe fn updateResultCount(&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-generated/src/UIKit/generated/UIFindSession.rs b/crates/icrate-generated/src/UIKit/generated/UIFindSession.rs new file mode 100644 index 000000000..185cde0c9 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIFindSession.rs @@ -0,0 +1,118 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIFindSessionSearchResultDisplayStyle { + UIFindSessionSearchResultDisplayStyleCurrentAndTotal = 0, + UIFindSessionSearchResultDisplayStyleTotal = 1, + UIFindSessionSearchResultDisplayStyleNone = 2, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UITextSearchMatchMethod { + UITextSearchMatchMethodContains = 0, + UITextSearchMatchMethodStartsWith = 1, + UITextSearchMatchMethodFullWord = 2, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UITextSearchOptions; + + unsafe impl ClassType for UITextSearchOptions { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UITextSearchOptions { + #[method(wordMatchMethod)] + pub unsafe fn wordMatchMethod(&self, ) -> UITextSearchMatchMethod; + + #[method(stringCompareOptions)] + pub unsafe fn stringCompareOptions(&self, ) -> NSStringCompareOptions; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIFindSession; + + unsafe impl ClassType for UIFindSession { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIFindSession { + #[method(resultCount)] + pub unsafe fn resultCount(&self, ) -> NSInteger; + + #[method(highlightedResultIndex)] + pub unsafe fn highlightedResultIndex(&self, ) -> NSInteger; + + #[method(searchResultDisplayStyle)] + pub unsafe fn searchResultDisplayStyle(&self, ) -> UIFindSessionSearchResultDisplayStyle; + + #[method(setSearchResultDisplayStyle:)] + pub unsafe fn setSearchResultDisplayStyle(&self, searchResultDisplayStyle: UIFindSessionSearchResultDisplayStyle,); + + #[method(supportsReplacement)] + pub unsafe fn supportsReplacement(&self, ) -> bool; + + #[method(allowsReplacementForCurrentlyHighlightedResult)] + pub unsafe fn allowsReplacementForCurrentlyHighlightedResult(&self, ) -> bool; + + #[method(performSearchWithQuery:options:)] + pub unsafe fn performSearchWithQuery_options(&self, query: &NSString,options: Option<&UITextSearchOptions>,); + + #[method(performSingleReplacementWithSearchQuery:replacementString:options:)] + pub unsafe fn performSingleReplacementWithSearchQuery_replacementString_options(&self, searchQuery: &NSString,replacementString: &NSString,options: Option<&UITextSearchOptions>,); + + #[method(replaceAllInstancesOfSearchQuery:withReplacementString:options:)] + pub unsafe fn replaceAllInstancesOfSearchQuery_withReplacementString_options(&self, searchQuery: &NSString,replacementString: &NSString,options: Option<&UITextSearchOptions>,); + + #[method(highlightNextResultInDirection:)] + pub unsafe fn highlightNextResultInDirection(&self, direction: UITextStorageDirection,); + + #[method(invalidateFoundResults)] + pub unsafe fn invalidateFoundResults(&self, ); + + #[method(allowsReplacement)] + pub unsafe fn allowsReplacement(&self, ) -> bool; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UITextSearchingFindSession; + + unsafe impl ClassType for UITextSearchingFindSession { + type Super = UIFindSession; + } +); + +extern_methods!( + unsafe impl UITextSearchingFindSession { + #[method_id(@__retain_semantics Other searchableObject)] + pub unsafe fn searchableObject(&self, ) -> Option>; + + #[method_id(@__retain_semantics Init initWithSearchableObject:)] + pub unsafe fn initWithSearchableObject(this: Option>, searchableObject: &UITextSearching,) -> 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-generated/src/UIKit/generated/UIFocus.rs b/crates/icrate-generated/src/UIKit/generated/UIFocus.rs new file mode 100644 index 000000000..2b8d86c6d --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIFocus.rs @@ -0,0 +1,171 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_options!( + #[underlying(NSUInteger)] + pub enum UIFocusHeading { + UIFocusHeadingNone = 0, + UIFocusHeadingUp = 1<<0, + UIFocusHeadingDown = 1<<1, + UIFocusHeadingLeft = 1<<2, + UIFocusHeadingRight = 1<<3, + UIFocusHeadingNext = 1<<4, + UIFocusHeadingPrevious = 1<<5, + UIFocusHeadingFirst = 1<<8, + UIFocusHeadingLast = 1<<9, + } +); + +pub type UIFocusSoundIdentifier = NSString; + +pub type UIFocusGroupPriority = NSInteger; + +extern_static!(UIFocusGroupPriorityIgnored: UIFocusGroupPriority = 0); + +extern_static!(UIFocusGroupPriorityPreviouslyFocused: UIFocusGroupPriority = 1000); + +extern_static!(UIFocusGroupPriorityPrioritized: UIFocusGroupPriority = 2000); + +extern_protocol!( + pub struct UIFocusEnvironment; + + unsafe impl UIFocusEnvironment { + #[method_id(@__retain_semantics Other preferredFocusEnvironments)] + pub unsafe fn preferredFocusEnvironments(&self, ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other parentFocusEnvironment)] + pub unsafe fn parentFocusEnvironment(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other focusItemContainer)] + pub unsafe fn focusItemContainer(&self, ) -> Option>; + + #[method(setNeedsFocusUpdate)] + pub unsafe fn setNeedsFocusUpdate(&self, ); + + #[method(updateFocusIfNeeded)] + pub unsafe fn updateFocusIfNeeded(&self, ); + + #[method(shouldUpdateFocusInContext:)] + pub unsafe fn shouldUpdateFocusInContext(&self, context: &UIFocusUpdateContext,) -> bool; + + #[method(didUpdateFocusInContext:withAnimationCoordinator:)] + pub unsafe fn didUpdateFocusInContext_withAnimationCoordinator(&self, context: &UIFocusUpdateContext,coordinator: &UIFocusAnimationCoordinator,); + + #[optional] + #[method_id(@__retain_semantics Other soundIdentifierForFocusUpdateInContext:)] + pub unsafe fn soundIdentifierForFocusUpdateInContext(&self, context: &UIFocusUpdateContext,) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other preferredFocusedView)] + pub unsafe fn preferredFocusedView(&self, ) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other focusGroupIdentifier)] + pub unsafe fn focusGroupIdentifier(&self, ) -> Option>; + + } +); + +extern_protocol!( + pub struct UIFocusItem; + + unsafe impl UIFocusItem { + #[method(canBecomeFocused)] + pub unsafe fn canBecomeFocused(&self, ) -> bool; + + #[method(frame)] + pub unsafe fn frame(&self, ) -> CGRect; + + #[optional] + #[method_id(@__retain_semantics Other focusEffect)] + pub unsafe fn focusEffect(&self, ) -> Option>; + + #[optional] + #[method(focusGroupPriority)] + pub unsafe fn focusGroupPriority(&self, ) -> UIFocusGroupPriority; + + #[optional] + #[method(isTransparentFocusItem)] + pub unsafe fn isTransparentFocusItem(&self, ) -> bool; + + #[optional] + #[method(didHintFocusMovement:)] + pub unsafe fn didHintFocusMovement(&self, hint: &UIFocusMovementHint,); + + } +); + +extern_protocol!( + pub struct UIFocusItemContainer; + + unsafe impl UIFocusItemContainer { + #[method_id(@__retain_semantics Other coordinateSpace)] + pub unsafe fn coordinateSpace(&self, ) -> Id; + + #[method_id(@__retain_semantics Other focusItemsInRect:)] + pub unsafe fn focusItemsInRect(&self, rect: CGRect,) -> Id, Shared>; + + } +); + +extern_protocol!( + pub struct UIFocusItemScrollableContainer; + + unsafe impl UIFocusItemScrollableContainer { + #[method(contentOffset)] + pub unsafe fn contentOffset(&self, ) -> CGPoint; + + #[method(setContentOffset:)] + pub unsafe fn setContentOffset(&self, contentOffset: CGPoint,); + + #[method(contentSize)] + pub unsafe fn contentSize(&self, ) -> CGSize; + + #[method(visibleSize)] + pub unsafe fn visibleSize(&self, ) -> CGSize; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIFocusUpdateContext; + + unsafe impl ClassType for UIFocusUpdateContext { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIFocusUpdateContext { + #[method_id(@__retain_semantics Other previouslyFocusedItem)] + pub unsafe fn previouslyFocusedItem(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other nextFocusedItem)] + pub unsafe fn nextFocusedItem(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other previouslyFocusedView)] + pub unsafe fn previouslyFocusedView(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other nextFocusedView)] + pub unsafe fn nextFocusedView(&self, ) -> Option>; + + #[method(focusHeading)] + pub unsafe fn focusHeading(&self, ) -> UIFocusHeading; + + } +); + +extern_static!(UIFocusDidUpdateNotification: &'static NSNotificationName); + +extern_static!(UIFocusMovementDidFailNotification: &'static NSNotificationName); + +extern_static!(UIFocusUpdateContextKey: &'static NSString); + +extern_static!(UIFocusUpdateAnimationCoordinatorKey: &'static NSString); + +extern_static!(UIFocusSoundIdentifierNone: &'static UIFocusSoundIdentifier); + +extern_static!(UIFocusSoundIdentifierDefault: &'static UIFocusSoundIdentifier); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIFocusAnimationCoordinator.rs b/crates/icrate-generated/src/UIKit/generated/UIFocusAnimationCoordinator.rs new file mode 100644 index 000000000..9c6034d8a --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIFocusAnimationCoordinator.rs @@ -0,0 +1,37 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_protocol!( + pub struct UIFocusAnimationContext; + + unsafe impl UIFocusAnimationContext { + #[method(duration)] + pub unsafe fn duration(&self, ) -> NSTimeInterval; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIFocusAnimationCoordinator; + + unsafe impl ClassType for UIFocusAnimationCoordinator { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIFocusAnimationCoordinator { + #[method(addCoordinatedAnimations:completion:)] + pub unsafe fn addCoordinatedAnimations_completion(&self, animations: Option<&Block<(), ()>>,completion: Option<&Block<(), ()>>,); + + #[method(addCoordinatedFocusingAnimations:completion:)] + pub unsafe fn addCoordinatedFocusingAnimations_completion(&self, animations: Option<&Block<(NonNull, ), ()>>,completion: Option<&Block<(), ()>>,); + + #[method(addCoordinatedUnfocusingAnimations:completion:)] + pub unsafe fn addCoordinatedUnfocusingAnimations_completion(&self, animations: Option<&Block<(NonNull, ), ()>>,completion: Option<&Block<(), ()>>,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIFocusDebugger.rs b/crates/icrate-generated/src/UIKit/generated/UIFocusDebugger.rs new file mode 100644 index 000000000..b695cb6f6 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIFocusDebugger.rs @@ -0,0 +1,43 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIFocusDebugger; + + unsafe impl ClassType for UIFocusDebugger { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIFocusDebugger { + #[method_id(@__retain_semantics Other help)] + pub unsafe fn help() -> Id; + + #[method_id(@__retain_semantics Other status)] + pub unsafe fn status() -> Id; + + #[method_id(@__retain_semantics Other checkFocusabilityForItem:)] + pub unsafe fn checkFocusabilityForItem(item: &UIFocusItem,) -> Id; + + #[method_id(@__retain_semantics Other simulateFocusUpdateRequestFromEnvironment:)] + pub unsafe fn simulateFocusUpdateRequestFromEnvironment(environment: &UIFocusEnvironment,) -> Id; + + #[method_id(@__retain_semantics Other focusGroupsForEnvironment:)] + pub unsafe fn focusGroupsForEnvironment(environment: &UIFocusEnvironment,) -> Id; + + #[method_id(@__retain_semantics Other preferredFocusEnvironmentsForEnvironment:)] + pub unsafe fn preferredFocusEnvironmentsForEnvironment(environment: &UIFocusEnvironment,) -> Id; + + } +); + +extern_protocol!( + pub struct UIFocusDebuggerOutput; + + unsafe impl UIFocusDebuggerOutput { + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIFocusEffect.rs b/crates/icrate-generated/src/UIKit/generated/UIFocusEffect.rs new file mode 100644 index 000000000..5589e76f3 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIFocusEffect.rs @@ -0,0 +1,77 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIFocusEffect; + + unsafe impl ClassType for UIFocusEffect { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIFocusEffect { + #[method_id(@__retain_semantics Other effect)] + pub unsafe fn effect() -> 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; + + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIFocusHaloEffectPosition { + UIFocusHaloEffectPositionAutomatic = 0, + UIFocusHaloEffectPositionOutside = 1, + UIFocusHaloEffectPositionInside = 2, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIFocusHaloEffect; + + unsafe impl ClassType for UIFocusHaloEffect { + type Super = UIFocusEffect; + } +); + +extern_methods!( + unsafe impl UIFocusHaloEffect { + #[method_id(@__retain_semantics Other effectWithRect:)] + pub unsafe fn effectWithRect(rect: CGRect,) -> Id; + + #[method_id(@__retain_semantics Other effectWithRoundedRect:cornerRadius:curve:)] + pub unsafe fn effectWithRoundedRect_cornerRadius_curve(rect: CGRect,cornerRadius: CGFloat,curve: &CALayerCornerCurve,) -> Id; + + #[method_id(@__retain_semantics Other effectWithPath:)] + pub unsafe fn effectWithPath(bezierPath: &UIBezierPath,) -> Id; + + #[method_id(@__retain_semantics Other containerView)] + pub unsafe fn containerView(&self, ) -> Option>; + + #[method(setContainerView:)] + pub unsafe fn setContainerView(&self, containerView: Option<&UIView>,); + + #[method_id(@__retain_semantics Other referenceView)] + pub unsafe fn referenceView(&self, ) -> Option>; + + #[method(setReferenceView:)] + pub unsafe fn setReferenceView(&self, referenceView: Option<&UIView>,); + + #[method(position)] + pub unsafe fn position(&self, ) -> UIFocusHaloEffectPosition; + + #[method(setPosition:)] + pub unsafe fn setPosition(&self, position: UIFocusHaloEffectPosition,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIFocusGuide.rs b/crates/icrate-generated/src/UIKit/generated/UIFocusGuide.rs new file mode 100644 index 000000000..f6cbcb561 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIFocusGuide.rs @@ -0,0 +1,36 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIFocusGuide; + + unsafe impl ClassType for UIFocusGuide { + type Super = UILayoutGuide; + } +); + +extern_methods!( + unsafe impl UIFocusGuide { + #[method(isEnabled)] + pub unsafe fn isEnabled(&self, ) -> bool; + + #[method(setEnabled:)] + pub unsafe fn setEnabled(&self, enabled: bool,); + + #[method_id(@__retain_semantics Other preferredFocusEnvironments)] + pub unsafe fn preferredFocusEnvironments(&self, ) -> Id, Shared>; + + #[method(setPreferredFocusEnvironments:)] + pub unsafe fn setPreferredFocusEnvironments(&self, preferredFocusEnvironments: Option<&NSArray>,); + + #[method_id(@__retain_semantics Other preferredFocusedView)] + pub unsafe fn preferredFocusedView(&self, ) -> Option>; + + #[method(setPreferredFocusedView:)] + pub unsafe fn setPreferredFocusedView(&self, preferredFocusedView: Option<&UIView>,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIFocusMovementHint.rs b/crates/icrate-generated/src/UIKit/generated/UIFocusMovementHint.rs new file mode 100644 index 000000000..42cad49a9 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIFocusMovementHint.rs @@ -0,0 +1,39 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIFocusMovementHint; + + unsafe impl ClassType for UIFocusMovementHint { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIFocusMovementHint { + #[method(movementDirection)] + pub unsafe fn movementDirection(&self, ) -> CGVector; + + #[method(perspectiveTransform)] + pub unsafe fn perspectiveTransform(&self, ) -> CATransform3D; + + #[method(rotation)] + pub unsafe fn rotation(&self, ) -> CGVector; + + #[method(translation)] + pub unsafe fn translation(&self, ) -> CGVector; + + #[method(interactionTransform)] + pub unsafe fn interactionTransform(&self, ) -> CATransform3D; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Option>; + + #[method_id(@__retain_semantics New new)] + pub unsafe fn new() -> Option>; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIFocusSystem.rs b/crates/icrate-generated/src/UIKit/generated/UIFocusSystem.rs new file mode 100644 index 000000000..26efaf60b --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIFocusSystem.rs @@ -0,0 +1,51 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIFocusSystem; + + unsafe impl ClassType for UIFocusSystem { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIFocusSystem { + #[method_id(@__retain_semantics Other focusedItem)] + pub unsafe fn focusedItem(&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; + + #[method_id(@__retain_semantics Other focusSystemForEnvironment:)] + pub unsafe fn focusSystemForEnvironment(environment: &UIFocusEnvironment,) -> Option>; + + #[method(requestFocusUpdateToEnvironment:)] + pub unsafe fn requestFocusUpdateToEnvironment(&self, environment: &UIFocusEnvironment,); + + #[method(updateFocusIfNeeded)] + pub unsafe fn updateFocusIfNeeded(&self, ); + + #[method(environment:containsEnvironment:)] + pub unsafe fn environment_containsEnvironment(environment: &UIFocusEnvironment,otherEnvironment: &UIFocusEnvironment,) -> bool; + + #[method(registerURL:forSoundIdentifier:)] + pub unsafe fn registerURL_forSoundIdentifier(soundFileURL: &NSURL,identifier: &UIFocusSoundIdentifier,); + + } +); + +extern_methods!( + /// UIFocusSystem + unsafe impl UIWindowScene { + #[method_id(@__retain_semantics Other focusSystem)] + pub unsafe fn focusSystem(&self, ) -> Option>; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIFont.rs b/crates/icrate-generated/src/UIKit/generated/UIFont.rs new file mode 100644 index 000000000..7d7c3ce65 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIFont.rs @@ -0,0 +1,90 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIFont; + + unsafe impl ClassType for UIFont { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIFont { + #[method_id(@__retain_semantics Other preferredFontForTextStyle:)] + pub unsafe fn preferredFontForTextStyle(style: &UIFontTextStyle,) -> Id; + + #[method_id(@__retain_semantics Other preferredFontForTextStyle:compatibleWithTraitCollection:)] + pub unsafe fn preferredFontForTextStyle_compatibleWithTraitCollection(style: &UIFontTextStyle,traitCollection: Option<&UITraitCollection>,) -> Id; + + #[method_id(@__retain_semantics Other fontWithName:size:)] + pub unsafe fn fontWithName_size(fontName: &NSString,fontSize: CGFloat,) -> Option>; + + #[method_id(@__retain_semantics Other familyNames)] + pub unsafe fn familyNames() -> Id, Shared>; + + #[method_id(@__retain_semantics Other fontNamesForFamilyName:)] + pub unsafe fn fontNamesForFamilyName(familyName: &NSString,) -> Id, Shared>; + + #[method_id(@__retain_semantics Other systemFontOfSize:)] + pub unsafe fn systemFontOfSize(fontSize: CGFloat,) -> Id; + + #[method_id(@__retain_semantics Other boldSystemFontOfSize:)] + pub unsafe fn boldSystemFontOfSize(fontSize: CGFloat,) -> Id; + + #[method_id(@__retain_semantics Other italicSystemFontOfSize:)] + pub unsafe fn italicSystemFontOfSize(fontSize: CGFloat,) -> Id; + + #[method_id(@__retain_semantics Other systemFontOfSize:weight:)] + pub unsafe fn systemFontOfSize_weight(fontSize: CGFloat,weight: UIFontWeight,) -> Id; + + #[method_id(@__retain_semantics Other monospacedDigitSystemFontOfSize:weight:)] + pub unsafe fn monospacedDigitSystemFontOfSize_weight(fontSize: CGFloat,weight: UIFontWeight,) -> Id; + + #[method_id(@__retain_semantics Other systemFontOfSize:weight:width:)] + pub unsafe fn systemFontOfSize_weight_width(fontSize: CGFloat,weight: UIFontWeight,width: UIFontWidth,) -> Id; + + #[method_id(@__retain_semantics Other monospacedSystemFontOfSize:weight:)] + pub unsafe fn monospacedSystemFontOfSize_weight(fontSize: CGFloat,weight: UIFontWeight,) -> Id; + + #[method_id(@__retain_semantics Other familyName)] + pub unsafe fn familyName(&self, ) -> Id; + + #[method_id(@__retain_semantics Other fontName)] + pub unsafe fn fontName(&self, ) -> Id; + + #[method(pointSize)] + pub unsafe fn pointSize(&self, ) -> CGFloat; + + #[method(ascender)] + pub unsafe fn ascender(&self, ) -> CGFloat; + + #[method(descender)] + pub unsafe fn descender(&self, ) -> CGFloat; + + #[method(capHeight)] + pub unsafe fn capHeight(&self, ) -> CGFloat; + + #[method(xHeight)] + pub unsafe fn xHeight(&self, ) -> CGFloat; + + #[method(lineHeight)] + pub unsafe fn lineHeight(&self, ) -> CGFloat; + + #[method(leading)] + pub unsafe fn leading(&self, ) -> CGFloat; + + #[method_id(@__retain_semantics Other fontWithSize:)] + pub unsafe fn fontWithSize(&self, fontSize: CGFloat,) -> Id; + + #[method_id(@__retain_semantics Other fontWithDescriptor:size:)] + pub unsafe fn fontWithDescriptor_size(descriptor: &UIFontDescriptor,pointSize: CGFloat,) -> Id; + + #[method_id(@__retain_semantics Other fontDescriptor)] + pub unsafe fn fontDescriptor(&self, ) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIFontDescriptor.rs b/crates/icrate-generated/src/UIKit/generated/UIFontDescriptor.rs new file mode 100644 index 000000000..abc34515f --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIFontDescriptor.rs @@ -0,0 +1,219 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_options!( + #[underlying(u32)] + pub enum UIFontDescriptorSymbolicTraits { + UIFontDescriptorTraitItalic = 1<<0, + UIFontDescriptorTraitBold = 1<<1, + UIFontDescriptorTraitExpanded = 1<<5, + UIFontDescriptorTraitCondensed = 1<<6, + UIFontDescriptorTraitMonoSpace = 1<<10, + UIFontDescriptorTraitVertical = 1<<11, + UIFontDescriptorTraitUIOptimized = 1<<12, + UIFontDescriptorTraitTightLeading = 1<<15, + UIFontDescriptorTraitLooseLeading = 1<<16, + UIFontDescriptorClassMask = 0xF0000000, + UIFontDescriptorClassUnknown = 0<<28, + UIFontDescriptorClassOldStyleSerifs = 1<<28, + UIFontDescriptorClassTransitionalSerifs = 2<<28, + UIFontDescriptorClassModernSerifs = 3<<28, + UIFontDescriptorClassClarendonSerifs = 4<<28, + UIFontDescriptorClassSlabSerifs = 5<<28, + UIFontDescriptorClassFreeformSerifs = 7<<28, + UIFontDescriptorClassSansSerif = 8<<28, + UIFontDescriptorClassOrnamentals = 9<<28, + UIFontDescriptorClassScripts = 10<<28, + UIFontDescriptorClassSymbolic = 12<<28, + } +); + +pub type UIFontDescriptorClass = NSUInteger; + +pub type UIFontTextStyle = NSString; + +pub type UIFontDescriptorAttributeName = NSString; + +pub type UIFontDescriptorTraitKey = NSString; + +pub type UIFontDescriptorFeatureKey = NSString; + +pub type UIFontWeight = CGFloat; + +pub type UIFontWidth = CGFloat; + +pub type UIFontDescriptorSystemDesign = NSString; + +extern_static!(UIFontDescriptorSystemDesignDefault: &'static UIFontDescriptorSystemDesign); + +extern_static!(UIFontDescriptorSystemDesignRounded: &'static UIFontDescriptorSystemDesign); + +extern_static!(UIFontDescriptorSystemDesignSerif: &'static UIFontDescriptorSystemDesign); + +extern_static!(UIFontDescriptorSystemDesignMonospaced: &'static UIFontDescriptorSystemDesign); + +extern_class!( + #[derive(Debug)] + pub struct UIFontDescriptor; + + unsafe impl ClassType for UIFontDescriptor { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIFontDescriptor { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method_id(@__retain_semantics Other postscriptName)] + pub unsafe fn postscriptName(&self, ) -> Id; + + #[method(pointSize)] + pub unsafe fn pointSize(&self, ) -> CGFloat; + + #[method(matrix)] + pub unsafe fn matrix(&self, ) -> CGAffineTransform; + + #[method(symbolicTraits)] + pub unsafe fn symbolicTraits(&self, ) -> UIFontDescriptorSymbolicTraits; + + #[method_id(@__retain_semantics Other objectForKey:)] + pub unsafe fn objectForKey(&self, anAttribute: &UIFontDescriptorAttributeName,) -> Option>; + + #[method_id(@__retain_semantics Other fontAttributes)] + pub unsafe fn fontAttributes(&self, ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other matchingFontDescriptorsWithMandatoryKeys:)] + pub unsafe fn matchingFontDescriptorsWithMandatoryKeys(&self, mandatoryKeys: Option<&NSSet>,) -> Id, Shared>; + + #[method_id(@__retain_semantics Other fontDescriptorWithFontAttributes:)] + pub unsafe fn fontDescriptorWithFontAttributes(attributes: &NSDictionary,) -> Id; + + #[method_id(@__retain_semantics Other fontDescriptorWithName:size:)] + pub unsafe fn fontDescriptorWithName_size(fontName: &NSString,size: CGFloat,) -> Id; + + #[method_id(@__retain_semantics Other fontDescriptorWithName:matrix:)] + pub unsafe fn fontDescriptorWithName_matrix(fontName: &NSString,matrix: CGAffineTransform,) -> Id; + + #[method_id(@__retain_semantics Other preferredFontDescriptorWithTextStyle:)] + pub unsafe fn preferredFontDescriptorWithTextStyle(style: &UIFontTextStyle,) -> Id; + + #[method_id(@__retain_semantics Other preferredFontDescriptorWithTextStyle:compatibleWithTraitCollection:)] + pub unsafe fn preferredFontDescriptorWithTextStyle_compatibleWithTraitCollection(style: &UIFontTextStyle,traitCollection: Option<&UITraitCollection>,) -> Id; + + #[method_id(@__retain_semantics Init initWithFontAttributes:)] + pub unsafe fn initWithFontAttributes(this: Option>, attributes: &NSDictionary,) -> Id; + + #[method_id(@__retain_semantics Other fontDescriptorByAddingAttributes:)] + pub unsafe fn fontDescriptorByAddingAttributes(&self, attributes: &NSDictionary,) -> Id; + + #[method_id(@__retain_semantics Other fontDescriptorWithSize:)] + pub unsafe fn fontDescriptorWithSize(&self, newPointSize: CGFloat,) -> Id; + + #[method_id(@__retain_semantics Other fontDescriptorWithMatrix:)] + pub unsafe fn fontDescriptorWithMatrix(&self, matrix: CGAffineTransform,) -> Id; + + #[method_id(@__retain_semantics Other fontDescriptorWithFace:)] + pub unsafe fn fontDescriptorWithFace(&self, newFace: &NSString,) -> Id; + + #[method_id(@__retain_semantics Other fontDescriptorWithFamily:)] + pub unsafe fn fontDescriptorWithFamily(&self, newFamily: &NSString,) -> Id; + + #[method_id(@__retain_semantics Other fontDescriptorWithSymbolicTraits:)] + pub unsafe fn fontDescriptorWithSymbolicTraits(&self, symbolicTraits: UIFontDescriptorSymbolicTraits,) -> Option>; + + #[method_id(@__retain_semantics Other fontDescriptorWithDesign:)] + pub unsafe fn fontDescriptorWithDesign(&self, design: &UIFontDescriptorSystemDesign,) -> Option>; + + } +); + +extern_static!(UIFontDescriptorFamilyAttribute: &'static UIFontDescriptorAttributeName); + +extern_static!(UIFontDescriptorNameAttribute: &'static UIFontDescriptorAttributeName); + +extern_static!(UIFontDescriptorFaceAttribute: &'static UIFontDescriptorAttributeName); + +extern_static!(UIFontDescriptorSizeAttribute: &'static UIFontDescriptorAttributeName); + +extern_static!(UIFontDescriptorVisibleNameAttribute: &'static UIFontDescriptorAttributeName); + +extern_static!(UIFontDescriptorMatrixAttribute: &'static UIFontDescriptorAttributeName); + +extern_static!(UIFontDescriptorCharacterSetAttribute: &'static UIFontDescriptorAttributeName); + +extern_static!(UIFontDescriptorCascadeListAttribute: &'static UIFontDescriptorAttributeName); + +extern_static!(UIFontDescriptorTraitsAttribute: &'static UIFontDescriptorAttributeName); + +extern_static!(UIFontDescriptorFixedAdvanceAttribute: &'static UIFontDescriptorAttributeName); + +extern_static!(UIFontDescriptorFeatureSettingsAttribute: &'static UIFontDescriptorAttributeName); + +extern_static!(UIFontDescriptorTextStyleAttribute: &'static UIFontDescriptorAttributeName); + +extern_static!(UIFontSymbolicTrait: &'static UIFontDescriptorTraitKey); + +extern_static!(UIFontWeightTrait: &'static UIFontDescriptorTraitKey); + +extern_static!(UIFontWidthTrait: &'static UIFontDescriptorTraitKey); + +extern_static!(UIFontSlantTrait: &'static UIFontDescriptorTraitKey); + +extern_static!(UIFontWeightUltraLight: UIFontWeight); + +extern_static!(UIFontWeightThin: UIFontWeight); + +extern_static!(UIFontWeightLight: UIFontWeight); + +extern_static!(UIFontWeightRegular: UIFontWeight); + +extern_static!(UIFontWeightMedium: UIFontWeight); + +extern_static!(UIFontWeightSemibold: UIFontWeight); + +extern_static!(UIFontWeightBold: UIFontWeight); + +extern_static!(UIFontWeightHeavy: UIFontWeight); + +extern_static!(UIFontWeightBlack: UIFontWeight); + +extern_static!(UIFontWidthCondensed: UIFontWidth); + +extern_static!(UIFontWidthStandard: UIFontWidth); + +extern_static!(UIFontWidthExpanded: UIFontWidth); + +extern_static!(UIFontWidthCompressed: UIFontWidth); + +extern_static!(UIFontFeatureTypeIdentifierKey: &'static UIFontDescriptorFeatureKey); + +extern_static!(UIFontFeatureSelectorIdentifierKey: &'static UIFontDescriptorFeatureKey); + +extern_static!(UIFontTextStyleLargeTitle: &'static UIFontTextStyle); + +extern_static!(UIFontTextStyleTitle1: &'static UIFontTextStyle); + +extern_static!(UIFontTextStyleTitle2: &'static UIFontTextStyle); + +extern_static!(UIFontTextStyleTitle3: &'static UIFontTextStyle); + +extern_static!(UIFontTextStyleHeadline: &'static UIFontTextStyle); + +extern_static!(UIFontTextStyleSubheadline: &'static UIFontTextStyle); + +extern_static!(UIFontTextStyleBody: &'static UIFontTextStyle); + +extern_static!(UIFontTextStyleCallout: &'static UIFontTextStyle); + +extern_static!(UIFontTextStyleFootnote: &'static UIFontTextStyle); + +extern_static!(UIFontTextStyleCaption1: &'static UIFontTextStyle); + +extern_static!(UIFontTextStyleCaption2: &'static UIFontTextStyle); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIFontMetrics.rs b/crates/icrate-generated/src/UIKit/generated/UIFontMetrics.rs new file mode 100644 index 000000000..07e4bf728 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIFontMetrics.rs @@ -0,0 +1,48 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIFontMetrics; + + unsafe impl ClassType for UIFontMetrics { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIFontMetrics { + #[method_id(@__retain_semantics Other defaultMetrics)] + pub unsafe fn defaultMetrics() -> Id; + + #[method_id(@__retain_semantics Other metricsForTextStyle:)] + pub unsafe fn metricsForTextStyle(textStyle: &UIFontTextStyle,) -> Id; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics Init initForTextStyle:)] + pub unsafe fn initForTextStyle(this: Option>, textStyle: &UIFontTextStyle,) -> Id; + + #[method_id(@__retain_semantics Other scaledFontForFont:)] + pub unsafe fn scaledFontForFont(&self, font: &UIFont,) -> Id; + + #[method_id(@__retain_semantics Other scaledFontForFont:maximumPointSize:)] + pub unsafe fn scaledFontForFont_maximumPointSize(&self, font: &UIFont,maximumPointSize: CGFloat,) -> Id; + + #[method_id(@__retain_semantics Other scaledFontForFont:compatibleWithTraitCollection:)] + pub unsafe fn scaledFontForFont_compatibleWithTraitCollection(&self, font: &UIFont,traitCollection: Option<&UITraitCollection>,) -> Id; + + #[method_id(@__retain_semantics Other scaledFontForFont:maximumPointSize:compatibleWithTraitCollection:)] + pub unsafe fn scaledFontForFont_maximumPointSize_compatibleWithTraitCollection(&self, font: &UIFont,maximumPointSize: CGFloat,traitCollection: Option<&UITraitCollection>,) -> Id; + + #[method(scaledValueForValue:)] + pub unsafe fn scaledValueForValue(&self, value: CGFloat,) -> CGFloat; + + #[method(scaledValueForValue:compatibleWithTraitCollection:)] + pub unsafe fn scaledValueForValue_compatibleWithTraitCollection(&self, value: CGFloat,traitCollection: Option<&UITraitCollection>,) -> CGFloat; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIFontPickerViewController.rs b/crates/icrate-generated/src/UIKit/generated/UIFontPickerViewController.rs new file mode 100644 index 000000000..e0976056a --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIFontPickerViewController.rs @@ -0,0 +1,54 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_protocol!( + pub struct UIFontPickerViewControllerDelegate; + + unsafe impl UIFontPickerViewControllerDelegate { + #[optional] + #[method(fontPickerViewControllerDidCancel:)] + pub unsafe fn fontPickerViewControllerDidCancel(&self, viewController: &UIFontPickerViewController,); + + #[optional] + #[method(fontPickerViewControllerDidPickFont:)] + pub unsafe fn fontPickerViewControllerDidPickFont(&self, viewController: &UIFontPickerViewController,); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIFontPickerViewController; + + unsafe impl ClassType for UIFontPickerViewController { + type Super = UIViewController; + } +); + +extern_methods!( + unsafe impl UIFontPickerViewController { + #[method_id(@__retain_semantics Init initWithConfiguration:)] + pub unsafe fn initWithConfiguration(this: Option>, configuration: &UIFontPickerViewControllerConfiguration,) -> Id; + + #[method_id(@__retain_semantics Other configuration)] + pub unsafe fn configuration(&self, ) -> Id; + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&UIFontPickerViewControllerDelegate>,); + + #[method_id(@__retain_semantics Other selectedFontDescriptor)] + pub unsafe fn selectedFontDescriptor(&self, ) -> Option>; + + #[method(setSelectedFontDescriptor:)] + pub unsafe fn setSelectedFontDescriptor(&self, selectedFontDescriptor: Option<&UIFontDescriptor>,); + + #[method_id(@__retain_semantics Init initWithNibName:bundle:)] + pub unsafe fn initWithNibName_bundle(this: Option>, nibNameOrNil: Option<&NSString>,nibBundleOrNil: Option<&NSBundle>,) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIFontPickerViewControllerConfiguration.rs b/crates/icrate-generated/src/UIKit/generated/UIFontPickerViewControllerConfiguration.rs new file mode 100644 index 000000000..b1f853ee5 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIFontPickerViewControllerConfiguration.rs @@ -0,0 +1,45 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIFontPickerViewControllerConfiguration; + + unsafe impl ClassType for UIFontPickerViewControllerConfiguration { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIFontPickerViewControllerConfiguration { + #[method(includeFaces)] + pub unsafe fn includeFaces(&self, ) -> bool; + + #[method(setIncludeFaces:)] + pub unsafe fn setIncludeFaces(&self, includeFaces: bool,); + + #[method(displayUsingSystemFont)] + pub unsafe fn displayUsingSystemFont(&self, ) -> bool; + + #[method(setDisplayUsingSystemFont:)] + pub unsafe fn setDisplayUsingSystemFont(&self, displayUsingSystemFont: bool,); + + #[method(filteredTraits)] + pub unsafe fn filteredTraits(&self, ) -> UIFontDescriptorSymbolicTraits; + + #[method(setFilteredTraits:)] + pub unsafe fn setFilteredTraits(&self, filteredTraits: UIFontDescriptorSymbolicTraits,); + + #[method_id(@__retain_semantics Other filteredLanguagesPredicate)] + pub unsafe fn filteredLanguagesPredicate(&self, ) -> Option>; + + #[method(setFilteredLanguagesPredicate:)] + pub unsafe fn setFilteredLanguagesPredicate(&self, filteredLanguagesPredicate: Option<&NSPredicate>,); + + #[method_id(@__retain_semantics Other filterPredicateForFilteredLanguages:)] + pub unsafe fn filterPredicateForFilteredLanguages(filteredLanguages: &NSArray,) -> Option>; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIFoundation.rs b/crates/icrate-generated/src/UIKit/generated/UIFoundation.rs new file mode 100644 index 000000000..bc88fc826 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIFoundation.rs @@ -0,0 +1,4 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + diff --git a/crates/icrate-generated/src/UIKit/generated/UIGeometry.rs b/crates/icrate-generated/src/UIKit/generated/UIGeometry.rs new file mode 100644 index 000000000..b77cad895 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIGeometry.rs @@ -0,0 +1,321 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_struct!( + pub struct UIEdgeInsets { + pub top: CGFloat, + pub left: CGFloat, + pub bottom: CGFloat, + pub right: CGFloat, + } +); + +extern_struct!( + pub struct NSDirectionalEdgeInsets { + pub top: CGFloat, + pub leading: CGFloat, + pub bottom: CGFloat, + pub trailing: CGFloat, + } +); + +extern_struct!( + pub struct UIOffset { + pub horizontal: CGFloat, + pub vertical: CGFloat, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum UIRectEdge { + UIRectEdgeNone = 0, + UIRectEdgeTop = 1<<0, + UIRectEdgeLeft = 1<<1, + UIRectEdgeBottom = 1<<2, + UIRectEdgeRight = 1<<3, + UIRectEdgeAll = UIRectEdgeTop|UIRectEdgeLeft|UIRectEdgeBottom|UIRectEdgeRight, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum UIRectCorner { + UIRectCornerTopLeft = 1<<0, + UIRectCornerTopRight = 1<<1, + UIRectCornerBottomLeft = 1<<2, + UIRectCornerBottomRight = 1<<3, + UIRectCornerAllCorners = !0, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum UIAxis { + UIAxisNeither = 0, + UIAxisHorizontal = 1<<0, + UIAxisVertical = 1<<1, + UIAxisBoth = UIAxisHorizontal|UIAxisVertical, + } +); + +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, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum UIDirectionalRectEdge { + UIDirectionalRectEdgeNone = 0, + UIDirectionalRectEdgeTop = 1<<0, + UIDirectionalRectEdgeLeading = 1<<1, + UIDirectionalRectEdgeBottom = 1<<2, + UIDirectionalRectEdgeTrailing = 1<<3, + UIDirectionalRectEdgeAll = UIDirectionalRectEdgeTop|UIDirectionalRectEdgeLeading|UIDirectionalRectEdgeBottom|UIDirectionalRectEdgeTrailing, + } +); + +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, + } +); + +inline_fn!( + pub unsafe fn UIEdgeInsetsMake(top: CGFloat,left: CGFloat,bottom: CGFloat,right: CGFloat,) -> UIEdgeInsets { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSDirectionalEdgeInsetsMake(top: CGFloat,leading: CGFloat,bottom: CGFloat,trailing: CGFloat,) -> NSDirectionalEdgeInsets { + todo!() + } +); + +inline_fn!( + pub unsafe fn UIEdgeInsetsInsetRect(rect: CGRect,insets: UIEdgeInsets,) -> CGRect { + todo!() + } +); + +inline_fn!( + pub unsafe fn UIOffsetMake(horizontal: CGFloat,vertical: CGFloat,) -> UIOffset { + todo!() + } +); + +inline_fn!( + pub unsafe fn UIEdgeInsetsEqualToEdgeInsets(insets1: UIEdgeInsets,insets2: UIEdgeInsets,) -> Bool { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSDirectionalEdgeInsetsEqualToDirectionalEdgeInsets(insets1: NSDirectionalEdgeInsets,insets2: NSDirectionalEdgeInsets,) -> Bool { + todo!() + } +); + +inline_fn!( + pub unsafe fn UIOffsetEqualToOffset(offset1: UIOffset,offset2: UIOffset,) -> Bool { + todo!() + } +); + +extern_static!(UIEdgeInsetsZero: UIEdgeInsets); + +extern_static!(NSDirectionalEdgeInsetsZero: NSDirectionalEdgeInsets); + +extern_static!(UIOffsetZero: UIOffset); + +extern_fn!( + pub unsafe fn NSStringFromCGPoint(point: CGPoint,) -> NonNull; +); + +extern_fn!( + pub unsafe fn NSStringFromCGVector(vector: CGVector,) -> NonNull; +); + +extern_fn!( + pub unsafe fn NSStringFromCGSize(size: CGSize,) -> NonNull; +); + +extern_fn!( + pub unsafe fn NSStringFromCGRect(rect: CGRect,) -> NonNull; +); + +extern_fn!( + pub unsafe fn NSStringFromCGAffineTransform(transform: CGAffineTransform,) -> NonNull; +); + +extern_fn!( + pub unsafe fn NSStringFromUIEdgeInsets(insets: UIEdgeInsets,) -> NonNull; +); + +extern_fn!( + pub unsafe fn NSStringFromDirectionalEdgeInsets(insets: NSDirectionalEdgeInsets,) -> NonNull; +); + +extern_fn!( + pub unsafe fn NSStringFromUIOffset(offset: UIOffset,) -> NonNull; +); + +extern_fn!( + pub unsafe fn CGPointFromString(string: &NSString,) -> CGPoint; +); + +extern_fn!( + pub unsafe fn CGVectorFromString(string: &NSString,) -> CGVector; +); + +extern_fn!( + pub unsafe fn CGSizeFromString(string: &NSString,) -> CGSize; +); + +extern_fn!( + pub unsafe fn CGRectFromString(string: &NSString,) -> CGRect; +); + +extern_fn!( + pub unsafe fn CGAffineTransformFromString(string: &NSString,) -> CGAffineTransform; +); + +extern_fn!( + pub unsafe fn UIEdgeInsetsFromString(string: &NSString,) -> UIEdgeInsets; +); + +extern_fn!( + pub unsafe fn NSDirectionalEdgeInsetsFromString(string: &NSString,) -> NSDirectionalEdgeInsets; +); + +extern_fn!( + pub unsafe fn UIOffsetFromString(string: &NSString,) -> UIOffset; +); + +extern_methods!( + /// NSValueUIGeometryExtensions + unsafe impl NSValue { + #[method_id(@__retain_semantics Other valueWithCGPoint:)] + pub unsafe fn valueWithCGPoint(point: CGPoint,) -> Id; + + #[method_id(@__retain_semantics Other valueWithCGVector:)] + pub unsafe fn valueWithCGVector(vector: CGVector,) -> Id; + + #[method_id(@__retain_semantics Other valueWithCGSize:)] + pub unsafe fn valueWithCGSize(size: CGSize,) -> Id; + + #[method_id(@__retain_semantics Other valueWithCGRect:)] + pub unsafe fn valueWithCGRect(rect: CGRect,) -> Id; + + #[method_id(@__retain_semantics Other valueWithCGAffineTransform:)] + pub unsafe fn valueWithCGAffineTransform(transform: CGAffineTransform,) -> Id; + + #[method_id(@__retain_semantics Other valueWithUIEdgeInsets:)] + pub unsafe fn valueWithUIEdgeInsets(insets: UIEdgeInsets,) -> Id; + + #[method_id(@__retain_semantics Other valueWithDirectionalEdgeInsets:)] + pub unsafe fn valueWithDirectionalEdgeInsets(insets: NSDirectionalEdgeInsets,) -> Id; + + #[method_id(@__retain_semantics Other valueWithUIOffset:)] + pub unsafe fn valueWithUIOffset(insets: UIOffset,) -> Id; + + #[method(CGPointValue)] + pub unsafe fn CGPointValue(&self, ) -> CGPoint; + + #[method(CGVectorValue)] + pub unsafe fn CGVectorValue(&self, ) -> CGVector; + + #[method(CGSizeValue)] + pub unsafe fn CGSizeValue(&self, ) -> CGSize; + + #[method(CGRectValue)] + pub unsafe fn CGRectValue(&self, ) -> CGRect; + + #[method(CGAffineTransformValue)] + pub unsafe fn CGAffineTransformValue(&self, ) -> CGAffineTransform; + + #[method(UIEdgeInsetsValue)] + pub unsafe fn UIEdgeInsetsValue(&self, ) -> UIEdgeInsets; + + #[method(directionalEdgeInsetsValue)] + pub unsafe fn directionalEdgeInsetsValue(&self, ) -> NSDirectionalEdgeInsets; + + #[method(UIOffsetValue)] + pub unsafe fn UIOffsetValue(&self, ) -> UIOffset; + + } +); + +extern_methods!( + /// UIGeometryKeyedCoding + unsafe impl NSCoder { + #[method(encodeCGPoint:forKey:)] + pub unsafe fn encodeCGPoint_forKey(&self, point: CGPoint,key: &NSString,); + + #[method(encodeCGVector:forKey:)] + pub unsafe fn encodeCGVector_forKey(&self, vector: CGVector,key: &NSString,); + + #[method(encodeCGSize:forKey:)] + pub unsafe fn encodeCGSize_forKey(&self, size: CGSize,key: &NSString,); + + #[method(encodeCGRect:forKey:)] + pub unsafe fn encodeCGRect_forKey(&self, rect: CGRect,key: &NSString,); + + #[method(encodeCGAffineTransform:forKey:)] + pub unsafe fn encodeCGAffineTransform_forKey(&self, transform: CGAffineTransform,key: &NSString,); + + #[method(encodeUIEdgeInsets:forKey:)] + pub unsafe fn encodeUIEdgeInsets_forKey(&self, insets: UIEdgeInsets,key: &NSString,); + + #[method(encodeDirectionalEdgeInsets:forKey:)] + pub unsafe fn encodeDirectionalEdgeInsets_forKey(&self, insets: NSDirectionalEdgeInsets,key: &NSString,); + + #[method(encodeUIOffset:forKey:)] + pub unsafe fn encodeUIOffset_forKey(&self, offset: UIOffset,key: &NSString,); + + #[method(decodeCGPointForKey:)] + pub unsafe fn decodeCGPointForKey(&self, key: &NSString,) -> CGPoint; + + #[method(decodeCGVectorForKey:)] + pub unsafe fn decodeCGVectorForKey(&self, key: &NSString,) -> CGVector; + + #[method(decodeCGSizeForKey:)] + pub unsafe fn decodeCGSizeForKey(&self, key: &NSString,) -> CGSize; + + #[method(decodeCGRectForKey:)] + pub unsafe fn decodeCGRectForKey(&self, key: &NSString,) -> CGRect; + + #[method(decodeCGAffineTransformForKey:)] + pub unsafe fn decodeCGAffineTransformForKey(&self, key: &NSString,) -> CGAffineTransform; + + #[method(decodeUIEdgeInsetsForKey:)] + pub unsafe fn decodeUIEdgeInsetsForKey(&self, key: &NSString,) -> UIEdgeInsets; + + #[method(decodeDirectionalEdgeInsetsForKey:)] + pub unsafe fn decodeDirectionalEdgeInsetsForKey(&self, key: &NSString,) -> NSDirectionalEdgeInsets; + + #[method(decodeUIOffsetForKey:)] + pub unsafe fn decodeUIOffsetForKey(&self, key: &NSString,) -> UIOffset; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIGestureRecognizer.rs b/crates/icrate-generated/src/UIKit/generated/UIGestureRecognizer.rs new file mode 100644 index 000000000..4602cfe0f --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIGestureRecognizer.rs @@ -0,0 +1,159 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIGestureRecognizerState { + UIGestureRecognizerStatePossible = 0, + UIGestureRecognizerStateBegan = 1, + UIGestureRecognizerStateChanged = 2, + UIGestureRecognizerStateEnded = 3, + UIGestureRecognizerStateCancelled = 4, + UIGestureRecognizerStateFailed = 5, + UIGestureRecognizerStateRecognized = UIGestureRecognizerStateEnded, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIGestureRecognizer; + + unsafe impl ClassType for UIGestureRecognizer { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIGestureRecognizer { + #[method_id(@__retain_semantics Init initWithTarget:action:)] + pub unsafe fn initWithTarget_action(this: Option>, target: Option<&Object>,action: OptionSel,) -> Id; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method(addTarget:action:)] + pub unsafe fn addTarget_action(&self, target: &Object,action: Sel,); + + #[method(removeTarget:action:)] + pub unsafe fn removeTarget_action(&self, target: Option<&Object>,action: OptionSel,); + + #[method(state)] + pub unsafe fn state(&self, ) -> UIGestureRecognizerState; + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&UIGestureRecognizerDelegate>,); + + #[method(isEnabled)] + pub unsafe fn isEnabled(&self, ) -> bool; + + #[method(setEnabled:)] + pub unsafe fn setEnabled(&self, enabled: bool,); + + #[method_id(@__retain_semantics Other view)] + pub unsafe fn view(&self, ) -> Option>; + + #[method(cancelsTouchesInView)] + pub unsafe fn cancelsTouchesInView(&self, ) -> bool; + + #[method(setCancelsTouchesInView:)] + pub unsafe fn setCancelsTouchesInView(&self, cancelsTouchesInView: bool,); + + #[method(delaysTouchesBegan)] + pub unsafe fn delaysTouchesBegan(&self, ) -> bool; + + #[method(setDelaysTouchesBegan:)] + pub unsafe fn setDelaysTouchesBegan(&self, delaysTouchesBegan: bool,); + + #[method(delaysTouchesEnded)] + pub unsafe fn delaysTouchesEnded(&self, ) -> bool; + + #[method(setDelaysTouchesEnded:)] + pub unsafe fn setDelaysTouchesEnded(&self, delaysTouchesEnded: bool,); + + #[method_id(@__retain_semantics Other allowedTouchTypes)] + pub unsafe fn allowedTouchTypes(&self, ) -> Id, Shared>; + + #[method(setAllowedTouchTypes:)] + pub unsafe fn setAllowedTouchTypes(&self, allowedTouchTypes: &NSArray,); + + #[method_id(@__retain_semantics Other allowedPressTypes)] + pub unsafe fn allowedPressTypes(&self, ) -> Id, Shared>; + + #[method(setAllowedPressTypes:)] + pub unsafe fn setAllowedPressTypes(&self, allowedPressTypes: &NSArray,); + + #[method(requiresExclusiveTouchType)] + pub unsafe fn requiresExclusiveTouchType(&self, ) -> bool; + + #[method(setRequiresExclusiveTouchType:)] + pub unsafe fn setRequiresExclusiveTouchType(&self, requiresExclusiveTouchType: bool,); + + #[method(requireGestureRecognizerToFail:)] + pub unsafe fn requireGestureRecognizerToFail(&self, otherGestureRecognizer: &UIGestureRecognizer,); + + #[method(locationInView:)] + pub unsafe fn locationInView(&self, view: Option<&UIView>,) -> CGPoint; + + #[method(numberOfTouches)] + pub unsafe fn numberOfTouches(&self, ) -> NSUInteger; + + #[method(locationOfTouch:inView:)] + pub unsafe fn locationOfTouch_inView(&self, touchIndex: NSUInteger,view: Option<&UIView>,) -> CGPoint; + + #[method_id(@__retain_semantics Other name)] + pub unsafe fn name(&self, ) -> Option>; + + #[method(setName:)] + pub unsafe fn setName(&self, name: Option<&NSString>,); + + #[method(modifierFlags)] + pub unsafe fn modifierFlags(&self, ) -> UIKeyModifierFlags; + + #[method(buttonMask)] + pub unsafe fn buttonMask(&self, ) -> UIEventButtonMask; + + } +); + +extern_protocol!( + pub struct UIGestureRecognizerDelegate; + + unsafe impl UIGestureRecognizerDelegate { + #[optional] + #[method(gestureRecognizerShouldBegin:)] + pub unsafe fn gestureRecognizerShouldBegin(&self, gestureRecognizer: &UIGestureRecognizer,) -> bool; + + #[optional] + #[method(gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:)] + pub unsafe fn gestureRecognizer_shouldRecognizeSimultaneouslyWithGestureRecognizer(&self, gestureRecognizer: &UIGestureRecognizer,otherGestureRecognizer: &UIGestureRecognizer,) -> bool; + + #[optional] + #[method(gestureRecognizer:shouldRequireFailureOfGestureRecognizer:)] + pub unsafe fn gestureRecognizer_shouldRequireFailureOfGestureRecognizer(&self, gestureRecognizer: &UIGestureRecognizer,otherGestureRecognizer: &UIGestureRecognizer,) -> bool; + + #[optional] + #[method(gestureRecognizer:shouldBeRequiredToFailByGestureRecognizer:)] + pub unsafe fn gestureRecognizer_shouldBeRequiredToFailByGestureRecognizer(&self, gestureRecognizer: &UIGestureRecognizer,otherGestureRecognizer: &UIGestureRecognizer,) -> bool; + + #[optional] + #[method(gestureRecognizer:shouldReceiveTouch:)] + pub unsafe fn gestureRecognizer_shouldReceiveTouch(&self, gestureRecognizer: &UIGestureRecognizer,touch: &UITouch,) -> bool; + + #[optional] + #[method(gestureRecognizer:shouldReceivePress:)] + pub unsafe fn gestureRecognizer_shouldReceivePress(&self, gestureRecognizer: &UIGestureRecognizer,press: &UIPress,) -> bool; + + #[optional] + #[method(gestureRecognizer:shouldReceiveEvent:)] + pub unsafe fn gestureRecognizer_shouldReceiveEvent(&self, gestureRecognizer: &UIGestureRecognizer,event: &UIEvent,) -> bool; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIGestureRecognizerSubclass.rs b/crates/icrate-generated/src/UIKit/generated/UIGestureRecognizerSubclass.rs new file mode 100644 index 000000000..e908123da --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIGestureRecognizerSubclass.rs @@ -0,0 +1,67 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_methods!( + /// UIGestureRecognizerProtected + unsafe impl UIGestureRecognizer { + #[method(state)] + pub unsafe fn state(&self, ) -> UIGestureRecognizerState; + + #[method(setState:)] + pub unsafe fn setState(&self, state: UIGestureRecognizerState,); + + #[method(ignoreTouch:forEvent:)] + pub unsafe fn ignoreTouch_forEvent(&self, touch: &UITouch,event: &UIEvent,); + + #[method(ignorePress:forEvent:)] + pub unsafe fn ignorePress_forEvent(&self, button: &UIPress,event: &UIPressesEvent,); + + #[method(reset)] + pub unsafe fn reset(&self, ); + + #[method(canPreventGestureRecognizer:)] + pub unsafe fn canPreventGestureRecognizer(&self, preventedGestureRecognizer: &UIGestureRecognizer,) -> bool; + + #[method(canBePreventedByGestureRecognizer:)] + pub unsafe fn canBePreventedByGestureRecognizer(&self, preventingGestureRecognizer: &UIGestureRecognizer,) -> bool; + + #[method(shouldRequireFailureOfGestureRecognizer:)] + pub unsafe fn shouldRequireFailureOfGestureRecognizer(&self, otherGestureRecognizer: &UIGestureRecognizer,) -> bool; + + #[method(shouldBeRequiredToFailByGestureRecognizer:)] + pub unsafe fn shouldBeRequiredToFailByGestureRecognizer(&self, otherGestureRecognizer: &UIGestureRecognizer,) -> bool; + + #[method(shouldReceiveEvent:)] + pub unsafe fn shouldReceiveEvent(&self, event: &UIEvent,) -> bool; + + #[method(touchesBegan:withEvent:)] + pub unsafe fn touchesBegan_withEvent(&self, touches: &NSSet,event: &UIEvent,); + + #[method(touchesMoved:withEvent:)] + pub unsafe fn touchesMoved_withEvent(&self, touches: &NSSet,event: &UIEvent,); + + #[method(touchesEnded:withEvent:)] + pub unsafe fn touchesEnded_withEvent(&self, touches: &NSSet,event: &UIEvent,); + + #[method(touchesCancelled:withEvent:)] + pub unsafe fn touchesCancelled_withEvent(&self, touches: &NSSet,event: &UIEvent,); + + #[method(touchesEstimatedPropertiesUpdated:)] + pub unsafe fn touchesEstimatedPropertiesUpdated(&self, touches: &NSSet,); + + #[method(pressesBegan:withEvent:)] + pub unsafe fn pressesBegan_withEvent(&self, presses: &NSSet,event: &UIPressesEvent,); + + #[method(pressesChanged:withEvent:)] + pub unsafe fn pressesChanged_withEvent(&self, presses: &NSSet,event: &UIPressesEvent,); + + #[method(pressesEnded:withEvent:)] + pub unsafe fn pressesEnded_withEvent(&self, presses: &NSSet,event: &UIPressesEvent,); + + #[method(pressesCancelled:withEvent:)] + pub unsafe fn pressesCancelled_withEvent(&self, presses: &NSSet,event: &UIPressesEvent,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIGraphics.rs b/crates/icrate-generated/src/UIKit/generated/UIGraphics.rs new file mode 100644 index 000000000..28a0354f0 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIGraphics.rs @@ -0,0 +1,88 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_fn!( + pub unsafe fn UIGraphicsGetCurrentContext() -> CGContextRef; +); + +extern_fn!( + pub unsafe fn UIGraphicsPushContext(context: CGContextRef,); +); + +extern_fn!( + pub unsafe fn UIGraphicsPopContext(); +); + +extern_fn!( + pub unsafe fn UIRectFillUsingBlendMode(rect: CGRect,blendMode: CGBlendMode,); +); + +extern_fn!( + pub unsafe fn UIRectFill(rect: CGRect,); +); + +extern_fn!( + pub unsafe fn UIRectFrameUsingBlendMode(rect: CGRect,blendMode: CGBlendMode,); +); + +extern_fn!( + pub unsafe fn UIRectFrame(rect: CGRect,); +); + +extern_fn!( + pub unsafe fn UIRectClip(rect: CGRect,); +); + +extern_fn!( + pub unsafe fn UIGraphicsBeginImageContext(size: CGSize,); +); + +extern_fn!( + pub unsafe fn UIGraphicsBeginImageContextWithOptions(size: CGSize,opaque: Bool,scale: CGFloat,); +); + +extern_fn!( + pub unsafe fn UIGraphicsGetImageFromCurrentImageContext() -> *mut UIImage; +); + +extern_fn!( + pub unsafe fn UIGraphicsEndImageContext(); +); + +extern_fn!( + pub unsafe fn UIGraphicsBeginPDFContextToFile(path: &NSString,bounds: CGRect,documentInfo: Option<&NSDictionary>,) -> Bool; +); + +extern_fn!( + pub unsafe fn UIGraphicsBeginPDFContextToData(data: &NSMutableData,bounds: CGRect,documentInfo: Option<&NSDictionary>,); +); + +extern_fn!( + pub unsafe fn UIGraphicsEndPDFContext(); +); + +extern_fn!( + pub unsafe fn UIGraphicsBeginPDFPage(); +); + +extern_fn!( + pub unsafe fn UIGraphicsBeginPDFPageWithInfo(bounds: CGRect,pageInfo: Option<&NSDictionary>,); +); + +extern_fn!( + pub unsafe fn UIGraphicsGetPDFContextBounds() -> CGRect; +); + +extern_fn!( + pub unsafe fn UIGraphicsSetPDFContextURLForRect(url: &NSURL,rect: CGRect,); +); + +extern_fn!( + pub unsafe fn UIGraphicsAddPDFContextDestinationAtPoint(name: &NSString,point: CGPoint,); +); + +extern_fn!( + pub unsafe fn UIGraphicsSetPDFContextDestinationForRect(name: &NSString,rect: CGRect,); +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIGraphicsImageRenderer.rs b/crates/icrate-generated/src/UIKit/generated/UIGraphicsImageRenderer.rs new file mode 100644 index 000000000..c3068ba2e --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIGraphicsImageRenderer.rs @@ -0,0 +1,106 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +pub type UIGraphicsImageDrawingActions = *mut Block<(NonNull, ), ()>; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIGraphicsImageRendererFormatRange { + UIGraphicsImageRendererFormatRangeUnspecified = -1, + UIGraphicsImageRendererFormatRangeAutomatic = 0, + UIGraphicsImageRendererFormatRangeExtended = 1, + UIGraphicsImageRendererFormatRangeStandard = 2, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIGraphicsImageRendererFormat; + + unsafe impl ClassType for UIGraphicsImageRendererFormat { + type Super = UIGraphicsRendererFormat; + } +); + +extern_methods!( + unsafe impl UIGraphicsImageRendererFormat { + #[method(scale)] + pub unsafe fn scale(&self, ) -> CGFloat; + + #[method(setScale:)] + pub unsafe fn setScale(&self, scale: CGFloat,); + + #[method(opaque)] + pub unsafe fn opaque(&self, ) -> bool; + + #[method(setOpaque:)] + pub unsafe fn setOpaque(&self, opaque: bool,); + + #[method(prefersExtendedRange)] + pub unsafe fn prefersExtendedRange(&self, ) -> bool; + + #[method(setPrefersExtendedRange:)] + pub unsafe fn setPrefersExtendedRange(&self, prefersExtendedRange: bool,); + + #[method(preferredRange)] + pub unsafe fn preferredRange(&self, ) -> UIGraphicsImageRendererFormatRange; + + #[method(setPreferredRange:)] + pub unsafe fn setPreferredRange(&self, preferredRange: UIGraphicsImageRendererFormatRange,); + + #[method_id(@__retain_semantics Other formatForTraitCollection:)] + pub unsafe fn formatForTraitCollection(traitCollection: &UITraitCollection,) -> Id; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIGraphicsImageRendererContext; + + unsafe impl ClassType for UIGraphicsImageRendererContext { + type Super = UIGraphicsRendererContext; + } +); + +extern_methods!( + unsafe impl UIGraphicsImageRendererContext { + #[method_id(@__retain_semantics Other currentImage)] + pub unsafe fn currentImage(&self, ) -> Id; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIGraphicsImageRenderer; + + unsafe impl ClassType for UIGraphicsImageRenderer { + type Super = UIGraphicsRenderer; + } +); + +extern_methods!( + unsafe impl UIGraphicsImageRenderer { + #[method_id(@__retain_semantics Init initWithSize:)] + pub unsafe fn initWithSize(this: Option>, size: CGSize,) -> Id; + + #[method_id(@__retain_semantics Init initWithSize:format:)] + pub unsafe fn initWithSize_format(this: Option>, size: CGSize,format: &UIGraphicsImageRendererFormat,) -> Id; + + #[method_id(@__retain_semantics Init initWithBounds:format:)] + pub unsafe fn initWithBounds_format(this: Option>, bounds: CGRect,format: &UIGraphicsImageRendererFormat,) -> Id; + + #[method_id(@__retain_semantics Other imageWithActions:)] + pub unsafe fn imageWithActions(&self, actions: UIGraphicsImageDrawingActions,) -> Id; + + #[method_id(@__retain_semantics Other PNGDataWithActions:)] + pub unsafe fn PNGDataWithActions(&self, actions: UIGraphicsImageDrawingActions,) -> Id; + + #[method_id(@__retain_semantics Other JPEGDataWithCompressionQuality:actions:)] + pub unsafe fn JPEGDataWithCompressionQuality_actions(&self, compressionQuality: CGFloat,actions: UIGraphicsImageDrawingActions,) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIGraphicsPDFRenderer.rs b/crates/icrate-generated/src/UIKit/generated/UIGraphicsPDFRenderer.rs new file mode 100644 index 000000000..c090725f6 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIGraphicsPDFRenderer.rs @@ -0,0 +1,81 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +pub type UIGraphicsPDFDrawingActions = *mut Block<(NonNull, ), ()>; + +extern_class!( + #[derive(Debug)] + pub struct UIGraphicsPDFRendererFormat; + + unsafe impl ClassType for UIGraphicsPDFRendererFormat { + type Super = UIGraphicsRendererFormat; + } +); + +extern_methods!( + unsafe impl UIGraphicsPDFRendererFormat { + #[method_id(@__retain_semantics Other documentInfo)] + pub unsafe fn documentInfo(&self, ) -> Id, Shared>; + + #[method(setDocumentInfo:)] + pub unsafe fn setDocumentInfo(&self, documentInfo: &NSDictionary,); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIGraphicsPDFRendererContext; + + unsafe impl ClassType for UIGraphicsPDFRendererContext { + type Super = UIGraphicsRendererContext; + } +); + +extern_methods!( + unsafe impl UIGraphicsPDFRendererContext { + #[method(pdfContextBounds)] + pub unsafe fn pdfContextBounds(&self, ) -> CGRect; + + #[method(beginPage)] + pub unsafe fn beginPage(&self, ); + + #[method(beginPageWithBounds:pageInfo:)] + pub unsafe fn beginPageWithBounds_pageInfo(&self, bounds: CGRect,pageInfo: &NSDictionary,); + + #[method(setURL:forRect:)] + pub unsafe fn setURL_forRect(&self, url: &NSURL,rect: CGRect,); + + #[method(addDestinationWithName:atPoint:)] + pub unsafe fn addDestinationWithName_atPoint(&self, name: &NSString,point: CGPoint,); + + #[method(setDestinationWithName:forRect:)] + pub unsafe fn setDestinationWithName_forRect(&self, name: &NSString,rect: CGRect,); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIGraphicsPDFRenderer; + + unsafe impl ClassType for UIGraphicsPDFRenderer { + type Super = UIGraphicsRenderer; + } +); + +extern_methods!( + unsafe impl UIGraphicsPDFRenderer { + #[method_id(@__retain_semantics Init initWithBounds:format:)] + pub unsafe fn initWithBounds_format(this: Option>, bounds: CGRect,format: &UIGraphicsPDFRendererFormat,) -> Id; + + #[method(writePDFToURL:withActions:error:)] + pub unsafe fn writePDFToURL_withActions_error(&self, url: &NSURL,actions: UIGraphicsPDFDrawingActions,) -> Result<(), Id>; + + #[method_id(@__retain_semantics Other PDFDataWithActions:)] + pub unsafe fn PDFDataWithActions(&self, actions: UIGraphicsPDFDrawingActions,) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIGraphicsRenderer.rs b/crates/icrate-generated/src/UIKit/generated/UIGraphicsRenderer.rs new file mode 100644 index 000000000..3e236ac2d --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIGraphicsRenderer.rs @@ -0,0 +1,88 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIGraphicsRendererFormat; + + unsafe impl ClassType for UIGraphicsRendererFormat { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIGraphicsRendererFormat { + #[method_id(@__retain_semantics Other defaultFormat)] + pub unsafe fn defaultFormat() -> Id; + + #[method_id(@__retain_semantics Other preferredFormat)] + pub unsafe fn preferredFormat() -> Id; + + #[method(bounds)] + pub unsafe fn bounds(&self, ) -> CGRect; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIGraphicsRendererContext; + + unsafe impl ClassType for UIGraphicsRendererContext { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIGraphicsRendererContext { + #[method(CGContext)] + pub unsafe fn CGContext(&self, ) -> CGContextRef; + + #[method_id(@__retain_semantics Other format)] + pub unsafe fn format(&self, ) -> Id; + + #[method(fillRect:)] + pub unsafe fn fillRect(&self, rect: CGRect,); + + #[method(fillRect:blendMode:)] + pub unsafe fn fillRect_blendMode(&self, rect: CGRect,blendMode: CGBlendMode,); + + #[method(strokeRect:)] + pub unsafe fn strokeRect(&self, rect: CGRect,); + + #[method(strokeRect:blendMode:)] + pub unsafe fn strokeRect_blendMode(&self, rect: CGRect,blendMode: CGBlendMode,); + + #[method(clipToRect:)] + pub unsafe fn clipToRect(&self, rect: CGRect,); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIGraphicsRenderer; + + unsafe impl ClassType for UIGraphicsRenderer { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIGraphicsRenderer { + #[method_id(@__retain_semantics Init initWithBounds:)] + pub unsafe fn initWithBounds(this: Option>, bounds: CGRect,) -> Id; + + #[method_id(@__retain_semantics Init initWithBounds:format:)] + pub unsafe fn initWithBounds_format(this: Option>, bounds: CGRect,format: &UIGraphicsRendererFormat,) -> Id; + + #[method_id(@__retain_semantics Other format)] + pub unsafe fn format(&self, ) -> Id; + + #[method(allowsImageOutput)] + pub unsafe fn allowsImageOutput(&self, ) -> bool; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIGraphicsRendererSubclass.rs b/crates/icrate-generated/src/UIKit/generated/UIGraphicsRendererSubclass.rs new file mode 100644 index 000000000..f06dd1fc1 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIGraphicsRendererSubclass.rs @@ -0,0 +1,24 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +pub type UIGraphicsDrawingActions = *mut Block<(NonNull, ), ()>; + +extern_methods!( + /// UIGraphicsRendererProtected + unsafe impl UIGraphicsRenderer { + #[method(rendererContextClass)] + pub unsafe fn rendererContextClass() -> &'static Class; + + #[method(contextWithFormat:)] + pub unsafe fn contextWithFormat(format: &UIGraphicsRendererFormat,) -> CGContextRef; + + #[method(prepareCGContext:withRendererContext:)] + pub unsafe fn prepareCGContext_withRendererContext(context: CGContextRef,rendererContext: &UIGraphicsRendererContext,); + + #[method(runDrawingActions:completionActions:error:)] + pub unsafe fn runDrawingActions_completionActions_error(&self, drawingActions: UIGraphicsDrawingActions,completionActions: UIGraphicsDrawingActions,) -> Result<(), Id>; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIGravityBehavior.rs b/crates/icrate-generated/src/UIKit/generated/UIGravityBehavior.rs new file mode 100644 index 000000000..15e3cd237 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIGravityBehavior.rs @@ -0,0 +1,51 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIGravityBehavior; + + unsafe impl ClassType for UIGravityBehavior { + type Super = UIDynamicBehavior; + } +); + +extern_methods!( + unsafe impl UIGravityBehavior { + #[method_id(@__retain_semantics Init initWithItems:)] + pub unsafe fn initWithItems(this: Option>, items: &NSArray,) -> Id; + + #[method(addItem:)] + pub unsafe fn addItem(&self, item: &UIDynamicItem,); + + #[method(removeItem:)] + pub unsafe fn removeItem(&self, item: &UIDynamicItem,); + + #[method_id(@__retain_semantics Other items)] + pub unsafe fn items(&self, ) -> Id, Shared>; + + #[method(gravityDirection)] + pub unsafe fn gravityDirection(&self, ) -> CGVector; + + #[method(setGravityDirection:)] + pub unsafe fn setGravityDirection(&self, gravityDirection: CGVector,); + + #[method(angle)] + pub unsafe fn angle(&self, ) -> CGFloat; + + #[method(setAngle:)] + pub unsafe fn setAngle(&self, angle: CGFloat,); + + #[method(magnitude)] + pub unsafe fn magnitude(&self, ) -> CGFloat; + + #[method(setMagnitude:)] + pub unsafe fn setMagnitude(&self, magnitude: CGFloat,); + + #[method(setAngle:magnitude:)] + pub unsafe fn setAngle_magnitude(&self, angle: CGFloat,magnitude: CGFloat,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIGuidedAccess.rs b/crates/icrate-generated/src/UIKit/generated/UIGuidedAccess.rs new file mode 100644 index 000000000..b3bd53089 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIGuidedAccess.rs @@ -0,0 +1,61 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_static!(UIGuidedAccessErrorDomain: &'static NSErrorDomain); + +ns_error_enum!( + #[underlying(NSInteger)] + pub enum UIGuidedAccessErrorCode { + UIGuidedAccessErrorPermissionDenied = 0, + UIGuidedAccessErrorFailed = 9223372036854775807, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIGuidedAccessRestrictionState { + UIGuidedAccessRestrictionStateAllow = 0, + UIGuidedAccessRestrictionStateDeny = 1, + } +); + +extern_protocol!( + pub struct UIGuidedAccessRestrictionDelegate; + + unsafe impl UIGuidedAccessRestrictionDelegate { + #[method_id(@__retain_semantics Other guidedAccessRestrictionIdentifiers)] + pub unsafe fn guidedAccessRestrictionIdentifiers(&self, ) -> Option, Shared>>; + + #[method(guidedAccessRestrictionWithIdentifier:didChangeState:)] + pub unsafe fn guidedAccessRestrictionWithIdentifier_didChangeState(&self, restrictionIdentifier: &NSString,newRestrictionState: UIGuidedAccessRestrictionState,); + + #[method_id(@__retain_semantics Other textForGuidedAccessRestrictionWithIdentifier:)] + pub unsafe fn textForGuidedAccessRestrictionWithIdentifier(&self, restrictionIdentifier: &NSString,) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other detailTextForGuidedAccessRestrictionWithIdentifier:)] + pub unsafe fn detailTextForGuidedAccessRestrictionWithIdentifier(&self, restrictionIdentifier: &NSString,) -> Option>; + + } +); + +extern_fn!( + pub unsafe fn UIGuidedAccessRestrictionStateForIdentifier(restrictionIdentifier: &NSString,) -> UIGuidedAccessRestrictionState; +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum UIGuidedAccessAccessibilityFeature { + UIGuidedAccessAccessibilityFeatureVoiceOver = 1<<0, + UIGuidedAccessAccessibilityFeatureZoom = 1<<1, + UIGuidedAccessAccessibilityFeatureAssistiveTouch = 1<<2, + UIGuidedAccessAccessibilityFeatureInvertColors = 1<<3, + UIGuidedAccessAccessibilityFeatureGrayscaleDisplay = 1<<4, + } +); + +extern_fn!( + pub unsafe fn UIGuidedAccessConfigureAccessibilityFeatures(features: UIGuidedAccessAccessibilityFeature,enabled: Bool,completion: &Block<(Bool, *mut NSError, ), ()>,); +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIGuidedAccessRestrictions.rs b/crates/icrate-generated/src/UIKit/generated/UIGuidedAccessRestrictions.rs new file mode 100644 index 000000000..bc88fc826 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIGuidedAccessRestrictions.rs @@ -0,0 +1,4 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + diff --git a/crates/icrate-generated/src/UIKit/generated/UIHoverGestureRecognizer.rs b/crates/icrate-generated/src/UIKit/generated/UIHoverGestureRecognizer.rs new file mode 100644 index 000000000..efe54aee6 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIHoverGestureRecognizer.rs @@ -0,0 +1,18 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIHoverGestureRecognizer; + + unsafe impl ClassType for UIHoverGestureRecognizer { + type Super = UIGestureRecognizer; + } +); + +extern_methods!( + unsafe impl UIHoverGestureRecognizer { + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIImage.rs b/crates/icrate-generated/src/UIKit/generated/UIImage.rs new file mode 100644 index 000000000..8c6568ff5 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIImage.rs @@ -0,0 +1,321 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIImageOrientation { + UIImageOrientationUp = 0, + UIImageOrientationDown = 1, + UIImageOrientationLeft = 2, + UIImageOrientationRight = 3, + UIImageOrientationUpMirrored = 4, + UIImageOrientationDownMirrored = 5, + UIImageOrientationLeftMirrored = 6, + UIImageOrientationRightMirrored = 7, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIImageResizingMode { + UIImageResizingModeTile = 0, + UIImageResizingModeStretch = 1, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIImageRenderingMode { + UIImageRenderingModeAutomatic = 0, + UIImageRenderingModeAlwaysOriginal = 1, + UIImageRenderingModeAlwaysTemplate = 2, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIImage; + + unsafe impl ClassType for UIImage { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIImage { + #[method_id(@__retain_semantics Other systemImageNamed:)] + pub unsafe fn systemImageNamed(name: &NSString,) -> Option>; + + #[method_id(@__retain_semantics Other systemImageNamed:withConfiguration:)] + pub unsafe fn systemImageNamed_withConfiguration(name: &NSString,configuration: Option<&UIImageConfiguration>,) -> Option>; + + #[method_id(@__retain_semantics Other systemImageNamed:compatibleWithTraitCollection:)] + pub unsafe fn systemImageNamed_compatibleWithTraitCollection(name: &NSString,traitCollection: Option<&UITraitCollection>,) -> Option>; + + #[method_id(@__retain_semantics Other systemImageNamed:variableValue:withConfiguration:)] + pub unsafe fn systemImageNamed_variableValue_withConfiguration(name: &NSString,value: c_double,configuration: Option<&UIImageConfiguration>,) -> Option>; + + #[method_id(@__retain_semantics Other imageNamed:)] + pub unsafe fn imageNamed(name: &NSString,) -> Option>; + + #[method_id(@__retain_semantics Other imageNamed:inBundle:withConfiguration:)] + pub unsafe fn imageNamed_inBundle_withConfiguration(name: &NSString,bundle: Option<&NSBundle>,configuration: Option<&UIImageConfiguration>,) -> Option>; + + #[method_id(@__retain_semantics Other imageNamed:inBundle:compatibleWithTraitCollection:)] + pub unsafe fn imageNamed_inBundle_compatibleWithTraitCollection(name: &NSString,bundle: Option<&NSBundle>,traitCollection: Option<&UITraitCollection>,) -> Option>; + + #[method_id(@__retain_semantics Other imageNamed:inBundle:variableValue:withConfiguration:)] + pub unsafe fn imageNamed_inBundle_variableValue_withConfiguration(name: &NSString,bundle: Option<&NSBundle>,value: c_double,configuration: Option<&UIImageConfiguration>,) -> Option>; + + #[method_id(@__retain_semantics Other imageWithContentsOfFile:)] + pub unsafe fn imageWithContentsOfFile(path: &NSString,) -> Option>; + + #[method_id(@__retain_semantics Other imageWithData:)] + pub unsafe fn imageWithData(data: &NSData,) -> Option>; + + #[method_id(@__retain_semantics Other imageWithData:scale:)] + pub unsafe fn imageWithData_scale(data: &NSData,scale: CGFloat,) -> Option>; + + #[method_id(@__retain_semantics Other imageWithCGImage:)] + pub unsafe fn imageWithCGImage(cgImage: CGImageRef,) -> Id; + + #[method_id(@__retain_semantics Other imageWithCGImage:scale:orientation:)] + pub unsafe fn imageWithCGImage_scale_orientation(cgImage: CGImageRef,scale: CGFloat,orientation: UIImageOrientation,) -> Id; + + #[method_id(@__retain_semantics Other imageWithCIImage:)] + pub unsafe fn imageWithCIImage(ciImage: &CIImage,) -> Id; + + #[method_id(@__retain_semantics Other imageWithCIImage:scale:orientation:)] + pub unsafe fn imageWithCIImage_scale_orientation(ciImage: &CIImage,scale: CGFloat,orientation: UIImageOrientation,) -> Id; + + #[method_id(@__retain_semantics Init initWithContentsOfFile:)] + pub unsafe fn initWithContentsOfFile(this: Option>, path: &NSString,) -> Option>; + + #[method_id(@__retain_semantics Init initWithData:)] + pub unsafe fn initWithData(this: Option>, data: &NSData,) -> Option>; + + #[method_id(@__retain_semantics Init initWithData:scale:)] + pub unsafe fn initWithData_scale(this: Option>, data: &NSData,scale: CGFloat,) -> Option>; + + #[method_id(@__retain_semantics Init initWithCGImage:)] + pub unsafe fn initWithCGImage(this: Option>, cgImage: CGImageRef,) -> Id; + + #[method_id(@__retain_semantics Init initWithCGImage:scale:orientation:)] + pub unsafe fn initWithCGImage_scale_orientation(this: Option>, cgImage: CGImageRef,scale: CGFloat,orientation: UIImageOrientation,) -> Id; + + #[method_id(@__retain_semantics Init initWithCIImage:)] + pub unsafe fn initWithCIImage(this: Option>, ciImage: &CIImage,) -> Id; + + #[method_id(@__retain_semantics Init initWithCIImage:scale:orientation:)] + pub unsafe fn initWithCIImage_scale_orientation(this: Option>, ciImage: &CIImage,scale: CGFloat,orientation: UIImageOrientation,) -> Id; + + #[method(size)] + pub unsafe fn size(&self, ) -> CGSize; + + #[method(CGImage)] + pub unsafe fn CGImage(&self, ) -> CGImageRef; + + #[method_id(@__retain_semantics Other CIImage)] + pub unsafe fn CIImage(&self, ) -> Option>; + + #[method(imageOrientation)] + pub unsafe fn imageOrientation(&self, ) -> UIImageOrientation; + + #[method(scale)] + pub unsafe fn scale(&self, ) -> CGFloat; + + #[method(isSymbolImage)] + pub unsafe fn isSymbolImage(&self, ) -> bool; + + #[method_id(@__retain_semantics Other animatedImageNamed:duration:)] + pub unsafe fn animatedImageNamed_duration(name: &NSString,duration: NSTimeInterval,) -> Option>; + + #[method_id(@__retain_semantics Other animatedResizableImageNamed:capInsets:duration:)] + pub unsafe fn animatedResizableImageNamed_capInsets_duration(name: &NSString,capInsets: UIEdgeInsets,duration: NSTimeInterval,) -> Option>; + + #[method_id(@__retain_semantics Other animatedResizableImageNamed:capInsets:resizingMode:duration:)] + pub unsafe fn animatedResizableImageNamed_capInsets_resizingMode_duration(name: &NSString,capInsets: UIEdgeInsets,resizingMode: UIImageResizingMode,duration: NSTimeInterval,) -> Option>; + + #[method_id(@__retain_semantics Other animatedImageWithImages:duration:)] + pub unsafe fn animatedImageWithImages_duration(images: &NSArray,duration: NSTimeInterval,) -> Option>; + + #[method_id(@__retain_semantics Other images)] + pub unsafe fn images(&self, ) -> Option, Shared>>; + + #[method(duration)] + pub unsafe fn duration(&self, ) -> NSTimeInterval; + + #[method(drawAtPoint:)] + pub unsafe fn drawAtPoint(&self, point: CGPoint,); + + #[method(drawAtPoint:blendMode:alpha:)] + pub unsafe fn drawAtPoint_blendMode_alpha(&self, point: CGPoint,blendMode: CGBlendMode,alpha: CGFloat,); + + #[method(drawInRect:)] + pub unsafe fn drawInRect(&self, rect: CGRect,); + + #[method(drawInRect:blendMode:alpha:)] + pub unsafe fn drawInRect_blendMode_alpha(&self, rect: CGRect,blendMode: CGBlendMode,alpha: CGFloat,); + + #[method(drawAsPatternInRect:)] + pub unsafe fn drawAsPatternInRect(&self, rect: CGRect,); + + #[method_id(@__retain_semantics Other resizableImageWithCapInsets:)] + pub unsafe fn resizableImageWithCapInsets(&self, capInsets: UIEdgeInsets,) -> Id; + + #[method_id(@__retain_semantics Other resizableImageWithCapInsets:resizingMode:)] + pub unsafe fn resizableImageWithCapInsets_resizingMode(&self, capInsets: UIEdgeInsets,resizingMode: UIImageResizingMode,) -> Id; + + #[method(capInsets)] + pub unsafe fn capInsets(&self, ) -> UIEdgeInsets; + + #[method(resizingMode)] + pub unsafe fn resizingMode(&self, ) -> UIImageResizingMode; + + #[method_id(@__retain_semantics Other imageWithAlignmentRectInsets:)] + pub unsafe fn imageWithAlignmentRectInsets(&self, alignmentInsets: UIEdgeInsets,) -> Id; + + #[method(alignmentRectInsets)] + pub unsafe fn alignmentRectInsets(&self, ) -> UIEdgeInsets; + + #[method_id(@__retain_semantics Other imageWithRenderingMode:)] + pub unsafe fn imageWithRenderingMode(&self, renderingMode: UIImageRenderingMode,) -> Id; + + #[method(renderingMode)] + pub unsafe fn renderingMode(&self, ) -> UIImageRenderingMode; + + #[method_id(@__retain_semantics Other imageRendererFormat)] + pub unsafe fn imageRendererFormat(&self, ) -> Id; + + #[method_id(@__retain_semantics Other traitCollection)] + pub unsafe fn traitCollection(&self, ) -> Id; + + #[method_id(@__retain_semantics Other imageAsset)] + pub unsafe fn imageAsset(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other imageFlippedForRightToLeftLayoutDirection)] + pub unsafe fn imageFlippedForRightToLeftLayoutDirection(&self, ) -> Id; + + #[method(flipsForRightToLeftLayoutDirection)] + pub unsafe fn flipsForRightToLeftLayoutDirection(&self, ) -> bool; + + #[method_id(@__retain_semantics Other imageWithHorizontallyFlippedOrientation)] + pub unsafe fn imageWithHorizontallyFlippedOrientation(&self, ) -> Id; + + #[method(baselineOffsetFromBottom)] + pub unsafe fn baselineOffsetFromBottom(&self, ) -> CGFloat; + + #[method(hasBaseline)] + pub unsafe fn hasBaseline(&self, ) -> bool; + + #[method_id(@__retain_semantics Other imageWithBaselineOffsetFromBottom:)] + pub unsafe fn imageWithBaselineOffsetFromBottom(&self, baselineOffset: CGFloat,) -> Id; + + #[method_id(@__retain_semantics Other imageWithoutBaseline)] + pub unsafe fn imageWithoutBaseline(&self, ) -> Id; + + #[method_id(@__retain_semantics Other configuration)] + pub unsafe fn configuration(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other imageWithConfiguration:)] + pub unsafe fn imageWithConfiguration(&self, configuration: &UIImageConfiguration,) -> Id; + + #[method_id(@__retain_semantics Other symbolConfiguration)] + pub unsafe fn symbolConfiguration(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other imageByApplyingSymbolConfiguration:)] + pub unsafe fn imageByApplyingSymbolConfiguration(&self, configuration: &UIImageSymbolConfiguration,) -> Option>; + + #[method_id(@__retain_semantics Other imageWithTintColor:)] + pub unsafe fn imageWithTintColor(&self, color: &UIColor,) -> Id; + + #[method_id(@__retain_semantics Other imageWithTintColor:renderingMode:)] + pub unsafe fn imageWithTintColor_renderingMode(&self, color: &UIColor,renderingMode: UIImageRenderingMode,) -> Id; + + #[method_id(@__retain_semantics Other imageByPreparingForDisplay)] + pub unsafe fn imageByPreparingForDisplay(&self, ) -> Option>; + + #[method(prepareForDisplayWithCompletionHandler:)] + pub unsafe fn prepareForDisplayWithCompletionHandler(&self, completionHandler: &Block<(*mut UIImage, ), ()>,); + + #[method_id(@__retain_semantics Other imageByPreparingThumbnailOfSize:)] + pub unsafe fn imageByPreparingThumbnailOfSize(&self, size: CGSize,) -> Option>; + + #[method(prepareThumbnailOfSize:completionHandler:)] + pub unsafe fn prepareThumbnailOfSize_completionHandler(&self, size: CGSize,completionHandler: &Block<(*mut UIImage, ), ()>,); + + } +); + +extern_methods!( + /// PreconfiguredSystemImages + unsafe impl UIImage { + #[method_id(@__retain_semantics Other actionsImage)] + pub unsafe fn actionsImage() -> Id; + + #[method_id(@__retain_semantics Other addImage)] + pub unsafe fn addImage() -> Id; + + #[method_id(@__retain_semantics Other removeImage)] + pub unsafe fn removeImage() -> Id; + + #[method_id(@__retain_semantics Other checkmarkImage)] + pub unsafe fn checkmarkImage() -> Id; + + #[method_id(@__retain_semantics Other strokedCheckmarkImage)] + pub unsafe fn strokedCheckmarkImage() -> Id; + + } +); + +extern_methods!( + /// NSItemProvider + unsafe impl UIImage { + } +); + +extern_methods!( + /// UIImage + unsafe impl NSTextAttachment { + #[method_id(@__retain_semantics Other textAttachmentWithImage:)] + pub unsafe fn textAttachmentWithImage(image: &UIImage,) -> Id; + + } +); + +extern_methods!( + /// UIImageDeprecated + unsafe impl UIImage { + #[method_id(@__retain_semantics Other stretchableImageWithLeftCapWidth:topCapHeight:)] + pub unsafe fn stretchableImageWithLeftCapWidth_topCapHeight(&self, leftCapWidth: NSInteger,topCapHeight: NSInteger,) -> Id; + + #[method(leftCapWidth)] + pub unsafe fn leftCapWidth(&self, ) -> NSInteger; + + #[method(topCapHeight)] + pub unsafe fn topCapHeight(&self, ) -> NSInteger; + + } +); + +extern_methods!( + /// UIKitAdditions + unsafe impl CIImage { + #[method_id(@__retain_semantics Init initWithImage:)] + pub unsafe fn initWithImage(this: Option>, image: &UIImage,) -> Option>; + + #[method_id(@__retain_semantics Init initWithImage:options:)] + pub unsafe fn initWithImage_options(this: Option>, image: &UIImage,options: Option<&NSDictionary>,) -> Option>; + + } +); + +extern_fn!( + pub unsafe fn UIImagePNGRepresentation(image: &UIImage,) -> *mut NSData; +); + +extern_fn!( + pub unsafe fn UIImageJPEGRepresentation(image: &UIImage,compressionQuality: CGFloat,) -> *mut NSData; +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIImageAsset.rs b/crates/icrate-generated/src/UIKit/generated/UIImageAsset.rs new file mode 100644 index 000000000..abbc9181c --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIImageAsset.rs @@ -0,0 +1,42 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIImageAsset; + + unsafe impl ClassType for UIImageAsset { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIImageAsset { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method_id(@__retain_semantics Other imageWithConfiguration:)] + pub unsafe fn imageWithConfiguration(&self, configuration: &UIImageConfiguration,) -> Id; + + #[method(registerImage:withConfiguration:)] + pub unsafe fn registerImage_withConfiguration(&self, image: &UIImage,configuration: &UIImageConfiguration,); + + #[method(unregisterImageWithConfiguration:)] + pub unsafe fn unregisterImageWithConfiguration(&self, configuration: &UIImageConfiguration,); + + #[method_id(@__retain_semantics Other imageWithTraitCollection:)] + pub unsafe fn imageWithTraitCollection(&self, traitCollection: &UITraitCollection,) -> Id; + + #[method(registerImage:withTraitCollection:)] + pub unsafe fn registerImage_withTraitCollection(&self, image: &UIImage,traitCollection: &UITraitCollection,); + + #[method(unregisterImageWithTraitCollection:)] + pub unsafe fn unregisterImageWithTraitCollection(&self, traitCollection: &UITraitCollection,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIImageConfiguration.rs b/crates/icrate-generated/src/UIKit/generated/UIImageConfiguration.rs new file mode 100644 index 000000000..ce12652af --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIImageConfiguration.rs @@ -0,0 +1,33 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIImageConfiguration; + + unsafe impl ClassType for UIImageConfiguration { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIImageConfiguration { + #[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 traitCollection)] + pub unsafe fn traitCollection(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other configurationWithTraitCollection:)] + pub unsafe fn configurationWithTraitCollection(&self, traitCollection: Option<&UITraitCollection>,) -> Id; + + #[method_id(@__retain_semantics Other configurationByApplyingConfiguration:)] + pub unsafe fn configurationByApplyingConfiguration(&self, otherConfiguration: Option<&UIImageConfiguration>,) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIImagePickerController.rs b/crates/icrate-generated/src/UIKit/generated/UIImagePickerController.rs new file mode 100644 index 000000000..2bfaad76f --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIImagePickerController.rs @@ -0,0 +1,239 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIImagePickerControllerSourceType { + UIImagePickerControllerSourceTypePhotoLibrary = 0, + UIImagePickerControllerSourceTypeCamera = 1, + UIImagePickerControllerSourceTypeSavedPhotosAlbum = 2, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIImagePickerControllerQualityType { + UIImagePickerControllerQualityTypeHigh = 0, + UIImagePickerControllerQualityTypeMedium = 1, + UIImagePickerControllerQualityTypeLow = 2, + UIImagePickerControllerQualityType640x480 = 3, + UIImagePickerControllerQualityTypeIFrame1280x720 = 4, + UIImagePickerControllerQualityTypeIFrame960x540 = 5, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIImagePickerControllerCameraCaptureMode { + UIImagePickerControllerCameraCaptureModePhoto = 0, + UIImagePickerControllerCameraCaptureModeVideo = 1, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIImagePickerControllerCameraDevice { + UIImagePickerControllerCameraDeviceRear = 0, + UIImagePickerControllerCameraDeviceFront = 1, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIImagePickerControllerCameraFlashMode { + UIImagePickerControllerCameraFlashModeOff = -1, + UIImagePickerControllerCameraFlashModeAuto = 0, + UIImagePickerControllerCameraFlashModeOn = 1, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIImagePickerControllerImageURLExportPreset { + UIImagePickerControllerImageURLExportPresetCompatible = 0, + UIImagePickerControllerImageURLExportPresetCurrent = 1, + } +); + +pub type UIImagePickerControllerInfoKey = NSString; + +extern_static!(UIImagePickerControllerMediaType: &'static UIImagePickerControllerInfoKey); + +extern_static!(UIImagePickerControllerOriginalImage: &'static UIImagePickerControllerInfoKey); + +extern_static!(UIImagePickerControllerEditedImage: &'static UIImagePickerControllerInfoKey); + +extern_static!(UIImagePickerControllerCropRect: &'static UIImagePickerControllerInfoKey); + +extern_static!(UIImagePickerControllerMediaURL: &'static UIImagePickerControllerInfoKey); + +extern_static!(UIImagePickerControllerReferenceURL: &'static UIImagePickerControllerInfoKey); + +extern_static!(UIImagePickerControllerMediaMetadata: &'static UIImagePickerControllerInfoKey); + +extern_static!(UIImagePickerControllerLivePhoto: &'static UIImagePickerControllerInfoKey); + +extern_static!(UIImagePickerControllerPHAsset: &'static UIImagePickerControllerInfoKey); + +extern_static!(UIImagePickerControllerImageURL: &'static UIImagePickerControllerInfoKey); + +extern_class!( + #[derive(Debug)] + pub struct UIImagePickerController; + + unsafe impl ClassType for UIImagePickerController { + type Super = UINavigationController; + } +); + +extern_methods!( + unsafe impl UIImagePickerController { + #[method(isSourceTypeAvailable:)] + pub unsafe fn isSourceTypeAvailable(sourceType: UIImagePickerControllerSourceType,) -> bool; + + #[method_id(@__retain_semantics Other availableMediaTypesForSourceType:)] + pub unsafe fn availableMediaTypesForSourceType(sourceType: UIImagePickerControllerSourceType,) -> Option, Shared>>; + + #[method(isCameraDeviceAvailable:)] + pub unsafe fn isCameraDeviceAvailable(cameraDevice: UIImagePickerControllerCameraDevice,) -> bool; + + #[method(isFlashAvailableForCameraDevice:)] + pub unsafe fn isFlashAvailableForCameraDevice(cameraDevice: UIImagePickerControllerCameraDevice,) -> bool; + + #[method_id(@__retain_semantics Other availableCaptureModesForCameraDevice:)] + pub unsafe fn availableCaptureModesForCameraDevice(cameraDevice: UIImagePickerControllerCameraDevice,) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&TodoProtocols>,); + + #[method(sourceType)] + pub unsafe fn sourceType(&self, ) -> UIImagePickerControllerSourceType; + + #[method(setSourceType:)] + pub unsafe fn setSourceType(&self, sourceType: UIImagePickerControllerSourceType,); + + #[method_id(@__retain_semantics Other mediaTypes)] + pub unsafe fn mediaTypes(&self, ) -> Id, Shared>; + + #[method(setMediaTypes:)] + pub unsafe fn setMediaTypes(&self, mediaTypes: &NSArray,); + + #[method(allowsEditing)] + pub unsafe fn allowsEditing(&self, ) -> bool; + + #[method(setAllowsEditing:)] + pub unsafe fn setAllowsEditing(&self, allowsEditing: bool,); + + #[method(allowsImageEditing)] + pub unsafe fn allowsImageEditing(&self, ) -> bool; + + #[method(setAllowsImageEditing:)] + pub unsafe fn setAllowsImageEditing(&self, allowsImageEditing: bool,); + + #[method(imageExportPreset)] + pub unsafe fn imageExportPreset(&self, ) -> UIImagePickerControllerImageURLExportPreset; + + #[method(setImageExportPreset:)] + pub unsafe fn setImageExportPreset(&self, imageExportPreset: UIImagePickerControllerImageURLExportPreset,); + + #[method(videoMaximumDuration)] + pub unsafe fn videoMaximumDuration(&self, ) -> NSTimeInterval; + + #[method(setVideoMaximumDuration:)] + pub unsafe fn setVideoMaximumDuration(&self, videoMaximumDuration: NSTimeInterval,); + + #[method(videoQuality)] + pub unsafe fn videoQuality(&self, ) -> UIImagePickerControllerQualityType; + + #[method(setVideoQuality:)] + pub unsafe fn setVideoQuality(&self, videoQuality: UIImagePickerControllerQualityType,); + + #[method_id(@__retain_semantics Other videoExportPreset)] + pub unsafe fn videoExportPreset(&self, ) -> Id; + + #[method(setVideoExportPreset:)] + pub unsafe fn setVideoExportPreset(&self, videoExportPreset: &NSString,); + + #[method(showsCameraControls)] + pub unsafe fn showsCameraControls(&self, ) -> bool; + + #[method(setShowsCameraControls:)] + pub unsafe fn setShowsCameraControls(&self, showsCameraControls: bool,); + + #[method_id(@__retain_semantics Other cameraOverlayView)] + pub unsafe fn cameraOverlayView(&self, ) -> Option>; + + #[method(setCameraOverlayView:)] + pub unsafe fn setCameraOverlayView(&self, cameraOverlayView: Option<&UIView>,); + + #[method(cameraViewTransform)] + pub unsafe fn cameraViewTransform(&self, ) -> CGAffineTransform; + + #[method(setCameraViewTransform:)] + pub unsafe fn setCameraViewTransform(&self, cameraViewTransform: CGAffineTransform,); + + #[method(takePicture)] + pub unsafe fn takePicture(&self, ); + + #[method(startVideoCapture)] + pub unsafe fn startVideoCapture(&self, ) -> bool; + + #[method(stopVideoCapture)] + pub unsafe fn stopVideoCapture(&self, ); + + #[method(cameraCaptureMode)] + pub unsafe fn cameraCaptureMode(&self, ) -> UIImagePickerControllerCameraCaptureMode; + + #[method(setCameraCaptureMode:)] + pub unsafe fn setCameraCaptureMode(&self, cameraCaptureMode: UIImagePickerControllerCameraCaptureMode,); + + #[method(cameraDevice)] + pub unsafe fn cameraDevice(&self, ) -> UIImagePickerControllerCameraDevice; + + #[method(setCameraDevice:)] + pub unsafe fn setCameraDevice(&self, cameraDevice: UIImagePickerControllerCameraDevice,); + + #[method(cameraFlashMode)] + pub unsafe fn cameraFlashMode(&self, ) -> UIImagePickerControllerCameraFlashMode; + + #[method(setCameraFlashMode:)] + pub unsafe fn setCameraFlashMode(&self, cameraFlashMode: UIImagePickerControllerCameraFlashMode,); + + } +); + +extern_protocol!( + pub struct UIImagePickerControllerDelegate; + + unsafe impl UIImagePickerControllerDelegate { + #[optional] + #[method(imagePickerController:didFinishPickingImage:editingInfo:)] + pub unsafe fn imagePickerController_didFinishPickingImage_editingInfo(&self, picker: &UIImagePickerController,image: &UIImage,editingInfo: Option<&NSDictionary>,); + + #[optional] + #[method(imagePickerController:didFinishPickingMediaWithInfo:)] + pub unsafe fn imagePickerController_didFinishPickingMediaWithInfo(&self, picker: &UIImagePickerController,info: &NSDictionary,); + + #[optional] + #[method(imagePickerControllerDidCancel:)] + pub unsafe fn imagePickerControllerDidCancel(&self, picker: &UIImagePickerController,); + + } +); + +extern_fn!( + pub unsafe fn UIImageWriteToSavedPhotosAlbum(image: &UIImage,completionTarget: Option<&Object>,completionSelector: OptionSel,contextInfo: *mut c_void,); +); + +extern_fn!( + pub unsafe fn UIVideoAtPathIsCompatibleWithSavedPhotosAlbum(videoPath: &NSString,) -> Bool; +); + +extern_fn!( + pub unsafe fn UISaveVideoAtPathToSavedPhotosAlbum(videoPath: &NSString,completionTarget: Option<&Object>,completionSelector: OptionSel,contextInfo: *mut c_void,); +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIImageSymbolConfiguration.rs b/crates/icrate-generated/src/UIKit/generated/UIImageSymbolConfiguration.rs new file mode 100644 index 000000000..0acee3241 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIImageSymbolConfiguration.rs @@ -0,0 +1,110 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIImageSymbolScale { + UIImageSymbolScaleDefault = -1, + UIImageSymbolScaleUnspecified = 0, + UIImageSymbolScaleSmall = 1, + UIImageSymbolScaleMedium = 2, + UIImageSymbolScaleLarge = 3, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIImageSymbolWeight { + UIImageSymbolWeightUnspecified = 0, + UIImageSymbolWeightUltraLight = 1, + UIImageSymbolWeightThin = 2, + UIImageSymbolWeightLight = 3, + UIImageSymbolWeightRegular = 4, + UIImageSymbolWeightMedium = 5, + UIImageSymbolWeightSemibold = 6, + UIImageSymbolWeightBold = 7, + UIImageSymbolWeightHeavy = 8, + UIImageSymbolWeightBlack = 9, + } +); + +extern_fn!( + pub unsafe fn UIFontWeightForImageSymbolWeight(symbolWeight: UIImageSymbolWeight,) -> UIFontWeight; +); + +extern_fn!( + pub unsafe fn UIImageSymbolWeightForFontWeight(fontWeight: UIFontWeight,) -> UIImageSymbolWeight; +); + +extern_class!( + #[derive(Debug)] + pub struct UIImageSymbolConfiguration; + + unsafe impl ClassType for UIImageSymbolConfiguration { + type Super = UIImageConfiguration; + } +); + +extern_methods!( + unsafe impl UIImageSymbolConfiguration { + #[method_id(@__retain_semantics Other unspecifiedConfiguration)] + pub unsafe fn unspecifiedConfiguration() -> Id; + + #[method_id(@__retain_semantics Other configurationWithScale:)] + pub unsafe fn configurationWithScale(scale: UIImageSymbolScale,) -> Id; + + #[method_id(@__retain_semantics Other configurationWithPointSize:)] + pub unsafe fn configurationWithPointSize(pointSize: CGFloat,) -> Id; + + #[method_id(@__retain_semantics Other configurationWithWeight:)] + pub unsafe fn configurationWithWeight(weight: UIImageSymbolWeight,) -> Id; + + #[method_id(@__retain_semantics Other configurationWithPointSize:weight:)] + pub unsafe fn configurationWithPointSize_weight(pointSize: CGFloat,weight: UIImageSymbolWeight,) -> Id; + + #[method_id(@__retain_semantics Other configurationWithPointSize:weight:scale:)] + pub unsafe fn configurationWithPointSize_weight_scale(pointSize: CGFloat,weight: UIImageSymbolWeight,scale: UIImageSymbolScale,) -> Id; + + #[method_id(@__retain_semantics Other configurationWithTextStyle:)] + pub unsafe fn configurationWithTextStyle(textStyle: &UIFontTextStyle,) -> Id; + + #[method_id(@__retain_semantics Other configurationWithTextStyle:scale:)] + pub unsafe fn configurationWithTextStyle_scale(textStyle: &UIFontTextStyle,scale: UIImageSymbolScale,) -> Id; + + #[method_id(@__retain_semantics Other configurationWithFont:)] + pub unsafe fn configurationWithFont(font: &UIFont,) -> Id; + + #[method_id(@__retain_semantics Other configurationWithFont:scale:)] + pub unsafe fn configurationWithFont_scale(font: &UIFont,scale: UIImageSymbolScale,) -> Id; + + #[method_id(@__retain_semantics Other configurationWithHierarchicalColor:)] + pub unsafe fn configurationWithHierarchicalColor(hierarchicalColor: &UIColor,) -> Id; + + #[method_id(@__retain_semantics Other configurationWithPaletteColors:)] + pub unsafe fn configurationWithPaletteColors(paletteColors: &NSArray,) -> Id; + + #[method_id(@__retain_semantics Other configurationPreferringMulticolor)] + pub unsafe fn configurationPreferringMulticolor() -> Id; + + #[method_id(@__retain_semantics Other configurationPreferringMonochrome)] + pub unsafe fn configurationPreferringMonochrome() -> Id; + + #[method_id(@__retain_semantics Other configurationWithoutTextStyle)] + pub unsafe fn configurationWithoutTextStyle(&self, ) -> Id; + + #[method_id(@__retain_semantics Other configurationWithoutScale)] + pub unsafe fn configurationWithoutScale(&self, ) -> Id; + + #[method_id(@__retain_semantics Other configurationWithoutWeight)] + pub unsafe fn configurationWithoutWeight(&self, ) -> Id; + + #[method_id(@__retain_semantics Other configurationWithoutPointSizeAndWeight)] + pub unsafe fn configurationWithoutPointSizeAndWeight(&self, ) -> Id; + + #[method(isEqualToConfiguration:)] + pub unsafe fn isEqualToConfiguration(&self, otherConfiguration: Option<&UIImageSymbolConfiguration>,) -> bool; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIImageView.rs b/crates/icrate-generated/src/UIKit/generated/UIImageView.rs new file mode 100644 index 000000000..b8c3f06b8 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIImageView.rs @@ -0,0 +1,111 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIImageView; + + unsafe impl ClassType for UIImageView { + type Super = UIView; + } +); + +extern_methods!( + unsafe impl UIImageView { + #[method_id(@__retain_semantics Init initWithImage:)] + pub unsafe fn initWithImage(this: Option>, image: Option<&UIImage>,) -> Id; + + #[method_id(@__retain_semantics Init initWithImage:highlightedImage:)] + pub unsafe fn initWithImage_highlightedImage(this: Option>, image: Option<&UIImage>,highlightedImage: Option<&UIImage>,) -> Id; + + #[method_id(@__retain_semantics Other image)] + pub unsafe fn image(&self, ) -> Option>; + + #[method(setImage:)] + pub unsafe fn setImage(&self, image: Option<&UIImage>,); + + #[method_id(@__retain_semantics Other highlightedImage)] + pub unsafe fn highlightedImage(&self, ) -> Option>; + + #[method(setHighlightedImage:)] + pub unsafe fn setHighlightedImage(&self, highlightedImage: Option<&UIImage>,); + + #[method_id(@__retain_semantics Other preferredSymbolConfiguration)] + pub unsafe fn preferredSymbolConfiguration(&self, ) -> Option>; + + #[method(setPreferredSymbolConfiguration:)] + pub unsafe fn setPreferredSymbolConfiguration(&self, preferredSymbolConfiguration: Option<&UIImageSymbolConfiguration>,); + + #[method(isUserInteractionEnabled)] + pub unsafe fn isUserInteractionEnabled(&self, ) -> bool; + + #[method(setUserInteractionEnabled:)] + pub unsafe fn setUserInteractionEnabled(&self, userInteractionEnabled: bool,); + + #[method(isHighlighted)] + pub unsafe fn isHighlighted(&self, ) -> bool; + + #[method(setHighlighted:)] + pub unsafe fn setHighlighted(&self, highlighted: bool,); + + #[method_id(@__retain_semantics Other animationImages)] + pub unsafe fn animationImages(&self, ) -> Option, Shared>>; + + #[method(setAnimationImages:)] + pub unsafe fn setAnimationImages(&self, animationImages: Option<&NSArray>,); + + #[method_id(@__retain_semantics Other highlightedAnimationImages)] + pub unsafe fn highlightedAnimationImages(&self, ) -> Option, Shared>>; + + #[method(setHighlightedAnimationImages:)] + pub unsafe fn setHighlightedAnimationImages(&self, highlightedAnimationImages: Option<&NSArray>,); + + #[method(animationDuration)] + pub unsafe fn animationDuration(&self, ) -> NSTimeInterval; + + #[method(setAnimationDuration:)] + pub unsafe fn setAnimationDuration(&self, animationDuration: NSTimeInterval,); + + #[method(animationRepeatCount)] + pub unsafe fn animationRepeatCount(&self, ) -> NSInteger; + + #[method(setAnimationRepeatCount:)] + pub unsafe fn setAnimationRepeatCount(&self, animationRepeatCount: NSInteger,); + + #[method_id(@__retain_semantics Other tintColor)] + pub unsafe fn tintColor(&self, ) -> Option>; + + #[method(setTintColor:)] + pub unsafe fn setTintColor(&self, tintColor: Option<&UIColor>,); + + #[method(startAnimating)] + pub unsafe fn startAnimating(&self, ); + + #[method(stopAnimating)] + pub unsafe fn stopAnimating(&self, ); + + #[method(isAnimating)] + pub unsafe fn isAnimating(&self, ) -> bool; + + #[method(adjustsImageWhenAncestorFocused)] + pub unsafe fn adjustsImageWhenAncestorFocused(&self, ) -> bool; + + #[method(setAdjustsImageWhenAncestorFocused:)] + pub unsafe fn setAdjustsImageWhenAncestorFocused(&self, adjustsImageWhenAncestorFocused: bool,); + + #[method_id(@__retain_semantics Other focusedFrameGuide)] + pub unsafe fn focusedFrameGuide(&self, ) -> Id; + + #[method_id(@__retain_semantics Other overlayContentView)] + pub unsafe fn overlayContentView(&self, ) -> Id; + + #[method(masksFocusEffectToContents)] + pub unsafe fn masksFocusEffectToContents(&self, ) -> bool; + + #[method(setMasksFocusEffectToContents:)] + pub unsafe fn setMasksFocusEffectToContents(&self, masksFocusEffectToContents: bool,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIImpactFeedbackGenerator.rs b/crates/icrate-generated/src/UIKit/generated/UIImpactFeedbackGenerator.rs new file mode 100644 index 000000000..6652c8a95 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIImpactFeedbackGenerator.rs @@ -0,0 +1,38 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIImpactFeedbackStyle { + UIImpactFeedbackStyleLight = 0, + UIImpactFeedbackStyleMedium = 1, + UIImpactFeedbackStyleHeavy = 2, + UIImpactFeedbackStyleSoft = 3, + UIImpactFeedbackStyleRigid = 4, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIImpactFeedbackGenerator; + + unsafe impl ClassType for UIImpactFeedbackGenerator { + type Super = UIFeedbackGenerator; + } +); + +extern_methods!( + unsafe impl UIImpactFeedbackGenerator { + #[method_id(@__retain_semantics Init initWithStyle:)] + pub unsafe fn initWithStyle(this: Option>, style: UIImpactFeedbackStyle,) -> Id; + + #[method(impactOccurred)] + pub unsafe fn impactOccurred(&self, ); + + #[method(impactOccurredWithIntensity:)] + pub unsafe fn impactOccurredWithIntensity(&self, intensity: CGFloat,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIIndirectScribbleInteraction.rs b/crates/icrate-generated/src/UIKit/generated/UIIndirectScribbleInteraction.rs new file mode 100644 index 000000000..9f4919703 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIIndirectScribbleInteraction.rs @@ -0,0 +1,66 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIIndirectScribbleInteraction; + + unsafe impl ClassType for UIIndirectScribbleInteraction { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIIndirectScribbleInteraction { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics New new)] + pub unsafe fn new() -> Id; + + #[method_id(@__retain_semantics Init initWithDelegate:)] + pub unsafe fn initWithDelegate(this: Option>, delegate: &UIIndirectScribbleInteractionDelegate,) -> Id; + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(isHandlingWriting)] + pub unsafe fn isHandlingWriting(&self, ) -> bool; + + } +); + +pub type UIScribbleElementIdentifier = TodoProtocols; + +extern_protocol!( + pub struct UIIndirectScribbleInteractionDelegate; + + unsafe impl UIIndirectScribbleInteractionDelegate { + #[method(indirectScribbleInteraction:requestElementsInRect:completion:)] + pub unsafe fn indirectScribbleInteraction_requestElementsInRect_completion(&self, interaction: &UIIndirectScribbleInteraction,rect: CGRect,completion: &Block<(NonNull>, ), ()>,); + + #[method(indirectScribbleInteraction:isElementFocused:)] + pub unsafe fn indirectScribbleInteraction_isElementFocused(&self, interaction: &UIIndirectScribbleInteraction,elementIdentifier: &UIScribbleElementIdentifier,) -> bool; + + #[method(indirectScribbleInteraction:frameForElement:)] + pub unsafe fn indirectScribbleInteraction_frameForElement(&self, interaction: &UIIndirectScribbleInteraction,elementIdentifier: &UIScribbleElementIdentifier,) -> CGRect; + + #[method(indirectScribbleInteraction:focusElementIfNeeded:referencePoint:completion:)] + pub unsafe fn indirectScribbleInteraction_focusElementIfNeeded_referencePoint_completion(&self, interaction: &UIIndirectScribbleInteraction,elementIdentifier: &UIScribbleElementIdentifier,focusReferencePoint: CGPoint,completion: &Block<(*mut TodoProtocols, ), ()>,); + + #[optional] + #[method(indirectScribbleInteraction:shouldDelayFocusForElement:)] + pub unsafe fn indirectScribbleInteraction_shouldDelayFocusForElement(&self, interaction: &UIIndirectScribbleInteraction,elementIdentifier: &UIScribbleElementIdentifier,) -> bool; + + #[optional] + #[method(indirectScribbleInteraction:willBeginWritingInElement:)] + pub unsafe fn indirectScribbleInteraction_willBeginWritingInElement(&self, interaction: &UIIndirectScribbleInteraction,elementIdentifier: &UIScribbleElementIdentifier,); + + #[optional] + #[method(indirectScribbleInteraction:didFinishWritingInElement:)] + pub unsafe fn indirectScribbleInteraction_didFinishWritingInElement(&self, interaction: &UIIndirectScribbleInteraction,elementIdentifier: &UIScribbleElementIdentifier,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIInputView.rs b/crates/icrate-generated/src/UIKit/generated/UIInputView.rs new file mode 100644 index 000000000..0ae234c42 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIInputView.rs @@ -0,0 +1,41 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIInputViewStyle { + UIInputViewStyleDefault = 0, + UIInputViewStyleKeyboard = 1, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIInputView; + + unsafe impl ClassType for UIInputView { + type Super = UIView; + } +); + +extern_methods!( + unsafe impl UIInputView { + #[method(inputViewStyle)] + pub unsafe fn inputViewStyle(&self, ) -> UIInputViewStyle; + + #[method(allowsSelfSizing)] + pub unsafe fn allowsSelfSizing(&self, ) -> bool; + + #[method(setAllowsSelfSizing:)] + pub unsafe fn setAllowsSelfSizing(&self, allowsSelfSizing: bool,); + + #[method_id(@__retain_semantics Init initWithFrame:inputViewStyle:)] + pub unsafe fn initWithFrame_inputViewStyle(this: Option>, frame: CGRect,inputViewStyle: UIInputViewStyle,) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIInputViewController.rs b/crates/icrate-generated/src/UIKit/generated/UIInputViewController.rs new file mode 100644 index 000000000..0db58904f --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIInputViewController.rs @@ -0,0 +1,88 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_protocol!( + pub struct UITextDocumentProxy; + + unsafe impl UITextDocumentProxy { + #[method_id(@__retain_semantics Other documentContextBeforeInput)] + pub unsafe fn documentContextBeforeInput(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other documentContextAfterInput)] + pub unsafe fn documentContextAfterInput(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other selectedText)] + pub unsafe fn selectedText(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other documentInputMode)] + pub unsafe fn documentInputMode(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other documentIdentifier)] + pub unsafe fn documentIdentifier(&self, ) -> Id; + + #[method(adjustTextPositionByCharacterOffset:)] + pub unsafe fn adjustTextPositionByCharacterOffset(&self, offset: NSInteger,); + + #[method(setMarkedText:selectedRange:)] + pub unsafe fn setMarkedText_selectedRange(&self, markedText: &NSString,selectedRange: NSRange,); + + #[method(unmarkText)] + pub unsafe fn unmarkText(&self, ); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIInputViewController; + + unsafe impl ClassType for UIInputViewController { + type Super = UIViewController; + } +); + +extern_methods!( + unsafe impl UIInputViewController { + #[method_id(@__retain_semantics Other inputView)] + pub unsafe fn inputView(&self, ) -> Option>; + + #[method(setInputView:)] + pub unsafe fn setInputView(&self, inputView: Option<&UIInputView>,); + + #[method_id(@__retain_semantics Other textDocumentProxy)] + pub unsafe fn textDocumentProxy(&self, ) -> Id; + + #[method_id(@__retain_semantics Other primaryLanguage)] + pub unsafe fn primaryLanguage(&self, ) -> Option>; + + #[method(setPrimaryLanguage:)] + pub unsafe fn setPrimaryLanguage(&self, primaryLanguage: Option<&NSString>,); + + #[method(hasDictationKey)] + pub unsafe fn hasDictationKey(&self, ) -> bool; + + #[method(setHasDictationKey:)] + pub unsafe fn setHasDictationKey(&self, hasDictationKey: bool,); + + #[method(hasFullAccess)] + pub unsafe fn hasFullAccess(&self, ) -> bool; + + #[method(needsInputModeSwitchKey)] + pub unsafe fn needsInputModeSwitchKey(&self, ) -> bool; + + #[method(dismissKeyboard)] + pub unsafe fn dismissKeyboard(&self, ); + + #[method(advanceToNextInputMode)] + pub unsafe fn advanceToNextInputMode(&self, ); + + #[method(handleInputModeListFromView:withEvent:)] + pub unsafe fn handleInputModeListFromView_withEvent(&self, view: &UIView,event: &UIEvent,); + + #[method(requestSupplementaryLexiconWithCompletion:)] + pub unsafe fn requestSupplementaryLexiconWithCompletion(&self, completionHandler: &Block<(NonNull, ), ()>,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIInteraction.rs b/crates/icrate-generated/src/UIKit/generated/UIInteraction.rs new file mode 100644 index 000000000..6a982e710 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIInteraction.rs @@ -0,0 +1,38 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_protocol!( + pub struct UIInteraction; + + unsafe impl UIInteraction { + #[method_id(@__retain_semantics Other view)] + pub unsafe fn view(&self, ) -> Option>; + + #[method(willMoveToView:)] + pub unsafe fn willMoveToView(&self, view: Option<&UIView>,); + + #[method(didMoveToView:)] + pub unsafe fn didMoveToView(&self, view: Option<&UIView>,); + + } +); + +extern_methods!( + /// Interactions + unsafe impl UIView { + #[method(addInteraction:)] + pub unsafe fn addInteraction(&self, interaction: &UIInteraction,); + + #[method(removeInteraction:)] + pub unsafe fn removeInteraction(&self, interaction: &UIInteraction,); + + #[method_id(@__retain_semantics Other interactions)] + pub unsafe fn interactions(&self, ) -> Id, Shared>; + + #[method(setInteractions:)] + pub unsafe fn setInteractions(&self, interactions: &NSArray,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIInterface.rs b/crates/icrate-generated/src/UIKit/generated/UIInterface.rs new file mode 100644 index 000000000..5b5624676 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIInterface.rs @@ -0,0 +1,263 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIBarStyle { + UIBarStyleDefault = 0, + UIBarStyleBlack = 1, + UIBarStyleBlackOpaque = 1, + UIBarStyleBlackTranslucent = 2, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIUserInterfaceSizeClass { + UIUserInterfaceSizeClassUnspecified = 0, + UIUserInterfaceSizeClassCompact = 1, + UIUserInterfaceSizeClassRegular = 2, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIUserInterfaceStyle { + UIUserInterfaceStyleUnspecified = 0, + UIUserInterfaceStyleLight = 1, + UIUserInterfaceStyleDark = 2, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIUserInterfaceLayoutDirection { + UIUserInterfaceLayoutDirectionLeftToRight = 0, + UIUserInterfaceLayoutDirectionRightToLeft = 1, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UITraitEnvironmentLayoutDirection { + UITraitEnvironmentLayoutDirectionUnspecified = -1, + UITraitEnvironmentLayoutDirectionLeftToRight = UIUserInterfaceLayoutDirectionLeftToRight, + UITraitEnvironmentLayoutDirectionRightToLeft = UIUserInterfaceLayoutDirectionRightToLeft, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIDisplayGamut { + UIDisplayGamutUnspecified = -1, + UIDisplayGamutSRGB = 0, + UIDisplayGamutP3 = 1, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIAccessibilityContrast { + UIAccessibilityContrastUnspecified = -1, + UIAccessibilityContrastNormal = 0, + UIAccessibilityContrastHigh = 1, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UILegibilityWeight { + UILegibilityWeightUnspecified = -1, + UILegibilityWeightRegular = 0, + UILegibilityWeightBold = 1, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIUserInterfaceLevel { + UIUserInterfaceLevelUnspecified = -1, + UIUserInterfaceLevelBase = 0, + UIUserInterfaceLevelElevated = 1, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIUserInterfaceActiveAppearance { + UIUserInterfaceActiveAppearanceUnspecified = -1, + UIUserInterfaceActiveAppearanceInactive = 0, + UIUserInterfaceActiveAppearanceActive = 1, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UINSToolbarItemPresentationSize { + UINSToolbarItemPresentationSizeUnspecified = -1, + UINSToolbarItemPresentationSizeRegular = 0, + UINSToolbarItemPresentationSizeSmall = 1, + UINSToolbarItemPresentationSizeLarge = 3, + } +); + +extern_methods!( + /// UIColorSystemColors + unsafe impl UIColor { + #[method_id(@__retain_semantics Other systemRedColor)] + pub unsafe fn systemRedColor() -> Id; + + #[method_id(@__retain_semantics Other systemGreenColor)] + pub unsafe fn systemGreenColor() -> Id; + + #[method_id(@__retain_semantics Other systemBlueColor)] + pub unsafe fn systemBlueColor() -> Id; + + #[method_id(@__retain_semantics Other systemOrangeColor)] + pub unsafe fn systemOrangeColor() -> Id; + + #[method_id(@__retain_semantics Other systemYellowColor)] + pub unsafe fn systemYellowColor() -> Id; + + #[method_id(@__retain_semantics Other systemPinkColor)] + pub unsafe fn systemPinkColor() -> Id; + + #[method_id(@__retain_semantics Other systemPurpleColor)] + pub unsafe fn systemPurpleColor() -> Id; + + #[method_id(@__retain_semantics Other systemTealColor)] + pub unsafe fn systemTealColor() -> Id; + + #[method_id(@__retain_semantics Other systemIndigoColor)] + pub unsafe fn systemIndigoColor() -> Id; + + #[method_id(@__retain_semantics Other systemBrownColor)] + pub unsafe fn systemBrownColor() -> Id; + + #[method_id(@__retain_semantics Other systemMintColor)] + pub unsafe fn systemMintColor() -> Id; + + #[method_id(@__retain_semantics Other systemCyanColor)] + pub unsafe fn systemCyanColor() -> Id; + + #[method_id(@__retain_semantics Other systemGrayColor)] + pub unsafe fn systemGrayColor() -> Id; + + #[method_id(@__retain_semantics Other systemGray2Color)] + pub unsafe fn systemGray2Color() -> Id; + + #[method_id(@__retain_semantics Other systemGray3Color)] + pub unsafe fn systemGray3Color() -> Id; + + #[method_id(@__retain_semantics Other systemGray4Color)] + pub unsafe fn systemGray4Color() -> Id; + + #[method_id(@__retain_semantics Other systemGray5Color)] + pub unsafe fn systemGray5Color() -> Id; + + #[method_id(@__retain_semantics Other systemGray6Color)] + pub unsafe fn systemGray6Color() -> Id; + + #[method_id(@__retain_semantics Other tintColor)] + pub unsafe fn tintColor() -> Id; + + #[method_id(@__retain_semantics Other labelColor)] + pub unsafe fn labelColor() -> Id; + + #[method_id(@__retain_semantics Other secondaryLabelColor)] + pub unsafe fn secondaryLabelColor() -> Id; + + #[method_id(@__retain_semantics Other tertiaryLabelColor)] + pub unsafe fn tertiaryLabelColor() -> Id; + + #[method_id(@__retain_semantics Other quaternaryLabelColor)] + pub unsafe fn quaternaryLabelColor() -> Id; + + #[method_id(@__retain_semantics Other linkColor)] + pub unsafe fn linkColor() -> Id; + + #[method_id(@__retain_semantics Other placeholderTextColor)] + pub unsafe fn placeholderTextColor() -> Id; + + #[method_id(@__retain_semantics Other separatorColor)] + pub unsafe fn separatorColor() -> Id; + + #[method_id(@__retain_semantics Other opaqueSeparatorColor)] + pub unsafe fn opaqueSeparatorColor() -> Id; + + #[method_id(@__retain_semantics Other systemBackgroundColor)] + pub unsafe fn systemBackgroundColor() -> Id; + + #[method_id(@__retain_semantics Other secondarySystemBackgroundColor)] + pub unsafe fn secondarySystemBackgroundColor() -> Id; + + #[method_id(@__retain_semantics Other tertiarySystemBackgroundColor)] + pub unsafe fn tertiarySystemBackgroundColor() -> Id; + + #[method_id(@__retain_semantics Other systemGroupedBackgroundColor)] + pub unsafe fn systemGroupedBackgroundColor() -> Id; + + #[method_id(@__retain_semantics Other secondarySystemGroupedBackgroundColor)] + pub unsafe fn secondarySystemGroupedBackgroundColor() -> Id; + + #[method_id(@__retain_semantics Other tertiarySystemGroupedBackgroundColor)] + pub unsafe fn tertiarySystemGroupedBackgroundColor() -> Id; + + #[method_id(@__retain_semantics Other systemFillColor)] + pub unsafe fn systemFillColor() -> Id; + + #[method_id(@__retain_semantics Other secondarySystemFillColor)] + pub unsafe fn secondarySystemFillColor() -> Id; + + #[method_id(@__retain_semantics Other tertiarySystemFillColor)] + pub unsafe fn tertiarySystemFillColor() -> Id; + + #[method_id(@__retain_semantics Other quaternarySystemFillColor)] + pub unsafe fn quaternarySystemFillColor() -> Id; + + #[method_id(@__retain_semantics Other lightTextColor)] + pub unsafe fn lightTextColor() -> Id; + + #[method_id(@__retain_semantics Other darkTextColor)] + pub unsafe fn darkTextColor() -> Id; + + #[method_id(@__retain_semantics Other groupTableViewBackgroundColor)] + pub unsafe fn groupTableViewBackgroundColor() -> Id; + + #[method_id(@__retain_semantics Other viewFlipsideBackgroundColor)] + pub unsafe fn viewFlipsideBackgroundColor() -> Id; + + #[method_id(@__retain_semantics Other scrollViewTexturedBackgroundColor)] + pub unsafe fn scrollViewTexturedBackgroundColor() -> Id; + + #[method_id(@__retain_semantics Other underPageBackgroundColor)] + pub unsafe fn underPageBackgroundColor() -> Id; + + } +); + +extern_methods!( + /// UIFontSystemFonts + unsafe impl UIFont { + #[method(labelFontSize)] + pub unsafe fn labelFontSize() -> CGFloat; + + #[method(buttonFontSize)] + pub unsafe fn buttonFontSize() -> CGFloat; + + #[method(smallSystemFontSize)] + pub unsafe fn smallSystemFontSize() -> CGFloat; + + #[method(systemFontSize)] + pub unsafe fn systemFontSize() -> CGFloat; + + #[method(defaultFontSize)] + pub unsafe fn defaultFontSize() -> CGFloat; + + #[method(systemMinimumFontSize)] + pub unsafe fn systemMinimumFontSize() -> CGFloat; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIKey.rs b/crates/icrate-generated/src/UIKit/generated/UIKey.rs new file mode 100644 index 000000000..1c4664043 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIKey.rs @@ -0,0 +1,30 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIKey; + + unsafe impl ClassType for UIKey { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIKey { + #[method_id(@__retain_semantics Other characters)] + pub unsafe fn characters(&self, ) -> Id; + + #[method_id(@__retain_semantics Other charactersIgnoringModifiers)] + pub unsafe fn charactersIgnoringModifiers(&self, ) -> Id; + + #[method(modifierFlags)] + pub unsafe fn modifierFlags(&self, ) -> UIKeyModifierFlags; + + #[method(keyCode)] + pub unsafe fn keyCode(&self, ) -> UIKeyboardHIDUsage; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIKeyCommand.rs b/crates/icrate-generated/src/UIKit/generated/UIKeyCommand.rs new file mode 100644 index 000000000..ce0771d62 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIKeyCommand.rs @@ -0,0 +1,105 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIKeyCommand; + + unsafe impl ClassType for UIKeyCommand { + type Super = UICommand; + } +); + +extern_methods!( + unsafe impl UIKeyCommand { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method_id(@__retain_semantics Other title)] + pub unsafe fn title(&self, ) -> Id; + + #[method(setTitle:)] + pub unsafe fn setTitle(&self, title: &NSString,); + + #[method_id(@__retain_semantics Other image)] + pub unsafe fn image(&self, ) -> Option>; + + #[method(setImage:)] + pub unsafe fn setImage(&self, image: Option<&UIImage>,); + + #[method_id(@__retain_semantics Other discoverabilityTitle)] + pub unsafe fn discoverabilityTitle(&self, ) -> Option>; + + #[method(setDiscoverabilityTitle:)] + pub unsafe fn setDiscoverabilityTitle(&self, discoverabilityTitle: Option<&NSString>,); + + #[method(action)] + pub unsafe fn action(&self, ) -> OptionSel; + + #[method_id(@__retain_semantics Other input)] + pub unsafe fn input(&self, ) -> Option>; + + #[method(modifierFlags)] + pub unsafe fn modifierFlags(&self, ) -> UIKeyModifierFlags; + + #[method_id(@__retain_semantics Other propertyList)] + pub unsafe fn propertyList(&self, ) -> Option>; + + #[method(attributes)] + pub unsafe fn attributes(&self, ) -> UIMenuElementAttributes; + + #[method(setAttributes:)] + pub unsafe fn setAttributes(&self, attributes: UIMenuElementAttributes,); + + #[method(state)] + pub unsafe fn state(&self, ) -> UIMenuElementState; + + #[method(setState:)] + pub unsafe fn setState(&self, state: UIMenuElementState,); + + #[method_id(@__retain_semantics Other alternates)] + pub unsafe fn alternates(&self, ) -> Id, Shared>; + + #[method(wantsPriorityOverSystemBehavior)] + pub unsafe fn wantsPriorityOverSystemBehavior(&self, ) -> bool; + + #[method(setWantsPriorityOverSystemBehavior:)] + pub unsafe fn setWantsPriorityOverSystemBehavior(&self, wantsPriorityOverSystemBehavior: bool,); + + #[method(allowsAutomaticLocalization)] + pub unsafe fn allowsAutomaticLocalization(&self, ) -> bool; + + #[method(setAllowsAutomaticLocalization:)] + pub unsafe fn setAllowsAutomaticLocalization(&self, allowsAutomaticLocalization: bool,); + + #[method(allowsAutomaticMirroring)] + pub unsafe fn allowsAutomaticMirroring(&self, ) -> bool; + + #[method(setAllowsAutomaticMirroring:)] + pub unsafe fn setAllowsAutomaticMirroring(&self, allowsAutomaticMirroring: bool,); + + #[method_id(@__retain_semantics Other commandWithTitle:image:action:input:modifierFlags:propertyList:)] + pub unsafe fn commandWithTitle_image_action_input_modifierFlags_propertyList(title: &NSString,image: Option<&UIImage>,action: Sel,input: &NSString,modifierFlags: UIKeyModifierFlags,propertyList: Option<&Object>,) -> Id; + + #[method_id(@__retain_semantics Other commandWithTitle:image:action:input:modifierFlags:propertyList:alternates:)] + pub unsafe fn commandWithTitle_image_action_input_modifierFlags_propertyList_alternates(title: &NSString,image: Option<&UIImage>,action: Sel,input: &NSString,modifierFlags: UIKeyModifierFlags,propertyList: Option<&Object>,alternates: &NSArray,) -> Id; + + #[method_id(@__retain_semantics Other keyCommandWithInput:modifierFlags:action:)] + pub unsafe fn keyCommandWithInput_modifierFlags_action(input: &NSString,modifierFlags: UIKeyModifierFlags,action: Sel,) -> Id; + + #[method_id(@__retain_semantics Other keyCommandWithInput:modifierFlags:action:discoverabilityTitle:)] + pub unsafe fn keyCommandWithInput_modifierFlags_action_discoverabilityTitle(input: &NSString,modifierFlags: UIKeyModifierFlags,action: Sel,discoverabilityTitle: &NSString,) -> Id; + + #[method_id(@__retain_semantics Other commandWithTitle:image:action:propertyList:)] + pub unsafe fn commandWithTitle_image_action_propertyList(title: &NSString,image: Option<&UIImage>,action: Sel,propertyList: Option<&Object>,) -> Id; + + #[method_id(@__retain_semantics Other commandWithTitle:image:action:propertyList:alternates:)] + pub unsafe fn commandWithTitle_image_action_propertyList_alternates(title: &NSString,image: Option<&UIImage>,action: Sel,propertyList: Option<&Object>,alternates: &NSArray,) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIKeyConstants.rs b/crates/icrate-generated/src/UIKit/generated/UIKeyConstants.rs new file mode 100644 index 000000000..fa7900d7d --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIKeyConstants.rs @@ -0,0 +1,190 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(CFIndex)] + pub enum UIKeyboardHIDUsage { + UIKeyboardHIDUsageKeyboardErrorRollOver = 0x01, + UIKeyboardHIDUsageKeyboardPOSTFail = 0x02, + UIKeyboardHIDUsageKeyboardErrorUndefined = 0x03, + UIKeyboardHIDUsageKeyboardA = 0x04, + UIKeyboardHIDUsageKeyboardB = 0x05, + UIKeyboardHIDUsageKeyboardC = 0x06, + UIKeyboardHIDUsageKeyboardD = 0x07, + UIKeyboardHIDUsageKeyboardE = 0x08, + UIKeyboardHIDUsageKeyboardF = 0x09, + UIKeyboardHIDUsageKeyboardG = 0x0A, + UIKeyboardHIDUsageKeyboardH = 0x0B, + UIKeyboardHIDUsageKeyboardI = 0x0C, + UIKeyboardHIDUsageKeyboardJ = 0x0D, + UIKeyboardHIDUsageKeyboardK = 0x0E, + UIKeyboardHIDUsageKeyboardL = 0x0F, + UIKeyboardHIDUsageKeyboardM = 0x10, + UIKeyboardHIDUsageKeyboardN = 0x11, + UIKeyboardHIDUsageKeyboardO = 0x12, + UIKeyboardHIDUsageKeyboardP = 0x13, + UIKeyboardHIDUsageKeyboardQ = 0x14, + UIKeyboardHIDUsageKeyboardR = 0x15, + UIKeyboardHIDUsageKeyboardS = 0x16, + UIKeyboardHIDUsageKeyboardT = 0x17, + UIKeyboardHIDUsageKeyboardU = 0x18, + UIKeyboardHIDUsageKeyboardV = 0x19, + UIKeyboardHIDUsageKeyboardW = 0x1A, + UIKeyboardHIDUsageKeyboardX = 0x1B, + UIKeyboardHIDUsageKeyboardY = 0x1C, + UIKeyboardHIDUsageKeyboardZ = 0x1D, + UIKeyboardHIDUsageKeyboard1 = 0x1E, + UIKeyboardHIDUsageKeyboard2 = 0x1F, + UIKeyboardHIDUsageKeyboard3 = 0x20, + UIKeyboardHIDUsageKeyboard4 = 0x21, + UIKeyboardHIDUsageKeyboard5 = 0x22, + UIKeyboardHIDUsageKeyboard6 = 0x23, + UIKeyboardHIDUsageKeyboard7 = 0x24, + UIKeyboardHIDUsageKeyboard8 = 0x25, + UIKeyboardHIDUsageKeyboard9 = 0x26, + UIKeyboardHIDUsageKeyboard0 = 0x27, + UIKeyboardHIDUsageKeyboardReturnOrEnter = 0x28, + UIKeyboardHIDUsageKeyboardEscape = 0x29, + UIKeyboardHIDUsageKeyboardDeleteOrBackspace = 0x2A, + UIKeyboardHIDUsageKeyboardTab = 0x2B, + UIKeyboardHIDUsageKeyboardSpacebar = 0x2C, + UIKeyboardHIDUsageKeyboardHyphen = 0x2D, + UIKeyboardHIDUsageKeyboardEqualSign = 0x2E, + UIKeyboardHIDUsageKeyboardOpenBracket = 0x2F, + UIKeyboardHIDUsageKeyboardCloseBracket = 0x30, + UIKeyboardHIDUsageKeyboardBackslash = 0x31, + UIKeyboardHIDUsageKeyboardNonUSPound = 0x32, + UIKeyboardHIDUsageKeyboardSemicolon = 0x33, + UIKeyboardHIDUsageKeyboardQuote = 0x34, + UIKeyboardHIDUsageKeyboardGraveAccentAndTilde = 0x35, + UIKeyboardHIDUsageKeyboardComma = 0x36, + UIKeyboardHIDUsageKeyboardPeriod = 0x37, + UIKeyboardHIDUsageKeyboardSlash = 0x38, + UIKeyboardHIDUsageKeyboardCapsLock = 0x39, + UIKeyboardHIDUsageKeyboardF1 = 0x3A, + UIKeyboardHIDUsageKeyboardF2 = 0x3B, + UIKeyboardHIDUsageKeyboardF3 = 0x3C, + UIKeyboardHIDUsageKeyboardF4 = 0x3D, + UIKeyboardHIDUsageKeyboardF5 = 0x3E, + UIKeyboardHIDUsageKeyboardF6 = 0x3F, + UIKeyboardHIDUsageKeyboardF7 = 0x40, + UIKeyboardHIDUsageKeyboardF8 = 0x41, + UIKeyboardHIDUsageKeyboardF9 = 0x42, + UIKeyboardHIDUsageKeyboardF10 = 0x43, + UIKeyboardHIDUsageKeyboardF11 = 0x44, + UIKeyboardHIDUsageKeyboardF12 = 0x45, + UIKeyboardHIDUsageKeyboardPrintScreen = 0x46, + UIKeyboardHIDUsageKeyboardScrollLock = 0x47, + UIKeyboardHIDUsageKeyboardPause = 0x48, + UIKeyboardHIDUsageKeyboardInsert = 0x49, + UIKeyboardHIDUsageKeyboardHome = 0x4A, + UIKeyboardHIDUsageKeyboardPageUp = 0x4B, + UIKeyboardHIDUsageKeyboardDeleteForward = 0x4C, + UIKeyboardHIDUsageKeyboardEnd = 0x4D, + UIKeyboardHIDUsageKeyboardPageDown = 0x4E, + UIKeyboardHIDUsageKeyboardRightArrow = 0x4F, + UIKeyboardHIDUsageKeyboardLeftArrow = 0x50, + UIKeyboardHIDUsageKeyboardDownArrow = 0x51, + UIKeyboardHIDUsageKeyboardUpArrow = 0x52, + UIKeyboardHIDUsageKeypadNumLock = 0x53, + UIKeyboardHIDUsageKeypadSlash = 0x54, + UIKeyboardHIDUsageKeypadAsterisk = 0x55, + UIKeyboardHIDUsageKeypadHyphen = 0x56, + UIKeyboardHIDUsageKeypadPlus = 0x57, + UIKeyboardHIDUsageKeypadEnter = 0x58, + UIKeyboardHIDUsageKeypad1 = 0x59, + UIKeyboardHIDUsageKeypad2 = 0x5A, + UIKeyboardHIDUsageKeypad3 = 0x5B, + UIKeyboardHIDUsageKeypad4 = 0x5C, + UIKeyboardHIDUsageKeypad5 = 0x5D, + UIKeyboardHIDUsageKeypad6 = 0x5E, + UIKeyboardHIDUsageKeypad7 = 0x5F, + UIKeyboardHIDUsageKeypad8 = 0x60, + UIKeyboardHIDUsageKeypad9 = 0x61, + UIKeyboardHIDUsageKeypad0 = 0x62, + UIKeyboardHIDUsageKeypadPeriod = 0x63, + UIKeyboardHIDUsageKeyboardNonUSBackslash = 0x64, + UIKeyboardHIDUsageKeyboardApplication = 0x65, + UIKeyboardHIDUsageKeyboardPower = 0x66, + UIKeyboardHIDUsageKeypadEqualSign = 0x67, + UIKeyboardHIDUsageKeyboardF13 = 0x68, + UIKeyboardHIDUsageKeyboardF14 = 0x69, + UIKeyboardHIDUsageKeyboardF15 = 0x6A, + UIKeyboardHIDUsageKeyboardF16 = 0x6B, + UIKeyboardHIDUsageKeyboardF17 = 0x6C, + UIKeyboardHIDUsageKeyboardF18 = 0x6D, + UIKeyboardHIDUsageKeyboardF19 = 0x6E, + UIKeyboardHIDUsageKeyboardF20 = 0x6F, + UIKeyboardHIDUsageKeyboardF21 = 0x70, + UIKeyboardHIDUsageKeyboardF22 = 0x71, + UIKeyboardHIDUsageKeyboardF23 = 0x72, + UIKeyboardHIDUsageKeyboardF24 = 0x73, + UIKeyboardHIDUsageKeyboardExecute = 0x74, + UIKeyboardHIDUsageKeyboardHelp = 0x75, + UIKeyboardHIDUsageKeyboardMenu = 0x76, + UIKeyboardHIDUsageKeyboardSelect = 0x77, + UIKeyboardHIDUsageKeyboardStop = 0x78, + UIKeyboardHIDUsageKeyboardAgain = 0x79, + UIKeyboardHIDUsageKeyboardUndo = 0x7A, + UIKeyboardHIDUsageKeyboardCut = 0x7B, + UIKeyboardHIDUsageKeyboardCopy = 0x7C, + UIKeyboardHIDUsageKeyboardPaste = 0x7D, + UIKeyboardHIDUsageKeyboardFind = 0x7E, + UIKeyboardHIDUsageKeyboardMute = 0x7F, + UIKeyboardHIDUsageKeyboardVolumeUp = 0x80, + UIKeyboardHIDUsageKeyboardVolumeDown = 0x81, + UIKeyboardHIDUsageKeyboardLockingCapsLock = 0x82, + UIKeyboardHIDUsageKeyboardLockingNumLock = 0x83, + UIKeyboardHIDUsageKeyboardLockingScrollLock = 0x84, + UIKeyboardHIDUsageKeypadComma = 0x85, + UIKeyboardHIDUsageKeypadEqualSignAS400 = 0x86, + UIKeyboardHIDUsageKeyboardInternational1 = 0x87, + UIKeyboardHIDUsageKeyboardInternational2 = 0x88, + UIKeyboardHIDUsageKeyboardInternational3 = 0x89, + UIKeyboardHIDUsageKeyboardInternational4 = 0x8A, + UIKeyboardHIDUsageKeyboardInternational5 = 0x8B, + UIKeyboardHIDUsageKeyboardInternational6 = 0x8C, + UIKeyboardHIDUsageKeyboardInternational7 = 0x8D, + UIKeyboardHIDUsageKeyboardInternational8 = 0x8E, + UIKeyboardHIDUsageKeyboardInternational9 = 0x8F, + UIKeyboardHIDUsageKeyboardLANG1 = 0x90, + UIKeyboardHIDUsageKeyboardLANG2 = 0x91, + UIKeyboardHIDUsageKeyboardLANG3 = 0x92, + UIKeyboardHIDUsageKeyboardLANG4 = 0x93, + UIKeyboardHIDUsageKeyboardLANG5 = 0x94, + UIKeyboardHIDUsageKeyboardLANG6 = 0x95, + UIKeyboardHIDUsageKeyboardLANG7 = 0x96, + UIKeyboardHIDUsageKeyboardLANG8 = 0x97, + UIKeyboardHIDUsageKeyboardLANG9 = 0x98, + UIKeyboardHIDUsageKeyboardAlternateErase = 0x99, + UIKeyboardHIDUsageKeyboardSysReqOrAttention = 0x9A, + UIKeyboardHIDUsageKeyboardCancel = 0x9B, + UIKeyboardHIDUsageKeyboardClear = 0x9C, + UIKeyboardHIDUsageKeyboardPrior = 0x9D, + UIKeyboardHIDUsageKeyboardReturn = 0x9E, + UIKeyboardHIDUsageKeyboardSeparator = 0x9F, + UIKeyboardHIDUsageKeyboardOut = 0xA0, + UIKeyboardHIDUsageKeyboardOper = 0xA1, + UIKeyboardHIDUsageKeyboardClearOrAgain = 0xA2, + UIKeyboardHIDUsageKeyboardCrSelOrProps = 0xA3, + UIKeyboardHIDUsageKeyboardExSel = 0xA4, + UIKeyboardHIDUsageKeyboardLeftControl = 0xE0, + UIKeyboardHIDUsageKeyboardLeftShift = 0xE1, + UIKeyboardHIDUsageKeyboardLeftAlt = 0xE2, + UIKeyboardHIDUsageKeyboardLeftGUI = 0xE3, + UIKeyboardHIDUsageKeyboardRightControl = 0xE4, + UIKeyboardHIDUsageKeyboardRightShift = 0xE5, + UIKeyboardHIDUsageKeyboardRightAlt = 0xE6, + UIKeyboardHIDUsageKeyboardRightGUI = 0xE7, + UIKeyboardHIDUsageKeyboard_Reserved = 0xFFFF, + UIKeyboardHIDUsageKeyboardHangul = UIKeyboardHIDUsageKeyboardLANG1, + UIKeyboardHIDUsageKeyboardHanja = UIKeyboardHIDUsageKeyboardLANG2, + UIKeyboardHIDUsageKeyboardKanaSwitch = UIKeyboardHIDUsageKeyboardLANG1, + UIKeyboardHIDUsageKeyboardAlphanumericSwitch = UIKeyboardHIDUsageKeyboardLANG2, + UIKeyboardHIDUsageKeyboardKatakana = UIKeyboardHIDUsageKeyboardLANG3, + UIKeyboardHIDUsageKeyboardHiragana = UIKeyboardHIDUsageKeyboardLANG4, + UIKeyboardHIDUsageKeyboardZenkakuHankakuKanji = UIKeyboardHIDUsageKeyboardLANG5, + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIKeyboardLayoutGuide.rs b/crates/icrate-generated/src/UIKit/generated/UIKeyboardLayoutGuide.rs new file mode 100644 index 000000000..2a54bd1f7 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIKeyboardLayoutGuide.rs @@ -0,0 +1,24 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIKeyboardLayoutGuide; + + unsafe impl ClassType for UIKeyboardLayoutGuide { + type Super = UITrackingLayoutGuide; + } +); + +extern_methods!( + unsafe impl UIKeyboardLayoutGuide { + #[method(followsUndockedKeyboard)] + pub unsafe fn followsUndockedKeyboard(&self, ) -> bool; + + #[method(setFollowsUndockedKeyboard:)] + pub unsafe fn setFollowsUndockedKeyboard(&self, followsUndockedKeyboard: bool,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIKitCore.rs b/crates/icrate-generated/src/UIKit/generated/UIKitCore.rs new file mode 100644 index 000000000..bc88fc826 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIKitCore.rs @@ -0,0 +1,4 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + diff --git a/crates/icrate-generated/src/UIKit/generated/UIKitDefines.rs b/crates/icrate-generated/src/UIKit/generated/UIKitDefines.rs new file mode 100644 index 000000000..bc88fc826 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIKitDefines.rs @@ -0,0 +1,4 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + diff --git a/crates/icrate-generated/src/UIKit/generated/UILabel.rs b/crates/icrate-generated/src/UIKit/generated/UILabel.rs new file mode 100644 index 000000000..127131e53 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UILabel.rs @@ -0,0 +1,162 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UILabel; + + unsafe impl ClassType for UILabel { + type Super = UIView; + } +); + +extern_methods!( + unsafe impl UILabel { + #[method_id(@__retain_semantics Other text)] + pub unsafe fn text(&self, ) -> Option>; + + #[method(setText:)] + pub unsafe fn setText(&self, text: Option<&NSString>,); + + #[method_id(@__retain_semantics Other font)] + pub unsafe fn font(&self, ) -> Option>; + + #[method(setFont:)] + pub unsafe fn setFont(&self, font: Option<&UIFont>,); + + #[method_id(@__retain_semantics Other textColor)] + pub unsafe fn textColor(&self, ) -> Option>; + + #[method(setTextColor:)] + pub unsafe fn setTextColor(&self, textColor: Option<&UIColor>,); + + #[method_id(@__retain_semantics Other shadowColor)] + pub unsafe fn shadowColor(&self, ) -> Option>; + + #[method(setShadowColor:)] + pub unsafe fn setShadowColor(&self, shadowColor: Option<&UIColor>,); + + #[method(shadowOffset)] + pub unsafe fn shadowOffset(&self, ) -> CGSize; + + #[method(setShadowOffset:)] + pub unsafe fn setShadowOffset(&self, shadowOffset: CGSize,); + + #[method(textAlignment)] + pub unsafe fn textAlignment(&self, ) -> NSTextAlignment; + + #[method(setTextAlignment:)] + pub unsafe fn setTextAlignment(&self, textAlignment: NSTextAlignment,); + + #[method(lineBreakMode)] + pub unsafe fn lineBreakMode(&self, ) -> NSLineBreakMode; + + #[method(setLineBreakMode:)] + pub unsafe fn setLineBreakMode(&self, lineBreakMode: NSLineBreakMode,); + + #[method_id(@__retain_semantics Other attributedText)] + pub unsafe fn attributedText(&self, ) -> Option>; + + #[method(setAttributedText:)] + pub unsafe fn setAttributedText(&self, attributedText: Option<&NSAttributedString>,); + + #[method_id(@__retain_semantics Other highlightedTextColor)] + pub unsafe fn highlightedTextColor(&self, ) -> Option>; + + #[method(setHighlightedTextColor:)] + pub unsafe fn setHighlightedTextColor(&self, highlightedTextColor: Option<&UIColor>,); + + #[method(isHighlighted)] + pub unsafe fn isHighlighted(&self, ) -> bool; + + #[method(setHighlighted:)] + pub unsafe fn setHighlighted(&self, highlighted: bool,); + + #[method(isUserInteractionEnabled)] + pub unsafe fn isUserInteractionEnabled(&self, ) -> bool; + + #[method(setUserInteractionEnabled:)] + pub unsafe fn setUserInteractionEnabled(&self, userInteractionEnabled: bool,); + + #[method(isEnabled)] + pub unsafe fn isEnabled(&self, ) -> bool; + + #[method(setEnabled:)] + pub unsafe fn setEnabled(&self, enabled: bool,); + + #[method(numberOfLines)] + pub unsafe fn numberOfLines(&self, ) -> NSInteger; + + #[method(setNumberOfLines:)] + pub unsafe fn setNumberOfLines(&self, numberOfLines: NSInteger,); + + #[method(adjustsFontSizeToFitWidth)] + pub unsafe fn adjustsFontSizeToFitWidth(&self, ) -> bool; + + #[method(setAdjustsFontSizeToFitWidth:)] + pub unsafe fn setAdjustsFontSizeToFitWidth(&self, adjustsFontSizeToFitWidth: bool,); + + #[method(baselineAdjustment)] + pub unsafe fn baselineAdjustment(&self, ) -> UIBaselineAdjustment; + + #[method(setBaselineAdjustment:)] + pub unsafe fn setBaselineAdjustment(&self, baselineAdjustment: UIBaselineAdjustment,); + + #[method(minimumScaleFactor)] + pub unsafe fn minimumScaleFactor(&self, ) -> CGFloat; + + #[method(setMinimumScaleFactor:)] + pub unsafe fn setMinimumScaleFactor(&self, minimumScaleFactor: CGFloat,); + + #[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,); + + #[method(textRectForBounds:limitedToNumberOfLines:)] + pub unsafe fn textRectForBounds_limitedToNumberOfLines(&self, bounds: CGRect,numberOfLines: NSInteger,) -> CGRect; + + #[method(drawTextInRect:)] + pub unsafe fn drawTextInRect(&self, rect: CGRect,); + + #[method(preferredMaxLayoutWidth)] + pub unsafe fn preferredMaxLayoutWidth(&self, ) -> CGFloat; + + #[method(setPreferredMaxLayoutWidth:)] + pub unsafe fn setPreferredMaxLayoutWidth(&self, preferredMaxLayoutWidth: CGFloat,); + + #[method(enablesMarqueeWhenAncestorFocused)] + pub unsafe fn enablesMarqueeWhenAncestorFocused(&self, ) -> bool; + + #[method(setEnablesMarqueeWhenAncestorFocused:)] + pub unsafe fn setEnablesMarqueeWhenAncestorFocused(&self, enablesMarqueeWhenAncestorFocused: bool,); + + #[method(showsExpansionTextWhenTruncated)] + pub unsafe fn showsExpansionTextWhenTruncated(&self, ) -> bool; + + #[method(setShowsExpansionTextWhenTruncated:)] + pub unsafe fn setShowsExpansionTextWhenTruncated(&self, showsExpansionTextWhenTruncated: bool,); + + #[method(minimumFontSize)] + pub unsafe fn minimumFontSize(&self, ) -> CGFloat; + + #[method(setMinimumFontSize:)] + pub unsafe fn setMinimumFontSize(&self, minimumFontSize: CGFloat,); + + #[method(adjustsLetterSpacingToFitWidth)] + pub unsafe fn adjustsLetterSpacingToFitWidth(&self, ) -> bool; + + #[method(setAdjustsLetterSpacingToFitWidth:)] + pub unsafe fn setAdjustsLetterSpacingToFitWidth(&self, adjustsLetterSpacingToFitWidth: bool,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UILargeContentViewer.rs b/crates/icrate-generated/src/UIKit/generated/UILargeContentViewer.rs new file mode 100644 index 000000000..5028909a1 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UILargeContentViewer.rs @@ -0,0 +1,109 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_protocol!( + pub struct UILargeContentViewerItem; + + unsafe impl UILargeContentViewerItem { + #[method(showsLargeContentViewer)] + pub unsafe fn showsLargeContentViewer(&self, ) -> bool; + + #[method_id(@__retain_semantics Other largeContentTitle)] + pub unsafe fn largeContentTitle(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other largeContentImage)] + pub unsafe fn largeContentImage(&self, ) -> Option>; + + #[method(scalesLargeContentImage)] + pub unsafe fn scalesLargeContentImage(&self, ) -> bool; + + #[method(largeContentImageInsets)] + pub unsafe fn largeContentImageInsets(&self, ) -> UIEdgeInsets; + + } +); + +extern_methods!( + /// UILargeContentViewer + unsafe impl UIView { + #[method(showsLargeContentViewer)] + pub unsafe fn showsLargeContentViewer(&self, ) -> bool; + + #[method(setShowsLargeContentViewer:)] + pub unsafe fn setShowsLargeContentViewer(&self, showsLargeContentViewer: bool,); + + #[method_id(@__retain_semantics Other largeContentTitle)] + pub unsafe fn largeContentTitle(&self, ) -> Option>; + + #[method(setLargeContentTitle:)] + pub unsafe fn setLargeContentTitle(&self, largeContentTitle: Option<&NSString>,); + + #[method_id(@__retain_semantics Other largeContentImage)] + pub unsafe fn largeContentImage(&self, ) -> Option>; + + #[method(setLargeContentImage:)] + pub unsafe fn setLargeContentImage(&self, largeContentImage: Option<&UIImage>,); + + #[method(scalesLargeContentImage)] + pub unsafe fn scalesLargeContentImage(&self, ) -> bool; + + #[method(setScalesLargeContentImage:)] + pub unsafe fn setScalesLargeContentImage(&self, scalesLargeContentImage: bool,); + + #[method(largeContentImageInsets)] + pub unsafe fn largeContentImageInsets(&self, ) -> UIEdgeInsets; + + #[method(setLargeContentImageInsets:)] + pub unsafe fn setLargeContentImageInsets(&self, largeContentImageInsets: UIEdgeInsets,); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UILargeContentViewerInteraction; + + unsafe impl ClassType for UILargeContentViewerInteraction { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UILargeContentViewerInteraction { + #[method_id(@__retain_semantics Init initWithDelegate:)] + pub unsafe fn initWithDelegate(this: Option>, delegate: Option<&UILargeContentViewerInteractionDelegate>,) -> Id; + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other gestureRecognizerForExclusionRelationship)] + pub unsafe fn gestureRecognizerForExclusionRelationship(&self, ) -> Id; + + #[method(isEnabled)] + pub unsafe fn isEnabled() -> bool; + + } +); + +extern_protocol!( + pub struct UILargeContentViewerInteractionDelegate; + + unsafe impl UILargeContentViewerInteractionDelegate { + #[optional] + #[method(largeContentViewerInteraction:didEndOnItem:atPoint:)] + pub unsafe fn largeContentViewerInteraction_didEndOnItem_atPoint(&self, interaction: &UILargeContentViewerInteraction,item: Option<&UILargeContentViewerItem>,point: CGPoint,); + + #[optional] + #[method_id(@__retain_semantics Other largeContentViewerInteraction:itemAtPoint:)] + pub unsafe fn largeContentViewerInteraction_itemAtPoint(&self, interaction: &UILargeContentViewerInteraction,point: CGPoint,) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other viewControllerForLargeContentViewerInteraction:)] + pub unsafe fn viewControllerForLargeContentViewerInteraction(&self, interaction: &UILargeContentViewerInteraction,) -> Id; + + } +); + +extern_static!(UILargeContentViewerInteractionEnabledStatusDidChangeNotification: &'static NSNotificationName); + diff --git a/crates/icrate-generated/src/UIKit/generated/UILayoutGuide.rs b/crates/icrate-generated/src/UIKit/generated/UILayoutGuide.rs new file mode 100644 index 000000000..e6a0866e0 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UILayoutGuide.rs @@ -0,0 +1,63 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UILayoutGuide; + + unsafe impl ClassType for UILayoutGuide { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UILayoutGuide { + #[method(layoutFrame)] + pub unsafe fn layoutFrame(&self, ) -> CGRect; + + #[method_id(@__retain_semantics Other owningView)] + pub unsafe fn owningView(&self, ) -> Option>; + + #[method(setOwningView:)] + pub unsafe fn setOwningView(&self, owningView: Option<&UIView>,); + + #[method_id(@__retain_semantics Other identifier)] + pub unsafe fn identifier(&self, ) -> Id; + + #[method(setIdentifier:)] + pub unsafe fn setIdentifier(&self, identifier: &NSString,); + + #[method_id(@__retain_semantics Other leadingAnchor)] + pub unsafe fn leadingAnchor(&self, ) -> Id; + + #[method_id(@__retain_semantics Other trailingAnchor)] + pub unsafe fn trailingAnchor(&self, ) -> Id; + + #[method_id(@__retain_semantics Other leftAnchor)] + pub unsafe fn leftAnchor(&self, ) -> Id; + + #[method_id(@__retain_semantics Other rightAnchor)] + pub unsafe fn rightAnchor(&self, ) -> Id; + + #[method_id(@__retain_semantics Other topAnchor)] + pub unsafe fn topAnchor(&self, ) -> Id; + + #[method_id(@__retain_semantics Other bottomAnchor)] + pub unsafe fn bottomAnchor(&self, ) -> Id; + + #[method_id(@__retain_semantics Other widthAnchor)] + pub unsafe fn widthAnchor(&self, ) -> Id; + + #[method_id(@__retain_semantics Other heightAnchor)] + pub unsafe fn heightAnchor(&self, ) -> Id; + + #[method_id(@__retain_semantics Other centerXAnchor)] + pub unsafe fn centerXAnchor(&self, ) -> Id; + + #[method_id(@__retain_semantics Other centerYAnchor)] + pub unsafe fn centerYAnchor(&self, ) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UILexicon.rs b/crates/icrate-generated/src/UIKit/generated/UILexicon.rs new file mode 100644 index 000000000..c229977f1 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UILexicon.rs @@ -0,0 +1,41 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UILexiconEntry; + + unsafe impl ClassType for UILexiconEntry { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UILexiconEntry { + #[method_id(@__retain_semantics Other documentText)] + pub unsafe fn documentText(&self, ) -> Id; + + #[method_id(@__retain_semantics Other userInput)] + pub unsafe fn userInput(&self, ) -> Id; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UILexicon; + + unsafe impl ClassType for UILexicon { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UILexicon { + #[method_id(@__retain_semantics Other entries)] + pub unsafe fn entries(&self, ) -> Id, Shared>; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIListContentConfiguration.rs b/crates/icrate-generated/src/UIKit/generated/UIListContentConfiguration.rs new file mode 100644 index 000000000..93ee290e3 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIListContentConfiguration.rs @@ -0,0 +1,185 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIListContentConfiguration; + + unsafe impl ClassType for UIListContentConfiguration { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIListContentConfiguration { + #[method_id(@__retain_semantics Other cellConfiguration)] + pub unsafe fn cellConfiguration() -> Id; + + #[method_id(@__retain_semantics Other subtitleCellConfiguration)] + pub unsafe fn subtitleCellConfiguration() -> Id; + + #[method_id(@__retain_semantics Other valueCellConfiguration)] + pub unsafe fn valueCellConfiguration() -> Id; + + #[method_id(@__retain_semantics Other plainHeaderConfiguration)] + pub unsafe fn plainHeaderConfiguration() -> Id; + + #[method_id(@__retain_semantics Other plainFooterConfiguration)] + pub unsafe fn plainFooterConfiguration() -> Id; + + #[method_id(@__retain_semantics Other groupedHeaderConfiguration)] + pub unsafe fn groupedHeaderConfiguration() -> Id; + + #[method_id(@__retain_semantics Other groupedFooterConfiguration)] + pub unsafe fn groupedFooterConfiguration() -> Id; + + #[method_id(@__retain_semantics Other prominentInsetGroupedHeaderConfiguration)] + pub unsafe fn prominentInsetGroupedHeaderConfiguration() -> Id; + + #[method_id(@__retain_semantics Other extraProminentInsetGroupedHeaderConfiguration)] + pub unsafe fn extraProminentInsetGroupedHeaderConfiguration() -> Id; + + #[method_id(@__retain_semantics Other sidebarCellConfiguration)] + pub unsafe fn sidebarCellConfiguration() -> Id; + + #[method_id(@__retain_semantics Other sidebarSubtitleCellConfiguration)] + pub unsafe fn sidebarSubtitleCellConfiguration() -> Id; + + #[method_id(@__retain_semantics Other accompaniedSidebarCellConfiguration)] + pub unsafe fn accompaniedSidebarCellConfiguration() -> Id; + + #[method_id(@__retain_semantics Other accompaniedSidebarSubtitleCellConfiguration)] + pub unsafe fn accompaniedSidebarSubtitleCellConfiguration() -> Id; + + #[method_id(@__retain_semantics Other sidebarHeaderConfiguration)] + pub unsafe fn sidebarHeaderConfiguration() -> 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 image)] + pub unsafe fn image(&self, ) -> Option>; + + #[method(setImage:)] + pub unsafe fn setImage(&self, image: Option<&UIImage>,); + + #[method_id(@__retain_semantics Other imageProperties)] + pub unsafe fn imageProperties(&self, ) -> Id; + + #[method_id(@__retain_semantics Other text)] + pub unsafe fn text(&self, ) -> Option>; + + #[method(setText:)] + pub unsafe fn setText(&self, text: Option<&NSString>,); + + #[method_id(@__retain_semantics Other attributedText)] + pub unsafe fn attributedText(&self, ) -> Option>; + + #[method(setAttributedText:)] + pub unsafe fn setAttributedText(&self, attributedText: Option<&NSAttributedString>,); + + #[method_id(@__retain_semantics Other textProperties)] + pub unsafe fn textProperties(&self, ) -> Id; + + #[method_id(@__retain_semantics Other secondaryText)] + pub unsafe fn secondaryText(&self, ) -> Option>; + + #[method(setSecondaryText:)] + pub unsafe fn setSecondaryText(&self, secondaryText: Option<&NSString>,); + + #[method_id(@__retain_semantics Other secondaryAttributedText)] + pub unsafe fn secondaryAttributedText(&self, ) -> Option>; + + #[method(setSecondaryAttributedText:)] + pub unsafe fn setSecondaryAttributedText(&self, secondaryAttributedText: Option<&NSAttributedString>,); + + #[method_id(@__retain_semantics Other secondaryTextProperties)] + pub unsafe fn secondaryTextProperties(&self, ) -> Id; + + #[method(axesPreservingSuperviewLayoutMargins)] + pub unsafe fn axesPreservingSuperviewLayoutMargins(&self, ) -> UIAxis; + + #[method(setAxesPreservingSuperviewLayoutMargins:)] + pub unsafe fn setAxesPreservingSuperviewLayoutMargins(&self, axesPreservingSuperviewLayoutMargins: UIAxis,); + + #[method(directionalLayoutMargins)] + pub unsafe fn directionalLayoutMargins(&self, ) -> NSDirectionalEdgeInsets; + + #[method(setDirectionalLayoutMargins:)] + pub unsafe fn setDirectionalLayoutMargins(&self, directionalLayoutMargins: NSDirectionalEdgeInsets,); + + #[method(prefersSideBySideTextAndSecondaryText)] + pub unsafe fn prefersSideBySideTextAndSecondaryText(&self, ) -> bool; + + #[method(setPrefersSideBySideTextAndSecondaryText:)] + pub unsafe fn setPrefersSideBySideTextAndSecondaryText(&self, prefersSideBySideTextAndSecondaryText: bool,); + + #[method(imageToTextPadding)] + pub unsafe fn imageToTextPadding(&self, ) -> CGFloat; + + #[method(setImageToTextPadding:)] + pub unsafe fn setImageToTextPadding(&self, imageToTextPadding: CGFloat,); + + #[method(textToSecondaryTextHorizontalPadding)] + pub unsafe fn textToSecondaryTextHorizontalPadding(&self, ) -> CGFloat; + + #[method(setTextToSecondaryTextHorizontalPadding:)] + pub unsafe fn setTextToSecondaryTextHorizontalPadding(&self, textToSecondaryTextHorizontalPadding: CGFloat,); + + #[method(textToSecondaryTextVerticalPadding)] + pub unsafe fn textToSecondaryTextVerticalPadding(&self, ) -> CGFloat; + + #[method(setTextToSecondaryTextVerticalPadding:)] + pub unsafe fn setTextToSecondaryTextVerticalPadding(&self, textToSecondaryTextVerticalPadding: CGFloat,); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIListContentView; + + unsafe impl ClassType for UIListContentView { + type Super = UIView; + } +); + +extern_methods!( + unsafe impl UIListContentView { + #[method_id(@__retain_semantics Init initWithConfiguration:)] + pub unsafe fn initWithConfiguration(this: Option>, configuration: &UIListContentConfiguration,) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method_id(@__retain_semantics Init initWithFrame:)] + pub unsafe fn initWithFrame(this: Option>, frame: CGRect,) -> 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; + + #[method_id(@__retain_semantics Other configuration)] + pub unsafe fn configuration(&self, ) -> Id; + + #[method(setConfiguration:)] + pub unsafe fn setConfiguration(&self, configuration: &UIListContentConfiguration,); + + #[method_id(@__retain_semantics Other textLayoutGuide)] + pub unsafe fn textLayoutGuide(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other secondaryTextLayoutGuide)] + pub unsafe fn secondaryTextLayoutGuide(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other imageLayoutGuide)] + pub unsafe fn imageLayoutGuide(&self, ) -> Option>; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIListContentImageProperties.rs b/crates/icrate-generated/src/UIKit/generated/UIListContentImageProperties.rs new file mode 100644 index 000000000..4af00d9e4 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIListContentImageProperties.rs @@ -0,0 +1,65 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIListContentImageProperties; + + unsafe impl ClassType for UIListContentImageProperties { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIListContentImageProperties { + #[method_id(@__retain_semantics Other preferredSymbolConfiguration)] + pub unsafe fn preferredSymbolConfiguration(&self, ) -> Option>; + + #[method(setPreferredSymbolConfiguration:)] + pub unsafe fn setPreferredSymbolConfiguration(&self, preferredSymbolConfiguration: Option<&UIImageSymbolConfiguration>,); + + #[method_id(@__retain_semantics Other tintColor)] + pub unsafe fn tintColor(&self, ) -> Option>; + + #[method(setTintColor:)] + pub unsafe fn setTintColor(&self, tintColor: Option<&UIColor>,); + + #[method(tintColorTransformer)] + pub unsafe fn tintColorTransformer(&self, ) -> UIConfigurationColorTransformer; + + #[method(setTintColorTransformer:)] + pub unsafe fn setTintColorTransformer(&self, tintColorTransformer: UIConfigurationColorTransformer,); + + #[method_id(@__retain_semantics Other resolvedTintColorForTintColor:)] + pub unsafe fn resolvedTintColorForTintColor(&self, tintColor: &UIColor,) -> Id; + + #[method(cornerRadius)] + pub unsafe fn cornerRadius(&self, ) -> CGFloat; + + #[method(setCornerRadius:)] + pub unsafe fn setCornerRadius(&self, cornerRadius: CGFloat,); + + #[method(maximumSize)] + pub unsafe fn maximumSize(&self, ) -> CGSize; + + #[method(setMaximumSize:)] + pub unsafe fn setMaximumSize(&self, maximumSize: CGSize,); + + #[method(reservedLayoutSize)] + pub unsafe fn reservedLayoutSize(&self, ) -> CGSize; + + #[method(setReservedLayoutSize:)] + pub unsafe fn setReservedLayoutSize(&self, reservedLayoutSize: CGSize,); + + #[method(accessibilityIgnoresInvertColors)] + pub unsafe fn accessibilityIgnoresInvertColors(&self, ) -> bool; + + #[method(setAccessibilityIgnoresInvertColors:)] + pub unsafe fn setAccessibilityIgnoresInvertColors(&self, accessibilityIgnoresInvertColors: bool,); + + } +); + +extern_static!(UIListContentImageStandardDimension: CGFloat); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIListContentTextProperties.rs b/crates/icrate-generated/src/UIKit/generated/UIListContentTextProperties.rs new file mode 100644 index 000000000..7bf2d4082 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIListContentTextProperties.rs @@ -0,0 +1,112 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIListContentTextAlignment { + UIListContentTextAlignmentNatural = 0, + UIListContentTextAlignmentCenter = 1, + UIListContentTextAlignmentJustified = 2, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIListContentTextTransform { + UIListContentTextTransformNone = 0, + UIListContentTextTransformUppercase = 1, + UIListContentTextTransformLowercase = 2, + UIListContentTextTransformCapitalized = 3, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIListContentTextProperties; + + unsafe impl ClassType for UIListContentTextProperties { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIListContentTextProperties { + #[method_id(@__retain_semantics Other font)] + pub unsafe fn font(&self, ) -> Id; + + #[method(setFont:)] + pub unsafe fn setFont(&self, font: &UIFont,); + + #[method_id(@__retain_semantics Other color)] + pub unsafe fn color(&self, ) -> Id; + + #[method(setColor:)] + pub unsafe fn setColor(&self, color: &UIColor,); + + #[method(colorTransformer)] + pub unsafe fn colorTransformer(&self, ) -> UIConfigurationColorTransformer; + + #[method(setColorTransformer:)] + pub unsafe fn setColorTransformer(&self, colorTransformer: UIConfigurationColorTransformer,); + + #[method_id(@__retain_semantics Other resolvedColor)] + pub unsafe fn resolvedColor(&self, ) -> Id; + + #[method(alignment)] + pub unsafe fn alignment(&self, ) -> UIListContentTextAlignment; + + #[method(setAlignment:)] + pub unsafe fn setAlignment(&self, alignment: UIListContentTextAlignment,); + + #[method(lineBreakMode)] + pub unsafe fn lineBreakMode(&self, ) -> NSLineBreakMode; + + #[method(setLineBreakMode:)] + pub unsafe fn setLineBreakMode(&self, lineBreakMode: NSLineBreakMode,); + + #[method(numberOfLines)] + pub unsafe fn numberOfLines(&self, ) -> NSInteger; + + #[method(setNumberOfLines:)] + pub unsafe fn setNumberOfLines(&self, numberOfLines: NSInteger,); + + #[method(adjustsFontSizeToFitWidth)] + pub unsafe fn adjustsFontSizeToFitWidth(&self, ) -> bool; + + #[method(setAdjustsFontSizeToFitWidth:)] + pub unsafe fn setAdjustsFontSizeToFitWidth(&self, adjustsFontSizeToFitWidth: bool,); + + #[method(minimumScaleFactor)] + pub unsafe fn minimumScaleFactor(&self, ) -> CGFloat; + + #[method(setMinimumScaleFactor:)] + pub unsafe fn setMinimumScaleFactor(&self, minimumScaleFactor: CGFloat,); + + #[method(allowsDefaultTighteningForTruncation)] + pub unsafe fn allowsDefaultTighteningForTruncation(&self, ) -> bool; + + #[method(setAllowsDefaultTighteningForTruncation:)] + pub unsafe fn setAllowsDefaultTighteningForTruncation(&self, allowsDefaultTighteningForTruncation: bool,); + + #[method(adjustsFontForContentSizeCategory)] + pub unsafe fn adjustsFontForContentSizeCategory(&self, ) -> bool; + + #[method(setAdjustsFontForContentSizeCategory:)] + pub unsafe fn setAdjustsFontForContentSizeCategory(&self, adjustsFontForContentSizeCategory: bool,); + + #[method(showsExpansionTextWhenTruncated)] + pub unsafe fn showsExpansionTextWhenTruncated(&self, ) -> bool; + + #[method(setShowsExpansionTextWhenTruncated:)] + pub unsafe fn setShowsExpansionTextWhenTruncated(&self, showsExpansionTextWhenTruncated: bool,); + + #[method(transform)] + pub unsafe fn transform(&self, ) -> UIListContentTextTransform; + + #[method(setTransform:)] + pub unsafe fn setTransform(&self, transform: UIListContentTextTransform,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIListSeparatorConfiguration.rs b/crates/icrate-generated/src/UIKit/generated/UIListSeparatorConfiguration.rs new file mode 100644 index 000000000..f8936f137 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIListSeparatorConfiguration.rs @@ -0,0 +1,80 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIListSeparatorVisibility { + UIListSeparatorVisibilityAutomatic = 0, + UIListSeparatorVisibilityVisible = 1, + UIListSeparatorVisibilityHidden = 2, + } +); + +extern_static!(UIListSeparatorAutomaticInsets: NSDirectionalEdgeInsets); + +extern_class!( + #[derive(Debug)] + pub struct UIListSeparatorConfiguration; + + unsafe impl ClassType for UIListSeparatorConfiguration { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIListSeparatorConfiguration { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics New new)] + pub unsafe fn new() -> Id; + + #[method_id(@__retain_semantics Init initWithListAppearance:)] + pub unsafe fn initWithListAppearance(this: Option>, listAppearance: UICollectionLayoutListAppearance,) -> Id; + + #[method(topSeparatorVisibility)] + pub unsafe fn topSeparatorVisibility(&self, ) -> UIListSeparatorVisibility; + + #[method(setTopSeparatorVisibility:)] + pub unsafe fn setTopSeparatorVisibility(&self, topSeparatorVisibility: UIListSeparatorVisibility,); + + #[method(bottomSeparatorVisibility)] + pub unsafe fn bottomSeparatorVisibility(&self, ) -> UIListSeparatorVisibility; + + #[method(setBottomSeparatorVisibility:)] + pub unsafe fn setBottomSeparatorVisibility(&self, bottomSeparatorVisibility: UIListSeparatorVisibility,); + + #[method(topSeparatorInsets)] + pub unsafe fn topSeparatorInsets(&self, ) -> NSDirectionalEdgeInsets; + + #[method(setTopSeparatorInsets:)] + pub unsafe fn setTopSeparatorInsets(&self, topSeparatorInsets: NSDirectionalEdgeInsets,); + + #[method(bottomSeparatorInsets)] + pub unsafe fn bottomSeparatorInsets(&self, ) -> NSDirectionalEdgeInsets; + + #[method(setBottomSeparatorInsets:)] + pub unsafe fn setBottomSeparatorInsets(&self, bottomSeparatorInsets: NSDirectionalEdgeInsets,); + + #[method_id(@__retain_semantics Other color)] + pub unsafe fn color(&self, ) -> Id; + + #[method(setColor:)] + pub unsafe fn setColor(&self, color: &UIColor,); + + #[method_id(@__retain_semantics Other multipleSelectionColor)] + pub unsafe fn multipleSelectionColor(&self, ) -> Id; + + #[method(setMultipleSelectionColor:)] + pub unsafe fn setMultipleSelectionColor(&self, multipleSelectionColor: &UIColor,); + + #[method_id(@__retain_semantics Other visualEffect)] + pub unsafe fn visualEffect(&self, ) -> Option>; + + #[method(setVisualEffect:)] + pub unsafe fn setVisualEffect(&self, visualEffect: Option<&UIVisualEffect>,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UILocalNotification.rs b/crates/icrate-generated/src/UIKit/generated/UILocalNotification.rs new file mode 100644 index 000000000..76e825aa2 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UILocalNotification.rs @@ -0,0 +1,116 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UILocalNotification; + + unsafe impl ClassType for UILocalNotification { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UILocalNotification { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method_id(@__retain_semantics Other fireDate)] + pub unsafe fn fireDate(&self, ) -> Option>; + + #[method(setFireDate:)] + pub unsafe fn setFireDate(&self, fireDate: Option<&NSDate>,); + + #[method_id(@__retain_semantics Other timeZone)] + pub unsafe fn timeZone(&self, ) -> Option>; + + #[method(setTimeZone:)] + pub unsafe fn setTimeZone(&self, timeZone: Option<&NSTimeZone>,); + + #[method(repeatInterval)] + pub unsafe fn repeatInterval(&self, ) -> NSCalendarUnit; + + #[method(setRepeatInterval:)] + pub unsafe fn setRepeatInterval(&self, repeatInterval: NSCalendarUnit,); + + #[method_id(@__retain_semantics Other repeatCalendar)] + pub unsafe fn repeatCalendar(&self, ) -> Option>; + + #[method(setRepeatCalendar:)] + pub unsafe fn setRepeatCalendar(&self, repeatCalendar: Option<&NSCalendar>,); + + #[method_id(@__retain_semantics Other region)] + pub unsafe fn region(&self, ) -> Option>; + + #[method(setRegion:)] + pub unsafe fn setRegion(&self, region: Option<&CLRegion>,); + + #[method(regionTriggersOnce)] + pub unsafe fn regionTriggersOnce(&self, ) -> bool; + + #[method(setRegionTriggersOnce:)] + pub unsafe fn setRegionTriggersOnce(&self, regionTriggersOnce: bool,); + + #[method_id(@__retain_semantics Other alertBody)] + pub unsafe fn alertBody(&self, ) -> Option>; + + #[method(setAlertBody:)] + pub unsafe fn setAlertBody(&self, alertBody: Option<&NSString>,); + + #[method(hasAction)] + pub unsafe fn hasAction(&self, ) -> bool; + + #[method(setHasAction:)] + pub unsafe fn setHasAction(&self, hasAction: bool,); + + #[method_id(@__retain_semantics Other alertAction)] + pub unsafe fn alertAction(&self, ) -> Option>; + + #[method(setAlertAction:)] + pub unsafe fn setAlertAction(&self, alertAction: Option<&NSString>,); + + #[method_id(@__retain_semantics Other alertLaunchImage)] + pub unsafe fn alertLaunchImage(&self, ) -> Option>; + + #[method(setAlertLaunchImage:)] + pub unsafe fn setAlertLaunchImage(&self, alertLaunchImage: Option<&NSString>,); + + #[method_id(@__retain_semantics Other alertTitle)] + pub unsafe fn alertTitle(&self, ) -> Option>; + + #[method(setAlertTitle:)] + pub unsafe fn setAlertTitle(&self, alertTitle: Option<&NSString>,); + + #[method_id(@__retain_semantics Other soundName)] + pub unsafe fn soundName(&self, ) -> Option>; + + #[method(setSoundName:)] + pub unsafe fn setSoundName(&self, soundName: Option<&NSString>,); + + #[method(applicationIconBadgeNumber)] + pub unsafe fn applicationIconBadgeNumber(&self, ) -> NSInteger; + + #[method(setApplicationIconBadgeNumber:)] + pub unsafe fn setApplicationIconBadgeNumber(&self, applicationIconBadgeNumber: NSInteger,); + + #[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 category)] + pub unsafe fn category(&self, ) -> Option>; + + #[method(setCategory:)] + pub unsafe fn setCategory(&self, category: Option<&NSString>,); + + } +); + +extern_static!(UILocalNotificationDefaultSoundName: &'static NSString); + diff --git a/crates/icrate-generated/src/UIKit/generated/UILocalizedIndexedCollation.rs b/crates/icrate-generated/src/UIKit/generated/UILocalizedIndexedCollation.rs new file mode 100644 index 000000000..d689505f5 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UILocalizedIndexedCollation.rs @@ -0,0 +1,36 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UILocalizedIndexedCollation; + + unsafe impl ClassType for UILocalizedIndexedCollation { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UILocalizedIndexedCollation { + #[method_id(@__retain_semantics Other currentCollation)] + pub unsafe fn currentCollation() -> Id; + + #[method_id(@__retain_semantics Other sectionTitles)] + pub unsafe fn sectionTitles(&self, ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other sectionIndexTitles)] + pub unsafe fn sectionIndexTitles(&self, ) -> Id, Shared>; + + #[method(sectionForSectionIndexTitleAtIndex:)] + pub unsafe fn sectionForSectionIndexTitleAtIndex(&self, indexTitleIndex: NSInteger,) -> NSInteger; + + #[method(sectionForObject:collationStringSelector:)] + pub unsafe fn sectionForObject_collationStringSelector(&self, object: &Object,selector: Sel,) -> NSInteger; + + #[method_id(@__retain_semantics Other sortedArrayFromArray:collationStringSelector:)] + pub unsafe fn sortedArrayFromArray_collationStringSelector(&self, array: &NSArray,selector: Sel,) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UILongPressGestureRecognizer.rs b/crates/icrate-generated/src/UIKit/generated/UILongPressGestureRecognizer.rs new file mode 100644 index 000000000..595927dfd --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UILongPressGestureRecognizer.rs @@ -0,0 +1,42 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UILongPressGestureRecognizer; + + unsafe impl ClassType for UILongPressGestureRecognizer { + type Super = UIGestureRecognizer; + } +); + +extern_methods!( + unsafe impl UILongPressGestureRecognizer { + #[method(numberOfTapsRequired)] + pub unsafe fn numberOfTapsRequired(&self, ) -> NSUInteger; + + #[method(setNumberOfTapsRequired:)] + pub unsafe fn setNumberOfTapsRequired(&self, numberOfTapsRequired: NSUInteger,); + + #[method(numberOfTouchesRequired)] + pub unsafe fn numberOfTouchesRequired(&self, ) -> NSUInteger; + + #[method(setNumberOfTouchesRequired:)] + pub unsafe fn setNumberOfTouchesRequired(&self, numberOfTouchesRequired: 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,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIManagedDocument.rs b/crates/icrate-generated/src/UIKit/generated/UIManagedDocument.rs new file mode 100644 index 000000000..1a819f42a --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIManagedDocument.rs @@ -0,0 +1,54 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIManagedDocument; + + unsafe impl ClassType for UIManagedDocument { + type Super = UIDocument; + } +); + +extern_methods!( + unsafe impl UIManagedDocument { + #[method_id(@__retain_semantics Other persistentStoreName)] + pub unsafe fn persistentStoreName() -> Id; + + #[method_id(@__retain_semantics Other managedObjectContext)] + pub unsafe fn managedObjectContext(&self, ) -> Id; + + #[method_id(@__retain_semantics Other managedObjectModel)] + pub unsafe fn managedObjectModel(&self, ) -> Id; + + #[method_id(@__retain_semantics Other persistentStoreOptions)] + pub unsafe fn persistentStoreOptions(&self, ) -> Option>; + + #[method(setPersistentStoreOptions:)] + pub unsafe fn setPersistentStoreOptions(&self, persistentStoreOptions: Option<&NSDictionary>,); + + #[method_id(@__retain_semantics Other modelConfiguration)] + pub unsafe fn modelConfiguration(&self, ) -> Option>; + + #[method(setModelConfiguration:)] + pub unsafe fn setModelConfiguration(&self, modelConfiguration: Option<&NSString>,); + + #[method(configurePersistentStoreCoordinatorForURL:ofType:modelConfiguration:storeOptions:error:)] + pub unsafe fn configurePersistentStoreCoordinatorForURL_ofType_modelConfiguration_storeOptions_error(&self, storeURL: &NSURL,fileType: &NSString,configuration: Option<&NSString>,storeOptions: Option<&NSDictionary>,) -> Result<(), Id>; + + #[method_id(@__retain_semantics Other persistentStoreTypeForFileType:)] + pub unsafe fn persistentStoreTypeForFileType(&self, fileType: &NSString,) -> Id; + + #[method(readAdditionalContentFromURL:error:)] + pub unsafe fn readAdditionalContentFromURL_error(&self, absoluteURL: &NSURL,) -> Result<(), Id>; + + #[method_id(@__retain_semantics Other additionalContentForURL:error:)] + pub unsafe fn additionalContentForURL_error(&self, absoluteURL: &NSURL,) -> Result, Id>; + + #[method(writeAdditionalContent:toURL:originalContentsURL:error:)] + pub unsafe fn writeAdditionalContent_toURL_originalContentsURL_error(&self, content: &Object,absoluteURL: &NSURL,absoluteOriginalContentsURL: Option<&NSURL>,) -> Result<(), Id>; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIMenu.rs b/crates/icrate-generated/src/UIKit/generated/UIMenu.rs new file mode 100644 index 000000000..9be290e2a --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIMenu.rs @@ -0,0 +1,169 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +pub type UIMenuIdentifier = NSString; + +ns_options!( + #[underlying(NSUInteger)] + pub enum UIMenuOptions { + UIMenuOptionsDisplayInline = 1<<0, + UIMenuOptionsDestructive = 1<<1, + UIMenuOptionsSingleSelection = 1<<5, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIMenuElementSize { + UIMenuElementSizeSmall = 0, + UIMenuElementSizeMedium = 1, + UIMenuElementSizeLarge = 2, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIMenu; + + unsafe impl ClassType for UIMenu { + type Super = UIMenuElement; + } +); + +extern_methods!( + unsafe impl UIMenu { + #[method_id(@__retain_semantics Other identifier)] + pub unsafe fn identifier(&self, ) -> Id; + + #[method(options)] + pub unsafe fn options(&self, ) -> UIMenuOptions; + + #[method(preferredElementSize)] + pub unsafe fn preferredElementSize(&self, ) -> UIMenuElementSize; + + #[method(setPreferredElementSize:)] + pub unsafe fn setPreferredElementSize(&self, preferredElementSize: UIMenuElementSize,); + + #[method_id(@__retain_semantics Other children)] + pub unsafe fn children(&self, ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other selectedElements)] + pub unsafe fn selectedElements(&self, ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other menuWithChildren:)] + pub unsafe fn menuWithChildren(children: &NSArray,) -> Id; + + #[method_id(@__retain_semantics Other menuWithTitle:children:)] + pub unsafe fn menuWithTitle_children(title: &NSString,children: &NSArray,) -> Id; + + #[method_id(@__retain_semantics Other menuWithTitle:image:identifier:options:children:)] + pub unsafe fn menuWithTitle_image_identifier_options_children(title: &NSString,image: Option<&UIImage>,identifier: Option<&UIMenuIdentifier>,options: UIMenuOptions,children: &NSArray,) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics New new)] + pub unsafe fn new() -> Id; + + #[method_id(@__retain_semantics Other menuByReplacingChildren:)] + pub unsafe fn menuByReplacingChildren(&self, newChildren: &NSArray,) -> Id; + + } +); + +extern_static!(UIMenuApplication: &'static UIMenuIdentifier); + +extern_static!(UIMenuFile: &'static UIMenuIdentifier); + +extern_static!(UIMenuEdit: &'static UIMenuIdentifier); + +extern_static!(UIMenuView: &'static UIMenuIdentifier); + +extern_static!(UIMenuWindow: &'static UIMenuIdentifier); + +extern_static!(UIMenuHelp: &'static UIMenuIdentifier); + +extern_static!(UIMenuAbout: &'static UIMenuIdentifier); + +extern_static!(UIMenuPreferences: &'static UIMenuIdentifier); + +extern_static!(UIMenuServices: &'static UIMenuIdentifier); + +extern_static!(UIMenuHide: &'static UIMenuIdentifier); + +extern_static!(UIMenuQuit: &'static UIMenuIdentifier); + +extern_static!(UIMenuNewScene: &'static UIMenuIdentifier); + +extern_static!(UIMenuOpenRecent: &'static UIMenuIdentifier); + +extern_static!(UIMenuClose: &'static UIMenuIdentifier); + +extern_static!(UIMenuPrint: &'static UIMenuIdentifier); + +extern_static!(UIMenuDocument: &'static UIMenuIdentifier); + +extern_static!(UIMenuUndoRedo: &'static UIMenuIdentifier); + +extern_static!(UIMenuStandardEdit: &'static UIMenuIdentifier); + +extern_static!(UIMenuFind: &'static UIMenuIdentifier); + +extern_static!(UIMenuReplace: &'static UIMenuIdentifier); + +extern_static!(UIMenuShare: &'static UIMenuIdentifier); + +extern_static!(UIMenuTextStyle: &'static UIMenuIdentifier); + +extern_static!(UIMenuSpelling: &'static UIMenuIdentifier); + +extern_static!(UIMenuSpellingPanel: &'static UIMenuIdentifier); + +extern_static!(UIMenuSpellingOptions: &'static UIMenuIdentifier); + +extern_static!(UIMenuSubstitutions: &'static UIMenuIdentifier); + +extern_static!(UIMenuSubstitutionsPanel: &'static UIMenuIdentifier); + +extern_static!(UIMenuSubstitutionOptions: &'static UIMenuIdentifier); + +extern_static!(UIMenuTransformations: &'static UIMenuIdentifier); + +extern_static!(UIMenuSpeech: &'static UIMenuIdentifier); + +extern_static!(UIMenuLookup: &'static UIMenuIdentifier); + +extern_static!(UIMenuLearn: &'static UIMenuIdentifier); + +extern_static!(UIMenuFormat: &'static UIMenuIdentifier); + +extern_static!(UIMenuFont: &'static UIMenuIdentifier); + +extern_static!(UIMenuTextSize: &'static UIMenuIdentifier); + +extern_static!(UIMenuTextColor: &'static UIMenuIdentifier); + +extern_static!(UIMenuTextStylePasteboard: &'static UIMenuIdentifier); + +extern_static!(UIMenuText: &'static UIMenuIdentifier); + +extern_static!(UIMenuWritingDirection: &'static UIMenuIdentifier); + +extern_static!(UIMenuAlignment: &'static UIMenuIdentifier); + +extern_static!(UIMenuToolbar: &'static UIMenuIdentifier); + +extern_static!(UIMenuSidebar: &'static UIMenuIdentifier); + +extern_static!(UIMenuFullscreen: &'static UIMenuIdentifier); + +extern_static!(UIMenuMinimizeAndZoom: &'static UIMenuIdentifier); + +extern_static!(UIMenuBringAllToFront: &'static UIMenuIdentifier); + +extern_static!(UIMenuRoot: &'static UIMenuIdentifier); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIMenuBuilder.rs b/crates/icrate-generated/src/UIKit/generated/UIMenuBuilder.rs new file mode 100644 index 000000000..c0ad936db --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIMenuBuilder.rs @@ -0,0 +1,44 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_protocol!( + pub struct UIMenuBuilder; + + unsafe impl UIMenuBuilder { + #[method_id(@__retain_semantics Other system)] + pub unsafe fn system(&self, ) -> Id; + + #[method_id(@__retain_semantics Other menuForIdentifier:)] + pub unsafe fn menuForIdentifier(&self, identifier: &UIMenuIdentifier,) -> Option>; + + #[method_id(@__retain_semantics Other actionForIdentifier:)] + pub unsafe fn actionForIdentifier(&self, identifier: &UIActionIdentifier,) -> Option>; + + #[method_id(@__retain_semantics Other commandForAction:propertyList:)] + pub unsafe fn commandForAction_propertyList(&self, action: Sel,propertyList: Option<&Object>,) -> Option>; + + #[method(replaceMenuForIdentifier:withMenu:)] + pub unsafe fn replaceMenuForIdentifier_withMenu(&self, replacedIdentifier: &UIMenuIdentifier,replacementMenu: &UIMenu,); + + #[method(replaceChildrenOfMenuForIdentifier:fromChildrenBlock:)] + pub unsafe fn replaceChildrenOfMenuForIdentifier_fromChildrenBlock(&self, parentIdentifier: &UIMenuIdentifier,childrenBlock: &Block<(NonNull>, ), NonNull>>,); + + #[method(insertSiblingMenu:beforeMenuForIdentifier:)] + pub unsafe fn insertSiblingMenu_beforeMenuForIdentifier(&self, siblingMenu: &UIMenu,siblingIdentifier: &UIMenuIdentifier,); + + #[method(insertSiblingMenu:afterMenuForIdentifier:)] + pub unsafe fn insertSiblingMenu_afterMenuForIdentifier(&self, siblingMenu: &UIMenu,siblingIdentifier: &UIMenuIdentifier,); + + #[method(insertChildMenu:atStartOfMenuForIdentifier:)] + pub unsafe fn insertChildMenu_atStartOfMenuForIdentifier(&self, childMenu: &UIMenu,parentIdentifier: &UIMenuIdentifier,); + + #[method(insertChildMenu:atEndOfMenuForIdentifier:)] + pub unsafe fn insertChildMenu_atEndOfMenuForIdentifier(&self, childMenu: &UIMenu,parentIdentifier: &UIMenuIdentifier,); + + #[method(removeMenuForIdentifier:)] + pub unsafe fn removeMenuForIdentifier(&self, removedIdentifier: &UIMenuIdentifier,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIMenuController.rs b/crates/icrate-generated/src/UIKit/generated/UIMenuController.rs new file mode 100644 index 000000000..e0df2b3cc --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIMenuController.rs @@ -0,0 +1,110 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIMenuControllerArrowDirection { + UIMenuControllerArrowDefault = 0, + UIMenuControllerArrowUp = 1, + UIMenuControllerArrowDown = 2, + UIMenuControllerArrowLeft = 3, + UIMenuControllerArrowRight = 4, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIMenuController; + + unsafe impl ClassType for UIMenuController { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIMenuController { + #[method_id(@__retain_semantics Other sharedMenuController)] + pub unsafe fn sharedMenuController() -> Id; + + #[method(isMenuVisible)] + pub unsafe fn isMenuVisible(&self, ) -> bool; + + #[method(setMenuVisible:)] + pub unsafe fn setMenuVisible(&self, menuVisible: bool,); + + #[method(setMenuVisible:animated:)] + pub unsafe fn setMenuVisible_animated(&self, menuVisible: bool,animated: bool,); + + #[method(setTargetRect:inView:)] + pub unsafe fn setTargetRect_inView(&self, targetRect: CGRect,targetView: &UIView,); + + #[method(showMenuFromView:rect:)] + pub unsafe fn showMenuFromView_rect(&self, targetView: &UIView,targetRect: CGRect,); + + #[method(hideMenuFromView:)] + pub unsafe fn hideMenuFromView(&self, targetView: &UIView,); + + #[method(hideMenu)] + pub unsafe fn hideMenu(&self, ); + + #[method(arrowDirection)] + pub unsafe fn arrowDirection(&self, ) -> UIMenuControllerArrowDirection; + + #[method(setArrowDirection:)] + pub unsafe fn setArrowDirection(&self, arrowDirection: UIMenuControllerArrowDirection,); + + #[method_id(@__retain_semantics Other menuItems)] + pub unsafe fn menuItems(&self, ) -> Option, Shared>>; + + #[method(setMenuItems:)] + pub unsafe fn setMenuItems(&self, menuItems: Option<&NSArray>,); + + #[method(update)] + pub unsafe fn update(&self, ); + + #[method(menuFrame)] + pub unsafe fn menuFrame(&self, ) -> CGRect; + + } +); + +extern_static!(UIMenuControllerWillShowMenuNotification: &'static NSNotificationName); + +extern_static!(UIMenuControllerDidShowMenuNotification: &'static NSNotificationName); + +extern_static!(UIMenuControllerWillHideMenuNotification: &'static NSNotificationName); + +extern_static!(UIMenuControllerDidHideMenuNotification: &'static NSNotificationName); + +extern_static!(UIMenuControllerMenuFrameDidChangeNotification: &'static NSNotificationName); + +extern_class!( + #[derive(Debug)] + pub struct UIMenuItem; + + unsafe impl ClassType for UIMenuItem { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIMenuItem { + #[method_id(@__retain_semantics Init initWithTitle:action:)] + pub unsafe fn initWithTitle_action(this: Option>, title: &NSString,action: Sel,) -> Id; + + #[method_id(@__retain_semantics Other title)] + pub unsafe fn title(&self, ) -> Id; + + #[method(setTitle:)] + pub unsafe fn setTitle(&self, title: &NSString,); + + #[method(action)] + pub unsafe fn action(&self, ) -> Sel; + + #[method(setAction:)] + pub unsafe fn setAction(&self, action: Sel,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIMenuElement.rs b/crates/icrate-generated/src/UIKit/generated/UIMenuElement.rs new file mode 100644 index 000000000..9c6cfd0eb --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIMenuElement.rs @@ -0,0 +1,58 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIMenuElementState { + UIMenuElementStateOff = 0, + UIMenuElementStateOn = 1, + UIMenuElementStateMixed = 2, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum UIMenuElementAttributes { + UIMenuElementAttributesDisabled = 1<<0, + UIMenuElementAttributesDestructive = 1<<1, + UIMenuElementAttributesHidden = 1<<2, + UIMenuElementAttributesKeepsMenuPresented = 1<<3, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIMenuElement; + + unsafe impl ClassType for UIMenuElement { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIMenuElement { + #[method_id(@__retain_semantics Other title)] + pub unsafe fn title(&self, ) -> Id; + + #[method_id(@__retain_semantics Other subtitle)] + pub unsafe fn subtitle(&self, ) -> Option>; + + #[method(setSubtitle:)] + pub unsafe fn setSubtitle(&self, subtitle: Option<&NSString>,); + + #[method_id(@__retain_semantics Other image)] + pub unsafe fn image(&self, ) -> Option>; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[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-generated/src/UIKit/generated/UIMenuLeaf.rs b/crates/icrate-generated/src/UIKit/generated/UIMenuLeaf.rs new file mode 100644 index 000000000..f21664569 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIMenuLeaf.rs @@ -0,0 +1,50 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_protocol!( + pub struct UIMenuLeaf; + + unsafe impl UIMenuLeaf { + #[method_id(@__retain_semantics Other title)] + pub unsafe fn title(&self, ) -> Id; + + #[method(setTitle:)] + pub unsafe fn setTitle(&self, title: &NSString,); + + #[method_id(@__retain_semantics Other image)] + pub unsafe fn image(&self, ) -> Option>; + + #[method(setImage:)] + pub unsafe fn setImage(&self, image: Option<&UIImage>,); + + #[method_id(@__retain_semantics Other discoverabilityTitle)] + pub unsafe fn discoverabilityTitle(&self, ) -> Option>; + + #[method(setDiscoverabilityTitle:)] + pub unsafe fn setDiscoverabilityTitle(&self, discoverabilityTitle: Option<&NSString>,); + + #[method(attributes)] + pub unsafe fn attributes(&self, ) -> UIMenuElementAttributes; + + #[method(setAttributes:)] + pub unsafe fn setAttributes(&self, attributes: UIMenuElementAttributes,); + + #[method(state)] + pub unsafe fn state(&self, ) -> UIMenuElementState; + + #[method(setState:)] + pub unsafe fn setState(&self, state: UIMenuElementState,); + + #[method_id(@__retain_semantics Other sender)] + pub unsafe fn sender(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other presentationSourceItem)] + pub unsafe fn presentationSourceItem(&self, ) -> Option>; + + #[method(performWithSender:target:)] + pub unsafe fn performWithSender_target(&self, sender: Option<&Object>,target: Option<&Object>,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIMenuSystem.rs b/crates/icrate-generated/src/UIKit/generated/UIMenuSystem.rs new file mode 100644 index 000000000..3731e53e9 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIMenuSystem.rs @@ -0,0 +1,36 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIMenuSystem; + + unsafe impl ClassType for UIMenuSystem { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIMenuSystem { + #[method_id(@__retain_semantics Other mainSystem)] + pub unsafe fn mainSystem() -> Id; + + #[method_id(@__retain_semantics Other contextSystem)] + pub unsafe fn contextSystem() -> 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(setNeedsRebuild)] + pub unsafe fn setNeedsRebuild(&self, ); + + #[method(setNeedsRevalidate)] + pub unsafe fn setNeedsRevalidate(&self, ); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIMotionEffect.rs b/crates/icrate-generated/src/UIKit/generated/UIMotionEffect.rs new file mode 100644 index 000000000..f65ce0dec --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIMotionEffect.rs @@ -0,0 +1,93 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIMotionEffect; + + unsafe impl ClassType for UIMotionEffect { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIMotionEffect { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method_id(@__retain_semantics Other keyPathsAndRelativeValuesForViewerOffset:)] + pub unsafe fn keyPathsAndRelativeValuesForViewerOffset(&self, viewerOffset: UIOffset,) -> Option, Shared>>; + + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIInterpolatingMotionEffectType { + UIInterpolatingMotionEffectTypeTiltAlongHorizontalAxis = 0, + UIInterpolatingMotionEffectTypeTiltAlongVerticalAxis = 1, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIInterpolatingMotionEffect; + + unsafe impl ClassType for UIInterpolatingMotionEffect { + type Super = UIMotionEffect; + } +); + +extern_methods!( + unsafe impl UIInterpolatingMotionEffect { + #[method_id(@__retain_semantics Init initWithKeyPath:type:)] + pub unsafe fn initWithKeyPath_type(this: Option>, keyPath: &NSString,type_: UIInterpolatingMotionEffectType,) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method_id(@__retain_semantics Other keyPath)] + pub unsafe fn keyPath(&self, ) -> Id; + + #[method(type)] + pub unsafe fn type_(&self, ) -> UIInterpolatingMotionEffectType; + + #[method_id(@__retain_semantics Other minimumRelativeValue)] + pub unsafe fn minimumRelativeValue(&self, ) -> Option>; + + #[method(setMinimumRelativeValue:)] + pub unsafe fn setMinimumRelativeValue(&self, minimumRelativeValue: Option<&Object>,); + + #[method_id(@__retain_semantics Other maximumRelativeValue)] + pub unsafe fn maximumRelativeValue(&self, ) -> Option>; + + #[method(setMaximumRelativeValue:)] + pub unsafe fn setMaximumRelativeValue(&self, maximumRelativeValue: Option<&Object>,); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIMotionEffectGroup; + + unsafe impl ClassType for UIMotionEffectGroup { + type Super = UIMotionEffect; + } +); + +extern_methods!( + unsafe impl UIMotionEffectGroup { + #[method_id(@__retain_semantics Other motionEffects)] + pub unsafe fn motionEffects(&self, ) -> Option, Shared>>; + + #[method(setMotionEffects:)] + pub unsafe fn setMotionEffects(&self, motionEffects: Option<&NSArray>,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UINavigationBar.rs b/crates/icrate-generated/src/UIKit/generated/UINavigationBar.rs new file mode 100644 index 000000000..160e4c1f4 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UINavigationBar.rs @@ -0,0 +1,196 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UINavigationBarNSToolbarSection { + UINavigationBarNSToolbarSectionNone = 0, + UINavigationBarNSToolbarSectionSidebar = 1, + UINavigationBarNSToolbarSectionSupplementary = 2, + UINavigationBarNSToolbarSectionContent = 3, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UINavigationBar; + + unsafe impl ClassType for UINavigationBar { + type Super = UIView; + } +); + +extern_methods!( + unsafe impl UINavigationBar { + #[method(barStyle)] + pub unsafe fn barStyle(&self, ) -> UIBarStyle; + + #[method(setBarStyle:)] + pub unsafe fn setBarStyle(&self, barStyle: UIBarStyle,); + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&UINavigationBarDelegate>,); + + #[method(isTranslucent)] + pub unsafe fn isTranslucent(&self, ) -> bool; + + #[method(setTranslucent:)] + pub unsafe fn setTranslucent(&self, translucent: bool,); + + #[method(pushNavigationItem:animated:)] + pub unsafe fn pushNavigationItem_animated(&self, item: &UINavigationItem,animated: bool,); + + #[method_id(@__retain_semantics Other popNavigationItemAnimated:)] + pub unsafe fn popNavigationItemAnimated(&self, animated: bool,) -> Option>; + + #[method_id(@__retain_semantics Other topItem)] + pub unsafe fn topItem(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other backItem)] + pub unsafe fn backItem(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other items)] + pub unsafe fn items(&self, ) -> Option, Shared>>; + + #[method(setItems:)] + pub unsafe fn setItems(&self, items: Option<&NSArray>,); + + #[method(setItems:animated:)] + pub unsafe fn setItems_animated(&self, items: Option<&NSArray>,animated: bool,); + + #[method(prefersLargeTitles)] + pub unsafe fn prefersLargeTitles(&self, ) -> bool; + + #[method(setPrefersLargeTitles:)] + pub unsafe fn setPrefersLargeTitles(&self, prefersLargeTitles: bool,); + + #[method(currentNSToolbarSection)] + pub unsafe fn currentNSToolbarSection(&self, ) -> UINavigationBarNSToolbarSection; + + #[method(behavioralStyle)] + pub unsafe fn behavioralStyle(&self, ) -> UIBehavioralStyle; + + #[method(preferredBehavioralStyle)] + pub unsafe fn preferredBehavioralStyle(&self, ) -> UIBehavioralStyle; + + #[method(setPreferredBehavioralStyle:)] + pub unsafe fn setPreferredBehavioralStyle(&self, preferredBehavioralStyle: UIBehavioralStyle,); + + #[method_id(@__retain_semantics Other tintColor)] + pub unsafe fn tintColor(&self, ) -> Option>; + + #[method(setTintColor:)] + pub unsafe fn setTintColor(&self, tintColor: Option<&UIColor>,); + + #[method_id(@__retain_semantics Other barTintColor)] + pub unsafe fn barTintColor(&self, ) -> Option>; + + #[method(setBarTintColor:)] + pub unsafe fn setBarTintColor(&self, barTintColor: Option<&UIColor>,); + + #[method(setBackgroundImage:forBarPosition:barMetrics:)] + pub unsafe fn setBackgroundImage_forBarPosition_barMetrics(&self, backgroundImage: Option<&UIImage>,barPosition: UIBarPosition,barMetrics: UIBarMetrics,); + + #[method_id(@__retain_semantics Other backgroundImageForBarPosition:barMetrics:)] + pub unsafe fn backgroundImageForBarPosition_barMetrics(&self, barPosition: UIBarPosition,barMetrics: UIBarMetrics,) -> Option>; + + #[method(setBackgroundImage:forBarMetrics:)] + pub unsafe fn setBackgroundImage_forBarMetrics(&self, backgroundImage: Option<&UIImage>,barMetrics: UIBarMetrics,); + + #[method_id(@__retain_semantics Other backgroundImageForBarMetrics:)] + pub unsafe fn backgroundImageForBarMetrics(&self, barMetrics: UIBarMetrics,) -> Option>; + + #[method_id(@__retain_semantics Other shadowImage)] + pub unsafe fn shadowImage(&self, ) -> Option>; + + #[method(setShadowImage:)] + pub unsafe fn setShadowImage(&self, shadowImage: Option<&UIImage>,); + + #[method_id(@__retain_semantics Other titleTextAttributes)] + pub unsafe fn titleTextAttributes(&self, ) -> Option, Shared>>; + + #[method(setTitleTextAttributes:)] + pub unsafe fn setTitleTextAttributes(&self, titleTextAttributes: Option<&NSDictionary>,); + + #[method_id(@__retain_semantics Other largeTitleTextAttributes)] + pub unsafe fn largeTitleTextAttributes(&self, ) -> Option, Shared>>; + + #[method(setLargeTitleTextAttributes:)] + pub unsafe fn setLargeTitleTextAttributes(&self, largeTitleTextAttributes: Option<&NSDictionary>,); + + #[method(setTitleVerticalPositionAdjustment:forBarMetrics:)] + pub unsafe fn setTitleVerticalPositionAdjustment_forBarMetrics(&self, adjustment: CGFloat,barMetrics: UIBarMetrics,); + + #[method(titleVerticalPositionAdjustmentForBarMetrics:)] + pub unsafe fn titleVerticalPositionAdjustmentForBarMetrics(&self, barMetrics: UIBarMetrics,) -> CGFloat; + + #[method_id(@__retain_semantics Other backIndicatorImage)] + pub unsafe fn backIndicatorImage(&self, ) -> Option>; + + #[method(setBackIndicatorImage:)] + pub unsafe fn setBackIndicatorImage(&self, backIndicatorImage: Option<&UIImage>,); + + #[method_id(@__retain_semantics Other backIndicatorTransitionMaskImage)] + pub unsafe fn backIndicatorTransitionMaskImage(&self, ) -> Option>; + + #[method(setBackIndicatorTransitionMaskImage:)] + pub unsafe fn setBackIndicatorTransitionMaskImage(&self, backIndicatorTransitionMaskImage: Option<&UIImage>,); + + #[method_id(@__retain_semantics Other standardAppearance)] + pub unsafe fn standardAppearance(&self, ) -> Id; + + #[method(setStandardAppearance:)] + pub unsafe fn setStandardAppearance(&self, standardAppearance: &UINavigationBarAppearance,); + + #[method_id(@__retain_semantics Other compactAppearance)] + pub unsafe fn compactAppearance(&self, ) -> Option>; + + #[method(setCompactAppearance:)] + pub unsafe fn setCompactAppearance(&self, compactAppearance: Option<&UINavigationBarAppearance>,); + + #[method_id(@__retain_semantics Other scrollEdgeAppearance)] + pub unsafe fn scrollEdgeAppearance(&self, ) -> Option>; + + #[method(setScrollEdgeAppearance:)] + pub unsafe fn setScrollEdgeAppearance(&self, scrollEdgeAppearance: Option<&UINavigationBarAppearance>,); + + #[method_id(@__retain_semantics Other compactScrollEdgeAppearance)] + pub unsafe fn compactScrollEdgeAppearance(&self, ) -> Option>; + + #[method(setCompactScrollEdgeAppearance:)] + pub unsafe fn setCompactScrollEdgeAppearance(&self, compactScrollEdgeAppearance: Option<&UINavigationBarAppearance>,); + + } +); + +extern_protocol!( + pub struct UINavigationBarDelegate; + + unsafe impl UINavigationBarDelegate { + #[optional] + #[method(navigationBar:shouldPushItem:)] + pub unsafe fn navigationBar_shouldPushItem(&self, navigationBar: &UINavigationBar,item: &UINavigationItem,) -> bool; + + #[optional] + #[method(navigationBar:didPushItem:)] + pub unsafe fn navigationBar_didPushItem(&self, navigationBar: &UINavigationBar,item: &UINavigationItem,); + + #[optional] + #[method(navigationBar:shouldPopItem:)] + pub unsafe fn navigationBar_shouldPopItem(&self, navigationBar: &UINavigationBar,item: &UINavigationItem,) -> bool; + + #[optional] + #[method(navigationBar:didPopItem:)] + pub unsafe fn navigationBar_didPopItem(&self, navigationBar: &UINavigationBar,item: &UINavigationItem,); + + #[optional] + #[method(navigationBarNSToolbarSection:)] + pub unsafe fn navigationBarNSToolbarSection(&self, navigationBar: &UINavigationBar,) -> UINavigationBarNSToolbarSection; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UINavigationBarAppearance.rs b/crates/icrate-generated/src/UIKit/generated/UINavigationBarAppearance.rs new file mode 100644 index 000000000..d6afeba7a --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UINavigationBarAppearance.rs @@ -0,0 +1,63 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UINavigationBarAppearance; + + unsafe impl ClassType for UINavigationBarAppearance { + type Super = UIBarAppearance; + } +); + +extern_methods!( + unsafe impl UINavigationBarAppearance { + #[method_id(@__retain_semantics Other titleTextAttributes)] + pub unsafe fn titleTextAttributes(&self, ) -> Id, Shared>; + + #[method(setTitleTextAttributes:)] + pub unsafe fn setTitleTextAttributes(&self, titleTextAttributes: &NSDictionary,); + + #[method(titlePositionAdjustment)] + pub unsafe fn titlePositionAdjustment(&self, ) -> UIOffset; + + #[method(setTitlePositionAdjustment:)] + pub unsafe fn setTitlePositionAdjustment(&self, titlePositionAdjustment: UIOffset,); + + #[method_id(@__retain_semantics Other largeTitleTextAttributes)] + pub unsafe fn largeTitleTextAttributes(&self, ) -> Id, Shared>; + + #[method(setLargeTitleTextAttributes:)] + pub unsafe fn setLargeTitleTextAttributes(&self, largeTitleTextAttributes: &NSDictionary,); + + #[method_id(@__retain_semantics Other buttonAppearance)] + pub unsafe fn buttonAppearance(&self, ) -> Id; + + #[method(setButtonAppearance:)] + pub unsafe fn setButtonAppearance(&self, buttonAppearance: &UIBarButtonItemAppearance,); + + #[method_id(@__retain_semantics Other doneButtonAppearance)] + pub unsafe fn doneButtonAppearance(&self, ) -> Id; + + #[method(setDoneButtonAppearance:)] + pub unsafe fn setDoneButtonAppearance(&self, doneButtonAppearance: &UIBarButtonItemAppearance,); + + #[method_id(@__retain_semantics Other backButtonAppearance)] + pub unsafe fn backButtonAppearance(&self, ) -> Id; + + #[method(setBackButtonAppearance:)] + pub unsafe fn setBackButtonAppearance(&self, backButtonAppearance: &UIBarButtonItemAppearance,); + + #[method_id(@__retain_semantics Other backIndicatorImage)] + pub unsafe fn backIndicatorImage(&self, ) -> Id; + + #[method_id(@__retain_semantics Other backIndicatorTransitionMaskImage)] + pub unsafe fn backIndicatorTransitionMaskImage(&self, ) -> Id; + + #[method(setBackIndicatorImage:transitionMaskImage:)] + pub unsafe fn setBackIndicatorImage_transitionMaskImage(&self, backIndicatorImage: Option<&UIImage>,backIndicatorTransitionMaskImage: Option<&UIImage>,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UINavigationController.rs b/crates/icrate-generated/src/UIKit/generated/UINavigationController.rs new file mode 100644 index 000000000..62a9551e3 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UINavigationController.rs @@ -0,0 +1,198 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UINavigationControllerOperation { + UINavigationControllerOperationNone = 0, + UINavigationControllerOperationPush = 1, + UINavigationControllerOperationPop = 2, + } +); + +extern_static!(UINavigationControllerHideShowBarDuration: CGFloat); + +extern_class!( + #[derive(Debug)] + pub struct UINavigationController; + + unsafe impl ClassType for UINavigationController { + type Super = UIViewController; + } +); + +extern_methods!( + unsafe impl UINavigationController { + #[method_id(@__retain_semantics Init initWithNavigationBarClass:toolbarClass:)] + pub unsafe fn initWithNavigationBarClass_toolbarClass(this: Option>, navigationBarClass: Option<&Class>,toolbarClass: Option<&Class>,) -> Id; + + #[method_id(@__retain_semantics Init initWithRootViewController:)] + pub unsafe fn initWithRootViewController(this: Option>, rootViewController: &UIViewController,) -> Id; + + #[method_id(@__retain_semantics Init initWithNibName:bundle:)] + pub unsafe fn initWithNibName_bundle(this: Option>, nibNameOrNil: Option<&NSString>,nibBundleOrNil: Option<&NSBundle>,) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, aDecoder: &NSCoder,) -> Option>; + + #[method(pushViewController:animated:)] + pub unsafe fn pushViewController_animated(&self, viewController: &UIViewController,animated: bool,); + + #[method_id(@__retain_semantics Other popViewControllerAnimated:)] + pub unsafe fn popViewControllerAnimated(&self, animated: bool,) -> Option>; + + #[method_id(@__retain_semantics Other popToViewController:animated:)] + pub unsafe fn popToViewController_animated(&self, viewController: &UIViewController,animated: bool,) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other popToRootViewControllerAnimated:)] + pub unsafe fn popToRootViewControllerAnimated(&self, animated: bool,) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other topViewController)] + pub unsafe fn topViewController(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other visibleViewController)] + pub unsafe fn visibleViewController(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other viewControllers)] + pub unsafe fn viewControllers(&self, ) -> Id, Shared>; + + #[method(setViewControllers:)] + pub unsafe fn setViewControllers(&self, viewControllers: &NSArray,); + + #[method(setViewControllers:animated:)] + pub unsafe fn setViewControllers_animated(&self, viewControllers: &NSArray,animated: bool,); + + #[method(isNavigationBarHidden)] + pub unsafe fn isNavigationBarHidden(&self, ) -> bool; + + #[method(setNavigationBarHidden:)] + pub unsafe fn setNavigationBarHidden(&self, navigationBarHidden: bool,); + + #[method(setNavigationBarHidden:animated:)] + pub unsafe fn setNavigationBarHidden_animated(&self, hidden: bool,animated: bool,); + + #[method_id(@__retain_semantics Other navigationBar)] + pub unsafe fn navigationBar(&self, ) -> Id; + + #[method(isToolbarHidden)] + pub unsafe fn isToolbarHidden(&self, ) -> bool; + + #[method(setToolbarHidden:)] + pub unsafe fn setToolbarHidden(&self, toolbarHidden: bool,); + + #[method(setToolbarHidden:animated:)] + pub unsafe fn setToolbarHidden_animated(&self, hidden: bool,animated: bool,); + + #[method_id(@__retain_semantics Other toolbar)] + pub unsafe fn toolbar(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&UINavigationControllerDelegate>,); + + #[method_id(@__retain_semantics Other interactivePopGestureRecognizer)] + pub unsafe fn interactivePopGestureRecognizer(&self, ) -> Option>; + + #[method(showViewController:sender:)] + pub unsafe fn showViewController_sender(&self, vc: &UIViewController,sender: Option<&Object>,); + + #[method(hidesBarsWhenKeyboardAppears)] + pub unsafe fn hidesBarsWhenKeyboardAppears(&self, ) -> bool; + + #[method(setHidesBarsWhenKeyboardAppears:)] + pub unsafe fn setHidesBarsWhenKeyboardAppears(&self, hidesBarsWhenKeyboardAppears: bool,); + + #[method(hidesBarsOnSwipe)] + pub unsafe fn hidesBarsOnSwipe(&self, ) -> bool; + + #[method(setHidesBarsOnSwipe:)] + pub unsafe fn setHidesBarsOnSwipe(&self, hidesBarsOnSwipe: bool,); + + #[method_id(@__retain_semantics Other barHideOnSwipeGestureRecognizer)] + pub unsafe fn barHideOnSwipeGestureRecognizer(&self, ) -> Id; + + #[method(hidesBarsWhenVerticallyCompact)] + pub unsafe fn hidesBarsWhenVerticallyCompact(&self, ) -> bool; + + #[method(setHidesBarsWhenVerticallyCompact:)] + pub unsafe fn setHidesBarsWhenVerticallyCompact(&self, hidesBarsWhenVerticallyCompact: bool,); + + #[method(hidesBarsOnTap)] + pub unsafe fn hidesBarsOnTap(&self, ) -> bool; + + #[method(setHidesBarsOnTap:)] + pub unsafe fn setHidesBarsOnTap(&self, hidesBarsOnTap: bool,); + + #[method_id(@__retain_semantics Other barHideOnTapGestureRecognizer)] + pub unsafe fn barHideOnTapGestureRecognizer(&self, ) -> Id; + + } +); + +extern_protocol!( + pub struct UINavigationControllerDelegate; + + unsafe impl UINavigationControllerDelegate { + #[optional] + #[method(navigationController:willShowViewController:animated:)] + pub unsafe fn navigationController_willShowViewController_animated(&self, navigationController: &UINavigationController,viewController: &UIViewController,animated: bool,); + + #[optional] + #[method(navigationController:didShowViewController:animated:)] + pub unsafe fn navigationController_didShowViewController_animated(&self, navigationController: &UINavigationController,viewController: &UIViewController,animated: bool,); + + #[optional] + #[method(navigationControllerSupportedInterfaceOrientations:)] + pub unsafe fn navigationControllerSupportedInterfaceOrientations(&self, navigationController: &UINavigationController,) -> UIInterfaceOrientationMask; + + #[optional] + #[method(navigationControllerPreferredInterfaceOrientationForPresentation:)] + pub unsafe fn navigationControllerPreferredInterfaceOrientationForPresentation(&self, navigationController: &UINavigationController,) -> UIInterfaceOrientation; + + #[optional] + #[method_id(@__retain_semantics Other navigationController:interactionControllerForAnimationController:)] + pub unsafe fn navigationController_interactionControllerForAnimationController(&self, navigationController: &UINavigationController,animationController: &UIViewControllerAnimatedTransitioning,) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other navigationController:animationControllerForOperation:fromViewController:toViewController:)] + pub unsafe fn navigationController_animationControllerForOperation_fromViewController_toViewController(&self, navigationController: &UINavigationController,operation: UINavigationControllerOperation,fromVC: &UIViewController,toVC: &UIViewController,) -> Option>; + + } +); + +extern_methods!( + /// UINavigationControllerItem + unsafe impl UIViewController { + #[method_id(@__retain_semantics Other navigationItem)] + pub unsafe fn navigationItem(&self, ) -> Id; + + #[method(hidesBottomBarWhenPushed)] + pub unsafe fn hidesBottomBarWhenPushed(&self, ) -> bool; + + #[method(setHidesBottomBarWhenPushed:)] + pub unsafe fn setHidesBottomBarWhenPushed(&self, hidesBottomBarWhenPushed: bool,); + + #[method_id(@__retain_semantics Other navigationController)] + pub unsafe fn navigationController(&self, ) -> Option>; + + } +); + +extern_methods!( + /// UINavigationControllerContextualToolbarItems + unsafe impl UIViewController { + #[method_id(@__retain_semantics Other toolbarItems)] + pub unsafe fn toolbarItems(&self, ) -> Option, Shared>>; + + #[method(setToolbarItems:)] + pub unsafe fn setToolbarItems(&self, toolbarItems: Option<&NSArray>,); + + #[method(setToolbarItems:animated:)] + pub unsafe fn setToolbarItems_animated(&self, toolbarItems: Option<&NSArray>,animated: bool,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UINavigationItem.rs b/crates/icrate-generated/src/UIKit/generated/UINavigationItem.rs new file mode 100644 index 000000000..92a14b36a --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UINavigationItem.rs @@ -0,0 +1,289 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UINavigationItemLargeTitleDisplayMode { + UINavigationItemLargeTitleDisplayModeAutomatic = 0, + UINavigationItemLargeTitleDisplayModeAlways = 1, + UINavigationItemLargeTitleDisplayModeNever = 2, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UINavigationItemBackButtonDisplayMode { + UINavigationItemBackButtonDisplayModeDefault = 0, + UINavigationItemBackButtonDisplayModeGeneric = 1, + UINavigationItemBackButtonDisplayModeMinimal = 2, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UINavigationItemSearchBarPlacement { + UINavigationItemSearchBarPlacementAutomatic = 0, + UINavigationItemSearchBarPlacementInline = 1, + UINavigationItemSearchBarPlacementStacked = 2, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UINavigationItemStyle { + UINavigationItemStyleNavigator = 0, + UINavigationItemStyleBrowser = 1, + UINavigationItemStyleEditor = 2, + } +); + +extern_protocol!( + pub struct UINavigationItemRenameDelegate; + + unsafe impl UINavigationItemRenameDelegate { + #[method(navigationItem:didEndRenamingWithTitle:)] + pub unsafe fn navigationItem_didEndRenamingWithTitle(&self, navigationItem: &UINavigationItem,title: &NSString,); + + #[optional] + #[method(navigationItemShouldBeginRenaming:)] + pub unsafe fn navigationItemShouldBeginRenaming(&self, navigationItem: &UINavigationItem,) -> bool; + + #[optional] + #[method_id(@__retain_semantics Other navigationItem:willBeginRenamingWithSuggestedTitle:selectedRange:)] + pub unsafe fn navigationItem_willBeginRenamingWithSuggestedTitle_selectedRange(&self, navigationItem: &UINavigationItem,title: &NSString,selectedRange: NonNull,) -> Id; + + #[optional] + #[method(navigationItem:shouldEndRenamingWithTitle:)] + pub unsafe fn navigationItem_shouldEndRenamingWithTitle(&self, navigationItem: &UINavigationItem,title: &NSString,) -> bool; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UINavigationItem; + + unsafe impl ClassType for UINavigationItem { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UINavigationItem { + #[method_id(@__retain_semantics Init initWithTitle:)] + pub unsafe fn initWithTitle(this: Option>, title: &NSString,) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method_id(@__retain_semantics Other title)] + pub unsafe fn title(&self, ) -> Option>; + + #[method(setTitle:)] + pub unsafe fn setTitle(&self, title: Option<&NSString>,); + + #[method_id(@__retain_semantics Other titleView)] + pub unsafe fn titleView(&self, ) -> Option>; + + #[method(setTitleView:)] + pub unsafe fn setTitleView(&self, titleView: Option<&UIView>,); + + #[method_id(@__retain_semantics Other prompt)] + pub unsafe fn prompt(&self, ) -> Option>; + + #[method(setPrompt:)] + pub unsafe fn setPrompt(&self, prompt: Option<&NSString>,); + + #[method_id(@__retain_semantics Other backBarButtonItem)] + pub unsafe fn backBarButtonItem(&self, ) -> Option>; + + #[method(setBackBarButtonItem:)] + pub unsafe fn setBackBarButtonItem(&self, backBarButtonItem: Option<&UIBarButtonItem>,); + + #[method_id(@__retain_semantics Other backButtonTitle)] + pub unsafe fn backButtonTitle(&self, ) -> Option>; + + #[method(setBackButtonTitle:)] + pub unsafe fn setBackButtonTitle(&self, backButtonTitle: Option<&NSString>,); + + #[method(hidesBackButton)] + pub unsafe fn hidesBackButton(&self, ) -> bool; + + #[method(setHidesBackButton:)] + pub unsafe fn setHidesBackButton(&self, hidesBackButton: bool,); + + #[method(setHidesBackButton:animated:)] + pub unsafe fn setHidesBackButton_animated(&self, hidesBackButton: bool,animated: bool,); + + #[method(backButtonDisplayMode)] + pub unsafe fn backButtonDisplayMode(&self, ) -> UINavigationItemBackButtonDisplayMode; + + #[method(setBackButtonDisplayMode:)] + pub unsafe fn setBackButtonDisplayMode(&self, backButtonDisplayMode: UINavigationItemBackButtonDisplayMode,); + + #[method_id(@__retain_semantics Other backAction)] + pub unsafe fn backAction(&self, ) -> Option>; + + #[method(setBackAction:)] + pub unsafe fn setBackAction(&self, backAction: Option<&UIAction>,); + + #[method(titleMenuProvider)] + pub unsafe fn titleMenuProvider(&self, ) -> *mut Block<(NonNull>, ), *mut UIMenu>; + + #[method(setTitleMenuProvider:)] + pub unsafe fn setTitleMenuProvider(&self, titleMenuProvider: Option<&Block<(NonNull>, ), *mut UIMenu>>,); + + #[method_id(@__retain_semantics Other renameDelegate)] + pub unsafe fn renameDelegate(&self, ) -> Option>; + + #[method(setRenameDelegate:)] + pub unsafe fn setRenameDelegate(&self, renameDelegate: Option<&UINavigationItemRenameDelegate>,); + + #[method_id(@__retain_semantics Other documentProperties)] + pub unsafe fn documentProperties(&self, ) -> Option>; + + #[method(setDocumentProperties:)] + pub unsafe fn setDocumentProperties(&self, documentProperties: Option<&UIDocumentProperties>,); + + #[method_id(@__retain_semantics Other leftBarButtonItems)] + pub unsafe fn leftBarButtonItems(&self, ) -> Option, Shared>>; + + #[method(setLeftBarButtonItems:)] + pub unsafe fn setLeftBarButtonItems(&self, leftBarButtonItems: Option<&NSArray>,); + + #[method_id(@__retain_semantics Other rightBarButtonItems)] + pub unsafe fn rightBarButtonItems(&self, ) -> Option, Shared>>; + + #[method(setRightBarButtonItems:)] + pub unsafe fn setRightBarButtonItems(&self, rightBarButtonItems: Option<&NSArray>,); + + #[method(setLeftBarButtonItems:animated:)] + pub unsafe fn setLeftBarButtonItems_animated(&self, items: Option<&NSArray>,animated: bool,); + + #[method(setRightBarButtonItems:animated:)] + pub unsafe fn setRightBarButtonItems_animated(&self, items: Option<&NSArray>,animated: bool,); + + #[method(leftItemsSupplementBackButton)] + pub unsafe fn leftItemsSupplementBackButton(&self, ) -> bool; + + #[method(setLeftItemsSupplementBackButton:)] + pub unsafe fn setLeftItemsSupplementBackButton(&self, leftItemsSupplementBackButton: bool,); + + #[method_id(@__retain_semantics Other leftBarButtonItem)] + pub unsafe fn leftBarButtonItem(&self, ) -> Option>; + + #[method(setLeftBarButtonItem:)] + pub unsafe fn setLeftBarButtonItem(&self, leftBarButtonItem: Option<&UIBarButtonItem>,); + + #[method_id(@__retain_semantics Other rightBarButtonItem)] + pub unsafe fn rightBarButtonItem(&self, ) -> Option>; + + #[method(setRightBarButtonItem:)] + pub unsafe fn setRightBarButtonItem(&self, rightBarButtonItem: Option<&UIBarButtonItem>,); + + #[method(setLeftBarButtonItem:animated:)] + pub unsafe fn setLeftBarButtonItem_animated(&self, item: Option<&UIBarButtonItem>,animated: bool,); + + #[method(setRightBarButtonItem:animated:)] + pub unsafe fn setRightBarButtonItem_animated(&self, item: Option<&UIBarButtonItem>,animated: bool,); + + #[method_id(@__retain_semantics Other customizationIdentifier)] + pub unsafe fn customizationIdentifier(&self, ) -> Option>; + + #[method(setCustomizationIdentifier:)] + pub unsafe fn setCustomizationIdentifier(&self, customizationIdentifier: Option<&NSString>,); + + #[method_id(@__retain_semantics Other leadingItemGroups)] + pub unsafe fn leadingItemGroups(&self, ) -> Id, Shared>; + + #[method(setLeadingItemGroups:)] + pub unsafe fn setLeadingItemGroups(&self, leadingItemGroups: &NSArray,); + + #[method_id(@__retain_semantics Other centerItemGroups)] + pub unsafe fn centerItemGroups(&self, ) -> Id, Shared>; + + #[method(setCenterItemGroups:)] + pub unsafe fn setCenterItemGroups(&self, centerItemGroups: &NSArray,); + + #[method_id(@__retain_semantics Other trailingItemGroups)] + pub unsafe fn trailingItemGroups(&self, ) -> Id, Shared>; + + #[method(setTrailingItemGroups:)] + pub unsafe fn setTrailingItemGroups(&self, trailingItemGroups: &NSArray,); + + #[method_id(@__retain_semantics Other pinnedTrailingGroup)] + pub unsafe fn pinnedTrailingGroup(&self, ) -> Option>; + + #[method(setPinnedTrailingGroup:)] + pub unsafe fn setPinnedTrailingGroup(&self, pinnedTrailingGroup: Option<&UIBarButtonItemGroup>,); + + #[method_id(@__retain_semantics Other additionalOverflowItems)] + pub unsafe fn additionalOverflowItems(&self, ) -> Option>; + + #[method(setAdditionalOverflowItems:)] + pub unsafe fn setAdditionalOverflowItems(&self, additionalOverflowItems: Option<&UIDeferredMenuElement>,); + + #[method_id(@__retain_semantics Other overflowPresentationSource)] + pub unsafe fn overflowPresentationSource(&self, ) -> Option>; + + #[method(largeTitleDisplayMode)] + pub unsafe fn largeTitleDisplayMode(&self, ) -> UINavigationItemLargeTitleDisplayMode; + + #[method(setLargeTitleDisplayMode:)] + pub unsafe fn setLargeTitleDisplayMode(&self, largeTitleDisplayMode: UINavigationItemLargeTitleDisplayMode,); + + #[method(style)] + pub unsafe fn style(&self, ) -> UINavigationItemStyle; + + #[method(setStyle:)] + pub unsafe fn setStyle(&self, style: UINavigationItemStyle,); + + #[method_id(@__retain_semantics Other searchController)] + pub unsafe fn searchController(&self, ) -> Option>; + + #[method(setSearchController:)] + pub unsafe fn setSearchController(&self, searchController: Option<&UISearchController>,); + + #[method(hidesSearchBarWhenScrolling)] + pub unsafe fn hidesSearchBarWhenScrolling(&self, ) -> bool; + + #[method(setHidesSearchBarWhenScrolling:)] + pub unsafe fn setHidesSearchBarWhenScrolling(&self, hidesSearchBarWhenScrolling: bool,); + + #[method(preferredSearchBarPlacement)] + pub unsafe fn preferredSearchBarPlacement(&self, ) -> UINavigationItemSearchBarPlacement; + + #[method(setPreferredSearchBarPlacement:)] + pub unsafe fn setPreferredSearchBarPlacement(&self, preferredSearchBarPlacement: UINavigationItemSearchBarPlacement,); + + #[method(searchBarPlacement)] + pub unsafe fn searchBarPlacement(&self, ) -> UINavigationItemSearchBarPlacement; + + #[method_id(@__retain_semantics Other standardAppearance)] + pub unsafe fn standardAppearance(&self, ) -> Option>; + + #[method(setStandardAppearance:)] + pub unsafe fn setStandardAppearance(&self, standardAppearance: Option<&UINavigationBarAppearance>,); + + #[method_id(@__retain_semantics Other compactAppearance)] + pub unsafe fn compactAppearance(&self, ) -> Option>; + + #[method(setCompactAppearance:)] + pub unsafe fn setCompactAppearance(&self, compactAppearance: Option<&UINavigationBarAppearance>,); + + #[method_id(@__retain_semantics Other scrollEdgeAppearance)] + pub unsafe fn scrollEdgeAppearance(&self, ) -> Option>; + + #[method(setScrollEdgeAppearance:)] + pub unsafe fn setScrollEdgeAppearance(&self, scrollEdgeAppearance: Option<&UINavigationBarAppearance>,); + + #[method_id(@__retain_semantics Other compactScrollEdgeAppearance)] + pub unsafe fn compactScrollEdgeAppearance(&self, ) -> Option>; + + #[method(setCompactScrollEdgeAppearance:)] + pub unsafe fn setCompactScrollEdgeAppearance(&self, compactScrollEdgeAppearance: Option<&UINavigationBarAppearance>,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UINib.rs b/crates/icrate-generated/src/UIKit/generated/UINib.rs new file mode 100644 index 000000000..9d5c76810 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UINib.rs @@ -0,0 +1,27 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UINib; + + unsafe impl ClassType for UINib { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UINib { + #[method_id(@__retain_semantics Other nibWithNibName:bundle:)] + pub unsafe fn nibWithNibName_bundle(name: &NSString,bundleOrNil: Option<&NSBundle>,) -> Id; + + #[method_id(@__retain_semantics Other nibWithData:bundle:)] + pub unsafe fn nibWithData_bundle(data: &NSData,bundleOrNil: Option<&NSBundle>,) -> Id; + + #[method_id(@__retain_semantics Other instantiateWithOwner:options:)] + pub unsafe fn instantiateWithOwner_options(&self, ownerOrNil: Option<&Object>,optionsOrNil: Option<&NSDictionary>,) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UINibDeclarations.rs b/crates/icrate-generated/src/UIKit/generated/UINibDeclarations.rs new file mode 100644 index 000000000..bc88fc826 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UINibDeclarations.rs @@ -0,0 +1,4 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + diff --git a/crates/icrate-generated/src/UIKit/generated/UINibLoading.rs b/crates/icrate-generated/src/UIKit/generated/UINibLoading.rs new file mode 100644 index 000000000..d5b315772 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UINibLoading.rs @@ -0,0 +1,31 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +pub type UINibOptionsKey = NSString; + +extern_static!(UINibExternalObjects: &'static UINibOptionsKey); + +extern_methods!( + /// UINibLoadingAdditions + unsafe impl NSBundle { + #[method_id(@__retain_semantics Other loadNibNamed:owner:options:)] + pub unsafe fn loadNibNamed_owner_options(&self, name: &NSString,owner: Option<&Object>,options: Option<&NSDictionary>,) -> Option>; + + } +); + +extern_methods!( + /// UINibLoadingAdditions + unsafe impl NSObject { + #[method(awakeFromNib)] + pub unsafe fn awakeFromNib(&self, ); + + #[method(prepareForInterfaceBuilder)] + pub unsafe fn prepareForInterfaceBuilder(&self, ); + + } +); + +extern_static!(UINibProxiedObjectsKey: &'static NSString); + diff --git a/crates/icrate-generated/src/UIKit/generated/UINotificationFeedbackGenerator.rs b/crates/icrate-generated/src/UIKit/generated/UINotificationFeedbackGenerator.rs new file mode 100644 index 000000000..644e65c97 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UINotificationFeedbackGenerator.rs @@ -0,0 +1,30 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UINotificationFeedbackType { + UINotificationFeedbackTypeSuccess = 0, + UINotificationFeedbackTypeWarning = 1, + UINotificationFeedbackTypeError = 2, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UINotificationFeedbackGenerator; + + unsafe impl ClassType for UINotificationFeedbackGenerator { + type Super = UIFeedbackGenerator; + } +); + +extern_methods!( + unsafe impl UINotificationFeedbackGenerator { + #[method(notificationOccurred:)] + pub unsafe fn notificationOccurred(&self, notificationType: UINotificationFeedbackType,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIOpenURLContext.rs b/crates/icrate-generated/src/UIKit/generated/UIOpenURLContext.rs new file mode 100644 index 000000000..b9718183f --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIOpenURLContext.rs @@ -0,0 +1,30 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIOpenURLContext; + + unsafe impl ClassType for UIOpenURLContext { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIOpenURLContext { + #[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_id(@__retain_semantics Other options)] + pub unsafe fn options(&self, ) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIPageControl.rs b/crates/icrate-generated/src/UIKit/generated/UIPageControl.rs new file mode 100644 index 000000000..e5a3b069a --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIPageControl.rs @@ -0,0 +1,134 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIPageControlInteractionState { + UIPageControlInteractionStateNone = 0, + UIPageControlInteractionStateDiscrete = 1, + UIPageControlInteractionStateContinuous = 2, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIPageControlBackgroundStyle { + UIPageControlBackgroundStyleAutomatic = 0, + UIPageControlBackgroundStyleProminent = 1, + UIPageControlBackgroundStyleMinimal = 2, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIPageControlDirection { + UIPageControlDirectionNatural = 0, + UIPageControlDirectionLeftToRight = 1, + UIPageControlDirectionRightToLeft = 2, + UIPageControlDirectionTopToBottom = 3, + UIPageControlDirectionBottomToTop = 4, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIPageControl; + + unsafe impl ClassType for UIPageControl { + type Super = UIControl; + } +); + +extern_methods!( + unsafe impl UIPageControl { + #[method(numberOfPages)] + pub unsafe fn numberOfPages(&self, ) -> NSInteger; + + #[method(setNumberOfPages:)] + pub unsafe fn setNumberOfPages(&self, numberOfPages: NSInteger,); + + #[method(currentPage)] + pub unsafe fn currentPage(&self, ) -> NSInteger; + + #[method(setCurrentPage:)] + pub unsafe fn setCurrentPage(&self, currentPage: NSInteger,); + + #[method(hidesForSinglePage)] + pub unsafe fn hidesForSinglePage(&self, ) -> bool; + + #[method(setHidesForSinglePage:)] + pub unsafe fn setHidesForSinglePage(&self, hidesForSinglePage: bool,); + + #[method_id(@__retain_semantics Other pageIndicatorTintColor)] + pub unsafe fn pageIndicatorTintColor(&self, ) -> Option>; + + #[method(setPageIndicatorTintColor:)] + pub unsafe fn setPageIndicatorTintColor(&self, pageIndicatorTintColor: Option<&UIColor>,); + + #[method_id(@__retain_semantics Other currentPageIndicatorTintColor)] + pub unsafe fn currentPageIndicatorTintColor(&self, ) -> Option>; + + #[method(setCurrentPageIndicatorTintColor:)] + pub unsafe fn setCurrentPageIndicatorTintColor(&self, currentPageIndicatorTintColor: Option<&UIColor>,); + + #[method(backgroundStyle)] + pub unsafe fn backgroundStyle(&self, ) -> UIPageControlBackgroundStyle; + + #[method(setBackgroundStyle:)] + pub unsafe fn setBackgroundStyle(&self, backgroundStyle: UIPageControlBackgroundStyle,); + + #[method(direction)] + pub unsafe fn direction(&self, ) -> UIPageControlDirection; + + #[method(setDirection:)] + pub unsafe fn setDirection(&self, direction: UIPageControlDirection,); + + #[method(interactionState)] + pub unsafe fn interactionState(&self, ) -> UIPageControlInteractionState; + + #[method(allowsContinuousInteraction)] + pub unsafe fn allowsContinuousInteraction(&self, ) -> bool; + + #[method(setAllowsContinuousInteraction:)] + pub unsafe fn setAllowsContinuousInteraction(&self, allowsContinuousInteraction: bool,); + + #[method_id(@__retain_semantics Other preferredIndicatorImage)] + pub unsafe fn preferredIndicatorImage(&self, ) -> Option>; + + #[method(setPreferredIndicatorImage:)] + pub unsafe fn setPreferredIndicatorImage(&self, preferredIndicatorImage: Option<&UIImage>,); + + #[method_id(@__retain_semantics Other indicatorImageForPage:)] + pub unsafe fn indicatorImageForPage(&self, page: NSInteger,) -> Option>; + + #[method(setIndicatorImage:forPage:)] + pub unsafe fn setIndicatorImage_forPage(&self, image: Option<&UIImage>,page: NSInteger,); + + #[method_id(@__retain_semantics Other preferredCurrentPageIndicatorImage)] + pub unsafe fn preferredCurrentPageIndicatorImage(&self, ) -> Option>; + + #[method(setPreferredCurrentPageIndicatorImage:)] + pub unsafe fn setPreferredCurrentPageIndicatorImage(&self, preferredCurrentPageIndicatorImage: Option<&UIImage>,); + + #[method_id(@__retain_semantics Other currentPageIndicatorImageForPage:)] + pub unsafe fn currentPageIndicatorImageForPage(&self, page: NSInteger,) -> Option>; + + #[method(setCurrentPageIndicatorImage:forPage:)] + pub unsafe fn setCurrentPageIndicatorImage_forPage(&self, image: Option<&UIImage>,page: NSInteger,); + + #[method(sizeForNumberOfPages:)] + pub unsafe fn sizeForNumberOfPages(&self, pageCount: NSInteger,) -> CGSize; + + #[method(defersCurrentPageDisplay)] + pub unsafe fn defersCurrentPageDisplay(&self, ) -> bool; + + #[method(setDefersCurrentPageDisplay:)] + pub unsafe fn setDefersCurrentPageDisplay(&self, defersCurrentPageDisplay: bool,); + + #[method(updateCurrentPageDisplay)] + pub unsafe fn updateCurrentPageDisplay(&self, ); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIPageViewController.rs b/crates/icrate-generated/src/UIKit/generated/UIPageViewController.rs new file mode 100644 index 000000000..7fa76a18d --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIPageViewController.rs @@ -0,0 +1,148 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIPageViewControllerNavigationOrientation { + UIPageViewControllerNavigationOrientationHorizontal = 0, + UIPageViewControllerNavigationOrientationVertical = 1, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIPageViewControllerSpineLocation { + UIPageViewControllerSpineLocationNone = 0, + UIPageViewControllerSpineLocationMin = 1, + UIPageViewControllerSpineLocationMid = 2, + UIPageViewControllerSpineLocationMax = 3, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIPageViewControllerNavigationDirection { + UIPageViewControllerNavigationDirectionForward = 0, + UIPageViewControllerNavigationDirectionReverse = 1, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIPageViewControllerTransitionStyle { + UIPageViewControllerTransitionStylePageCurl = 0, + UIPageViewControllerTransitionStyleScroll = 1, + } +); + +pub type UIPageViewControllerOptionsKey = NSString; + +extern_static!(UIPageViewControllerOptionSpineLocationKey: &'static UIPageViewControllerOptionsKey); + +extern_static!(UIPageViewControllerOptionInterPageSpacingKey: &'static UIPageViewControllerOptionsKey); + +extern_class!( + #[derive(Debug)] + pub struct UIPageViewController; + + unsafe impl ClassType for UIPageViewController { + type Super = UIViewController; + } +); + +extern_methods!( + unsafe impl UIPageViewController { + #[method_id(@__retain_semantics Init initWithTransitionStyle:navigationOrientation:options:)] + pub unsafe fn initWithTransitionStyle_navigationOrientation_options(this: Option>, style: UIPageViewControllerTransitionStyle,navigationOrientation: UIPageViewControllerNavigationOrientation,options: Option<&NSDictionary>,) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&UIPageViewControllerDelegate>,); + + #[method_id(@__retain_semantics Other dataSource)] + pub unsafe fn dataSource(&self, ) -> Option>; + + #[method(setDataSource:)] + pub unsafe fn setDataSource(&self, dataSource: Option<&UIPageViewControllerDataSource>,); + + #[method(transitionStyle)] + pub unsafe fn transitionStyle(&self, ) -> UIPageViewControllerTransitionStyle; + + #[method(navigationOrientation)] + pub unsafe fn navigationOrientation(&self, ) -> UIPageViewControllerNavigationOrientation; + + #[method(spineLocation)] + pub unsafe fn spineLocation(&self, ) -> UIPageViewControllerSpineLocation; + + #[method(isDoubleSided)] + pub unsafe fn isDoubleSided(&self, ) -> bool; + + #[method(setDoubleSided:)] + pub unsafe fn setDoubleSided(&self, doubleSided: bool,); + + #[method_id(@__retain_semantics Other gestureRecognizers)] + pub unsafe fn gestureRecognizers(&self, ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other viewControllers)] + pub unsafe fn viewControllers(&self, ) -> Option, Shared>>; + + #[method(setViewControllers:direction:animated:completion:)] + pub unsafe fn setViewControllers_direction_animated_completion(&self, viewControllers: Option<&NSArray>,direction: UIPageViewControllerNavigationDirection,animated: bool,completion: Option<&Block<(Bool, ), ()>>,); + + } +); + +extern_protocol!( + pub struct UIPageViewControllerDelegate; + + unsafe impl UIPageViewControllerDelegate { + #[optional] + #[method(pageViewController:willTransitionToViewControllers:)] + pub unsafe fn pageViewController_willTransitionToViewControllers(&self, pageViewController: &UIPageViewController,pendingViewControllers: &NSArray,); + + #[optional] + #[method(pageViewController:didFinishAnimating:previousViewControllers:transitionCompleted:)] + pub unsafe fn pageViewController_didFinishAnimating_previousViewControllers_transitionCompleted(&self, pageViewController: &UIPageViewController,finished: bool,previousViewControllers: &NSArray,completed: bool,); + + #[optional] + #[method(pageViewController:spineLocationForInterfaceOrientation:)] + pub unsafe fn pageViewController_spineLocationForInterfaceOrientation(&self, pageViewController: &UIPageViewController,orientation: UIInterfaceOrientation,) -> UIPageViewControllerSpineLocation; + + #[optional] + #[method(pageViewControllerSupportedInterfaceOrientations:)] + pub unsafe fn pageViewControllerSupportedInterfaceOrientations(&self, pageViewController: &UIPageViewController,) -> UIInterfaceOrientationMask; + + #[optional] + #[method(pageViewControllerPreferredInterfaceOrientationForPresentation:)] + pub unsafe fn pageViewControllerPreferredInterfaceOrientationForPresentation(&self, pageViewController: &UIPageViewController,) -> UIInterfaceOrientation; + + } +); + +extern_protocol!( + pub struct UIPageViewControllerDataSource; + + unsafe impl UIPageViewControllerDataSource { + #[method_id(@__retain_semantics Other pageViewController:viewControllerBeforeViewController:)] + pub unsafe fn pageViewController_viewControllerBeforeViewController(&self, pageViewController: &UIPageViewController,viewController: &UIViewController,) -> Option>; + + #[method_id(@__retain_semantics Other pageViewController:viewControllerAfterViewController:)] + pub unsafe fn pageViewController_viewControllerAfterViewController(&self, pageViewController: &UIPageViewController,viewController: &UIViewController,) -> Option>; + + #[optional] + #[method(presentationCountForPageViewController:)] + pub unsafe fn presentationCountForPageViewController(&self, pageViewController: &UIPageViewController,) -> NSInteger; + + #[optional] + #[method(presentationIndexForPageViewController:)] + pub unsafe fn presentationIndexForPageViewController(&self, pageViewController: &UIPageViewController,) -> NSInteger; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIPanGestureRecognizer.rs b/crates/icrate-generated/src/UIKit/generated/UIPanGestureRecognizer.rs new file mode 100644 index 000000000..1194d980b --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIPanGestureRecognizer.rs @@ -0,0 +1,62 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSUInteger)] + pub enum UIScrollType { + UIScrollTypeDiscrete = 0, + UIScrollTypeContinuous = 1, + } +); + +ns_options!( + #[underlying(NSInteger)] + pub enum UIScrollTypeMask { + UIScrollTypeMaskDiscrete = 1< NSUInteger; + + #[method(setMinimumNumberOfTouches:)] + pub unsafe fn setMinimumNumberOfTouches(&self, minimumNumberOfTouches: NSUInteger,); + + #[method(maximumNumberOfTouches)] + pub unsafe fn maximumNumberOfTouches(&self, ) -> NSUInteger; + + #[method(setMaximumNumberOfTouches:)] + pub unsafe fn setMaximumNumberOfTouches(&self, maximumNumberOfTouches: NSUInteger,); + + #[method(translationInView:)] + pub unsafe fn translationInView(&self, view: Option<&UIView>,) -> CGPoint; + + #[method(setTranslation:inView:)] + pub unsafe fn setTranslation_inView(&self, translation: CGPoint,view: Option<&UIView>,); + + #[method(velocityInView:)] + pub unsafe fn velocityInView(&self, view: Option<&UIView>,) -> CGPoint; + + #[method(allowedScrollTypesMask)] + pub unsafe fn allowedScrollTypesMask(&self, ) -> UIScrollTypeMask; + + #[method(setAllowedScrollTypesMask:)] + pub unsafe fn setAllowedScrollTypesMask(&self, allowedScrollTypesMask: UIScrollTypeMask,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIPasteConfiguration.rs b/crates/icrate-generated/src/UIKit/generated/UIPasteConfiguration.rs new file mode 100644 index 000000000..be85db665 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIPasteConfiguration.rs @@ -0,0 +1,39 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIPasteConfiguration; + + unsafe impl ClassType for UIPasteConfiguration { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIPasteConfiguration { + #[method_id(@__retain_semantics Other acceptableTypeIdentifiers)] + pub unsafe fn acceptableTypeIdentifiers(&self, ) -> Id, Shared>; + + #[method(setAcceptableTypeIdentifiers:)] + pub unsafe fn setAcceptableTypeIdentifiers(&self, acceptableTypeIdentifiers: &NSArray,); + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics Init initWithAcceptableTypeIdentifiers:)] + pub unsafe fn initWithAcceptableTypeIdentifiers(this: Option>, acceptableTypeIdentifiers: &NSArray,) -> Id; + + #[method(addAcceptableTypeIdentifiers:)] + pub unsafe fn addAcceptableTypeIdentifiers(&self, acceptableTypeIdentifiers: &NSArray,); + + #[method_id(@__retain_semantics Init initWithTypeIdentifiersForAcceptingClass:)] + pub unsafe fn initWithTypeIdentifiersForAcceptingClass(this: Option>, aClass: NonNull,) -> Id; + + #[method(addTypeIdentifiersForAcceptingClass:)] + pub unsafe fn addTypeIdentifiersForAcceptingClass(&self, aClass: NonNull,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIPasteConfigurationSupporting.rs b/crates/icrate-generated/src/UIKit/generated/UIPasteConfigurationSupporting.rs new file mode 100644 index 000000000..900f98320 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIPasteConfigurationSupporting.rs @@ -0,0 +1,25 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_protocol!( + pub struct UIPasteConfigurationSupporting; + + unsafe impl UIPasteConfigurationSupporting { + #[method_id(@__retain_semantics Other pasteConfiguration)] + pub unsafe fn pasteConfiguration(&self, ) -> Option>; + + #[method(setPasteConfiguration:)] + pub unsafe fn setPasteConfiguration(&self, pasteConfiguration: Option<&UIPasteConfiguration>,); + + #[optional] + #[method(pasteItemProviders:)] + pub unsafe fn pasteItemProviders(&self, itemProviders: &NSArray,); + + #[optional] + #[method(canPasteItemProviders:)] + pub unsafe fn canPasteItemProviders(&self, itemProviders: &NSArray,) -> bool; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIPasteControl.rs b/crates/icrate-generated/src/UIKit/generated/UIPasteControl.rs new file mode 100644 index 000000000..5dbdef60b --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIPasteControl.rs @@ -0,0 +1,89 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSUInteger)] + pub enum UIPasteControlDisplayMode { + UIPasteControlDisplayModeIconAndLabel = 0, + UIPasteControlDisplayModeIconOnly = 1, + UIPasteControlDisplayModeLabelOnly = 2, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIPasteControlConfiguration; + + unsafe impl ClassType for UIPasteControlConfiguration { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIPasteControlConfiguration { + #[method(displayMode)] + pub unsafe fn displayMode(&self, ) -> UIPasteControlDisplayMode; + + #[method(setDisplayMode:)] + pub unsafe fn setDisplayMode(&self, displayMode: UIPasteControlDisplayMode,); + + #[method(cornerStyle)] + pub unsafe fn cornerStyle(&self, ) -> UIButtonConfigurationCornerStyle; + + #[method(setCornerStyle:)] + pub unsafe fn setCornerStyle(&self, cornerStyle: UIButtonConfigurationCornerStyle,); + + #[method(cornerRadius)] + pub unsafe fn cornerRadius(&self, ) -> CGFloat; + + #[method(setCornerRadius:)] + pub unsafe fn setCornerRadius(&self, cornerRadius: CGFloat,); + + #[method_id(@__retain_semantics Other baseForegroundColor)] + pub unsafe fn baseForegroundColor(&self, ) -> Option>; + + #[method(setBaseForegroundColor:)] + pub unsafe fn setBaseForegroundColor(&self, baseForegroundColor: Option<&UIColor>,); + + #[method_id(@__retain_semantics Other baseBackgroundColor)] + pub unsafe fn baseBackgroundColor(&self, ) -> Option>; + + #[method(setBaseBackgroundColor:)] + pub unsafe fn setBaseBackgroundColor(&self, baseBackgroundColor: Option<&UIColor>,); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIPasteControl; + + unsafe impl ClassType for UIPasteControl { + type Super = UIControl; + } +); + +extern_methods!( + unsafe impl UIPasteControl { + #[method_id(@__retain_semantics Other configuration)] + pub unsafe fn configuration(&self, ) -> Id; + + #[method_id(@__retain_semantics Other target)] + pub unsafe fn target(&self, ) -> Option>; + + #[method(setTarget:)] + pub unsafe fn setTarget(&self, target: Option<&UIPasteConfigurationSupporting>,); + + #[method_id(@__retain_semantics Init initWithConfiguration:)] + pub unsafe fn initWithConfiguration(this: Option>, configuration: &UIPasteControlConfiguration,) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method_id(@__retain_semantics Init initWithFrame:)] + pub unsafe fn initWithFrame(this: Option>, frame: CGRect,) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIPasteboard.rs b/crates/icrate-generated/src/UIKit/generated/UIPasteboard.rs new file mode 100644 index 000000000..515ecc386 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIPasteboard.rs @@ -0,0 +1,231 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +pub type UIPasteboardName = NSString; + +extern_static!(UIPasteboardNameGeneral: &'static UIPasteboardName); + +extern_static!(UIPasteboardNameFind: &'static NSString); + +pub type UIPasteboardDetectionPattern = NSString; + +extern_static!(UIPasteboardDetectionPatternProbableWebURL: &'static UIPasteboardDetectionPattern); + +extern_static!(UIPasteboardDetectionPatternProbableWebSearch: &'static UIPasteboardDetectionPattern); + +extern_static!(UIPasteboardDetectionPatternNumber: &'static UIPasteboardDetectionPattern); + +extern_static!(UIPasteboardDetectionPatternLink: &'static UIPasteboardDetectionPattern); + +extern_static!(UIPasteboardDetectionPatternPhoneNumber: &'static UIPasteboardDetectionPattern); + +extern_static!(UIPasteboardDetectionPatternEmailAddress: &'static UIPasteboardDetectionPattern); + +extern_static!(UIPasteboardDetectionPatternPostalAddress: &'static UIPasteboardDetectionPattern); + +extern_static!(UIPasteboardDetectionPatternCalendarEvent: &'static UIPasteboardDetectionPattern); + +extern_static!(UIPasteboardDetectionPatternShipmentTrackingNumber: &'static UIPasteboardDetectionPattern); + +extern_static!(UIPasteboardDetectionPatternFlightNumber: &'static UIPasteboardDetectionPattern); + +extern_static!(UIPasteboardDetectionPatternMoneyAmount: &'static UIPasteboardDetectionPattern); + +pub type UIPasteboardOption = NSString; + +extern_static!(UIPasteboardOptionExpirationDate: &'static UIPasteboardOption); + +extern_static!(UIPasteboardOptionLocalOnly: &'static UIPasteboardOption); + +extern_class!( + #[derive(Debug)] + pub struct UIPasteboard; + + unsafe impl ClassType for UIPasteboard { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIPasteboard { + #[method_id(@__retain_semantics Other generalPasteboard)] + pub unsafe fn generalPasteboard() -> Id; + + #[method_id(@__retain_semantics Other pasteboardWithName:create:)] + pub unsafe fn pasteboardWithName_create(pasteboardName: &UIPasteboardName,create: bool,) -> Option>; + + #[method_id(@__retain_semantics Other pasteboardWithUniqueName)] + pub unsafe fn pasteboardWithUniqueName() -> Id; + + #[method_id(@__retain_semantics Other name)] + pub unsafe fn name(&self, ) -> Id; + + #[method(removePasteboardWithName:)] + pub unsafe fn removePasteboardWithName(pasteboardName: &UIPasteboardName,); + + #[method(isPersistent)] + pub unsafe fn isPersistent(&self, ) -> bool; + + #[method(setPersistent:)] + pub unsafe fn setPersistent(&self, persistent: bool,); + + #[method(changeCount)] + pub unsafe fn changeCount(&self, ) -> NSInteger; + + #[method_id(@__retain_semantics Other itemProviders)] + pub unsafe fn itemProviders(&self, ) -> Id, Shared>; + + #[method(setItemProviders:)] + pub unsafe fn setItemProviders(&self, itemProviders: &NSArray,); + + #[method(setItemProviders:localOnly:expirationDate:)] + pub unsafe fn setItemProviders_localOnly_expirationDate(&self, itemProviders: &NSArray,localOnly: bool,expirationDate: Option<&NSDate>,); + + #[method(setObjects:)] + pub unsafe fn setObjects(&self, objects: &NSArray,); + + #[method(setObjects:localOnly:expirationDate:)] + pub unsafe fn setObjects_localOnly_expirationDate(&self, objects: &NSArray,localOnly: bool,expirationDate: Option<&NSDate>,); + + #[method_id(@__retain_semantics Other pasteboardTypes)] + pub unsafe fn pasteboardTypes(&self, ) -> Id, Shared>; + + #[method(containsPasteboardTypes:)] + pub unsafe fn containsPasteboardTypes(&self, pasteboardTypes: &NSArray,) -> bool; + + #[method_id(@__retain_semantics Other dataForPasteboardType:)] + pub unsafe fn dataForPasteboardType(&self, pasteboardType: &NSString,) -> Option>; + + #[method_id(@__retain_semantics Other valueForPasteboardType:)] + pub unsafe fn valueForPasteboardType(&self, pasteboardType: &NSString,) -> Option>; + + #[method(setValue:forPasteboardType:)] + pub unsafe fn setValue_forPasteboardType(&self, value: &Object,pasteboardType: &NSString,); + + #[method(setData:forPasteboardType:)] + pub unsafe fn setData_forPasteboardType(&self, data: &NSData,pasteboardType: &NSString,); + + #[method(numberOfItems)] + pub unsafe fn numberOfItems(&self, ) -> NSInteger; + + #[method_id(@__retain_semantics Other pasteboardTypesForItemSet:)] + pub unsafe fn pasteboardTypesForItemSet(&self, itemSet: Option<&NSIndexSet>,) -> Option,>, Shared>>; + + #[method(containsPasteboardTypes:inItemSet:)] + pub unsafe fn containsPasteboardTypes_inItemSet(&self, pasteboardTypes: &NSArray,itemSet: Option<&NSIndexSet>,) -> bool; + + #[method_id(@__retain_semantics Other itemSetWithPasteboardTypes:)] + pub unsafe fn itemSetWithPasteboardTypes(&self, pasteboardTypes: &NSArray,) -> Option>; + + #[method_id(@__retain_semantics Other valuesForPasteboardType:inItemSet:)] + pub unsafe fn valuesForPasteboardType_inItemSet(&self, pasteboardType: &NSString,itemSet: Option<&NSIndexSet>,) -> Option>; + + #[method_id(@__retain_semantics Other dataForPasteboardType:inItemSet:)] + pub unsafe fn dataForPasteboardType_inItemSet(&self, pasteboardType: &NSString,itemSet: Option<&NSIndexSet>,) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other items)] + pub unsafe fn items(&self, ) -> Id,>, Shared>; + + #[method(setItems:)] + pub unsafe fn setItems(&self, items: &NSArray,>,); + + #[method(addItems:)] + pub unsafe fn addItems(&self, items: &NSArray,>,); + + #[method(setItems:options:)] + pub unsafe fn setItems_options(&self, items: &NSArray,>,options: &NSDictionary,); + + #[method_id(@__retain_semantics Other string)] + pub unsafe fn string(&self, ) -> Option>; + + #[method(setString:)] + pub unsafe fn setString(&self, string: Option<&NSString>,); + + #[method_id(@__retain_semantics Other strings)] + pub unsafe fn strings(&self, ) -> Option, Shared>>; + + #[method(setStrings:)] + pub unsafe fn setStrings(&self, strings: Option<&NSArray>,); + + #[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 URLs)] + pub unsafe fn URLs(&self, ) -> Option, Shared>>; + + #[method(setURLs:)] + pub unsafe fn setURLs(&self, URLs: Option<&NSArray>,); + + #[method_id(@__retain_semantics Other image)] + pub unsafe fn image(&self, ) -> Option>; + + #[method(setImage:)] + pub unsafe fn setImage(&self, image: Option<&UIImage>,); + + #[method_id(@__retain_semantics Other images)] + pub unsafe fn images(&self, ) -> Option, Shared>>; + + #[method(setImages:)] + pub unsafe fn setImages(&self, images: Option<&NSArray>,); + + #[method_id(@__retain_semantics Other color)] + pub unsafe fn color(&self, ) -> Option>; + + #[method(setColor:)] + pub unsafe fn setColor(&self, color: Option<&UIColor>,); + + #[method_id(@__retain_semantics Other colors)] + pub unsafe fn colors(&self, ) -> Option, Shared>>; + + #[method(setColors:)] + pub unsafe fn setColors(&self, colors: Option<&NSArray>,); + + #[method(hasStrings)] + pub unsafe fn hasStrings(&self, ) -> bool; + + #[method(hasURLs)] + pub unsafe fn hasURLs(&self, ) -> bool; + + #[method(hasImages)] + pub unsafe fn hasImages(&self, ) -> bool; + + #[method(hasColors)] + pub unsafe fn hasColors(&self, ) -> bool; + + #[method(detectPatternsForPatterns:completionHandler:)] + pub unsafe fn detectPatternsForPatterns_completionHandler(&self, patterns: &NSSet,completionHandler: &Block<(*mut NSSet, *mut NSError, ), ()>,); + + #[method(detectPatternsForPatterns:inItemSet:completionHandler:)] + pub unsafe fn detectPatternsForPatterns_inItemSet_completionHandler(&self, patterns: &NSSet,itemSet: Option<&NSIndexSet>,completionHandler: &Block<(*mut NSArray,>, *mut NSError, ), ()>,); + + #[method(detectValuesForPatterns:completionHandler:)] + pub unsafe fn detectValuesForPatterns_completionHandler(&self, patterns: &NSSet,completionHandler: &Block<(*mut NSDictionary, *mut NSError, ), ()>,); + + #[method(detectValuesForPatterns:inItemSet:completionHandler:)] + pub unsafe fn detectValuesForPatterns_inItemSet_completionHandler(&self, patterns: &NSSet,itemSet: Option<&NSIndexSet>,completionHandler: &Block<(*mut NSArray,>, *mut NSError, ), ()>,); + + } +); + +extern_static!(UIPasteboardChangedNotification: &'static NSNotificationName); + +extern_static!(UIPasteboardChangedTypesAddedKey: &'static NSString); + +extern_static!(UIPasteboardChangedTypesRemovedKey: &'static NSString); + +extern_static!(UIPasteboardRemovedNotification: &'static NSNotificationName); + +extern_static!(UIPasteboardTypeListString: &'static NSArray); + +extern_static!(UIPasteboardTypeListURL: &'static NSArray); + +extern_static!(UIPasteboardTypeListImage: &'static NSArray); + +extern_static!(UIPasteboardTypeListColor: &'static NSArray); + +extern_static!(UIPasteboardTypeAutomatic: &'static NSString); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIPencilInteraction.rs b/crates/icrate-generated/src/UIKit/generated/UIPencilInteraction.rs new file mode 100644 index 000000000..ada5d2a1f --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIPencilInteraction.rs @@ -0,0 +1,58 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIPencilPreferredAction { + UIPencilPreferredActionIgnore = 0, + UIPencilPreferredActionSwitchEraser = 1, + UIPencilPreferredActionSwitchPrevious = 2, + UIPencilPreferredActionShowColorPalette = 3, + UIPencilPreferredActionShowInkAttributes = 4, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIPencilInteraction; + + unsafe impl ClassType for UIPencilInteraction { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIPencilInteraction { + #[method(preferredTapAction)] + pub unsafe fn preferredTapAction() -> UIPencilPreferredAction; + + #[method(prefersPencilOnlyDrawing)] + pub unsafe fn prefersPencilOnlyDrawing() -> bool; + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&UIPencilInteractionDelegate>,); + + #[method(isEnabled)] + pub unsafe fn isEnabled(&self, ) -> bool; + + #[method(setEnabled:)] + pub unsafe fn setEnabled(&self, enabled: bool,); + + } +); + +extern_protocol!( + pub struct UIPencilInteractionDelegate; + + unsafe impl UIPencilInteractionDelegate { + #[optional] + #[method(pencilInteractionDidTap:)] + pub unsafe fn pencilInteractionDidTap(&self, interaction: &UIPencilInteraction,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIPickerView.rs b/crates/icrate-generated/src/UIKit/generated/UIPickerView.rs new file mode 100644 index 000000000..5d3568ab0 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIPickerView.rs @@ -0,0 +1,104 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIPickerView; + + unsafe impl ClassType for UIPickerView { + type Super = UIView; + } +); + +extern_methods!( + unsafe impl UIPickerView { + #[method_id(@__retain_semantics Other dataSource)] + pub unsafe fn dataSource(&self, ) -> Option>; + + #[method(setDataSource:)] + pub unsafe fn setDataSource(&self, dataSource: Option<&UIPickerViewDataSource>,); + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&UIPickerViewDelegate>,); + + #[method(showsSelectionIndicator)] + pub unsafe fn showsSelectionIndicator(&self, ) -> bool; + + #[method(setShowsSelectionIndicator:)] + pub unsafe fn setShowsSelectionIndicator(&self, showsSelectionIndicator: bool,); + + #[method(numberOfComponents)] + pub unsafe fn numberOfComponents(&self, ) -> NSInteger; + + #[method(numberOfRowsInComponent:)] + pub unsafe fn numberOfRowsInComponent(&self, component: NSInteger,) -> NSInteger; + + #[method(rowSizeForComponent:)] + pub unsafe fn rowSizeForComponent(&self, component: NSInteger,) -> CGSize; + + #[method_id(@__retain_semantics Other viewForRow:forComponent:)] + pub unsafe fn viewForRow_forComponent(&self, row: NSInteger,component: NSInteger,) -> Option>; + + #[method(reloadAllComponents)] + pub unsafe fn reloadAllComponents(&self, ); + + #[method(reloadComponent:)] + pub unsafe fn reloadComponent(&self, component: NSInteger,); + + #[method(selectRow:inComponent:animated:)] + pub unsafe fn selectRow_inComponent_animated(&self, row: NSInteger,component: NSInteger,animated: bool,); + + #[method(selectedRowInComponent:)] + pub unsafe fn selectedRowInComponent(&self, component: NSInteger,) -> NSInteger; + + } +); + +extern_protocol!( + pub struct UIPickerViewDataSource; + + unsafe impl UIPickerViewDataSource { + #[method(numberOfComponentsInPickerView:)] + pub unsafe fn numberOfComponentsInPickerView(&self, pickerView: &UIPickerView,) -> NSInteger; + + #[method(pickerView:numberOfRowsInComponent:)] + pub unsafe fn pickerView_numberOfRowsInComponent(&self, pickerView: &UIPickerView,component: NSInteger,) -> NSInteger; + + } +); + +extern_protocol!( + pub struct UIPickerViewDelegate; + + unsafe impl UIPickerViewDelegate { + #[optional] + #[method(pickerView:widthForComponent:)] + pub unsafe fn pickerView_widthForComponent(&self, pickerView: &UIPickerView,component: NSInteger,) -> CGFloat; + + #[optional] + #[method(pickerView:rowHeightForComponent:)] + pub unsafe fn pickerView_rowHeightForComponent(&self, pickerView: &UIPickerView,component: NSInteger,) -> CGFloat; + + #[optional] + #[method_id(@__retain_semantics Other pickerView:titleForRow:forComponent:)] + pub unsafe fn pickerView_titleForRow_forComponent(&self, pickerView: &UIPickerView,row: NSInteger,component: NSInteger,) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other pickerView:attributedTitleForRow:forComponent:)] + pub unsafe fn pickerView_attributedTitleForRow_forComponent(&self, pickerView: &UIPickerView,row: NSInteger,component: NSInteger,) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other pickerView:viewForRow:forComponent:reusingView:)] + pub unsafe fn pickerView_viewForRow_forComponent_reusingView(&self, pickerView: &UIPickerView,row: NSInteger,component: NSInteger,view: Option<&UIView>,) -> Id; + + #[optional] + #[method(pickerView:didSelectRow:inComponent:)] + pub unsafe fn pickerView_didSelectRow_inComponent(&self, pickerView: &UIPickerView,row: NSInteger,component: NSInteger,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIPinchGestureRecognizer.rs b/crates/icrate-generated/src/UIKit/generated/UIPinchGestureRecognizer.rs new file mode 100644 index 000000000..c2112c9b1 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIPinchGestureRecognizer.rs @@ -0,0 +1,27 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIPinchGestureRecognizer; + + unsafe impl ClassType for UIPinchGestureRecognizer { + type Super = UIGestureRecognizer; + } +); + +extern_methods!( + unsafe impl UIPinchGestureRecognizer { + #[method(scale)] + pub unsafe fn scale(&self, ) -> CGFloat; + + #[method(setScale:)] + pub unsafe fn setScale(&self, scale: CGFloat,); + + #[method(velocity)] + pub unsafe fn velocity(&self, ) -> CGFloat; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIPointerAccessory.rs b/crates/icrate-generated/src/UIKit/generated/UIPointerAccessory.rs new file mode 100644 index 000000000..d86496742 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIPointerAccessory.rs @@ -0,0 +1,71 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_struct!( + pub struct UIPointerAccessoryPosition { + pub offset: CGFloat, + pub angle: CGFloat, + } +); + +inline_fn!( + pub unsafe fn UIPointerAccessoryPositionMake(offset: CGFloat,angle: CGFloat,) -> UIPointerAccessoryPosition { + todo!() + } +); + +extern_static!(UIPointerAccessoryPositionTop: UIPointerAccessoryPosition); + +extern_static!(UIPointerAccessoryPositionTopRight: UIPointerAccessoryPosition); + +extern_static!(UIPointerAccessoryPositionRight: UIPointerAccessoryPosition); + +extern_static!(UIPointerAccessoryPositionBottomRight: UIPointerAccessoryPosition); + +extern_static!(UIPointerAccessoryPositionBottom: UIPointerAccessoryPosition); + +extern_static!(UIPointerAccessoryPositionBottomLeft: UIPointerAccessoryPosition); + +extern_static!(UIPointerAccessoryPositionLeft: UIPointerAccessoryPosition); + +extern_static!(UIPointerAccessoryPositionTopLeft: UIPointerAccessoryPosition); + +extern_class!( + #[derive(Debug)] + pub struct UIPointerAccessory; + + unsafe impl ClassType for UIPointerAccessory { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIPointerAccessory { + #[method_id(@__retain_semantics Other shape)] + pub unsafe fn shape(&self, ) -> Id; + + #[method(position)] + pub unsafe fn position(&self, ) -> UIPointerAccessoryPosition; + + #[method(orientationMatchesAngle)] + pub unsafe fn orientationMatchesAngle(&self, ) -> bool; + + #[method(setOrientationMatchesAngle:)] + pub unsafe fn setOrientationMatchesAngle(&self, orientationMatchesAngle: bool,); + + #[method_id(@__retain_semantics Other accessoryWithShape:position:)] + pub unsafe fn accessoryWithShape_position(shape: &UIPointerShape,position: UIPointerAccessoryPosition,) -> Id; + + #[method_id(@__retain_semantics Other arrowAccessoryWithPosition:)] + pub unsafe fn arrowAccessoryWithPosition(position: UIPointerAccessoryPosition,) -> 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-generated/src/UIKit/generated/UIPointerInteraction.rs b/crates/icrate-generated/src/UIKit/generated/UIPointerInteraction.rs new file mode 100644 index 000000000..06ff367b8 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIPointerInteraction.rs @@ -0,0 +1,89 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIPointerInteraction; + + unsafe impl ClassType for UIPointerInteraction { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIPointerInteraction { + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(isEnabled)] + pub unsafe fn isEnabled(&self, ) -> bool; + + #[method(setEnabled:)] + pub unsafe fn setEnabled(&self, enabled: bool,); + + #[method_id(@__retain_semantics Init initWithDelegate:)] + pub unsafe fn initWithDelegate(this: Option>, delegate: Option<&UIPointerInteractionDelegate>,) -> Id; + + #[method(invalidate)] + pub unsafe fn invalidate(&self, ); + + } +); + +extern_protocol!( + pub struct UIPointerInteractionDelegate; + + unsafe impl UIPointerInteractionDelegate { + #[optional] + #[method_id(@__retain_semantics Other pointerInteraction:regionForRequest:defaultRegion:)] + pub unsafe fn pointerInteraction_regionForRequest_defaultRegion(&self, interaction: &UIPointerInteraction,request: &UIPointerRegionRequest,defaultRegion: &UIPointerRegion,) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other pointerInteraction:styleForRegion:)] + pub unsafe fn pointerInteraction_styleForRegion(&self, interaction: &UIPointerInteraction,region: &UIPointerRegion,) -> Option>; + + #[optional] + #[method(pointerInteraction:willEnterRegion:animator:)] + pub unsafe fn pointerInteraction_willEnterRegion_animator(&self, interaction: &UIPointerInteraction,region: &UIPointerRegion,animator: &UIPointerInteractionAnimating,); + + #[optional] + #[method(pointerInteraction:willExitRegion:animator:)] + pub unsafe fn pointerInteraction_willExitRegion_animator(&self, interaction: &UIPointerInteraction,region: &UIPointerRegion,animator: &UIPointerInteractionAnimating,); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIPointerRegionRequest; + + unsafe impl ClassType for UIPointerRegionRequest { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIPointerRegionRequest { + #[method(location)] + pub unsafe fn location(&self, ) -> CGPoint; + + #[method(modifiers)] + pub unsafe fn modifiers(&self, ) -> UIKeyModifierFlags; + + } +); + +extern_protocol!( + pub struct UIPointerInteractionAnimating; + + unsafe impl UIPointerInteractionAnimating { + #[method(addAnimations:)] + pub unsafe fn addAnimations(&self, animations: &Block<(), ()>,); + + #[method(addCompletion:)] + pub unsafe fn addCompletion(&self, completion: &Block<(Bool, ), ()>,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIPointerLockState.rs b/crates/icrate-generated/src/UIKit/generated/UIPointerLockState.rs new file mode 100644 index 000000000..5551736d6 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIPointerLockState.rs @@ -0,0 +1,40 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIPointerLockState; + + unsafe impl ClassType for UIPointerLockState { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIPointerLockState { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics New new)] + pub unsafe fn new() -> Id; + + #[method(isLocked)] + pub unsafe fn isLocked(&self, ) -> bool; + + } +); + +extern_methods!( + /// PointerLockState + unsafe impl UIScene { + #[method_id(@__retain_semantics Other pointerLockState)] + pub unsafe fn pointerLockState(&self, ) -> Option>; + + } +); + +extern_static!(UIPointerLockStateDidChangeNotification: &'static NSNotificationName); + +extern_static!(UIPointerLockStateSceneUserInfoKey: &'static NSString); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIPointerRegion.rs b/crates/icrate-generated/src/UIKit/generated/UIPointerRegion.rs new file mode 100644 index 000000000..344b142d6 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIPointerRegion.rs @@ -0,0 +1,39 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIPointerRegion; + + unsafe impl ClassType for UIPointerRegion { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIPointerRegion { + #[method(rect)] + pub unsafe fn rect(&self, ) -> CGRect; + + #[method_id(@__retain_semantics Other identifier)] + pub unsafe fn identifier(&self, ) -> Option>; + + #[method(latchingAxes)] + pub unsafe fn latchingAxes(&self, ) -> UIAxis; + + #[method(setLatchingAxes:)] + pub unsafe fn setLatchingAxes(&self, latchingAxes: UIAxis,); + + #[method_id(@__retain_semantics Other regionWithRect:identifier:)] + pub unsafe fn regionWithRect_identifier(rect: CGRect,identifier: Option<&NSObject>,) -> 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-generated/src/UIKit/generated/UIPointerStyle.rs b/crates/icrate-generated/src/UIKit/generated/UIPointerStyle.rs new file mode 100644 index 000000000..c04028f39 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIPointerStyle.rs @@ -0,0 +1,169 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIPointerStyle; + + unsafe impl ClassType for UIPointerStyle { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIPointerStyle { + #[method_id(@__retain_semantics Other accessories)] + pub unsafe fn accessories(&self, ) -> Id, Shared>; + + #[method(setAccessories:)] + pub unsafe fn setAccessories(&self, accessories: &NSArray,); + + #[method_id(@__retain_semantics Other styleWithEffect:shape:)] + pub unsafe fn styleWithEffect_shape(effect: &UIPointerEffect,shape: Option<&UIPointerShape>,) -> Id; + + #[method_id(@__retain_semantics Other styleWithShape:constrainedAxes:)] + pub unsafe fn styleWithShape_constrainedAxes(shape: &UIPointerShape,axes: UIAxis,) -> Id; + + #[method_id(@__retain_semantics Other hiddenPointerStyle)] + pub unsafe fn hiddenPointerStyle() -> Id; + + #[method_id(@__retain_semantics Other systemPointerStyle)] + pub unsafe fn systemPointerStyle() -> 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; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIPointerEffect; + + unsafe impl ClassType for UIPointerEffect { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIPointerEffect { + #[method_id(@__retain_semantics Other preview)] + pub unsafe fn preview(&self, ) -> Id; + + #[method_id(@__retain_semantics Other effectWithPreview:)] + pub unsafe fn effectWithPreview(preview: &UITargetedPreview,) -> 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; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIPointerHighlightEffect; + + unsafe impl ClassType for UIPointerHighlightEffect { + type Super = UIPointerEffect; + } +); + +extern_methods!( + unsafe impl UIPointerHighlightEffect { + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIPointerLiftEffect; + + unsafe impl ClassType for UIPointerLiftEffect { + type Super = UIPointerEffect; + } +); + +extern_methods!( + unsafe impl UIPointerLiftEffect { + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIPointerEffectTintMode { + UIPointerEffectTintModeNone = 0, + UIPointerEffectTintModeOverlay = 1, + UIPointerEffectTintModeUnderlay = 2, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIPointerHoverEffect; + + unsafe impl ClassType for UIPointerHoverEffect { + type Super = UIPointerEffect; + } +); + +extern_methods!( + unsafe impl UIPointerHoverEffect { + #[method(preferredTintMode)] + pub unsafe fn preferredTintMode(&self, ) -> UIPointerEffectTintMode; + + #[method(setPreferredTintMode:)] + pub unsafe fn setPreferredTintMode(&self, preferredTintMode: UIPointerEffectTintMode,); + + #[method(prefersShadow)] + pub unsafe fn prefersShadow(&self, ) -> bool; + + #[method(setPrefersShadow:)] + pub unsafe fn setPrefersShadow(&self, prefersShadow: bool,); + + #[method(prefersScaledContent)] + pub unsafe fn prefersScaledContent(&self, ) -> bool; + + #[method(setPrefersScaledContent:)] + pub unsafe fn setPrefersScaledContent(&self, prefersScaledContent: bool,); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIPointerShape; + + unsafe impl ClassType for UIPointerShape { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIPointerShape { + #[method_id(@__retain_semantics Other shapeWithPath:)] + pub unsafe fn shapeWithPath(path: &UIBezierPath,) -> Id; + + #[method_id(@__retain_semantics Other shapeWithRoundedRect:)] + pub unsafe fn shapeWithRoundedRect(rect: CGRect,) -> Id; + + #[method_id(@__retain_semantics Other shapeWithRoundedRect:cornerRadius:)] + pub unsafe fn shapeWithRoundedRect_cornerRadius(rect: CGRect,cornerRadius: CGFloat,) -> Id; + + #[method_id(@__retain_semantics Other beamWithPreferredLength:axis:)] + pub unsafe fn beamWithPreferredLength_axis(length: CGFloat,axis: UIAxis,) -> 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-generated/src/UIKit/generated/UIPopoverBackgroundView.rs b/crates/icrate-generated/src/UIKit/generated/UIPopoverBackgroundView.rs new file mode 100644 index 000000000..6a8b5c44b --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIPopoverBackgroundView.rs @@ -0,0 +1,49 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_protocol!( + pub struct UIPopoverBackgroundViewMethods; + + unsafe impl UIPopoverBackgroundViewMethods { + #[method(arrowBase)] + pub unsafe fn arrowBase() -> CGFloat; + + #[method(contentViewInsets)] + pub unsafe fn contentViewInsets() -> UIEdgeInsets; + + #[method(arrowHeight)] + pub unsafe fn arrowHeight() -> CGFloat; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIPopoverBackgroundView; + + unsafe impl ClassType for UIPopoverBackgroundView { + type Super = UIView; + } +); + +extern_methods!( + unsafe impl UIPopoverBackgroundView { + #[method(arrowOffset)] + pub unsafe fn arrowOffset(&self, ) -> CGFloat; + + #[method(setArrowOffset:)] + pub unsafe fn setArrowOffset(&self, arrowOffset: CGFloat,); + + #[method(arrowDirection)] + pub unsafe fn arrowDirection(&self, ) -> UIPopoverArrowDirection; + + #[method(setArrowDirection:)] + pub unsafe fn setArrowDirection(&self, arrowDirection: UIPopoverArrowDirection,); + + #[method(wantsDefaultContentAppearance)] + pub unsafe fn wantsDefaultContentAppearance() -> bool; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIPopoverController.rs b/crates/icrate-generated/src/UIKit/generated/UIPopoverController.rs new file mode 100644 index 000000000..c03278f6a --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIPopoverController.rs @@ -0,0 +1,103 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIPopoverController; + + unsafe impl ClassType for UIPopoverController { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIPopoverController { + #[method_id(@__retain_semantics Init initWithContentViewController:)] + pub unsafe fn initWithContentViewController(this: Option>, viewController: &UIViewController,) -> Id; + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&UIPopoverControllerDelegate>,); + + #[method_id(@__retain_semantics Other contentViewController)] + pub unsafe fn contentViewController(&self, ) -> Id; + + #[method(setContentViewController:)] + pub unsafe fn setContentViewController(&self, contentViewController: &UIViewController,); + + #[method(setContentViewController:animated:)] + pub unsafe fn setContentViewController_animated(&self, viewController: &UIViewController,animated: bool,); + + #[method(popoverContentSize)] + pub unsafe fn popoverContentSize(&self, ) -> CGSize; + + #[method(setPopoverContentSize:)] + pub unsafe fn setPopoverContentSize(&self, popoverContentSize: CGSize,); + + #[method(setPopoverContentSize:animated:)] + pub unsafe fn setPopoverContentSize_animated(&self, size: CGSize,animated: bool,); + + #[method(isPopoverVisible)] + pub unsafe fn isPopoverVisible(&self, ) -> bool; + + #[method(popoverArrowDirection)] + pub unsafe fn popoverArrowDirection(&self, ) -> UIPopoverArrowDirection; + + #[method_id(@__retain_semantics Other passthroughViews)] + pub unsafe fn passthroughViews(&self, ) -> Option, Shared>>; + + #[method(setPassthroughViews:)] + pub unsafe fn setPassthroughViews(&self, passthroughViews: Option<&NSArray>,); + + #[method(presentPopoverFromRect:inView:permittedArrowDirections:animated:)] + pub unsafe fn presentPopoverFromRect_inView_permittedArrowDirections_animated(&self, rect: CGRect,view: &UIView,arrowDirections: UIPopoverArrowDirection,animated: bool,); + + #[method(presentPopoverFromBarButtonItem:permittedArrowDirections:animated:)] + pub unsafe fn presentPopoverFromBarButtonItem_permittedArrowDirections_animated(&self, item: &UIBarButtonItem,arrowDirections: UIPopoverArrowDirection,animated: bool,); + + #[method(dismissPopoverAnimated:)] + pub unsafe fn dismissPopoverAnimated(&self, animated: bool,); + + #[method_id(@__retain_semantics Other backgroundColor)] + pub unsafe fn backgroundColor(&self, ) -> Option>; + + #[method(setBackgroundColor:)] + pub unsafe fn setBackgroundColor(&self, backgroundColor: Option<&UIColor>,); + + #[method(popoverLayoutMargins)] + pub unsafe fn popoverLayoutMargins(&self, ) -> UIEdgeInsets; + + #[method(setPopoverLayoutMargins:)] + pub unsafe fn setPopoverLayoutMargins(&self, popoverLayoutMargins: UIEdgeInsets,); + + #[method(popoverBackgroundViewClass)] + pub unsafe fn popoverBackgroundViewClass(&self, ) -> Option<&'static Class>; + + #[method(setPopoverBackgroundViewClass:)] + pub unsafe fn setPopoverBackgroundViewClass(&self, popoverBackgroundViewClass: Option<&Class>,); + + } +); + +extern_protocol!( + pub struct UIPopoverControllerDelegate; + + unsafe impl UIPopoverControllerDelegate { + #[optional] + #[method(popoverControllerShouldDismissPopover:)] + pub unsafe fn popoverControllerShouldDismissPopover(&self, popoverController: &UIPopoverController,) -> bool; + + #[optional] + #[method(popoverControllerDidDismissPopover:)] + pub unsafe fn popoverControllerDidDismissPopover(&self, popoverController: &UIPopoverController,); + + #[optional] + #[method(popoverController:willRepositionPopoverToRect:inView:)] + pub unsafe fn popoverController_willRepositionPopoverToRect_inView(&self, popoverController: &UIPopoverController,rect: NonNull,view: NonNull>,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIPopoverPresentationController.rs b/crates/icrate-generated/src/UIKit/generated/UIPopoverPresentationController.rs new file mode 100644 index 000000000..812fd59f5 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIPopoverPresentationController.rs @@ -0,0 +1,113 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_protocol!( + pub struct UIPopoverPresentationControllerDelegate; + + unsafe impl UIPopoverPresentationControllerDelegate { + #[optional] + #[method(prepareForPopoverPresentation:)] + pub unsafe fn prepareForPopoverPresentation(&self, popoverPresentationController: &UIPopoverPresentationController,); + + #[optional] + #[method(popoverPresentationControllerShouldDismissPopover:)] + pub unsafe fn popoverPresentationControllerShouldDismissPopover(&self, popoverPresentationController: &UIPopoverPresentationController,) -> bool; + + #[optional] + #[method(popoverPresentationControllerDidDismissPopover:)] + pub unsafe fn popoverPresentationControllerDidDismissPopover(&self, popoverPresentationController: &UIPopoverPresentationController,); + + #[optional] + #[method(popoverPresentationController:willRepositionPopoverToRect:inView:)] + pub unsafe fn popoverPresentationController_willRepositionPopoverToRect_inView(&self, popoverPresentationController: &UIPopoverPresentationController,rect: NonNull,view: NonNull>,); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIPopoverPresentationController; + + unsafe impl ClassType for UIPopoverPresentationController { + type Super = UIPresentationController; + } +); + +extern_methods!( + unsafe impl UIPopoverPresentationController { + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&UIPopoverPresentationControllerDelegate>,); + + #[method(permittedArrowDirections)] + pub unsafe fn permittedArrowDirections(&self, ) -> UIPopoverArrowDirection; + + #[method(setPermittedArrowDirections:)] + pub unsafe fn setPermittedArrowDirections(&self, permittedArrowDirections: UIPopoverArrowDirection,); + + #[method_id(@__retain_semantics Other sourceView)] + pub unsafe fn sourceView(&self, ) -> Option>; + + #[method(setSourceView:)] + pub unsafe fn setSourceView(&self, sourceView: Option<&UIView>,); + + #[method(sourceRect)] + pub unsafe fn sourceRect(&self, ) -> CGRect; + + #[method(setSourceRect:)] + pub unsafe fn setSourceRect(&self, sourceRect: CGRect,); + + #[method(canOverlapSourceViewRect)] + pub unsafe fn canOverlapSourceViewRect(&self, ) -> bool; + + #[method(setCanOverlapSourceViewRect:)] + pub unsafe fn setCanOverlapSourceViewRect(&self, canOverlapSourceViewRect: bool,); + + #[method_id(@__retain_semantics Other sourceItem)] + pub unsafe fn sourceItem(&self, ) -> Option>; + + #[method(setSourceItem:)] + pub unsafe fn setSourceItem(&self, sourceItem: Option<&UIPopoverPresentationControllerSourceItem>,); + + #[method_id(@__retain_semantics Other barButtonItem)] + pub unsafe fn barButtonItem(&self, ) -> Option>; + + #[method(setBarButtonItem:)] + pub unsafe fn setBarButtonItem(&self, barButtonItem: Option<&UIBarButtonItem>,); + + #[method(arrowDirection)] + pub unsafe fn arrowDirection(&self, ) -> UIPopoverArrowDirection; + + #[method_id(@__retain_semantics Other passthroughViews)] + pub unsafe fn passthroughViews(&self, ) -> Option, Shared>>; + + #[method(setPassthroughViews:)] + pub unsafe fn setPassthroughViews(&self, passthroughViews: Option<&NSArray>,); + + #[method_id(@__retain_semantics Other backgroundColor)] + pub unsafe fn backgroundColor(&self, ) -> Option>; + + #[method(setBackgroundColor:)] + pub unsafe fn setBackgroundColor(&self, backgroundColor: Option<&UIColor>,); + + #[method(popoverLayoutMargins)] + pub unsafe fn popoverLayoutMargins(&self, ) -> UIEdgeInsets; + + #[method(setPopoverLayoutMargins:)] + pub unsafe fn setPopoverLayoutMargins(&self, popoverLayoutMargins: UIEdgeInsets,); + + #[method_id(@__retain_semantics Other popoverBackgroundViewClass)] + pub unsafe fn popoverBackgroundViewClass(&self, ) -> Option>; + + #[method(setPopoverBackgroundViewClass:)] + pub unsafe fn setPopoverBackgroundViewClass(&self, popoverBackgroundViewClass: Option<&TodoProtocols>,); + + #[method_id(@__retain_semantics Other adaptiveSheetPresentationController)] + pub unsafe fn adaptiveSheetPresentationController(&self, ) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIPopoverPresentationControllerSourceItem.rs b/crates/icrate-generated/src/UIKit/generated/UIPopoverPresentationControllerSourceItem.rs new file mode 100644 index 000000000..fb642dd32 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIPopoverPresentationControllerSourceItem.rs @@ -0,0 +1,35 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_protocol!( + pub struct UIPopoverPresentationControllerSourceItem; + + unsafe impl UIPopoverPresentationControllerSourceItem { + } +); + +extern_methods!( + /// UIPopoverPresentationControllerSourceItem + unsafe impl UIView { + } +); + +extern_methods!( + /// UIPopoverPresentationControllerSourceItem + unsafe impl UILayoutGuide { + } +); + +extern_methods!( + /// UIPopoverPresentationControllerSourceItem + unsafe impl UIBarButtonItem { + } +); + +extern_methods!( + /// UIPopoverPresentationControllerSourceItem + unsafe impl UITabBarItem { + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIPopoverSupport.rs b/crates/icrate-generated/src/UIKit/generated/UIPopoverSupport.rs new file mode 100644 index 000000000..ce8170a48 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIPopoverSupport.rs @@ -0,0 +1,34 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_options!( + #[underlying(NSUInteger)] + pub enum UIPopoverArrowDirection { + UIPopoverArrowDirectionUp = 1<<0, + UIPopoverArrowDirectionDown = 1<<1, + UIPopoverArrowDirectionLeft = 1<<2, + UIPopoverArrowDirectionRight = 1<<3, + UIPopoverArrowDirectionAny = UIPopoverArrowDirectionUp|UIPopoverArrowDirectionDown|UIPopoverArrowDirectionLeft|UIPopoverArrowDirectionRight, + UIPopoverArrowDirectionUnknown = 18446744073709551615, + } +); + +extern_methods!( + /// UIPopoverController + unsafe impl UIViewController { + #[method(isModalInPopover)] + pub unsafe fn isModalInPopover(&self, ) -> bool; + + #[method(setModalInPopover:)] + pub unsafe fn setModalInPopover(&self, modalInPopover: bool,); + + #[method(contentSizeForViewInPopover)] + pub unsafe fn contentSizeForViewInPopover(&self, ) -> CGSize; + + #[method(setContentSizeForViewInPopover:)] + pub unsafe fn setContentSizeForViewInPopover(&self, contentSizeForViewInPopover: CGSize,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIPresentationController.rs b/crates/icrate-generated/src/UIKit/generated/UIPresentationController.rs new file mode 100644 index 000000000..0fe9310ad --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIPresentationController.rs @@ -0,0 +1,127 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_protocol!( + pub struct UIAdaptivePresentationControllerDelegate; + + unsafe impl UIAdaptivePresentationControllerDelegate { + #[optional] + #[method(adaptivePresentationStyleForPresentationController:)] + pub unsafe fn adaptivePresentationStyleForPresentationController(&self, controller: &UIPresentationController,) -> UIModalPresentationStyle; + + #[optional] + #[method(adaptivePresentationStyleForPresentationController:traitCollection:)] + pub unsafe fn adaptivePresentationStyleForPresentationController_traitCollection(&self, controller: &UIPresentationController,traitCollection: &UITraitCollection,) -> UIModalPresentationStyle; + + #[optional] + #[method(presentationController:prepareAdaptivePresentationController:)] + pub unsafe fn presentationController_prepareAdaptivePresentationController(&self, presentationController: &UIPresentationController,adaptivePresentationController: &UIPresentationController,); + + #[optional] + #[method_id(@__retain_semantics Other presentationController:viewControllerForAdaptivePresentationStyle:)] + pub unsafe fn presentationController_viewControllerForAdaptivePresentationStyle(&self, controller: &UIPresentationController,style: UIModalPresentationStyle,) -> Option>; + + #[optional] + #[method(presentationController:willPresentWithAdaptiveStyle:transitionCoordinator:)] + pub unsafe fn presentationController_willPresentWithAdaptiveStyle_transitionCoordinator(&self, presentationController: &UIPresentationController,style: UIModalPresentationStyle,transitionCoordinator: Option<&UIViewControllerTransitionCoordinator>,); + + #[optional] + #[method(presentationControllerShouldDismiss:)] + pub unsafe fn presentationControllerShouldDismiss(&self, presentationController: &UIPresentationController,) -> bool; + + #[optional] + #[method(presentationControllerWillDismiss:)] + pub unsafe fn presentationControllerWillDismiss(&self, presentationController: &UIPresentationController,); + + #[optional] + #[method(presentationControllerDidDismiss:)] + pub unsafe fn presentationControllerDidDismiss(&self, presentationController: &UIPresentationController,); + + #[optional] + #[method(presentationControllerDidAttemptToDismiss:)] + pub unsafe fn presentationControllerDidAttemptToDismiss(&self, presentationController: &UIPresentationController,); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIPresentationController; + + unsafe impl ClassType for UIPresentationController { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIPresentationController { + #[method_id(@__retain_semantics Other presentingViewController)] + pub unsafe fn presentingViewController(&self, ) -> Id; + + #[method_id(@__retain_semantics Other presentedViewController)] + pub unsafe fn presentedViewController(&self, ) -> Id; + + #[method(presentationStyle)] + pub unsafe fn presentationStyle(&self, ) -> UIModalPresentationStyle; + + #[method_id(@__retain_semantics Other containerView)] + pub unsafe fn containerView(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&UIAdaptivePresentationControllerDelegate>,); + + #[method_id(@__retain_semantics Init initWithPresentedViewController:presentingViewController:)] + pub unsafe fn initWithPresentedViewController_presentingViewController(this: Option>, presentedViewController: &UIViewController,presentingViewController: Option<&UIViewController>,) -> Id; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method(adaptivePresentationStyle)] + pub unsafe fn adaptivePresentationStyle(&self, ) -> UIModalPresentationStyle; + + #[method(adaptivePresentationStyleForTraitCollection:)] + pub unsafe fn adaptivePresentationStyleForTraitCollection(&self, traitCollection: &UITraitCollection,) -> UIModalPresentationStyle; + + #[method(containerViewWillLayoutSubviews)] + pub unsafe fn containerViewWillLayoutSubviews(&self, ); + + #[method(containerViewDidLayoutSubviews)] + pub unsafe fn containerViewDidLayoutSubviews(&self, ); + + #[method_id(@__retain_semantics Other presentedView)] + pub unsafe fn presentedView(&self, ) -> Option>; + + #[method(frameOfPresentedViewInContainerView)] + pub unsafe fn frameOfPresentedViewInContainerView(&self, ) -> CGRect; + + #[method(shouldPresentInFullscreen)] + pub unsafe fn shouldPresentInFullscreen(&self, ) -> bool; + + #[method(shouldRemovePresentersView)] + pub unsafe fn shouldRemovePresentersView(&self, ) -> bool; + + #[method(presentationTransitionWillBegin)] + pub unsafe fn presentationTransitionWillBegin(&self, ); + + #[method(presentationTransitionDidEnd:)] + pub unsafe fn presentationTransitionDidEnd(&self, completed: bool,); + + #[method(dismissalTransitionWillBegin)] + pub unsafe fn dismissalTransitionWillBegin(&self, ); + + #[method(dismissalTransitionDidEnd:)] + pub unsafe fn dismissalTransitionDidEnd(&self, completed: bool,); + + #[method_id(@__retain_semantics Other overrideTraitCollection)] + pub unsafe fn overrideTraitCollection(&self, ) -> Option>; + + #[method(setOverrideTraitCollection:)] + pub unsafe fn setOverrideTraitCollection(&self, overrideTraitCollection: Option<&UITraitCollection>,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIPress.rs b/crates/icrate-generated/src/UIKit/generated/UIPress.rs new file mode 100644 index 000000000..5303c1c11 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIPress.rs @@ -0,0 +1,68 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIPressPhase { + UIPressPhaseBegan = 0, + UIPressPhaseChanged = 1, + UIPressPhaseStationary = 2, + UIPressPhaseEnded = 3, + UIPressPhaseCancelled = 4, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIPressType { + UIPressTypeUpArrow = 0, + UIPressTypeDownArrow = 1, + UIPressTypeLeftArrow = 2, + UIPressTypeRightArrow = 3, + UIPressTypeSelect = 4, + UIPressTypeMenu = 5, + UIPressTypePlayPause = 6, + UIPressTypePageUp = 30, + UIPressTypePageDown = 31, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIPress; + + unsafe impl ClassType for UIPress { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIPress { + #[method(timestamp)] + pub unsafe fn timestamp(&self, ) -> NSTimeInterval; + + #[method(phase)] + pub unsafe fn phase(&self, ) -> UIPressPhase; + + #[method(type)] + pub unsafe fn type_(&self, ) -> UIPressType; + + #[method_id(@__retain_semantics Other window)] + pub unsafe fn window(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other responder)] + pub unsafe fn responder(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other gestureRecognizers)] + pub unsafe fn gestureRecognizers(&self, ) -> Option, Shared>>; + + #[method(force)] + pub unsafe fn force(&self, ) -> CGFloat; + + #[method_id(@__retain_semantics Other key)] + pub unsafe fn key(&self, ) -> Option>; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIPressesEvent.rs b/crates/icrate-generated/src/UIKit/generated/UIPressesEvent.rs new file mode 100644 index 000000000..c8cf539b6 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIPressesEvent.rs @@ -0,0 +1,24 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIPressesEvent; + + unsafe impl ClassType for UIPressesEvent { + type Super = UIEvent; + } +); + +extern_methods!( + unsafe impl UIPressesEvent { + #[method_id(@__retain_semantics Other allPresses)] + pub unsafe fn allPresses(&self, ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other pressesForGestureRecognizer:)] + pub unsafe fn pressesForGestureRecognizer(&self, gesture: &UIGestureRecognizer,) -> Id, Shared>; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIPreviewInteraction.rs b/crates/icrate-generated/src/UIKit/generated/UIPreviewInteraction.rs new file mode 100644 index 000000000..230eae524 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIPreviewInteraction.rs @@ -0,0 +1,60 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIPreviewInteraction; + + unsafe impl ClassType for UIPreviewInteraction { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIPreviewInteraction { + #[method_id(@__retain_semantics Init initWithView:)] + pub unsafe fn initWithView(this: Option>, view: &UIView,) -> Id; + + #[method_id(@__retain_semantics Other view)] + pub unsafe fn view(&self, ) -> Option>; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&UIPreviewInteractionDelegate>,); + + #[method(locationInCoordinateSpace:)] + pub unsafe fn locationInCoordinateSpace(&self, coordinateSpace: Option<&UICoordinateSpace>,) -> CGPoint; + + #[method(cancelInteraction)] + pub unsafe fn cancelInteraction(&self, ); + + } +); + +extern_protocol!( + pub struct UIPreviewInteractionDelegate; + + unsafe impl UIPreviewInteractionDelegate { + #[method(previewInteraction:didUpdatePreviewTransition:ended:)] + pub unsafe fn previewInteraction_didUpdatePreviewTransition_ended(&self, previewInteraction: &UIPreviewInteraction,transitionProgress: CGFloat,ended: bool,); + + #[method(previewInteractionDidCancel:)] + pub unsafe fn previewInteractionDidCancel(&self, previewInteraction: &UIPreviewInteraction,); + + #[optional] + #[method(previewInteractionShouldBegin:)] + pub unsafe fn previewInteractionShouldBegin(&self, previewInteraction: &UIPreviewInteraction,) -> bool; + + #[optional] + #[method(previewInteraction:didUpdateCommitTransition:ended:)] + pub unsafe fn previewInteraction_didUpdateCommitTransition_ended(&self, previewInteraction: &UIPreviewInteraction,transitionProgress: CGFloat,ended: bool,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIPreviewParameters.rs b/crates/icrate-generated/src/UIKit/generated/UIPreviewParameters.rs new file mode 100644 index 000000000..f676c7665 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIPreviewParameters.rs @@ -0,0 +1,42 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIPreviewParameters; + + unsafe impl ClassType for UIPreviewParameters { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIPreviewParameters { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics Init initWithTextLineRects:)] + pub unsafe fn initWithTextLineRects(this: Option>, textLineRects: &NSArray,) -> Id; + + #[method_id(@__retain_semantics Other visiblePath)] + pub unsafe fn visiblePath(&self, ) -> Option>; + + #[method(setVisiblePath:)] + pub unsafe fn setVisiblePath(&self, visiblePath: Option<&UIBezierPath>,); + + #[method_id(@__retain_semantics Other shadowPath)] + pub unsafe fn shadowPath(&self, ) -> Option>; + + #[method(setShadowPath:)] + pub unsafe fn setShadowPath(&self, shadowPath: Option<&UIBezierPath>,); + + #[method_id(@__retain_semantics Other backgroundColor)] + pub unsafe fn backgroundColor(&self, ) -> Id; + + #[method(setBackgroundColor:)] + pub unsafe fn setBackgroundColor(&self, backgroundColor: Option<&UIColor>,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIPrintError.rs b/crates/icrate-generated/src/UIKit/generated/UIPrintError.rs new file mode 100644 index 000000000..381a12625 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIPrintError.rs @@ -0,0 +1,16 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_static!(UIPrintErrorDomain: &'static NSErrorDomain); + +ns_error_enum!( + #[underlying(NSInteger)] + pub enum UIPrintErrorCode { + UIPrintingNotAvailableError = 1, + UIPrintNoContentError = 2, + UIPrintUnknownImageFormatError = 3, + UIPrintJobFailedError = 4, + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIPrintFormatter.rs b/crates/icrate-generated/src/UIKit/generated/UIPrintFormatter.rs new file mode 100644 index 000000000..e804f776b --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIPrintFormatter.rs @@ -0,0 +1,168 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIPrintFormatter; + + unsafe impl ClassType for UIPrintFormatter { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIPrintFormatter { + #[method_id(@__retain_semantics Other printPageRenderer)] + pub unsafe fn printPageRenderer(&self, ) -> Option>; + + #[method(removeFromPrintPageRenderer)] + pub unsafe fn removeFromPrintPageRenderer(&self, ); + + #[method(maximumContentHeight)] + pub unsafe fn maximumContentHeight(&self, ) -> CGFloat; + + #[method(setMaximumContentHeight:)] + pub unsafe fn setMaximumContentHeight(&self, maximumContentHeight: CGFloat,); + + #[method(maximumContentWidth)] + pub unsafe fn maximumContentWidth(&self, ) -> CGFloat; + + #[method(setMaximumContentWidth:)] + pub unsafe fn setMaximumContentWidth(&self, maximumContentWidth: CGFloat,); + + #[method(contentInsets)] + pub unsafe fn contentInsets(&self, ) -> UIEdgeInsets; + + #[method(setContentInsets:)] + pub unsafe fn setContentInsets(&self, contentInsets: UIEdgeInsets,); + + #[method(perPageContentInsets)] + pub unsafe fn perPageContentInsets(&self, ) -> UIEdgeInsets; + + #[method(setPerPageContentInsets:)] + pub unsafe fn setPerPageContentInsets(&self, perPageContentInsets: UIEdgeInsets,); + + #[method(startPage)] + pub unsafe fn startPage(&self, ) -> NSInteger; + + #[method(setStartPage:)] + pub unsafe fn setStartPage(&self, startPage: NSInteger,); + + #[method(pageCount)] + pub unsafe fn pageCount(&self, ) -> NSInteger; + + #[method(requiresMainThread)] + pub unsafe fn requiresMainThread(&self, ) -> bool; + + #[method(rectForPageAtIndex:)] + pub unsafe fn rectForPageAtIndex(&self, pageIndex: NSInteger,) -> CGRect; + + #[method(drawInRect:forPageAtIndex:)] + pub unsafe fn drawInRect_forPageAtIndex(&self, rect: CGRect,pageIndex: NSInteger,); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UISimpleTextPrintFormatter; + + unsafe impl ClassType for UISimpleTextPrintFormatter { + type Super = UIPrintFormatter; + } +); + +extern_methods!( + unsafe impl UISimpleTextPrintFormatter { + #[method_id(@__retain_semantics Init initWithText:)] + pub unsafe fn initWithText(this: Option>, text: &NSString,) -> Id; + + #[method_id(@__retain_semantics Init initWithAttributedText:)] + pub unsafe fn initWithAttributedText(this: Option>, attributedText: &NSAttributedString,) -> Id; + + #[method_id(@__retain_semantics Other text)] + pub unsafe fn text(&self, ) -> Option>; + + #[method(setText:)] + pub unsafe fn setText(&self, text: Option<&NSString>,); + + #[method_id(@__retain_semantics Other attributedText)] + pub unsafe fn attributedText(&self, ) -> Option>; + + #[method(setAttributedText:)] + pub unsafe fn setAttributedText(&self, attributedText: Option<&NSAttributedString>,); + + #[method_id(@__retain_semantics Other font)] + pub unsafe fn font(&self, ) -> Option>; + + #[method(setFont:)] + pub unsafe fn setFont(&self, font: Option<&UIFont>,); + + #[method_id(@__retain_semantics Other color)] + pub unsafe fn color(&self, ) -> Option>; + + #[method(setColor:)] + pub unsafe fn setColor(&self, color: Option<&UIColor>,); + + #[method(textAlignment)] + pub unsafe fn textAlignment(&self, ) -> NSTextAlignment; + + #[method(setTextAlignment:)] + pub unsafe fn setTextAlignment(&self, textAlignment: NSTextAlignment,); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIMarkupTextPrintFormatter; + + unsafe impl ClassType for UIMarkupTextPrintFormatter { + type Super = UIPrintFormatter; + } +); + +extern_methods!( + unsafe impl UIMarkupTextPrintFormatter { + #[method_id(@__retain_semantics Init initWithMarkupText:)] + pub unsafe fn initWithMarkupText(this: Option>, markupText: &NSString,) -> Id; + + #[method_id(@__retain_semantics Other markupText)] + pub unsafe fn markupText(&self, ) -> Option>; + + #[method(setMarkupText:)] + pub unsafe fn setMarkupText(&self, markupText: Option<&NSString>,); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIViewPrintFormatter; + + unsafe impl ClassType for UIViewPrintFormatter { + type Super = UIPrintFormatter; + } +); + +extern_methods!( + unsafe impl UIViewPrintFormatter { + #[method_id(@__retain_semantics Other view)] + pub unsafe fn view(&self, ) -> Id; + + } +); + +extern_methods!( + /// UIPrintFormatter + unsafe impl UIView { + #[method_id(@__retain_semantics Other viewPrintFormatter)] + pub unsafe fn viewPrintFormatter(&self, ) -> Id; + + #[method(drawRect:forViewPrintFormatter:)] + pub unsafe fn drawRect_forViewPrintFormatter(&self, rect: CGRect,formatter: &UIViewPrintFormatter,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIPrintInfo.rs b/crates/icrate-generated/src/UIKit/generated/UIPrintInfo.rs new file mode 100644 index 000000000..813ed02c2 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIPrintInfo.rs @@ -0,0 +1,87 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIPrintInfoOutputType { + UIPrintInfoOutputGeneral = 0, + UIPrintInfoOutputPhoto = 1, + UIPrintInfoOutputGrayscale = 2, + UIPrintInfoOutputPhotoGrayscale = 3, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIPrintInfoOrientation { + UIPrintInfoOrientationPortrait = 0, + UIPrintInfoOrientationLandscape = 1, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIPrintInfoDuplex { + UIPrintInfoDuplexNone = 0, + UIPrintInfoDuplexLongEdge = 1, + UIPrintInfoDuplexShortEdge = 2, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIPrintInfo; + + unsafe impl ClassType for UIPrintInfo { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIPrintInfo { + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method_id(@__retain_semantics Other printInfo)] + pub unsafe fn printInfo() -> Id; + + #[method_id(@__retain_semantics Other printInfoWithDictionary:)] + pub unsafe fn printInfoWithDictionary(dictionary: Option<&NSDictionary>,) -> Id; + + #[method_id(@__retain_semantics Other printerID)] + pub unsafe fn printerID(&self, ) -> Option>; + + #[method(setPrinterID:)] + pub unsafe fn setPrinterID(&self, printerID: Option<&NSString>,); + + #[method_id(@__retain_semantics Other jobName)] + pub unsafe fn jobName(&self, ) -> Id; + + #[method(setJobName:)] + pub unsafe fn setJobName(&self, jobName: &NSString,); + + #[method(outputType)] + pub unsafe fn outputType(&self, ) -> UIPrintInfoOutputType; + + #[method(setOutputType:)] + pub unsafe fn setOutputType(&self, outputType: UIPrintInfoOutputType,); + + #[method(orientation)] + pub unsafe fn orientation(&self, ) -> UIPrintInfoOrientation; + + #[method(setOrientation:)] + pub unsafe fn setOrientation(&self, orientation: UIPrintInfoOrientation,); + + #[method(duplex)] + pub unsafe fn duplex(&self, ) -> UIPrintInfoDuplex; + + #[method(setDuplex:)] + pub unsafe fn setDuplex(&self, duplex: UIPrintInfoDuplex,); + + #[method_id(@__retain_semantics Other dictionaryRepresentation)] + pub unsafe fn dictionaryRepresentation(&self, ) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIPrintInteractionController.rs b/crates/icrate-generated/src/UIKit/generated/UIPrintInteractionController.rs new file mode 100644 index 000000000..52b480675 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIPrintInteractionController.rs @@ -0,0 +1,171 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +pub type UIPrintInteractionCompletionHandler = *mut Block<(NonNull, Bool, *mut NSError, ), ()>; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIPrinterCutterBehavior { + UIPrinterCutterBehaviorNoCut = 0, + UIPrinterCutterBehaviorPrinterDefault = 1, + UIPrinterCutterBehaviorCutAfterEachPage = 2, + UIPrinterCutterBehaviorCutAfterEachCopy = 3, + UIPrinterCutterBehaviorCutAfterEachJob = 4, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIPrintInteractionController; + + unsafe impl ClassType for UIPrintInteractionController { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIPrintInteractionController { + #[method(isPrintingAvailable)] + pub unsafe fn isPrintingAvailable() -> bool; + + #[method_id(@__retain_semantics Other printableUTIs)] + pub unsafe fn printableUTIs() -> Id, Shared>; + + #[method(canPrintURL:)] + pub unsafe fn canPrintURL(url: &NSURL,) -> bool; + + #[method(canPrintData:)] + pub unsafe fn canPrintData(data: &NSData,) -> bool; + + #[method_id(@__retain_semantics Other sharedPrintController)] + pub unsafe fn sharedPrintController() -> Id; + + #[method_id(@__retain_semantics Other printInfo)] + pub unsafe fn printInfo(&self, ) -> Option>; + + #[method(setPrintInfo:)] + pub unsafe fn setPrintInfo(&self, printInfo: Option<&UIPrintInfo>,); + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&UIPrintInteractionControllerDelegate>,); + + #[method(showsPageRange)] + pub unsafe fn showsPageRange(&self, ) -> bool; + + #[method(setShowsPageRange:)] + pub unsafe fn setShowsPageRange(&self, showsPageRange: bool,); + + #[method(showsNumberOfCopies)] + pub unsafe fn showsNumberOfCopies(&self, ) -> bool; + + #[method(setShowsNumberOfCopies:)] + pub unsafe fn setShowsNumberOfCopies(&self, showsNumberOfCopies: bool,); + + #[method(showsPaperSelectionForLoadedPapers)] + pub unsafe fn showsPaperSelectionForLoadedPapers(&self, ) -> bool; + + #[method(setShowsPaperSelectionForLoadedPapers:)] + pub unsafe fn setShowsPaperSelectionForLoadedPapers(&self, showsPaperSelectionForLoadedPapers: bool,); + + #[method(showsPaperOrientation)] + pub unsafe fn showsPaperOrientation(&self, ) -> bool; + + #[method(setShowsPaperOrientation:)] + pub unsafe fn setShowsPaperOrientation(&self, showsPaperOrientation: bool,); + + #[method_id(@__retain_semantics Other printPaper)] + pub unsafe fn printPaper(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other printPageRenderer)] + pub unsafe fn printPageRenderer(&self, ) -> Option>; + + #[method(setPrintPageRenderer:)] + pub unsafe fn setPrintPageRenderer(&self, printPageRenderer: Option<&UIPrintPageRenderer>,); + + #[method_id(@__retain_semantics Other printFormatter)] + pub unsafe fn printFormatter(&self, ) -> Option>; + + #[method(setPrintFormatter:)] + pub unsafe fn setPrintFormatter(&self, printFormatter: Option<&UIPrintFormatter>,); + + #[method_id(@__retain_semantics Other printingItem)] + pub unsafe fn printingItem(&self, ) -> Option>; + + #[method(setPrintingItem:)] + pub unsafe fn setPrintingItem(&self, printingItem: Option<&Object>,); + + #[method_id(@__retain_semantics Other printingItems)] + pub unsafe fn printingItems(&self, ) -> Option>; + + #[method(setPrintingItems:)] + pub unsafe fn setPrintingItems(&self, printingItems: Option<&NSArray>,); + + #[method(presentAnimated:completionHandler:)] + pub unsafe fn presentAnimated_completionHandler(&self, animated: bool,completion: UIPrintInteractionCompletionHandler,) -> bool; + + #[method(presentFromRect:inView:animated:completionHandler:)] + pub unsafe fn presentFromRect_inView_animated_completionHandler(&self, rect: CGRect,view: &UIView,animated: bool,completion: UIPrintInteractionCompletionHandler,) -> bool; + + #[method(presentFromBarButtonItem:animated:completionHandler:)] + pub unsafe fn presentFromBarButtonItem_animated_completionHandler(&self, item: &UIBarButtonItem,animated: bool,completion: UIPrintInteractionCompletionHandler,) -> bool; + + #[method(printToPrinter:completionHandler:)] + pub unsafe fn printToPrinter_completionHandler(&self, printer: &UIPrinter,completion: UIPrintInteractionCompletionHandler,) -> bool; + + #[method(dismissAnimated:)] + pub unsafe fn dismissAnimated(&self, animated: bool,); + + } +); + +extern_protocol!( + pub struct UIPrintInteractionControllerDelegate; + + unsafe impl UIPrintInteractionControllerDelegate { + #[optional] + #[method_id(@__retain_semantics Other printInteractionControllerParentViewController:)] + pub unsafe fn printInteractionControllerParentViewController(&self, printInteractionController: &UIPrintInteractionController,) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other printInteractionController:choosePaper:)] + pub unsafe fn printInteractionController_choosePaper(&self, printInteractionController: &UIPrintInteractionController,paperList: &NSArray,) -> Id; + + #[optional] + #[method(printInteractionControllerWillPresentPrinterOptions:)] + pub unsafe fn printInteractionControllerWillPresentPrinterOptions(&self, printInteractionController: &UIPrintInteractionController,); + + #[optional] + #[method(printInteractionControllerDidPresentPrinterOptions:)] + pub unsafe fn printInteractionControllerDidPresentPrinterOptions(&self, printInteractionController: &UIPrintInteractionController,); + + #[optional] + #[method(printInteractionControllerWillDismissPrinterOptions:)] + pub unsafe fn printInteractionControllerWillDismissPrinterOptions(&self, printInteractionController: &UIPrintInteractionController,); + + #[optional] + #[method(printInteractionControllerDidDismissPrinterOptions:)] + pub unsafe fn printInteractionControllerDidDismissPrinterOptions(&self, printInteractionController: &UIPrintInteractionController,); + + #[optional] + #[method(printInteractionControllerWillStartJob:)] + pub unsafe fn printInteractionControllerWillStartJob(&self, printInteractionController: &UIPrintInteractionController,); + + #[optional] + #[method(printInteractionControllerDidFinishJob:)] + pub unsafe fn printInteractionControllerDidFinishJob(&self, printInteractionController: &UIPrintInteractionController,); + + #[optional] + #[method(printInteractionController:cutLengthForPaper:)] + pub unsafe fn printInteractionController_cutLengthForPaper(&self, printInteractionController: &UIPrintInteractionController,paper: &UIPrintPaper,) -> CGFloat; + + #[optional] + #[method(printInteractionController:chooseCutterBehavior:)] + pub unsafe fn printInteractionController_chooseCutterBehavior(&self, printInteractionController: &UIPrintInteractionController,availableBehaviors: &NSArray,) -> UIPrinterCutterBehavior; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIPrintPageRenderer.rs b/crates/icrate-generated/src/UIKit/generated/UIPrintPageRenderer.rs new file mode 100644 index 000000000..00a14f5bc --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIPrintPageRenderer.rs @@ -0,0 +1,80 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIPrintRenderingQuality { + UIPrintRenderingQualityBest = 0, + UIPrintRenderingQualityResponsive = 1, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIPrintPageRenderer; + + unsafe impl ClassType for UIPrintPageRenderer { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIPrintPageRenderer { + #[method(headerHeight)] + pub unsafe fn headerHeight(&self, ) -> CGFloat; + + #[method(setHeaderHeight:)] + pub unsafe fn setHeaderHeight(&self, headerHeight: CGFloat,); + + #[method(footerHeight)] + pub unsafe fn footerHeight(&self, ) -> CGFloat; + + #[method(setFooterHeight:)] + pub unsafe fn setFooterHeight(&self, footerHeight: CGFloat,); + + #[method(paperRect)] + pub unsafe fn paperRect(&self, ) -> CGRect; + + #[method(printableRect)] + pub unsafe fn printableRect(&self, ) -> CGRect; + + #[method(numberOfPages)] + pub unsafe fn numberOfPages(&self, ) -> NSInteger; + + #[method_id(@__retain_semantics Other printFormatters)] + pub unsafe fn printFormatters(&self, ) -> Option, Shared>>; + + #[method(setPrintFormatters:)] + pub unsafe fn setPrintFormatters(&self, printFormatters: Option<&NSArray>,); + + #[method_id(@__retain_semantics Other printFormattersForPageAtIndex:)] + pub unsafe fn printFormattersForPageAtIndex(&self, pageIndex: NSInteger,) -> Option, Shared>>; + + #[method(addPrintFormatter:startingAtPageAtIndex:)] + pub unsafe fn addPrintFormatter_startingAtPageAtIndex(&self, formatter: &UIPrintFormatter,pageIndex: NSInteger,); + + #[method(currentRenderingQualityForRequestedRenderingQuality:)] + pub unsafe fn currentRenderingQualityForRequestedRenderingQuality(&self, requestedRenderingQuality: UIPrintRenderingQuality,) -> UIPrintRenderingQuality; + + #[method(prepareForDrawingPages:)] + pub unsafe fn prepareForDrawingPages(&self, range: NSRange,); + + #[method(drawPageAtIndex:inRect:)] + pub unsafe fn drawPageAtIndex_inRect(&self, pageIndex: NSInteger,printableRect: CGRect,); + + #[method(drawPrintFormatter:forPageAtIndex:)] + pub unsafe fn drawPrintFormatter_forPageAtIndex(&self, printFormatter: &UIPrintFormatter,pageIndex: NSInteger,); + + #[method(drawHeaderForPageAtIndex:inRect:)] + pub unsafe fn drawHeaderForPageAtIndex_inRect(&self, pageIndex: NSInteger,headerRect: CGRect,); + + #[method(drawContentForPageAtIndex:inRect:)] + pub unsafe fn drawContentForPageAtIndex_inRect(&self, pageIndex: NSInteger,contentRect: CGRect,); + + #[method(drawFooterForPageAtIndex:inRect:)] + pub unsafe fn drawFooterForPageAtIndex_inRect(&self, pageIndex: NSInteger,footerRect: CGRect,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIPrintPaper.rs b/crates/icrate-generated/src/UIKit/generated/UIPrintPaper.rs new file mode 100644 index 000000000..2038e2a48 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIPrintPaper.rs @@ -0,0 +1,36 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIPrintPaper; + + unsafe impl ClassType for UIPrintPaper { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIPrintPaper { + #[method_id(@__retain_semantics Other bestPaperForPageSize:withPapersFromArray:)] + pub unsafe fn bestPaperForPageSize_withPapersFromArray(contentSize: CGSize,paperList: &NSArray,) -> Id; + + #[method(paperSize)] + pub unsafe fn paperSize(&self, ) -> CGSize; + + #[method(printableRect)] + pub unsafe fn printableRect(&self, ) -> CGRect; + + } +); + +extern_methods!( + /// Deprecated_Nonfunctional + unsafe impl UIPrintPaper { + #[method(printRect)] + pub unsafe fn printRect(&self, ) -> CGRect; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIPrintServiceExtension.rs b/crates/icrate-generated/src/UIKit/generated/UIPrintServiceExtension.rs new file mode 100644 index 000000000..e94e44a78 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIPrintServiceExtension.rs @@ -0,0 +1,56 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIPrinterDestination; + + unsafe impl ClassType for UIPrinterDestination { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIPrinterDestination { + #[method_id(@__retain_semantics Init initWithURL:)] + pub unsafe fn initWithURL(this: Option>, url: &NSURL,) -> Id; + + #[method_id(@__retain_semantics Other URL)] + pub unsafe fn URL(&self, ) -> Id; + + #[method(setURL:)] + pub unsafe fn setURL(&self, URL: &NSURL,); + + #[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 txtRecord)] + pub unsafe fn txtRecord(&self, ) -> Option>; + + #[method(setTxtRecord:)] + pub unsafe fn setTxtRecord(&self, txtRecord: Option<&NSData>,); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIPrintServiceExtension; + + unsafe impl ClassType for UIPrintServiceExtension { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIPrintServiceExtension { + #[method_id(@__retain_semantics Other printerDestinationsForPrintInfo:)] + pub unsafe fn printerDestinationsForPrintInfo(&self, printInfo: &UIPrintInfo,) -> Id, Shared>; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIPrinter.rs b/crates/icrate-generated/src/UIKit/generated/UIPrinter.rs new file mode 100644 index 000000000..16c9d550a --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIPrinter.rs @@ -0,0 +1,60 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_options!( + #[underlying(NSInteger)] + pub enum UIPrinterJobTypes { + UIPrinterJobTypeUnknown = 0, + UIPrinterJobTypeDocument = 1<<0, + UIPrinterJobTypeEnvelope = 1<<1, + UIPrinterJobTypeLabel = 1<<2, + UIPrinterJobTypePhoto = 1<<3, + UIPrinterJobTypeReceipt = 1<<4, + UIPrinterJobTypeRoll = 1<<5, + UIPrinterJobTypeLargeFormat = 1<<6, + UIPrinterJobTypePostcard = 1<<7, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIPrinter; + + unsafe impl ClassType for UIPrinter { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIPrinter { + #[method_id(@__retain_semantics Other printerWithURL:)] + pub unsafe fn printerWithURL(url: &NSURL,) -> Id; + + #[method_id(@__retain_semantics Other URL)] + pub unsafe fn URL(&self, ) -> Id; + + #[method_id(@__retain_semantics Other displayName)] + pub unsafe fn displayName(&self, ) -> Id; + + #[method_id(@__retain_semantics Other displayLocation)] + pub unsafe fn displayLocation(&self, ) -> Option>; + + #[method(supportedJobTypes)] + pub unsafe fn supportedJobTypes(&self, ) -> UIPrinterJobTypes; + + #[method_id(@__retain_semantics Other makeAndModel)] + pub unsafe fn makeAndModel(&self, ) -> Option>; + + #[method(supportsColor)] + pub unsafe fn supportsColor(&self, ) -> bool; + + #[method(supportsDuplex)] + pub unsafe fn supportsDuplex(&self, ) -> bool; + + #[method(contactPrinter:)] + pub unsafe fn contactPrinter(&self, completionHandler: Option<&Block<(Bool, ), ()>>,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIPrinterPickerController.rs b/crates/icrate-generated/src/UIKit/generated/UIPrinterPickerController.rs new file mode 100644 index 000000000..c1054b8e4 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIPrinterPickerController.rs @@ -0,0 +1,79 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +pub type UIPrinterPickerCompletionHandler = *mut Block<(NonNull, Bool, *mut NSError, ), ()>; + +extern_protocol!( + pub struct UIPrinterPickerControllerDelegate; + + unsafe impl UIPrinterPickerControllerDelegate { + #[optional] + #[method_id(@__retain_semantics Other printerPickerControllerParentViewController:)] + pub unsafe fn printerPickerControllerParentViewController(&self, printerPickerController: &UIPrinterPickerController,) -> Option>; + + #[optional] + #[method(printerPickerController:shouldShowPrinter:)] + pub unsafe fn printerPickerController_shouldShowPrinter(&self, printerPickerController: &UIPrinterPickerController,printer: &UIPrinter,) -> bool; + + #[optional] + #[method(printerPickerControllerWillPresent:)] + pub unsafe fn printerPickerControllerWillPresent(&self, printerPickerController: &UIPrinterPickerController,); + + #[optional] + #[method(printerPickerControllerDidPresent:)] + pub unsafe fn printerPickerControllerDidPresent(&self, printerPickerController: &UIPrinterPickerController,); + + #[optional] + #[method(printerPickerControllerWillDismiss:)] + pub unsafe fn printerPickerControllerWillDismiss(&self, printerPickerController: &UIPrinterPickerController,); + + #[optional] + #[method(printerPickerControllerDidDismiss:)] + pub unsafe fn printerPickerControllerDidDismiss(&self, printerPickerController: &UIPrinterPickerController,); + + #[optional] + #[method(printerPickerControllerDidSelectPrinter:)] + pub unsafe fn printerPickerControllerDidSelectPrinter(&self, printerPickerController: &UIPrinterPickerController,); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIPrinterPickerController; + + unsafe impl ClassType for UIPrinterPickerController { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIPrinterPickerController { + #[method_id(@__retain_semantics Other printerPickerControllerWithInitiallySelectedPrinter:)] + pub unsafe fn printerPickerControllerWithInitiallySelectedPrinter(printer: Option<&UIPrinter>,) -> Id; + + #[method_id(@__retain_semantics Other selectedPrinter)] + pub unsafe fn selectedPrinter(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&UIPrinterPickerControllerDelegate>,); + + #[method(presentAnimated:completionHandler:)] + pub unsafe fn presentAnimated_completionHandler(&self, animated: bool,completion: UIPrinterPickerCompletionHandler,) -> bool; + + #[method(presentFromRect:inView:animated:completionHandler:)] + pub unsafe fn presentFromRect_inView_animated_completionHandler(&self, rect: CGRect,view: &UIView,animated: bool,completion: UIPrinterPickerCompletionHandler,) -> bool; + + #[method(presentFromBarButtonItem:animated:completionHandler:)] + pub unsafe fn presentFromBarButtonItem_animated_completionHandler(&self, item: &UIBarButtonItem,animated: bool,completion: UIPrinterPickerCompletionHandler,) -> bool; + + #[method(dismissAnimated:)] + pub unsafe fn dismissAnimated(&self, animated: bool,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIProgressView.rs b/crates/icrate-generated/src/UIKit/generated/UIProgressView.rs new file mode 100644 index 000000000..564c7698b --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIProgressView.rs @@ -0,0 +1,80 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIProgressViewStyle { + UIProgressViewStyleDefault = 0, + UIProgressViewStyleBar = 1, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIProgressView; + + unsafe impl ClassType for UIProgressView { + type Super = UIView; + } +); + +extern_methods!( + unsafe impl UIProgressView { + #[method_id(@__retain_semantics Init initWithFrame:)] + pub unsafe fn initWithFrame(this: Option>, frame: CGRect,) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method_id(@__retain_semantics Init initWithProgressViewStyle:)] + pub unsafe fn initWithProgressViewStyle(this: Option>, style: UIProgressViewStyle,) -> Id; + + #[method(progressViewStyle)] + pub unsafe fn progressViewStyle(&self, ) -> UIProgressViewStyle; + + #[method(setProgressViewStyle:)] + pub unsafe fn setProgressViewStyle(&self, progressViewStyle: UIProgressViewStyle,); + + #[method(progress)] + pub unsafe fn progress(&self, ) -> c_float; + + #[method(setProgress:)] + pub unsafe fn setProgress(&self, progress: c_float,); + + #[method_id(@__retain_semantics Other progressTintColor)] + pub unsafe fn progressTintColor(&self, ) -> Option>; + + #[method(setProgressTintColor:)] + pub unsafe fn setProgressTintColor(&self, progressTintColor: Option<&UIColor>,); + + #[method_id(@__retain_semantics Other trackTintColor)] + pub unsafe fn trackTintColor(&self, ) -> Option>; + + #[method(setTrackTintColor:)] + pub unsafe fn setTrackTintColor(&self, trackTintColor: Option<&UIColor>,); + + #[method_id(@__retain_semantics Other progressImage)] + pub unsafe fn progressImage(&self, ) -> Option>; + + #[method(setProgressImage:)] + pub unsafe fn setProgressImage(&self, progressImage: Option<&UIImage>,); + + #[method_id(@__retain_semantics Other trackImage)] + pub unsafe fn trackImage(&self, ) -> Option>; + + #[method(setTrackImage:)] + pub unsafe fn setTrackImage(&self, trackImage: Option<&UIImage>,); + + #[method(setProgress:animated:)] + pub unsafe fn setProgress_animated(&self, progress: c_float,animated: bool,); + + #[method_id(@__retain_semantics Other observedProgress)] + pub unsafe fn observedProgress(&self, ) -> Option>; + + #[method(setObservedProgress:)] + pub unsafe fn setObservedProgress(&self, observedProgress: Option<&NSProgress>,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIPushBehavior.rs b/crates/icrate-generated/src/UIKit/generated/UIPushBehavior.rs new file mode 100644 index 000000000..3861ca4af --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIPushBehavior.rs @@ -0,0 +1,74 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIPushBehaviorMode { + UIPushBehaviorModeContinuous = 0, + UIPushBehaviorModeInstantaneous = 1, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIPushBehavior; + + unsafe impl ClassType for UIPushBehavior { + type Super = UIDynamicBehavior; + } +); + +extern_methods!( + unsafe impl UIPushBehavior { + #[method_id(@__retain_semantics Init initWithItems:mode:)] + pub unsafe fn initWithItems_mode(this: Option>, items: &NSArray,mode: UIPushBehaviorMode,) -> Id; + + #[method(addItem:)] + pub unsafe fn addItem(&self, item: &UIDynamicItem,); + + #[method(removeItem:)] + pub unsafe fn removeItem(&self, item: &UIDynamicItem,); + + #[method_id(@__retain_semantics Other items)] + pub unsafe fn items(&self, ) -> Id, Shared>; + + #[method(targetOffsetFromCenterForItem:)] + pub unsafe fn targetOffsetFromCenterForItem(&self, item: &UIDynamicItem,) -> UIOffset; + + #[method(setTargetOffsetFromCenter:forItem:)] + pub unsafe fn setTargetOffsetFromCenter_forItem(&self, o: UIOffset,item: &UIDynamicItem,); + + #[method(mode)] + pub unsafe fn mode(&self, ) -> UIPushBehaviorMode; + + #[method(active)] + pub unsafe fn active(&self, ) -> bool; + + #[method(setActive:)] + pub unsafe fn setActive(&self, active: bool,); + + #[method(angle)] + pub unsafe fn angle(&self, ) -> CGFloat; + + #[method(setAngle:)] + pub unsafe fn setAngle(&self, angle: CGFloat,); + + #[method(magnitude)] + pub unsafe fn magnitude(&self, ) -> CGFloat; + + #[method(setMagnitude:)] + pub unsafe fn setMagnitude(&self, magnitude: CGFloat,); + + #[method(pushDirection)] + pub unsafe fn pushDirection(&self, ) -> CGVector; + + #[method(setPushDirection:)] + pub unsafe fn setPushDirection(&self, pushDirection: CGVector,); + + #[method(setAngle:magnitude:)] + pub unsafe fn setAngle_magnitude(&self, angle: CGFloat,magnitude: CGFloat,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIReferenceLibraryViewController.rs b/crates/icrate-generated/src/UIKit/generated/UIReferenceLibraryViewController.rs new file mode 100644 index 000000000..548c4b1df --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIReferenceLibraryViewController.rs @@ -0,0 +1,33 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIReferenceLibraryViewController; + + unsafe impl ClassType for UIReferenceLibraryViewController { + type Super = UIViewController; + } +); + +extern_methods!( + unsafe impl UIReferenceLibraryViewController { + #[method(dictionaryHasDefinitionForTerm:)] + pub unsafe fn dictionaryHasDefinitionForTerm(term: &NSString,) -> bool; + + #[method_id(@__retain_semantics Init initWithTerm:)] + pub unsafe fn initWithTerm(this: Option>, term: &NSString,) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Id; + + #[method_id(@__retain_semantics Init initWithNibName:bundle:)] + pub unsafe fn initWithNibName_bundle(this: Option>, nibNameOrNil: Option<&NSString>,nibBundleOrNil: Option<&NSBundle>,) -> Id; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIRefreshControl.rs b/crates/icrate-generated/src/UIKit/generated/UIRefreshControl.rs new file mode 100644 index 000000000..0a154683d --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIRefreshControl.rs @@ -0,0 +1,42 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIRefreshControl; + + unsafe impl ClassType for UIRefreshControl { + type Super = UIControl; + } +); + +extern_methods!( + unsafe impl UIRefreshControl { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method(isRefreshing)] + pub unsafe fn isRefreshing(&self, ) -> bool; + + #[method_id(@__retain_semantics Other tintColor)] + pub unsafe fn tintColor(&self, ) -> Option>; + + #[method(setTintColor:)] + pub unsafe fn setTintColor(&self, tintColor: Option<&UIColor>,); + + #[method_id(@__retain_semantics Other attributedTitle)] + pub unsafe fn attributedTitle(&self, ) -> Option>; + + #[method(setAttributedTitle:)] + pub unsafe fn setAttributedTitle(&self, attributedTitle: Option<&NSAttributedString>,); + + #[method(beginRefreshing)] + pub unsafe fn beginRefreshing(&self, ); + + #[method(endRefreshing)] + pub unsafe fn endRefreshing(&self, ); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIRegion.rs b/crates/icrate-generated/src/UIKit/generated/UIRegion.rs new file mode 100644 index 000000000..5c4bddbf5 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIRegion.rs @@ -0,0 +1,42 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIRegion; + + unsafe impl ClassType for UIRegion { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIRegion { + #[method_id(@__retain_semantics Other infiniteRegion)] + pub unsafe fn infiniteRegion() -> Id; + + #[method_id(@__retain_semantics Init initWithRadius:)] + pub unsafe fn initWithRadius(this: Option>, radius: CGFloat,) -> Id; + + #[method_id(@__retain_semantics Init initWithSize:)] + pub unsafe fn initWithSize(this: Option>, size: CGSize,) -> Id; + + #[method_id(@__retain_semantics Other inverseRegion)] + pub unsafe fn inverseRegion(&self, ) -> Id; + + #[method_id(@__retain_semantics Other regionByUnionWithRegion:)] + pub unsafe fn regionByUnionWithRegion(&self, region: &UIRegion,) -> Id; + + #[method_id(@__retain_semantics Other regionByDifferenceFromRegion:)] + pub unsafe fn regionByDifferenceFromRegion(&self, region: &UIRegion,) -> Id; + + #[method_id(@__retain_semantics Other regionByIntersectionWithRegion:)] + pub unsafe fn regionByIntersectionWithRegion(&self, region: &UIRegion,) -> Id; + + #[method(containsPoint:)] + pub unsafe fn containsPoint(&self, point: CGPoint,) -> bool; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIResponder+UIActivityItemsConfiguration.rs b/crates/icrate-generated/src/UIKit/generated/UIResponder+UIActivityItemsConfiguration.rs new file mode 100644 index 000000000..560a1e996 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIResponder+UIActivityItemsConfiguration.rs @@ -0,0 +1,16 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_methods!( + /// UIActivityItemsConfiguration + unsafe impl UIResponder { + #[method_id(@__retain_semantics Other activityItemsConfiguration)] + pub unsafe fn activityItemsConfiguration(&self, ) -> Option>; + + #[method(setActivityItemsConfiguration:)] + pub unsafe fn setActivityItemsConfiguration(&self, activityItemsConfiguration: Option<&UIActivityItemsConfigurationReading>,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIResponder.rs b/crates/icrate-generated/src/UIKit/generated/UIResponder.rs new file mode 100644 index 000000000..d9e5513fc --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIResponder.rs @@ -0,0 +1,339 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +pub type UITextAttributesConversionHandler = *mut Block<(NonNull>, ), NonNull>>; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIEditingInteractionConfiguration { + UIEditingInteractionConfigurationNone = 0, + UIEditingInteractionConfigurationDefault = 1, + } +); + +extern_protocol!( + pub struct UIResponderStandardEditActions; + + unsafe impl UIResponderStandardEditActions { + #[optional] + #[method(cut:)] + pub unsafe fn cut(&self, sender: Option<&Object>,); + + #[optional] + #[method(copy:)] + pub unsafe fn copy(&self, sender: Option<&Object>,); + + #[optional] + #[method(paste:)] + pub unsafe fn paste(&self, sender: Option<&Object>,); + + #[optional] + #[method(pasteAndMatchStyle:)] + pub unsafe fn pasteAndMatchStyle(&self, sender: Option<&Object>,); + + #[optional] + #[method(pasteAndGo:)] + pub unsafe fn pasteAndGo(&self, sender: Option<&Object>,); + + #[optional] + #[method(pasteAndSearch:)] + pub unsafe fn pasteAndSearch(&self, sender: Option<&Object>,); + + #[optional] + #[method(select:)] + pub unsafe fn select(&self, sender: Option<&Object>,); + + #[optional] + #[method(selectAll:)] + pub unsafe fn selectAll(&self, sender: Option<&Object>,); + + #[optional] + #[method(delete:)] + pub unsafe fn delete(&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(toggleBoldface:)] + pub unsafe fn toggleBoldface(&self, sender: Option<&Object>,); + + #[optional] + #[method(toggleItalics:)] + pub unsafe fn toggleItalics(&self, sender: Option<&Object>,); + + #[optional] + #[method(toggleUnderline:)] + pub unsafe fn toggleUnderline(&self, sender: Option<&Object>,); + + #[optional] + #[method(increaseSize:)] + pub unsafe fn increaseSize(&self, sender: Option<&Object>,); + + #[optional] + #[method(decreaseSize:)] + pub unsafe fn decreaseSize(&self, sender: Option<&Object>,); + + #[optional] + #[method(find:)] + pub unsafe fn find(&self, sender: Option<&Object>,); + + #[optional] + #[method(findAndReplace:)] + pub unsafe fn findAndReplace(&self, sender: Option<&Object>,); + + #[optional] + #[method(findNext:)] + pub unsafe fn findNext(&self, sender: Option<&Object>,); + + #[optional] + #[method(findPrevious:)] + pub unsafe fn findPrevious(&self, sender: Option<&Object>,); + + #[optional] + #[method(useSelectionForFind:)] + pub unsafe fn useSelectionForFind(&self, sender: Option<&Object>,); + + #[optional] + #[method(updateTextAttributesWithConversionHandler:)] + pub unsafe fn updateTextAttributesWithConversionHandler(&self, conversionHandler: UITextAttributesConversionHandler,); + + #[optional] + #[method(print:)] + pub unsafe fn print(&self, sender: Option<&Object>,); + + #[optional] + #[method(rename:)] + pub unsafe fn rename(&self, sender: Option<&Object>,); + + #[optional] + #[method(duplicate:)] + pub unsafe fn duplicate(&self, sender: Option<&Object>,); + + #[optional] + #[method(move:)] + pub unsafe fn move(&self, sender: Option<&Object>,); + + #[optional] + #[method(export:)] + pub unsafe fn export(&self, sender: Option<&Object>,); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIResponder; + + unsafe impl ClassType for UIResponder { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIResponder { + #[method_id(@__retain_semantics Other nextResponder)] + pub unsafe fn nextResponder(&self, ) -> Option>; + + #[method(canBecomeFirstResponder)] + pub unsafe fn canBecomeFirstResponder(&self, ) -> bool; + + #[method(becomeFirstResponder)] + pub unsafe fn becomeFirstResponder(&self, ) -> bool; + + #[method(canResignFirstResponder)] + pub unsafe fn canResignFirstResponder(&self, ) -> bool; + + #[method(resignFirstResponder)] + pub unsafe fn resignFirstResponder(&self, ) -> bool; + + #[method(isFirstResponder)] + pub unsafe fn isFirstResponder(&self, ) -> bool; + + #[method(touchesBegan:withEvent:)] + pub unsafe fn touchesBegan_withEvent(&self, touches: &NSSet,event: Option<&UIEvent>,); + + #[method(touchesMoved:withEvent:)] + pub unsafe fn touchesMoved_withEvent(&self, touches: &NSSet,event: Option<&UIEvent>,); + + #[method(touchesEnded:withEvent:)] + pub unsafe fn touchesEnded_withEvent(&self, touches: &NSSet,event: Option<&UIEvent>,); + + #[method(touchesCancelled:withEvent:)] + pub unsafe fn touchesCancelled_withEvent(&self, touches: &NSSet,event: Option<&UIEvent>,); + + #[method(touchesEstimatedPropertiesUpdated:)] + pub unsafe fn touchesEstimatedPropertiesUpdated(&self, touches: &NSSet,); + + #[method(pressesBegan:withEvent:)] + pub unsafe fn pressesBegan_withEvent(&self, presses: &NSSet,event: Option<&UIPressesEvent>,); + + #[method(pressesChanged:withEvent:)] + pub unsafe fn pressesChanged_withEvent(&self, presses: &NSSet,event: Option<&UIPressesEvent>,); + + #[method(pressesEnded:withEvent:)] + pub unsafe fn pressesEnded_withEvent(&self, presses: &NSSet,event: Option<&UIPressesEvent>,); + + #[method(pressesCancelled:withEvent:)] + pub unsafe fn pressesCancelled_withEvent(&self, presses: &NSSet,event: Option<&UIPressesEvent>,); + + #[method(motionBegan:withEvent:)] + pub unsafe fn motionBegan_withEvent(&self, motion: UIEventSubtype,event: Option<&UIEvent>,); + + #[method(motionEnded:withEvent:)] + pub unsafe fn motionEnded_withEvent(&self, motion: UIEventSubtype,event: Option<&UIEvent>,); + + #[method(motionCancelled:withEvent:)] + pub unsafe fn motionCancelled_withEvent(&self, motion: UIEventSubtype,event: Option<&UIEvent>,); + + #[method(remoteControlReceivedWithEvent:)] + pub unsafe fn remoteControlReceivedWithEvent(&self, event: Option<&UIEvent>,); + + #[method(canPerformAction:withSender:)] + pub unsafe fn canPerformAction_withSender(&self, action: Sel,sender: Option<&Object>,) -> bool; + + #[method_id(@__retain_semantics Other targetForAction:withSender:)] + pub unsafe fn targetForAction_withSender(&self, action: Sel,sender: Option<&Object>,) -> Option>; + + #[method(buildMenuWithBuilder:)] + pub unsafe fn buildMenuWithBuilder(&self, builder: &UIMenuBuilder,); + + #[method(validateCommand:)] + pub unsafe fn validateCommand(&self, command: &UICommand,); + + #[method_id(@__retain_semantics Other undoManager)] + pub unsafe fn undoManager(&self, ) -> Option>; + + #[method(editingInteractionConfiguration)] + pub unsafe fn editingInteractionConfiguration(&self, ) -> UIEditingInteractionConfiguration; + + } +); + +extern_methods!( + /// UIResponderKeyCommands + unsafe impl UIResponder { + #[method_id(@__retain_semantics Other keyCommands)] + pub unsafe fn keyCommands(&self, ) -> Option, Shared>>; + + } +); + +extern_methods!( + /// UIResponderInputViewAdditions + unsafe impl UIResponder { + #[method_id(@__retain_semantics Other inputView)] + pub unsafe fn inputView(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other inputAccessoryView)] + pub unsafe fn inputAccessoryView(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other inputAssistantItem)] + pub unsafe fn inputAssistantItem(&self, ) -> Id; + + #[method_id(@__retain_semantics Other inputViewController)] + pub unsafe fn inputViewController(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other inputAccessoryViewController)] + pub unsafe fn inputAccessoryViewController(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other textInputMode)] + pub unsafe fn textInputMode(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other textInputContextIdentifier)] + pub unsafe fn textInputContextIdentifier(&self, ) -> Option>; + + #[method(clearTextInputContextIdentifier:)] + pub unsafe fn clearTextInputContextIdentifier(identifier: &NSString,); + + #[method(reloadInputViews)] + pub unsafe fn reloadInputViews(&self, ); + + } +); + +extern_static!(UIKeyInputUpArrow: &'static NSString); + +extern_static!(UIKeyInputDownArrow: &'static NSString); + +extern_static!(UIKeyInputLeftArrow: &'static NSString); + +extern_static!(UIKeyInputRightArrow: &'static NSString); + +extern_static!(UIKeyInputEscape: &'static NSString); + +extern_static!(UIKeyInputPageUp: &'static NSString); + +extern_static!(UIKeyInputPageDown: &'static NSString); + +extern_static!(UIKeyInputHome: &'static NSString); + +extern_static!(UIKeyInputEnd: &'static NSString); + +extern_static!(UIKeyInputF1: &'static NSString); + +extern_static!(UIKeyInputF1: &'static NSString); + +extern_static!(UIKeyInputF2: &'static NSString); + +extern_static!(UIKeyInputF3: &'static NSString); + +extern_static!(UIKeyInputF4: &'static NSString); + +extern_static!(UIKeyInputF5: &'static NSString); + +extern_static!(UIKeyInputF6: &'static NSString); + +extern_static!(UIKeyInputF7: &'static NSString); + +extern_static!(UIKeyInputF8: &'static NSString); + +extern_static!(UIKeyInputF9: &'static NSString); + +extern_static!(UIKeyInputF10: &'static NSString); + +extern_static!(UIKeyInputF11: &'static NSString); + +extern_static!(UIKeyInputF12: &'static NSString); + +extern_static!(UIKeyInputDelete: &'static NSString); + +extern_methods!( + /// ActivityContinuation + unsafe impl UIResponder { + #[method_id(@__retain_semantics Other 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,); + + #[method(restoreUserActivityState:)] + pub unsafe fn restoreUserActivityState(&self, activity: &NSUserActivity,); + + } +); + +extern_methods!( + /// UIPasteConfigurationSupporting + unsafe impl UIResponder { + } +); + +extern_methods!( + /// UICaptureTextFromCameraSupporting + unsafe impl UIResponder { + #[method(captureTextFromCamera:)] + pub unsafe fn captureTextFromCamera(&self, sender: Option<&Object>,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIRotationGestureRecognizer.rs b/crates/icrate-generated/src/UIKit/generated/UIRotationGestureRecognizer.rs new file mode 100644 index 000000000..5ee3920d1 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIRotationGestureRecognizer.rs @@ -0,0 +1,27 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIRotationGestureRecognizer; + + unsafe impl ClassType for UIRotationGestureRecognizer { + type Super = UIGestureRecognizer; + } +); + +extern_methods!( + unsafe impl UIRotationGestureRecognizer { + #[method(rotation)] + pub unsafe fn rotation(&self, ) -> CGFloat; + + #[method(setRotation:)] + pub unsafe fn setRotation(&self, rotation: CGFloat,); + + #[method(velocity)] + pub unsafe fn velocity(&self, ) -> CGFloat; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIScene.rs b/crates/icrate-generated/src/UIKit/generated/UIScene.rs new file mode 100644 index 000000000..5f6c66ce0 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIScene.rs @@ -0,0 +1,131 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIScene; + + unsafe impl ClassType for UIScene { + type Super = UIResponder; + } +); + +extern_methods!( + unsafe impl UIScene { + #[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 initWithSession:connectionOptions:)] + pub unsafe fn initWithSession_connectionOptions(this: Option>, session: &UISceneSession,connectionOptions: &UISceneConnectionOptions,) -> Id; + + #[method_id(@__retain_semantics Other session)] + pub unsafe fn session(&self, ) -> Id; + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&UISceneDelegate>,); + + #[method(activationState)] + pub unsafe fn activationState(&self, ) -> UISceneActivationState; + + #[method(openURL:options:completionHandler:)] + pub unsafe fn openURL_options_completionHandler(&self, url: &NSURL,options: Option<&UISceneOpenExternalURLOptions>,completion: Option<&Block<(Bool, ), ()>>,); + + #[method_id(@__retain_semantics Other title)] + pub unsafe fn title(&self, ) -> Id; + + #[method(setTitle:)] + pub unsafe fn setTitle(&self, title: Option<&NSString>,); + + #[method_id(@__retain_semantics Other subtitle)] + pub unsafe fn subtitle(&self, ) -> Id; + + #[method(setSubtitle:)] + pub unsafe fn setSubtitle(&self, subtitle: &NSString,); + + #[method_id(@__retain_semantics Other activationConditions)] + pub unsafe fn activationConditions(&self, ) -> Id; + + #[method(setActivationConditions:)] + pub unsafe fn setActivationConditions(&self, activationConditions: &UISceneActivationConditions,); + + } +); + +extern_protocol!( + pub struct UISceneDelegate; + + unsafe impl UISceneDelegate { + #[optional] + #[method(scene:willConnectToSession:options:)] + pub unsafe fn scene_willConnectToSession_options(&self, scene: &UIScene,session: &UISceneSession,connectionOptions: &UISceneConnectionOptions,); + + #[optional] + #[method(sceneDidDisconnect:)] + pub unsafe fn sceneDidDisconnect(&self, scene: &UIScene,); + + #[optional] + #[method(sceneDidBecomeActive:)] + pub unsafe fn sceneDidBecomeActive(&self, scene: &UIScene,); + + #[optional] + #[method(sceneWillResignActive:)] + pub unsafe fn sceneWillResignActive(&self, scene: &UIScene,); + + #[optional] + #[method(sceneWillEnterForeground:)] + pub unsafe fn sceneWillEnterForeground(&self, scene: &UIScene,); + + #[optional] + #[method(sceneDidEnterBackground:)] + pub unsafe fn sceneDidEnterBackground(&self, scene: &UIScene,); + + #[optional] + #[method(scene:openURLContexts:)] + pub unsafe fn scene_openURLContexts(&self, scene: &UIScene,URLContexts: &NSSet,); + + #[optional] + #[method_id(@__retain_semantics Other stateRestorationActivityForScene:)] + pub unsafe fn stateRestorationActivityForScene(&self, scene: &UIScene,) -> Option>; + + #[optional] + #[method(scene:restoreInteractionStateWithUserActivity:)] + pub unsafe fn scene_restoreInteractionStateWithUserActivity(&self, scene: &UIScene,stateRestorationActivity: &NSUserActivity,); + + #[optional] + #[method(scene:willContinueUserActivityWithType:)] + pub unsafe fn scene_willContinueUserActivityWithType(&self, scene: &UIScene,userActivityType: &NSString,); + + #[optional] + #[method(scene:continueUserActivity:)] + pub unsafe fn scene_continueUserActivity(&self, scene: &UIScene,userActivity: &NSUserActivity,); + + #[optional] + #[method(scene:didFailToContinueUserActivityWithType:error:)] + pub unsafe fn scene_didFailToContinueUserActivityWithType_error(&self, scene: &UIScene,userActivityType: &NSString,error: &NSError,); + + #[optional] + #[method(scene:didUpdateUserActivity:)] + pub unsafe fn scene_didUpdateUserActivity(&self, scene: &UIScene,userActivity: &NSUserActivity,); + + } +); + +extern_static!(UISceneWillConnectNotification: &'static NSNotificationName); + +extern_static!(UISceneDidDisconnectNotification: &'static NSNotificationName); + +extern_static!(UISceneDidActivateNotification: &'static NSNotificationName); + +extern_static!(UISceneWillDeactivateNotification: &'static NSNotificationName); + +extern_static!(UISceneWillEnterForegroundNotification: &'static NSNotificationName); + +extern_static!(UISceneDidEnterBackgroundNotification: &'static NSNotificationName); + diff --git a/crates/icrate-generated/src/UIKit/generated/UISceneActivationConditions.rs b/crates/icrate-generated/src/UIKit/generated/UISceneActivationConditions.rs new file mode 100644 index 000000000..143d750b8 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UISceneActivationConditions.rs @@ -0,0 +1,48 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UISceneActivationConditions; + + unsafe impl ClassType for UISceneActivationConditions { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UISceneActivationConditions { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, aDecoder: &NSCoder,) -> Option>; + + #[method_id(@__retain_semantics Other canActivateForTargetContentIdentifierPredicate)] + pub unsafe fn canActivateForTargetContentIdentifierPredicate(&self, ) -> Id; + + #[method(setCanActivateForTargetContentIdentifierPredicate:)] + pub unsafe fn setCanActivateForTargetContentIdentifierPredicate(&self, canActivateForTargetContentIdentifierPredicate: &NSPredicate,); + + #[method_id(@__retain_semantics Other prefersToActivateForTargetContentIdentifierPredicate)] + pub unsafe fn prefersToActivateForTargetContentIdentifierPredicate(&self, ) -> Id; + + #[method(setPrefersToActivateForTargetContentIdentifierPredicate:)] + pub unsafe fn setPrefersToActivateForTargetContentIdentifierPredicate(&self, prefersToActivateForTargetContentIdentifierPredicate: &NSPredicate,); + + } +); + +extern_methods!( + /// UISceneActivationConditions + unsafe impl NSUserActivity { + #[method_id(@__retain_semantics Other targetContentIdentifier)] + pub unsafe fn targetContentIdentifier(&self, ) -> Option>; + + #[method(setTargetContentIdentifier:)] + pub unsafe fn setTargetContentIdentifier(&self, targetContentIdentifier: Option<&NSString>,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UISceneDefinitions.rs b/crates/icrate-generated/src/UIKit/generated/UISceneDefinitions.rs new file mode 100644 index 000000000..08053ca50 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UISceneDefinitions.rs @@ -0,0 +1,28 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UISceneActivationState { + UISceneActivationStateUnattached = -1, + UISceneActivationStateForegroundActive = 0, + UISceneActivationStateForegroundInactive = 1, + UISceneActivationStateBackground = 2, + } +); + +pub type UISceneSessionRole = NSString; + +extern_static!(UISceneErrorDomain: Option<&'static NSErrorDomain>); + +ns_error_enum!( + #[underlying(NSInteger)] + pub enum UISceneErrorCode { + UISceneErrorCodeMultipleScenesNotSupported = 0, + UISceneErrorCodeRequestDenied = 1, + UISceneErrorCodeGeometryRequestUnsupported = 100, + UISceneErrorCodeGeometryRequestDenied = 101, + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UISceneEnhancedStateRestoration.rs b/crates/icrate-generated/src/UIKit/generated/UISceneEnhancedStateRestoration.rs new file mode 100644 index 000000000..2c18f1333 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UISceneEnhancedStateRestoration.rs @@ -0,0 +1,16 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_methods!( + /// UISceneEnhancedStateRestoration + unsafe impl UIScene { + #[method(extendStateRestoration)] + pub unsafe fn extendStateRestoration(&self, ); + + #[method(completeStateRestoration)] + pub unsafe fn completeStateRestoration(&self, ); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UISceneOptions.rs b/crates/icrate-generated/src/UIKit/generated/UISceneOptions.rs new file mode 100644 index 000000000..3d68b7a61 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UISceneOptions.rs @@ -0,0 +1,153 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UISceneConnectionOptions; + + unsafe impl ClassType for UISceneConnectionOptions { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UISceneConnectionOptions { + #[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 URLContexts)] + pub unsafe fn URLContexts(&self, ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other sourceApplication)] + pub unsafe fn sourceApplication(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other handoffUserActivityType)] + pub unsafe fn handoffUserActivityType(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other userActivities)] + pub unsafe fn userActivities(&self, ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other notificationResponse)] + pub unsafe fn notificationResponse(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other shortcutItem)] + pub unsafe fn shortcutItem(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other cloudKitShareMetadata)] + pub unsafe fn cloudKitShareMetadata(&self, ) -> Option>; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UISceneOpenURLOptions; + + unsafe impl ClassType for UISceneOpenURLOptions { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UISceneOpenURLOptions { + #[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 sourceApplication)] + pub unsafe fn sourceApplication(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other annotation)] + pub unsafe fn annotation(&self, ) -> Option>; + + #[method(openInPlace)] + pub unsafe fn openInPlace(&self, ) -> bool; + + #[method_id(@__retain_semantics Other eventAttribution)] + pub unsafe fn eventAttribution(&self, ) -> Option>; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UISceneOpenExternalURLOptions; + + unsafe impl ClassType for UISceneOpenExternalURLOptions { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UISceneOpenExternalURLOptions { + #[method(universalLinksOnly)] + pub unsafe fn universalLinksOnly(&self, ) -> bool; + + #[method(setUniversalLinksOnly:)] + pub unsafe fn setUniversalLinksOnly(&self, universalLinksOnly: bool,); + + #[method_id(@__retain_semantics Other eventAttribution)] + pub unsafe fn eventAttribution(&self, ) -> Option>; + + #[method(setEventAttribution:)] + pub unsafe fn setEventAttribution(&self, eventAttribution: Option<&UIEventAttribution>,); + + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UISceneCollectionJoinBehavior { + UISceneCollectionJoinBehaviorAutomatic = 0, + UISceneCollectionJoinBehaviorPreferred = 1, + UISceneCollectionJoinBehaviorDisallowed = 2, + UISceneCollectionJoinBehaviorPreferredWithoutActivating = 3, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UISceneActivationRequestOptions; + + unsafe impl ClassType for UISceneActivationRequestOptions { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UISceneActivationRequestOptions { + #[method_id(@__retain_semantics Other requestingScene)] + pub unsafe fn requestingScene(&self, ) -> Option>; + + #[method(setRequestingScene:)] + pub unsafe fn setRequestingScene(&self, requestingScene: Option<&UIScene>,); + + #[method(collectionJoinBehavior)] + pub unsafe fn collectionJoinBehavior(&self, ) -> UISceneCollectionJoinBehavior; + + #[method(setCollectionJoinBehavior:)] + pub unsafe fn setCollectionJoinBehavior(&self, collectionJoinBehavior: UISceneCollectionJoinBehavior,); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UISceneDestructionRequestOptions; + + unsafe impl ClassType for UISceneDestructionRequestOptions { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UISceneDestructionRequestOptions { + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UISceneSession.rs b/crates/icrate-generated/src/UIKit/generated/UISceneSession.rs new file mode 100644 index 000000000..e0b16dfab --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UISceneSession.rs @@ -0,0 +1,92 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UISceneConfiguration; + + unsafe impl ClassType for UISceneConfiguration { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UISceneConfiguration { + #[method_id(@__retain_semantics Other configurationWithName:sessionRole:)] + pub unsafe fn configurationWithName_sessionRole(name: Option<&NSString>,sessionRole: &UISceneSessionRole,) -> Id; + + #[method_id(@__retain_semantics Init initWithName:sessionRole:)] + pub unsafe fn initWithName_sessionRole(this: Option>, name: Option<&NSString>,sessionRole: &UISceneSessionRole,) -> Id; + + #[method_id(@__retain_semantics Other name)] + pub unsafe fn name(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other role)] + pub unsafe fn role(&self, ) -> Id; + + #[method(sceneClass)] + pub unsafe fn sceneClass(&self, ) -> Option<&'static Class>; + + #[method(setSceneClass:)] + pub unsafe fn setSceneClass(&self, sceneClass: Option<&Class>,); + + #[method(delegateClass)] + pub unsafe fn delegateClass(&self, ) -> Option<&'static Class>; + + #[method(setDelegateClass:)] + pub unsafe fn setDelegateClass(&self, delegateClass: Option<&Class>,); + + #[method_id(@__retain_semantics Other storyboard)] + pub unsafe fn storyboard(&self, ) -> Option>; + + #[method(setStoryboard:)] + pub unsafe fn setStoryboard(&self, storyboard: Option<&UIStoryboard>,); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UISceneSession; + + unsafe impl ClassType for UISceneSession { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UISceneSession { + #[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 scene)] + pub unsafe fn scene(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other role)] + pub unsafe fn role(&self, ) -> Id; + + #[method_id(@__retain_semantics Other configuration)] + pub unsafe fn configuration(&self, ) -> Id; + + #[method_id(@__retain_semantics Other persistentIdentifier)] + pub unsafe fn persistentIdentifier(&self, ) -> Id; + + #[method_id(@__retain_semantics Other stateRestorationActivity)] + pub unsafe fn stateRestorationActivity(&self, ) -> Option>; + + #[method(setStateRestorationActivity:)] + pub unsafe fn setStateRestorationActivity(&self, stateRestorationActivity: Option<&NSUserActivity>,); + + #[method_id(@__retain_semantics Other userInfo)] + pub unsafe fn userInfo(&self, ) -> Option, Shared>>; + + #[method(setUserInfo:)] + pub unsafe fn setUserInfo(&self, userInfo: Option<&NSDictionary>,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UISceneWindowingBehaviors.rs b/crates/icrate-generated/src/UIKit/generated/UISceneWindowingBehaviors.rs new file mode 100644 index 000000000..9be72fca4 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UISceneWindowingBehaviors.rs @@ -0,0 +1,36 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UISceneWindowingBehaviors; + + unsafe impl ClassType for UISceneWindowingBehaviors { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UISceneWindowingBehaviors { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Option>; + + #[method_id(@__retain_semantics New new)] + pub unsafe fn new() -> Option>; + + #[method(isClosable)] + pub unsafe fn isClosable(&self, ) -> bool; + + #[method(setClosable:)] + pub unsafe fn setClosable(&self, closable: bool,); + + #[method(isMiniaturizable)] + pub unsafe fn isMiniaturizable(&self, ) -> bool; + + #[method(setMiniaturizable:)] + pub unsafe fn setMiniaturizable(&self, miniaturizable: bool,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIScreen.rs b/crates/icrate-generated/src/UIKit/generated/UIScreen.rs new file mode 100644 index 000000000..b691e2a45 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIScreen.rs @@ -0,0 +1,152 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_static!(UIScreenDidConnectNotification: &'static NSNotificationName); + +extern_static!(UIScreenDidDisconnectNotification: &'static NSNotificationName); + +extern_static!(UIScreenModeDidChangeNotification: &'static NSNotificationName); + +extern_static!(UIScreenBrightnessDidChangeNotification: &'static NSNotificationName); + +extern_static!(UIScreenCapturedDidChangeNotification: &'static NSNotificationName); + +extern_static!(UIScreenReferenceDisplayModeStatusDidChangeNotification: &'static NSNotificationName); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIScreenOverscanCompensation { + UIScreenOverscanCompensationScale = 0, + UIScreenOverscanCompensationInsetBounds = 1, + UIScreenOverscanCompensationNone = 2, + UIScreenOverscanCompensationInsetApplicationFrame = 2, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIScreenReferenceDisplayModeStatus { + UIScreenReferenceDisplayModeStatusNotSupported = 0, + UIScreenReferenceDisplayModeStatusNotEnabled = 1, + UIScreenReferenceDisplayModeStatusLimited = 2, + UIScreenReferenceDisplayModeStatusEnabled = 3, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIScreen; + + unsafe impl ClassType for UIScreen { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIScreen { + #[method_id(@__retain_semantics Other screens)] + pub unsafe fn screens() -> Id, Shared>; + + #[method_id(@__retain_semantics Other mainScreen)] + pub unsafe fn mainScreen() -> Id; + + #[method(bounds)] + pub unsafe fn bounds(&self, ) -> CGRect; + + #[method(scale)] + pub unsafe fn scale(&self, ) -> CGFloat; + + #[method_id(@__retain_semantics Other availableModes)] + pub unsafe fn availableModes(&self, ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other preferredMode)] + pub unsafe fn preferredMode(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other currentMode)] + pub unsafe fn currentMode(&self, ) -> Option>; + + #[method(setCurrentMode:)] + pub unsafe fn setCurrentMode(&self, currentMode: Option<&UIScreenMode>,); + + #[method(overscanCompensation)] + pub unsafe fn overscanCompensation(&self, ) -> UIScreenOverscanCompensation; + + #[method(setOverscanCompensation:)] + pub unsafe fn setOverscanCompensation(&self, overscanCompensation: UIScreenOverscanCompensation,); + + #[method(overscanCompensationInsets)] + pub unsafe fn overscanCompensationInsets(&self, ) -> UIEdgeInsets; + + #[method_id(@__retain_semantics Other mirroredScreen)] + pub unsafe fn mirroredScreen(&self, ) -> Option>; + + #[method(isCaptured)] + pub unsafe fn isCaptured(&self, ) -> bool; + + #[method(brightness)] + pub unsafe fn brightness(&self, ) -> CGFloat; + + #[method(setBrightness:)] + pub unsafe fn setBrightness(&self, brightness: CGFloat,); + + #[method(wantsSoftwareDimming)] + pub unsafe fn wantsSoftwareDimming(&self, ) -> bool; + + #[method(setWantsSoftwareDimming:)] + pub unsafe fn setWantsSoftwareDimming(&self, wantsSoftwareDimming: bool,); + + #[method_id(@__retain_semantics Other coordinateSpace)] + pub unsafe fn coordinateSpace(&self, ) -> Id; + + #[method_id(@__retain_semantics Other fixedCoordinateSpace)] + pub unsafe fn fixedCoordinateSpace(&self, ) -> Id; + + #[method(nativeBounds)] + pub unsafe fn nativeBounds(&self, ) -> CGRect; + + #[method(nativeScale)] + pub unsafe fn nativeScale(&self, ) -> CGFloat; + + #[method_id(@__retain_semantics Other displayLinkWithTarget:selector:)] + pub unsafe fn displayLinkWithTarget_selector(&self, target: &Object,sel: Sel,) -> Option>; + + #[method(maximumFramesPerSecond)] + pub unsafe fn maximumFramesPerSecond(&self, ) -> NSInteger; + + #[method(calibratedLatency)] + pub unsafe fn calibratedLatency(&self, ) -> CFTimeInterval; + + #[method(referenceDisplayModeStatus)] + pub unsafe fn referenceDisplayModeStatus(&self, ) -> UIScreenReferenceDisplayModeStatus; + + #[method(currentEDRHeadroom)] + pub unsafe fn currentEDRHeadroom(&self, ) -> CGFloat; + + #[method(potentialEDRHeadroom)] + pub unsafe fn potentialEDRHeadroom(&self, ) -> CGFloat; + + #[method_id(@__retain_semantics Other focusedItem)] + pub unsafe fn focusedItem(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other focusedView)] + pub unsafe fn focusedView(&self, ) -> Option>; + + #[method(supportsFocus)] + pub unsafe fn supportsFocus(&self, ) -> bool; + + #[method(applicationFrame)] + pub unsafe fn applicationFrame(&self, ) -> CGRect; + + } +); + +extern_methods!( + /// UISnapshotting + unsafe impl UIScreen { + #[method_id(@__retain_semantics Other snapshotViewAfterScreenUpdates:)] + pub unsafe fn snapshotViewAfterScreenUpdates(&self, afterUpdates: bool,) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIScreenEdgePanGestureRecognizer.rs b/crates/icrate-generated/src/UIKit/generated/UIScreenEdgePanGestureRecognizer.rs new file mode 100644 index 000000000..a502122e2 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIScreenEdgePanGestureRecognizer.rs @@ -0,0 +1,24 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIScreenEdgePanGestureRecognizer; + + unsafe impl ClassType for UIScreenEdgePanGestureRecognizer { + type Super = UIPanGestureRecognizer; + } +); + +extern_methods!( + unsafe impl UIScreenEdgePanGestureRecognizer { + #[method(edges)] + pub unsafe fn edges(&self, ) -> UIRectEdge; + + #[method(setEdges:)] + pub unsafe fn setEdges(&self, edges: UIRectEdge,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIScreenMode.rs b/crates/icrate-generated/src/UIKit/generated/UIScreenMode.rs new file mode 100644 index 000000000..cf590609f --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIScreenMode.rs @@ -0,0 +1,24 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIScreenMode; + + unsafe impl ClassType for UIScreenMode { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIScreenMode { + #[method(size)] + pub unsafe fn size(&self, ) -> CGSize; + + #[method(pixelAspectRatio)] + pub unsafe fn pixelAspectRatio(&self, ) -> CGFloat; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIScreenshotService.rs b/crates/icrate-generated/src/UIKit/generated/UIScreenshotService.rs new file mode 100644 index 000000000..77dca9a37 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIScreenshotService.rs @@ -0,0 +1,53 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIScreenshotService; + + unsafe impl ClassType for UIScreenshotService { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIScreenshotService { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics New new)] + pub unsafe fn new() -> Id; + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&UIScreenshotServiceDelegate>,); + + #[method_id(@__retain_semantics Other windowScene)] + pub unsafe fn windowScene(&self, ) -> Option>; + + } +); + +extern_methods!( + /// UIScreenshotService + unsafe impl UIWindowScene { + #[method_id(@__retain_semantics Other screenshotService)] + pub unsafe fn screenshotService(&self, ) -> Option>; + + } +); + +extern_protocol!( + pub struct UIScreenshotServiceDelegate; + + unsafe impl UIScreenshotServiceDelegate { + #[optional] + #[method(screenshotService:generatePDFRepresentationWithCompletion:)] + pub unsafe fn screenshotService_generatePDFRepresentationWithCompletion(&self, screenshotService: &UIScreenshotService,completionHandler: &Block<(*mut NSData, NSInteger, CGRect, ), ()>,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIScribbleInteraction.rs b/crates/icrate-generated/src/UIKit/generated/UIScribbleInteraction.rs new file mode 100644 index 000000000..7ffdaea6b --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIScribbleInteraction.rs @@ -0,0 +1,59 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIScribbleInteraction; + + unsafe impl ClassType for UIScribbleInteraction { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIScribbleInteraction { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics New new)] + pub unsafe fn new() -> Id; + + #[method_id(@__retain_semantics Init initWithDelegate:)] + pub unsafe fn initWithDelegate(this: Option>, delegate: &UIScribbleInteractionDelegate,) -> Id; + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(isHandlingWriting)] + pub unsafe fn isHandlingWriting(&self, ) -> bool; + + #[method(isPencilInputExpected)] + pub unsafe fn isPencilInputExpected() -> bool; + + } +); + +extern_protocol!( + pub struct UIScribbleInteractionDelegate; + + unsafe impl UIScribbleInteractionDelegate { + #[optional] + #[method(scribbleInteraction:shouldBeginAtLocation:)] + pub unsafe fn scribbleInteraction_shouldBeginAtLocation(&self, interaction: &UIScribbleInteraction,location: CGPoint,) -> bool; + + #[optional] + #[method(scribbleInteractionShouldDelayFocus:)] + pub unsafe fn scribbleInteractionShouldDelayFocus(&self, interaction: &UIScribbleInteraction,) -> bool; + + #[optional] + #[method(scribbleInteractionWillBeginWriting:)] + pub unsafe fn scribbleInteractionWillBeginWriting(&self, interaction: &UIScribbleInteraction,); + + #[optional] + #[method(scribbleInteractionDidFinishWriting:)] + pub unsafe fn scribbleInteractionDidFinishWriting(&self, interaction: &UIScribbleInteraction,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIScrollView.rs b/crates/icrate-generated/src/UIKit/generated/UIScrollView.rs new file mode 100644 index 000000000..4651130cb --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIScrollView.rs @@ -0,0 +1,356 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIScrollViewIndicatorStyle { + UIScrollViewIndicatorStyleDefault = 0, + UIScrollViewIndicatorStyleBlack = 1, + UIScrollViewIndicatorStyleWhite = 2, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIScrollViewKeyboardDismissMode { + UIScrollViewKeyboardDismissModeNone = 0, + UIScrollViewKeyboardDismissModeOnDrag = 1, + UIScrollViewKeyboardDismissModeInteractive = 2, + UIScrollViewKeyboardDismissModeOnDragWithAccessory = 3, + UIScrollViewKeyboardDismissModeInteractiveWithAccessory = 4, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIScrollViewIndexDisplayMode { + UIScrollViewIndexDisplayModeAutomatic = 0, + UIScrollViewIndexDisplayModeAlwaysHidden = 1, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIScrollViewContentInsetAdjustmentBehavior { + UIScrollViewContentInsetAdjustmentAutomatic = 0, + UIScrollViewContentInsetAdjustmentScrollableAxes = 1, + UIScrollViewContentInsetAdjustmentNever = 2, + UIScrollViewContentInsetAdjustmentAlways = 3, + } +); + +pub type UIScrollViewDecelerationRate = CGFloat; + +extern_static!(UIScrollViewDecelerationRateNormal: UIScrollViewDecelerationRate); + +extern_static!(UIScrollViewDecelerationRateFast: UIScrollViewDecelerationRate); + +extern_class!( + #[derive(Debug)] + pub struct UIScrollView; + + unsafe impl ClassType for UIScrollView { + type Super = UIView; + } +); + +extern_methods!( + unsafe impl UIScrollView { + #[method(contentOffset)] + pub unsafe fn contentOffset(&self, ) -> CGPoint; + + #[method(setContentOffset:)] + pub unsafe fn setContentOffset(&self, contentOffset: CGPoint,); + + #[method(contentSize)] + pub unsafe fn contentSize(&self, ) -> CGSize; + + #[method(setContentSize:)] + pub unsafe fn setContentSize(&self, contentSize: CGSize,); + + #[method(contentInset)] + pub unsafe fn contentInset(&self, ) -> UIEdgeInsets; + + #[method(setContentInset:)] + pub unsafe fn setContentInset(&self, contentInset: UIEdgeInsets,); + + #[method(adjustedContentInset)] + pub unsafe fn adjustedContentInset(&self, ) -> UIEdgeInsets; + + #[method(adjustedContentInsetDidChange)] + pub unsafe fn adjustedContentInsetDidChange(&self, ); + + #[method(contentInsetAdjustmentBehavior)] + pub unsafe fn contentInsetAdjustmentBehavior(&self, ) -> UIScrollViewContentInsetAdjustmentBehavior; + + #[method(setContentInsetAdjustmentBehavior:)] + pub unsafe fn setContentInsetAdjustmentBehavior(&self, contentInsetAdjustmentBehavior: UIScrollViewContentInsetAdjustmentBehavior,); + + #[method(automaticallyAdjustsScrollIndicatorInsets)] + pub unsafe fn automaticallyAdjustsScrollIndicatorInsets(&self, ) -> bool; + + #[method(setAutomaticallyAdjustsScrollIndicatorInsets:)] + pub unsafe fn setAutomaticallyAdjustsScrollIndicatorInsets(&self, automaticallyAdjustsScrollIndicatorInsets: bool,); + + #[method_id(@__retain_semantics Other contentLayoutGuide)] + pub unsafe fn contentLayoutGuide(&self, ) -> Id; + + #[method_id(@__retain_semantics Other frameLayoutGuide)] + pub unsafe fn frameLayoutGuide(&self, ) -> Id; + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&UIScrollViewDelegate>,); + + #[method(isDirectionalLockEnabled)] + pub unsafe fn isDirectionalLockEnabled(&self, ) -> bool; + + #[method(setDirectionalLockEnabled:)] + pub unsafe fn setDirectionalLockEnabled(&self, directionalLockEnabled: bool,); + + #[method(bounces)] + pub unsafe fn bounces(&self, ) -> bool; + + #[method(setBounces:)] + pub unsafe fn setBounces(&self, bounces: bool,); + + #[method(alwaysBounceVertical)] + pub unsafe fn alwaysBounceVertical(&self, ) -> bool; + + #[method(setAlwaysBounceVertical:)] + pub unsafe fn setAlwaysBounceVertical(&self, alwaysBounceVertical: bool,); + + #[method(alwaysBounceHorizontal)] + pub unsafe fn alwaysBounceHorizontal(&self, ) -> bool; + + #[method(setAlwaysBounceHorizontal:)] + pub unsafe fn setAlwaysBounceHorizontal(&self, alwaysBounceHorizontal: bool,); + + #[method(isPagingEnabled)] + pub unsafe fn isPagingEnabled(&self, ) -> bool; + + #[method(setPagingEnabled:)] + pub unsafe fn setPagingEnabled(&self, pagingEnabled: bool,); + + #[method(isScrollEnabled)] + pub unsafe fn isScrollEnabled(&self, ) -> bool; + + #[method(setScrollEnabled:)] + pub unsafe fn setScrollEnabled(&self, scrollEnabled: bool,); + + #[method(showsVerticalScrollIndicator)] + pub unsafe fn showsVerticalScrollIndicator(&self, ) -> bool; + + #[method(setShowsVerticalScrollIndicator:)] + pub unsafe fn setShowsVerticalScrollIndicator(&self, showsVerticalScrollIndicator: bool,); + + #[method(showsHorizontalScrollIndicator)] + pub unsafe fn showsHorizontalScrollIndicator(&self, ) -> bool; + + #[method(setShowsHorizontalScrollIndicator:)] + pub unsafe fn setShowsHorizontalScrollIndicator(&self, showsHorizontalScrollIndicator: bool,); + + #[method(indicatorStyle)] + pub unsafe fn indicatorStyle(&self, ) -> UIScrollViewIndicatorStyle; + + #[method(setIndicatorStyle:)] + pub unsafe fn setIndicatorStyle(&self, indicatorStyle: UIScrollViewIndicatorStyle,); + + #[method(verticalScrollIndicatorInsets)] + pub unsafe fn verticalScrollIndicatorInsets(&self, ) -> UIEdgeInsets; + + #[method(setVerticalScrollIndicatorInsets:)] + pub unsafe fn setVerticalScrollIndicatorInsets(&self, verticalScrollIndicatorInsets: UIEdgeInsets,); + + #[method(horizontalScrollIndicatorInsets)] + pub unsafe fn horizontalScrollIndicatorInsets(&self, ) -> UIEdgeInsets; + + #[method(setHorizontalScrollIndicatorInsets:)] + pub unsafe fn setHorizontalScrollIndicatorInsets(&self, horizontalScrollIndicatorInsets: UIEdgeInsets,); + + #[method(scrollIndicatorInsets)] + pub unsafe fn scrollIndicatorInsets(&self, ) -> UIEdgeInsets; + + #[method(setScrollIndicatorInsets:)] + pub unsafe fn setScrollIndicatorInsets(&self, scrollIndicatorInsets: UIEdgeInsets,); + + #[method(decelerationRate)] + pub unsafe fn decelerationRate(&self, ) -> UIScrollViewDecelerationRate; + + #[method(setDecelerationRate:)] + pub unsafe fn setDecelerationRate(&self, decelerationRate: UIScrollViewDecelerationRate,); + + #[method(indexDisplayMode)] + pub unsafe fn indexDisplayMode(&self, ) -> UIScrollViewIndexDisplayMode; + + #[method(setIndexDisplayMode:)] + pub unsafe fn setIndexDisplayMode(&self, indexDisplayMode: UIScrollViewIndexDisplayMode,); + + #[method(setContentOffset:animated:)] + pub unsafe fn setContentOffset_animated(&self, contentOffset: CGPoint,animated: bool,); + + #[method(scrollRectToVisible:animated:)] + pub unsafe fn scrollRectToVisible_animated(&self, rect: CGRect,animated: bool,); + + #[method(flashScrollIndicators)] + pub unsafe fn flashScrollIndicators(&self, ); + + #[method(isTracking)] + pub unsafe fn isTracking(&self, ) -> bool; + + #[method(isDragging)] + pub unsafe fn isDragging(&self, ) -> bool; + + #[method(isDecelerating)] + pub unsafe fn isDecelerating(&self, ) -> bool; + + #[method(delaysContentTouches)] + pub unsafe fn delaysContentTouches(&self, ) -> bool; + + #[method(setDelaysContentTouches:)] + pub unsafe fn setDelaysContentTouches(&self, delaysContentTouches: bool,); + + #[method(canCancelContentTouches)] + pub unsafe fn canCancelContentTouches(&self, ) -> bool; + + #[method(setCanCancelContentTouches:)] + pub unsafe fn setCanCancelContentTouches(&self, canCancelContentTouches: bool,); + + #[method(touchesShouldBegin:withEvent:inContentView:)] + pub unsafe fn touchesShouldBegin_withEvent_inContentView(&self, touches: &NSSet,event: Option<&UIEvent>,view: &UIView,) -> bool; + + #[method(touchesShouldCancelInContentView:)] + pub unsafe fn touchesShouldCancelInContentView(&self, view: &UIView,) -> bool; + + #[method(minimumZoomScale)] + pub unsafe fn minimumZoomScale(&self, ) -> CGFloat; + + #[method(setMinimumZoomScale:)] + pub unsafe fn setMinimumZoomScale(&self, minimumZoomScale: CGFloat,); + + #[method(maximumZoomScale)] + pub unsafe fn maximumZoomScale(&self, ) -> CGFloat; + + #[method(setMaximumZoomScale:)] + pub unsafe fn setMaximumZoomScale(&self, maximumZoomScale: CGFloat,); + + #[method(zoomScale)] + pub unsafe fn zoomScale(&self, ) -> CGFloat; + + #[method(setZoomScale:)] + pub unsafe fn setZoomScale(&self, zoomScale: CGFloat,); + + #[method(setZoomScale:animated:)] + pub unsafe fn setZoomScale_animated(&self, scale: CGFloat,animated: bool,); + + #[method(zoomToRect:animated:)] + pub unsafe fn zoomToRect_animated(&self, rect: CGRect,animated: bool,); + + #[method(bouncesZoom)] + pub unsafe fn bouncesZoom(&self, ) -> bool; + + #[method(setBouncesZoom:)] + pub unsafe fn setBouncesZoom(&self, bouncesZoom: bool,); + + #[method(isZooming)] + pub unsafe fn isZooming(&self, ) -> bool; + + #[method(isZoomBouncing)] + pub unsafe fn isZoomBouncing(&self, ) -> bool; + + #[method(scrollsToTop)] + pub unsafe fn scrollsToTop(&self, ) -> bool; + + #[method(setScrollsToTop:)] + pub unsafe fn setScrollsToTop(&self, scrollsToTop: bool,); + + #[method_id(@__retain_semantics Other panGestureRecognizer)] + pub unsafe fn panGestureRecognizer(&self, ) -> Id; + + #[method_id(@__retain_semantics Other pinchGestureRecognizer)] + pub unsafe fn pinchGestureRecognizer(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other directionalPressGestureRecognizer)] + pub unsafe fn directionalPressGestureRecognizer(&self, ) -> Id; + + #[method(keyboardDismissMode)] + pub unsafe fn keyboardDismissMode(&self, ) -> UIScrollViewKeyboardDismissMode; + + #[method(setKeyboardDismissMode:)] + pub unsafe fn setKeyboardDismissMode(&self, keyboardDismissMode: UIScrollViewKeyboardDismissMode,); + + #[method_id(@__retain_semantics Other refreshControl)] + pub unsafe fn refreshControl(&self, ) -> Option>; + + #[method(setRefreshControl:)] + pub unsafe fn setRefreshControl(&self, refreshControl: Option<&UIRefreshControl>,); + + } +); + +extern_protocol!( + pub struct UIScrollViewDelegate; + + unsafe impl UIScrollViewDelegate { + #[optional] + #[method(scrollViewDidScroll:)] + pub unsafe fn scrollViewDidScroll(&self, scrollView: &UIScrollView,); + + #[optional] + #[method(scrollViewDidZoom:)] + pub unsafe fn scrollViewDidZoom(&self, scrollView: &UIScrollView,); + + #[optional] + #[method(scrollViewWillBeginDragging:)] + pub unsafe fn scrollViewWillBeginDragging(&self, scrollView: &UIScrollView,); + + #[optional] + #[method(scrollViewWillEndDragging:withVelocity:targetContentOffset:)] + pub unsafe fn scrollViewWillEndDragging_withVelocity_targetContentOffset(&self, scrollView: &UIScrollView,velocity: CGPoint,targetContentOffset: NonNull,); + + #[optional] + #[method(scrollViewDidEndDragging:willDecelerate:)] + pub unsafe fn scrollViewDidEndDragging_willDecelerate(&self, scrollView: &UIScrollView,decelerate: bool,); + + #[optional] + #[method(scrollViewWillBeginDecelerating:)] + pub unsafe fn scrollViewWillBeginDecelerating(&self, scrollView: &UIScrollView,); + + #[optional] + #[method(scrollViewDidEndDecelerating:)] + pub unsafe fn scrollViewDidEndDecelerating(&self, scrollView: &UIScrollView,); + + #[optional] + #[method(scrollViewDidEndScrollingAnimation:)] + pub unsafe fn scrollViewDidEndScrollingAnimation(&self, scrollView: &UIScrollView,); + + #[optional] + #[method_id(@__retain_semantics Other viewForZoomingInScrollView:)] + pub unsafe fn viewForZoomingInScrollView(&self, scrollView: &UIScrollView,) -> Option>; + + #[optional] + #[method(scrollViewWillBeginZooming:withView:)] + pub unsafe fn scrollViewWillBeginZooming_withView(&self, scrollView: &UIScrollView,view: Option<&UIView>,); + + #[optional] + #[method(scrollViewDidEndZooming:withView:atScale:)] + pub unsafe fn scrollViewDidEndZooming_withView_atScale(&self, scrollView: &UIScrollView,view: Option<&UIView>,scale: CGFloat,); + + #[optional] + #[method(scrollViewShouldScrollToTop:)] + pub unsafe fn scrollViewShouldScrollToTop(&self, scrollView: &UIScrollView,) -> bool; + + #[optional] + #[method(scrollViewDidScrollToTop:)] + pub unsafe fn scrollViewDidScrollToTop(&self, scrollView: &UIScrollView,); + + #[optional] + #[method(scrollViewDidChangeAdjustedContentInset:)] + pub unsafe fn scrollViewDidChangeAdjustedContentInset(&self, scrollView: &UIScrollView,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UISearchBar.rs b/crates/icrate-generated/src/UIKit/generated/UISearchBar.rs new file mode 100644 index 000000000..a85caa39d --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UISearchBar.rs @@ -0,0 +1,277 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UISearchBarIcon { + UISearchBarIconSearch = 0, + UISearchBarIconClear = 1, + UISearchBarIconBookmark = 2, + UISearchBarIconResultsList = 3, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum UISearchBarStyle { + UISearchBarStyleDefault = 0, + UISearchBarStyleProminent = 1, + UISearchBarStyleMinimal = 2, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UISearchBar; + + unsafe impl ClassType for UISearchBar { + type Super = UIView; + } +); + +extern_methods!( + unsafe impl UISearchBar { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics Init initWithFrame:)] + pub unsafe fn initWithFrame(this: Option>, frame: CGRect,) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method(barStyle)] + pub unsafe fn barStyle(&self, ) -> UIBarStyle; + + #[method(setBarStyle:)] + pub unsafe fn setBarStyle(&self, barStyle: UIBarStyle,); + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&UISearchBarDelegate>,); + + #[method_id(@__retain_semantics Other text)] + pub unsafe fn text(&self, ) -> Option>; + + #[method(setText:)] + pub unsafe fn setText(&self, text: Option<&NSString>,); + + #[method_id(@__retain_semantics Other prompt)] + pub unsafe fn prompt(&self, ) -> Option>; + + #[method(setPrompt:)] + pub unsafe fn setPrompt(&self, prompt: Option<&NSString>,); + + #[method_id(@__retain_semantics Other placeholder)] + pub unsafe fn placeholder(&self, ) -> Option>; + + #[method(setPlaceholder:)] + pub unsafe fn setPlaceholder(&self, placeholder: Option<&NSString>,); + + #[method(showsBookmarkButton)] + pub unsafe fn showsBookmarkButton(&self, ) -> bool; + + #[method(setShowsBookmarkButton:)] + pub unsafe fn setShowsBookmarkButton(&self, showsBookmarkButton: bool,); + + #[method_id(@__retain_semantics Other searchTextField)] + pub unsafe fn searchTextField(&self, ) -> Id; + + #[method(showsCancelButton)] + pub unsafe fn showsCancelButton(&self, ) -> bool; + + #[method(setShowsCancelButton:)] + pub unsafe fn setShowsCancelButton(&self, showsCancelButton: bool,); + + #[method(showsSearchResultsButton)] + pub unsafe fn showsSearchResultsButton(&self, ) -> bool; + + #[method(setShowsSearchResultsButton:)] + pub unsafe fn setShowsSearchResultsButton(&self, showsSearchResultsButton: bool,); + + #[method(isSearchResultsButtonSelected)] + pub unsafe fn isSearchResultsButtonSelected(&self, ) -> bool; + + #[method(setSearchResultsButtonSelected:)] + pub unsafe fn setSearchResultsButtonSelected(&self, searchResultsButtonSelected: bool,); + + #[method(setShowsCancelButton:animated:)] + pub unsafe fn setShowsCancelButton_animated(&self, showsCancelButton: bool,animated: bool,); + + #[method_id(@__retain_semantics Other inputAssistantItem)] + pub unsafe fn inputAssistantItem(&self, ) -> Id; + + #[method_id(@__retain_semantics Other tintColor)] + pub unsafe fn tintColor(&self, ) -> Option>; + + #[method(setTintColor:)] + pub unsafe fn setTintColor(&self, tintColor: Option<&UIColor>,); + + #[method_id(@__retain_semantics Other barTintColor)] + pub unsafe fn barTintColor(&self, ) -> Option>; + + #[method(setBarTintColor:)] + pub unsafe fn setBarTintColor(&self, barTintColor: Option<&UIColor>,); + + #[method(searchBarStyle)] + pub unsafe fn searchBarStyle(&self, ) -> UISearchBarStyle; + + #[method(setSearchBarStyle:)] + pub unsafe fn setSearchBarStyle(&self, searchBarStyle: UISearchBarStyle,); + + #[method(isTranslucent)] + pub unsafe fn isTranslucent(&self, ) -> bool; + + #[method(setTranslucent:)] + pub unsafe fn setTranslucent(&self, translucent: bool,); + + #[method_id(@__retain_semantics Other scopeButtonTitles)] + pub unsafe fn scopeButtonTitles(&self, ) -> Option, Shared>>; + + #[method(setScopeButtonTitles:)] + pub unsafe fn setScopeButtonTitles(&self, scopeButtonTitles: Option<&NSArray>,); + + #[method(selectedScopeButtonIndex)] + pub unsafe fn selectedScopeButtonIndex(&self, ) -> NSInteger; + + #[method(setSelectedScopeButtonIndex:)] + pub unsafe fn setSelectedScopeButtonIndex(&self, selectedScopeButtonIndex: NSInteger,); + + #[method(showsScopeBar)] + pub unsafe fn showsScopeBar(&self, ) -> bool; + + #[method(setShowsScopeBar:)] + pub unsafe fn setShowsScopeBar(&self, showsScopeBar: bool,); + + #[method(setShowsScopeBar:animated:)] + pub unsafe fn setShowsScopeBar_animated(&self, show: bool,animate: bool,); + + #[method_id(@__retain_semantics Other inputAccessoryView)] + pub unsafe fn inputAccessoryView(&self, ) -> Option>; + + #[method(setInputAccessoryView:)] + pub unsafe fn setInputAccessoryView(&self, inputAccessoryView: Option<&UIView>,); + + #[method_id(@__retain_semantics Other backgroundImage)] + pub unsafe fn backgroundImage(&self, ) -> Option>; + + #[method(setBackgroundImage:)] + pub unsafe fn setBackgroundImage(&self, backgroundImage: Option<&UIImage>,); + + #[method_id(@__retain_semantics Other scopeBarBackgroundImage)] + pub unsafe fn scopeBarBackgroundImage(&self, ) -> Option>; + + #[method(setScopeBarBackgroundImage:)] + pub unsafe fn setScopeBarBackgroundImage(&self, scopeBarBackgroundImage: Option<&UIImage>,); + + #[method(setBackgroundImage:forBarPosition:barMetrics:)] + pub unsafe fn setBackgroundImage_forBarPosition_barMetrics(&self, backgroundImage: Option<&UIImage>,barPosition: UIBarPosition,barMetrics: UIBarMetrics,); + + #[method_id(@__retain_semantics Other backgroundImageForBarPosition:barMetrics:)] + pub unsafe fn backgroundImageForBarPosition_barMetrics(&self, barPosition: UIBarPosition,barMetrics: UIBarMetrics,) -> Option>; + + #[method(setSearchFieldBackgroundImage:forState:)] + pub unsafe fn setSearchFieldBackgroundImage_forState(&self, backgroundImage: Option<&UIImage>,state: UIControlState,); + + #[method_id(@__retain_semantics Other searchFieldBackgroundImageForState:)] + pub unsafe fn searchFieldBackgroundImageForState(&self, state: UIControlState,) -> Option>; + + #[method(setImage:forSearchBarIcon:state:)] + pub unsafe fn setImage_forSearchBarIcon_state(&self, iconImage: Option<&UIImage>,icon: UISearchBarIcon,state: UIControlState,); + + #[method_id(@__retain_semantics Other imageForSearchBarIcon:state:)] + pub unsafe fn imageForSearchBarIcon_state(&self, icon: UISearchBarIcon,state: UIControlState,) -> Option>; + + #[method(setScopeBarButtonBackgroundImage:forState:)] + pub unsafe fn setScopeBarButtonBackgroundImage_forState(&self, backgroundImage: Option<&UIImage>,state: UIControlState,); + + #[method_id(@__retain_semantics Other scopeBarButtonBackgroundImageForState:)] + pub unsafe fn scopeBarButtonBackgroundImageForState(&self, state: UIControlState,) -> Option>; + + #[method(setScopeBarButtonDividerImage:forLeftSegmentState:rightSegmentState:)] + pub unsafe fn setScopeBarButtonDividerImage_forLeftSegmentState_rightSegmentState(&self, dividerImage: Option<&UIImage>,leftState: UIControlState,rightState: UIControlState,); + + #[method_id(@__retain_semantics Other scopeBarButtonDividerImageForLeftSegmentState:rightSegmentState:)] + pub unsafe fn scopeBarButtonDividerImageForLeftSegmentState_rightSegmentState(&self, leftState: UIControlState,rightState: UIControlState,) -> Option>; + + #[method(setScopeBarButtonTitleTextAttributes:forState:)] + pub unsafe fn setScopeBarButtonTitleTextAttributes_forState(&self, attributes: Option<&NSDictionary>,state: UIControlState,); + + #[method_id(@__retain_semantics Other scopeBarButtonTitleTextAttributesForState:)] + pub unsafe fn scopeBarButtonTitleTextAttributesForState(&self, state: UIControlState,) -> Option, Shared>>; + + #[method(searchFieldBackgroundPositionAdjustment)] + pub unsafe fn searchFieldBackgroundPositionAdjustment(&self, ) -> UIOffset; + + #[method(setSearchFieldBackgroundPositionAdjustment:)] + pub unsafe fn setSearchFieldBackgroundPositionAdjustment(&self, searchFieldBackgroundPositionAdjustment: UIOffset,); + + #[method(searchTextPositionAdjustment)] + pub unsafe fn searchTextPositionAdjustment(&self, ) -> UIOffset; + + #[method(setSearchTextPositionAdjustment:)] + pub unsafe fn setSearchTextPositionAdjustment(&self, searchTextPositionAdjustment: UIOffset,); + + #[method(setPositionAdjustment:forSearchBarIcon:)] + pub unsafe fn setPositionAdjustment_forSearchBarIcon(&self, adjustment: UIOffset,icon: UISearchBarIcon,); + + #[method(positionAdjustmentForSearchBarIcon:)] + pub unsafe fn positionAdjustmentForSearchBarIcon(&self, icon: UISearchBarIcon,) -> UIOffset; + + } +); + +extern_protocol!( + pub struct UISearchBarDelegate; + + unsafe impl UISearchBarDelegate { + #[optional] + #[method(searchBarShouldBeginEditing:)] + pub unsafe fn searchBarShouldBeginEditing(&self, searchBar: &UISearchBar,) -> bool; + + #[optional] + #[method(searchBarTextDidBeginEditing:)] + pub unsafe fn searchBarTextDidBeginEditing(&self, searchBar: &UISearchBar,); + + #[optional] + #[method(searchBarShouldEndEditing:)] + pub unsafe fn searchBarShouldEndEditing(&self, searchBar: &UISearchBar,) -> bool; + + #[optional] + #[method(searchBarTextDidEndEditing:)] + pub unsafe fn searchBarTextDidEndEditing(&self, searchBar: &UISearchBar,); + + #[optional] + #[method(searchBar:textDidChange:)] + pub unsafe fn searchBar_textDidChange(&self, searchBar: &UISearchBar,searchText: &NSString,); + + #[optional] + #[method(searchBar:shouldChangeTextInRange:replacementText:)] + pub unsafe fn searchBar_shouldChangeTextInRange_replacementText(&self, searchBar: &UISearchBar,range: NSRange,text: &NSString,) -> bool; + + #[optional] + #[method(searchBarSearchButtonClicked:)] + pub unsafe fn searchBarSearchButtonClicked(&self, searchBar: &UISearchBar,); + + #[optional] + #[method(searchBarBookmarkButtonClicked:)] + pub unsafe fn searchBarBookmarkButtonClicked(&self, searchBar: &UISearchBar,); + + #[optional] + #[method(searchBarCancelButtonClicked:)] + pub unsafe fn searchBarCancelButtonClicked(&self, searchBar: &UISearchBar,); + + #[optional] + #[method(searchBarResultsListButtonClicked:)] + pub unsafe fn searchBarResultsListButtonClicked(&self, searchBar: &UISearchBar,); + + #[optional] + #[method(searchBar:selectedScopeButtonIndexDidChange:)] + pub unsafe fn searchBar_selectedScopeButtonIndexDidChange(&self, searchBar: &UISearchBar,selectedScope: NSInteger,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UISearchContainerViewController.rs b/crates/icrate-generated/src/UIKit/generated/UISearchContainerViewController.rs new file mode 100644 index 000000000..b55091a63 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UISearchContainerViewController.rs @@ -0,0 +1,24 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UISearchContainerViewController; + + unsafe impl ClassType for UISearchContainerViewController { + type Super = UIViewController; + } +); + +extern_methods!( + unsafe impl UISearchContainerViewController { + #[method_id(@__retain_semantics Other searchController)] + pub unsafe fn searchController(&self, ) -> Id; + + #[method_id(@__retain_semantics Init initWithSearchController:)] + pub unsafe fn initWithSearchController(this: Option>, searchController: &UISearchController,) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UISearchController.rs b/crates/icrate-generated/src/UIKit/generated/UISearchController.rs new file mode 100644 index 000000000..767f54f08 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UISearchController.rs @@ -0,0 +1,179 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UISearchControllerScopeBarActivation { + UISearchControllerScopeBarActivationAutomatic = 0, + UISearchControllerScopeBarActivationManual = 1, + UISearchControllerScopeBarActivationOnTextEntry = 2, + UISearchControllerScopeBarActivationOnSearchActivation = 3, + } +); + +extern_protocol!( + pub struct UISearchControllerDelegate; + + unsafe impl UISearchControllerDelegate { + #[optional] + #[method(willPresentSearchController:)] + pub unsafe fn willPresentSearchController(&self, searchController: &UISearchController,); + + #[optional] + #[method(didPresentSearchController:)] + pub unsafe fn didPresentSearchController(&self, searchController: &UISearchController,); + + #[optional] + #[method(willDismissSearchController:)] + pub unsafe fn willDismissSearchController(&self, searchController: &UISearchController,); + + #[optional] + #[method(didDismissSearchController:)] + pub unsafe fn didDismissSearchController(&self, searchController: &UISearchController,); + + #[optional] + #[method(presentSearchController:)] + pub unsafe fn presentSearchController(&self, searchController: &UISearchController,); + + #[optional] + #[method(searchController:willChangeToSearchBarPlacement:)] + pub unsafe fn searchController_willChangeToSearchBarPlacement(&self, searchController: &UISearchController,newPlacement: UINavigationItemSearchBarPlacement,); + + #[optional] + #[method(searchController:didChangeFromSearchBarPlacement:)] + pub unsafe fn searchController_didChangeFromSearchBarPlacement(&self, searchController: &UISearchController,previousPlacement: UINavigationItemSearchBarPlacement,); + + } +); + +extern_protocol!( + pub struct UISearchResultsUpdating; + + unsafe impl UISearchResultsUpdating { + #[method(updateSearchResultsForSearchController:)] + pub unsafe fn updateSearchResultsForSearchController(&self, searchController: &UISearchController,); + + #[optional] + #[method(updateSearchResultsForSearchController:selectingSearchSuggestion:)] + pub unsafe fn updateSearchResultsForSearchController_selectingSearchSuggestion(&self, searchController: &UISearchController,searchSuggestion: &UISearchSuggestion,); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UISearchController; + + unsafe impl ClassType for UISearchController { + type Super = UIViewController; + } +); + +extern_methods!( + unsafe impl UISearchController { + #[method_id(@__retain_semantics Init initWithSearchResultsController:)] + pub unsafe fn initWithSearchResultsController(this: Option>, searchResultsController: Option<&UIViewController>,) -> Id; + + #[method_id(@__retain_semantics Init initWithNibName:bundle:)] + pub unsafe fn initWithNibName_bundle(this: Option>, nibNameOrNil: Option<&NSString>,nibBundleOrNil: Option<&NSBundle>,) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method_id(@__retain_semantics Other searchResultsUpdater)] + pub unsafe fn searchResultsUpdater(&self, ) -> Option>; + + #[method(setSearchResultsUpdater:)] + pub unsafe fn setSearchResultsUpdater(&self, searchResultsUpdater: Option<&UISearchResultsUpdating>,); + + #[method(isActive)] + pub unsafe fn isActive(&self, ) -> bool; + + #[method(setActive:)] + pub unsafe fn setActive(&self, active: bool,); + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&UISearchControllerDelegate>,); + + #[method(dimsBackgroundDuringPresentation)] + pub unsafe fn dimsBackgroundDuringPresentation(&self, ) -> bool; + + #[method(setDimsBackgroundDuringPresentation:)] + pub unsafe fn setDimsBackgroundDuringPresentation(&self, dimsBackgroundDuringPresentation: bool,); + + #[method(obscuresBackgroundDuringPresentation)] + pub unsafe fn obscuresBackgroundDuringPresentation(&self, ) -> bool; + + #[method(setObscuresBackgroundDuringPresentation:)] + pub unsafe fn setObscuresBackgroundDuringPresentation(&self, obscuresBackgroundDuringPresentation: bool,); + + #[method(hidesNavigationBarDuringPresentation)] + pub unsafe fn hidesNavigationBarDuringPresentation(&self, ) -> bool; + + #[method(setHidesNavigationBarDuringPresentation:)] + pub unsafe fn setHidesNavigationBarDuringPresentation(&self, hidesNavigationBarDuringPresentation: bool,); + + #[method_id(@__retain_semantics Other searchResultsController)] + pub unsafe fn searchResultsController(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other searchBar)] + pub unsafe fn searchBar(&self, ) -> Id; + + #[method(searchBarPlacement)] + pub unsafe fn searchBarPlacement(&self, ) -> UINavigationItemSearchBarPlacement; + + #[method(automaticallyShowsSearchResultsController)] + pub unsafe fn automaticallyShowsSearchResultsController(&self, ) -> bool; + + #[method(setAutomaticallyShowsSearchResultsController:)] + pub unsafe fn setAutomaticallyShowsSearchResultsController(&self, automaticallyShowsSearchResultsController: bool,); + + #[method(showsSearchResultsController)] + pub unsafe fn showsSearchResultsController(&self, ) -> bool; + + #[method(setShowsSearchResultsController:)] + pub unsafe fn setShowsSearchResultsController(&self, showsSearchResultsController: bool,); + + #[method(automaticallyShowsCancelButton)] + pub unsafe fn automaticallyShowsCancelButton(&self, ) -> bool; + + #[method(setAutomaticallyShowsCancelButton:)] + pub unsafe fn setAutomaticallyShowsCancelButton(&self, automaticallyShowsCancelButton: bool,); + + #[method(automaticallyShowsScopeBar)] + pub unsafe fn automaticallyShowsScopeBar(&self, ) -> bool; + + #[method(setAutomaticallyShowsScopeBar:)] + pub unsafe fn setAutomaticallyShowsScopeBar(&self, automaticallyShowsScopeBar: bool,); + + #[method(scopeBarActivation)] + pub unsafe fn scopeBarActivation(&self, ) -> UISearchControllerScopeBarActivation; + + #[method(setScopeBarActivation:)] + pub unsafe fn setScopeBarActivation(&self, scopeBarActivation: UISearchControllerScopeBarActivation,); + + #[method_id(@__retain_semantics Other searchSuggestions)] + pub unsafe fn searchSuggestions(&self, ) -> Option, Shared>>; + + #[method(setSearchSuggestions:)] + pub unsafe fn setSearchSuggestions(&self, searchSuggestions: Option<&NSArray>,); + + #[method(ignoresSearchSuggestionsForSearchBarPlacementStacked)] + pub unsafe fn ignoresSearchSuggestionsForSearchBarPlacementStacked(&self, ) -> bool; + + #[method(setIgnoresSearchSuggestionsForSearchBarPlacementStacked:)] + pub unsafe fn setIgnoresSearchSuggestionsForSearchBarPlacementStacked(&self, ignoresSearchSuggestionsForSearchBarPlacementStacked: bool,); + + #[method_id(@__retain_semantics Other searchControllerObservedScrollView)] + pub unsafe fn searchControllerObservedScrollView(&self, ) -> Option>; + + #[method(setSearchControllerObservedScrollView:)] + pub unsafe fn setSearchControllerObservedScrollView(&self, searchControllerObservedScrollView: Option<&UIScrollView>,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UISearchDisplayController.rs b/crates/icrate-generated/src/UIKit/generated/UISearchDisplayController.rs new file mode 100644 index 000000000..9b2ef1ac7 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UISearchDisplayController.rs @@ -0,0 +1,127 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UISearchDisplayController; + + unsafe impl ClassType for UISearchDisplayController { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UISearchDisplayController { + #[method_id(@__retain_semantics Init initWithSearchBar:contentsController:)] + pub unsafe fn initWithSearchBar_contentsController(this: Option>, searchBar: &UISearchBar,viewController: &UIViewController,) -> Id; + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&UISearchDisplayDelegate>,); + + #[method(isActive)] + pub unsafe fn isActive(&self, ) -> bool; + + #[method(setActive:)] + pub unsafe fn setActive(&self, active: bool,); + + #[method(setActive:animated:)] + pub unsafe fn setActive_animated(&self, visible: bool,animated: bool,); + + #[method_id(@__retain_semantics Other searchBar)] + pub unsafe fn searchBar(&self, ) -> Id; + + #[method_id(@__retain_semantics Other searchContentsController)] + pub unsafe fn searchContentsController(&self, ) -> Id; + + #[method_id(@__retain_semantics Other searchResultsTableView)] + pub unsafe fn searchResultsTableView(&self, ) -> Id; + + #[method_id(@__retain_semantics Other searchResultsDataSource)] + pub unsafe fn searchResultsDataSource(&self, ) -> Option>; + + #[method(setSearchResultsDataSource:)] + pub unsafe fn setSearchResultsDataSource(&self, searchResultsDataSource: Option<&UITableViewDataSource>,); + + #[method_id(@__retain_semantics Other searchResultsDelegate)] + pub unsafe fn searchResultsDelegate(&self, ) -> Option>; + + #[method(setSearchResultsDelegate:)] + pub unsafe fn setSearchResultsDelegate(&self, searchResultsDelegate: Option<&UITableViewDelegate>,); + + #[method_id(@__retain_semantics Other searchResultsTitle)] + pub unsafe fn searchResultsTitle(&self, ) -> Option>; + + #[method(setSearchResultsTitle:)] + pub unsafe fn setSearchResultsTitle(&self, searchResultsTitle: Option<&NSString>,); + + #[method(displaysSearchBarInNavigationBar)] + pub unsafe fn displaysSearchBarInNavigationBar(&self, ) -> bool; + + #[method(setDisplaysSearchBarInNavigationBar:)] + pub unsafe fn setDisplaysSearchBarInNavigationBar(&self, displaysSearchBarInNavigationBar: bool,); + + #[method_id(@__retain_semantics Other navigationItem)] + pub unsafe fn navigationItem(&self, ) -> Option>; + + } +); + +extern_protocol!( + pub struct UISearchDisplayDelegate; + + unsafe impl UISearchDisplayDelegate { + #[optional] + #[method(searchDisplayControllerWillBeginSearch:)] + pub unsafe fn searchDisplayControllerWillBeginSearch(&self, controller: &UISearchDisplayController,); + + #[optional] + #[method(searchDisplayControllerDidBeginSearch:)] + pub unsafe fn searchDisplayControllerDidBeginSearch(&self, controller: &UISearchDisplayController,); + + #[optional] + #[method(searchDisplayControllerWillEndSearch:)] + pub unsafe fn searchDisplayControllerWillEndSearch(&self, controller: &UISearchDisplayController,); + + #[optional] + #[method(searchDisplayControllerDidEndSearch:)] + pub unsafe fn searchDisplayControllerDidEndSearch(&self, controller: &UISearchDisplayController,); + + #[optional] + #[method(searchDisplayController:didLoadSearchResultsTableView:)] + pub unsafe fn searchDisplayController_didLoadSearchResultsTableView(&self, controller: &UISearchDisplayController,tableView: &UITableView,); + + #[optional] + #[method(searchDisplayController:willUnloadSearchResultsTableView:)] + pub unsafe fn searchDisplayController_willUnloadSearchResultsTableView(&self, controller: &UISearchDisplayController,tableView: &UITableView,); + + #[optional] + #[method(searchDisplayController:willShowSearchResultsTableView:)] + pub unsafe fn searchDisplayController_willShowSearchResultsTableView(&self, controller: &UISearchDisplayController,tableView: &UITableView,); + + #[optional] + #[method(searchDisplayController:didShowSearchResultsTableView:)] + pub unsafe fn searchDisplayController_didShowSearchResultsTableView(&self, controller: &UISearchDisplayController,tableView: &UITableView,); + + #[optional] + #[method(searchDisplayController:willHideSearchResultsTableView:)] + pub unsafe fn searchDisplayController_willHideSearchResultsTableView(&self, controller: &UISearchDisplayController,tableView: &UITableView,); + + #[optional] + #[method(searchDisplayController:didHideSearchResultsTableView:)] + pub unsafe fn searchDisplayController_didHideSearchResultsTableView(&self, controller: &UISearchDisplayController,tableView: &UITableView,); + + #[optional] + #[method(searchDisplayController:shouldReloadTableForSearchString:)] + pub unsafe fn searchDisplayController_shouldReloadTableForSearchString(&self, controller: &UISearchDisplayController,searchString: Option<&NSString>,) -> bool; + + #[optional] + #[method(searchDisplayController:shouldReloadTableForSearchScope:)] + pub unsafe fn searchDisplayController_shouldReloadTableForSearchScope(&self, controller: &UISearchDisplayController,searchOption: NSInteger,) -> bool; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UISearchSuggestion.rs b/crates/icrate-generated/src/UIKit/generated/UISearchSuggestion.rs new file mode 100644 index 000000000..0387d12b6 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UISearchSuggestion.rs @@ -0,0 +1,99 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_protocol!( + pub struct UISearchSuggestion; + + unsafe impl UISearchSuggestion { + #[method_id(@__retain_semantics Other localizedSuggestion)] + pub unsafe fn localizedSuggestion(&self, ) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other localizedDescription)] + pub unsafe fn localizedDescription(&self, ) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other iconImage)] + pub unsafe fn iconImage(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other localizedAttributedSuggestion)] + pub unsafe fn localizedAttributedSuggestion(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other representedObject)] + pub unsafe fn representedObject(&self, ) -> Option>; + + #[method(setRepresentedObject:)] + pub unsafe fn setRepresentedObject(&self, representedObject: Option<&Object>,); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UISearchSuggestionItem; + + unsafe impl ClassType for UISearchSuggestionItem { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UISearchSuggestionItem { + #[method_id(@__retain_semantics Other suggestionWithLocalizedSuggestion:)] + pub unsafe fn suggestionWithLocalizedSuggestion(suggestion: &NSString,) -> Id; + + #[method_id(@__retain_semantics Other suggestionWithLocalizedSuggestion:descriptionString:)] + pub unsafe fn suggestionWithLocalizedSuggestion_descriptionString(suggestion: &NSString,description: Option<&NSString>,) -> Id; + + #[method_id(@__retain_semantics Other suggestionWithLocalizedSuggestion:descriptionString:iconImage:)] + pub unsafe fn suggestionWithLocalizedSuggestion_descriptionString_iconImage(suggestion: &NSString,description: Option<&NSString>,iconImage: Option<&UIImage>,) -> Id; + + #[method_id(@__retain_semantics Other suggestionWithLocalizedAttributedSuggestion:)] + pub unsafe fn suggestionWithLocalizedAttributedSuggestion(suggestion: &NSAttributedString,) -> Id; + + #[method_id(@__retain_semantics Other suggestionWithLocalizedAttributedSuggestion:descriptionString:)] + pub unsafe fn suggestionWithLocalizedAttributedSuggestion_descriptionString(suggestion: &NSAttributedString,description: Option<&NSString>,) -> Id; + + #[method_id(@__retain_semantics Other suggestionWithLocalizedAttributedSuggestion:descriptionString:iconImage:)] + pub unsafe fn suggestionWithLocalizedAttributedSuggestion_descriptionString_iconImage(suggestion: &NSAttributedString,description: Option<&NSString>,iconImage: Option<&UIImage>,) -> Id; + + #[method_id(@__retain_semantics Init initWithLocalizedSuggestion:)] + pub unsafe fn initWithLocalizedSuggestion(this: Option>, suggestion: &NSString,) -> Id; + + #[method_id(@__retain_semantics Init initWithLocalizedSuggestion:localizedDescription:)] + pub unsafe fn initWithLocalizedSuggestion_localizedDescription(this: Option>, suggestion: &NSString,description: Option<&NSString>,) -> Id; + + #[method_id(@__retain_semantics Init initWithLocalizedSuggestion:localizedDescription:iconImage:)] + pub unsafe fn initWithLocalizedSuggestion_localizedDescription_iconImage(this: Option>, suggestion: &NSString,description: Option<&NSString>,iconImage: Option<&UIImage>,) -> Id; + + #[method_id(@__retain_semantics Init initWithLocalizedAttributedSuggestion:)] + pub unsafe fn initWithLocalizedAttributedSuggestion(this: Option>, suggestion: &NSAttributedString,) -> Id; + + #[method_id(@__retain_semantics Init initWithLocalizedAttributedSuggestion:localizedDescription:)] + pub unsafe fn initWithLocalizedAttributedSuggestion_localizedDescription(this: Option>, suggestion: &NSAttributedString,description: Option<&NSString>,) -> Id; + + #[method_id(@__retain_semantics Init initWithLocalizedAttributedSuggestion:localizedDescription:iconImage:)] + pub unsafe fn initWithLocalizedAttributedSuggestion_localizedDescription_iconImage(this: Option>, suggestion: &NSAttributedString,description: Option<&NSString>,iconImage: Option<&UIImage>,) -> Id; + + #[method_id(@__retain_semantics Other localizedAttributedSuggestion)] + pub unsafe fn localizedAttributedSuggestion(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other localizedSuggestion)] + pub unsafe fn localizedSuggestion(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other localizedDescription)] + pub unsafe fn localizedDescription(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other iconImage)] + pub unsafe fn iconImage(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other representedObject)] + pub unsafe fn representedObject(&self, ) -> Option>; + + #[method(setRepresentedObject:)] + pub unsafe fn setRepresentedObject(&self, representedObject: Option<&Object>,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UISearchTextField.rs b/crates/icrate-generated/src/UIKit/generated/UISearchTextField.rs new file mode 100644 index 000000000..9c9030945 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UISearchTextField.rs @@ -0,0 +1,120 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UISearchTextField; + + unsafe impl ClassType for UISearchTextField { + type Super = UITextField; + } +); + +extern_methods!( + unsafe impl UISearchTextField { + #[method_id(@__retain_semantics Other tokens)] + pub unsafe fn tokens(&self, ) -> Id, Shared>; + + #[method(setTokens:)] + pub unsafe fn setTokens(&self, tokens: &NSArray,); + + #[method(insertToken:atIndex:)] + pub unsafe fn insertToken_atIndex(&self, token: &UISearchToken,tokenIndex: NSInteger,); + + #[method(removeTokenAtIndex:)] + pub unsafe fn removeTokenAtIndex(&self, tokenIndex: NSInteger,); + + #[method_id(@__retain_semantics Other positionOfTokenAtIndex:)] + pub unsafe fn positionOfTokenAtIndex(&self, tokenIndex: NSInteger,) -> Id; + + #[method_id(@__retain_semantics Other tokensInRange:)] + pub unsafe fn tokensInRange(&self, textRange: &UITextRange,) -> Id, Shared>; + + #[method_id(@__retain_semantics Other textualRange)] + pub unsafe fn textualRange(&self, ) -> Id; + + #[method(replaceTextualPortionOfRange:withToken:atIndex:)] + pub unsafe fn replaceTextualPortionOfRange_withToken_atIndex(&self, textRange: &UITextRange,token: &UISearchToken,tokenIndex: NSUInteger,); + + #[method_id(@__retain_semantics Other tokenBackgroundColor)] + pub unsafe fn tokenBackgroundColor(&self, ) -> Option>; + + #[method(setTokenBackgroundColor:)] + pub unsafe fn setTokenBackgroundColor(&self, tokenBackgroundColor: Option<&UIColor>,); + + #[method(allowsDeletingTokens)] + pub unsafe fn allowsDeletingTokens(&self, ) -> bool; + + #[method(setAllowsDeletingTokens:)] + pub unsafe fn setAllowsDeletingTokens(&self, allowsDeletingTokens: bool,); + + #[method(allowsCopyingTokens)] + pub unsafe fn allowsCopyingTokens(&self, ) -> bool; + + #[method(setAllowsCopyingTokens:)] + pub unsafe fn setAllowsCopyingTokens(&self, allowsCopyingTokens: bool,); + + #[method_id(@__retain_semantics Other searchSuggestions)] + pub unsafe fn searchSuggestions(&self, ) -> Option, Shared>>; + + #[method(setSearchSuggestions:)] + pub unsafe fn setSearchSuggestions(&self, searchSuggestions: Option<&NSArray>,); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UISearchToken; + + unsafe impl ClassType for UISearchToken { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UISearchToken { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics New new)] + pub unsafe fn new() -> Id; + + #[method_id(@__retain_semantics Other tokenWithIcon:text:)] + pub unsafe fn tokenWithIcon_text(icon: Option<&UIImage>,text: &NSString,) -> Id; + + #[method_id(@__retain_semantics Other representedObject)] + pub unsafe fn representedObject(&self, ) -> Option>; + + #[method(setRepresentedObject:)] + pub unsafe fn setRepresentedObject(&self, representedObject: Option<&Object>,); + + } +); + +extern_protocol!( + pub struct UISearchTextFieldDelegate; + + unsafe impl UISearchTextFieldDelegate { + #[optional] + #[method_id(@__retain_semantics Other searchTextField:itemProviderForCopyingToken:)] + pub unsafe fn searchTextField_itemProviderForCopyingToken(&self, searchTextField: &UISearchTextField,token: &UISearchToken,) -> Id; + + #[optional] + #[method(searchTextField:didSelectSuggestion:)] + pub unsafe fn searchTextField_didSelectSuggestion(&self, searchTextField: &UISearchTextField,suggestion: &UISearchSuggestion,); + + } +); + +extern_protocol!( + pub struct UISearchTextFieldPasteItem; + + unsafe impl UISearchTextFieldPasteItem { + #[method(setSearchTokenResult:)] + pub unsafe fn setSearchTokenResult(&self, token: &UISearchToken,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UISegmentedControl.rs b/crates/icrate-generated/src/UIKit/generated/UISegmentedControl.rs new file mode 100644 index 000000000..7e451f2a7 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UISegmentedControl.rs @@ -0,0 +1,175 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UISegmentedControlStyle { + UISegmentedControlStylePlain = 0, + UISegmentedControlStyleBordered = 1, + UISegmentedControlStyleBar = 2, + UISegmentedControlStyleBezeled = 3, + } +); + +extern_enum!( + #[underlying(c_int)] + pub enum { + UISegmentedControlNoSegment = -1, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UISegmentedControlSegment { + UISegmentedControlSegmentAny = 0, + UISegmentedControlSegmentLeft = 1, + UISegmentedControlSegmentCenter = 2, + UISegmentedControlSegmentRight = 3, + UISegmentedControlSegmentAlone = 4, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UISegmentedControl; + + unsafe impl ClassType for UISegmentedControl { + type Super = UIControl; + } +); + +extern_methods!( + unsafe impl UISegmentedControl { + #[method_id(@__retain_semantics Init initWithFrame:)] + pub unsafe fn initWithFrame(this: Option>, frame: CGRect,) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method_id(@__retain_semantics Init initWithItems:)] + pub unsafe fn initWithItems(this: Option>, items: Option<&NSArray>,) -> Id; + + #[method_id(@__retain_semantics Init initWithFrame:actions:)] + pub unsafe fn initWithFrame_actions(this: Option>, frame: CGRect,actions: &NSArray,) -> Id; + + #[method(insertSegmentWithAction:atIndex:animated:)] + pub unsafe fn insertSegmentWithAction_atIndex_animated(&self, action: &UIAction,segment: NSUInteger,animated: bool,); + + #[method(setAction:forSegmentAtIndex:)] + pub unsafe fn setAction_forSegmentAtIndex(&self, action: &UIAction,segment: NSUInteger,); + + #[method_id(@__retain_semantics Other actionForSegmentAtIndex:)] + pub unsafe fn actionForSegmentAtIndex(&self, segment: NSUInteger,) -> Option>; + + #[method(segmentIndexForActionIdentifier:)] + pub unsafe fn segmentIndexForActionIdentifier(&self, actionIdentifier: &UIActionIdentifier,) -> NSInteger; + + #[method(segmentedControlStyle)] + pub unsafe fn segmentedControlStyle(&self, ) -> UISegmentedControlStyle; + + #[method(setSegmentedControlStyle:)] + pub unsafe fn setSegmentedControlStyle(&self, segmentedControlStyle: UISegmentedControlStyle,); + + #[method(isMomentary)] + pub unsafe fn isMomentary(&self, ) -> bool; + + #[method(setMomentary:)] + pub unsafe fn setMomentary(&self, momentary: bool,); + + #[method(numberOfSegments)] + pub unsafe fn numberOfSegments(&self, ) -> NSUInteger; + + #[method(apportionsSegmentWidthsByContent)] + pub unsafe fn apportionsSegmentWidthsByContent(&self, ) -> bool; + + #[method(setApportionsSegmentWidthsByContent:)] + pub unsafe fn setApportionsSegmentWidthsByContent(&self, apportionsSegmentWidthsByContent: bool,); + + #[method(insertSegmentWithTitle:atIndex:animated:)] + pub unsafe fn insertSegmentWithTitle_atIndex_animated(&self, title: Option<&NSString>,segment: NSUInteger,animated: bool,); + + #[method(insertSegmentWithImage:atIndex:animated:)] + pub unsafe fn insertSegmentWithImage_atIndex_animated(&self, image: Option<&UIImage>,segment: NSUInteger,animated: bool,); + + #[method(removeSegmentAtIndex:animated:)] + pub unsafe fn removeSegmentAtIndex_animated(&self, segment: NSUInteger,animated: bool,); + + #[method(removeAllSegments)] + pub unsafe fn removeAllSegments(&self, ); + + #[method(setTitle:forSegmentAtIndex:)] + pub unsafe fn setTitle_forSegmentAtIndex(&self, title: Option<&NSString>,segment: NSUInteger,); + + #[method_id(@__retain_semantics Other titleForSegmentAtIndex:)] + pub unsafe fn titleForSegmentAtIndex(&self, segment: NSUInteger,) -> Option>; + + #[method(setImage:forSegmentAtIndex:)] + pub unsafe fn setImage_forSegmentAtIndex(&self, image: Option<&UIImage>,segment: NSUInteger,); + + #[method_id(@__retain_semantics Other imageForSegmentAtIndex:)] + pub unsafe fn imageForSegmentAtIndex(&self, segment: NSUInteger,) -> Option>; + + #[method(setWidth:forSegmentAtIndex:)] + pub unsafe fn setWidth_forSegmentAtIndex(&self, width: CGFloat,segment: NSUInteger,); + + #[method(widthForSegmentAtIndex:)] + pub unsafe fn widthForSegmentAtIndex(&self, segment: NSUInteger,) -> CGFloat; + + #[method(setContentOffset:forSegmentAtIndex:)] + pub unsafe fn setContentOffset_forSegmentAtIndex(&self, offset: CGSize,segment: NSUInteger,); + + #[method(contentOffsetForSegmentAtIndex:)] + pub unsafe fn contentOffsetForSegmentAtIndex(&self, segment: NSUInteger,) -> CGSize; + + #[method(setEnabled:forSegmentAtIndex:)] + pub unsafe fn setEnabled_forSegmentAtIndex(&self, enabled: bool,segment: NSUInteger,); + + #[method(isEnabledForSegmentAtIndex:)] + pub unsafe fn isEnabledForSegmentAtIndex(&self, segment: NSUInteger,) -> bool; + + #[method(selectedSegmentIndex)] + pub unsafe fn selectedSegmentIndex(&self, ) -> NSInteger; + + #[method(setSelectedSegmentIndex:)] + pub unsafe fn setSelectedSegmentIndex(&self, selectedSegmentIndex: NSInteger,); + + #[method_id(@__retain_semantics Other selectedSegmentTintColor)] + pub unsafe fn selectedSegmentTintColor(&self, ) -> Option>; + + #[method(setSelectedSegmentTintColor:)] + pub unsafe fn setSelectedSegmentTintColor(&self, selectedSegmentTintColor: Option<&UIColor>,); + + #[method(setBackgroundImage:forState:barMetrics:)] + pub unsafe fn setBackgroundImage_forState_barMetrics(&self, backgroundImage: Option<&UIImage>,state: UIControlState,barMetrics: UIBarMetrics,); + + #[method_id(@__retain_semantics Other backgroundImageForState:barMetrics:)] + pub unsafe fn backgroundImageForState_barMetrics(&self, state: UIControlState,barMetrics: UIBarMetrics,) -> Option>; + + #[method(setDividerImage:forLeftSegmentState:rightSegmentState:barMetrics:)] + pub unsafe fn setDividerImage_forLeftSegmentState_rightSegmentState_barMetrics(&self, dividerImage: Option<&UIImage>,leftState: UIControlState,rightState: UIControlState,barMetrics: UIBarMetrics,); + + #[method_id(@__retain_semantics Other dividerImageForLeftSegmentState:rightSegmentState:barMetrics:)] + pub unsafe fn dividerImageForLeftSegmentState_rightSegmentState_barMetrics(&self, leftState: UIControlState,rightState: UIControlState,barMetrics: UIBarMetrics,) -> Option>; + + #[method(setTitleTextAttributes:forState:)] + pub unsafe fn setTitleTextAttributes_forState(&self, attributes: Option<&NSDictionary>,state: UIControlState,); + + #[method_id(@__retain_semantics Other titleTextAttributesForState:)] + pub unsafe fn titleTextAttributesForState(&self, state: UIControlState,) -> Option, Shared>>; + + #[method(setContentPositionAdjustment:forSegmentType:barMetrics:)] + pub unsafe fn setContentPositionAdjustment_forSegmentType_barMetrics(&self, adjustment: UIOffset,leftCenterRightOrAlone: UISegmentedControlSegment,barMetrics: UIBarMetrics,); + + #[method(contentPositionAdjustmentForSegmentType:barMetrics:)] + pub unsafe fn contentPositionAdjustmentForSegmentType_barMetrics(&self, leftCenterRightOrAlone: UISegmentedControlSegment,barMetrics: UIBarMetrics,) -> UIOffset; + + } +); + +extern_methods!( + /// SpringLoading + unsafe impl UISegmentedControl { + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UISelectionFeedbackGenerator.rs b/crates/icrate-generated/src/UIKit/generated/UISelectionFeedbackGenerator.rs new file mode 100644 index 000000000..9757e5dce --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UISelectionFeedbackGenerator.rs @@ -0,0 +1,21 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UISelectionFeedbackGenerator; + + unsafe impl ClassType for UISelectionFeedbackGenerator { + type Super = UIFeedbackGenerator; + } +); + +extern_methods!( + unsafe impl UISelectionFeedbackGenerator { + #[method(selectionChanged)] + pub unsafe fn selectionChanged(&self, ); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UISheetPresentationController.rs b/crates/icrate-generated/src/UIKit/generated/UISheetPresentationController.rs new file mode 100644 index 000000000..d76ff9121 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UISheetPresentationController.rs @@ -0,0 +1,153 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +pub type UISheetPresentationControllerDetentIdentifier = NSString; + +extern_static!(UISheetPresentationControllerDetentIdentifierMedium: &'static UISheetPresentationControllerDetentIdentifier); + +extern_static!(UISheetPresentationControllerDetentIdentifierLarge: &'static UISheetPresentationControllerDetentIdentifier); + +extern_static!(UISheetPresentationControllerDetentInactive: CGFloat); + +extern_protocol!( + pub struct UISheetPresentationControllerDetentResolutionContext; + + unsafe impl UISheetPresentationControllerDetentResolutionContext { + #[method_id(@__retain_semantics Other containerTraitCollection)] + pub unsafe fn containerTraitCollection(&self, ) -> Id; + + #[method(maximumDetentValue)] + pub unsafe fn maximumDetentValue(&self, ) -> CGFloat; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UISheetPresentationControllerDetent; + + unsafe impl ClassType for UISheetPresentationControllerDetent { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UISheetPresentationControllerDetent { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics New new)] + pub unsafe fn new() -> Id; + + #[method_id(@__retain_semantics Other mediumDetent)] + pub unsafe fn mediumDetent() -> Id; + + #[method_id(@__retain_semantics Other largeDetent)] + pub unsafe fn largeDetent() -> Id; + + #[method_id(@__retain_semantics Other customDetentWithIdentifier:resolver:)] + pub unsafe fn customDetentWithIdentifier_resolver(identifier: Option<&UISheetPresentationControllerDetentIdentifier>,resolver: &Block<(NonNull, ), CGFloat>,) -> Id; + + #[method_id(@__retain_semantics Other identifier)] + pub unsafe fn identifier(&self, ) -> Id; + + #[method(resolvedValueInContext:)] + pub unsafe fn resolvedValueInContext(&self, context: &UISheetPresentationControllerDetentResolutionContext,) -> CGFloat; + + } +); + +extern_static!(UISheetPresentationControllerAutomaticDimension: CGFloat); + +extern_protocol!( + pub struct UISheetPresentationControllerDelegate; + + unsafe impl UISheetPresentationControllerDelegate { + #[optional] + #[method(sheetPresentationControllerDidChangeSelectedDetentIdentifier:)] + pub unsafe fn sheetPresentationControllerDidChangeSelectedDetentIdentifier(&self, sheetPresentationController: &UISheetPresentationController,); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UISheetPresentationController; + + unsafe impl ClassType for UISheetPresentationController { + type Super = UIPresentationController; + } +); + +extern_methods!( + unsafe impl UISheetPresentationController { + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&UISheetPresentationControllerDelegate>,); + + #[method_id(@__retain_semantics Other sourceView)] + pub unsafe fn sourceView(&self, ) -> Option>; + + #[method(setSourceView:)] + pub unsafe fn setSourceView(&self, sourceView: Option<&UIView>,); + + #[method(prefersEdgeAttachedInCompactHeight)] + pub unsafe fn prefersEdgeAttachedInCompactHeight(&self, ) -> bool; + + #[method(setPrefersEdgeAttachedInCompactHeight:)] + pub unsafe fn setPrefersEdgeAttachedInCompactHeight(&self, prefersEdgeAttachedInCompactHeight: bool,); + + #[method(widthFollowsPreferredContentSizeWhenEdgeAttached)] + pub unsafe fn widthFollowsPreferredContentSizeWhenEdgeAttached(&self, ) -> bool; + + #[method(setWidthFollowsPreferredContentSizeWhenEdgeAttached:)] + pub unsafe fn setWidthFollowsPreferredContentSizeWhenEdgeAttached(&self, widthFollowsPreferredContentSizeWhenEdgeAttached: bool,); + + #[method(prefersGrabberVisible)] + pub unsafe fn prefersGrabberVisible(&self, ) -> bool; + + #[method(setPrefersGrabberVisible:)] + pub unsafe fn setPrefersGrabberVisible(&self, prefersGrabberVisible: bool,); + + #[method(preferredCornerRadius)] + pub unsafe fn preferredCornerRadius(&self, ) -> CGFloat; + + #[method(setPreferredCornerRadius:)] + pub unsafe fn setPreferredCornerRadius(&self, preferredCornerRadius: CGFloat,); + + #[method_id(@__retain_semantics Other detents)] + pub unsafe fn detents(&self, ) -> Id, Shared>; + + #[method(setDetents:)] + pub unsafe fn setDetents(&self, detents: &NSArray,); + + #[method(invalidateDetents)] + pub unsafe fn invalidateDetents(&self, ); + + #[method_id(@__retain_semantics Other selectedDetentIdentifier)] + pub unsafe fn selectedDetentIdentifier(&self, ) -> Option>; + + #[method(setSelectedDetentIdentifier:)] + pub unsafe fn setSelectedDetentIdentifier(&self, selectedDetentIdentifier: Option<&UISheetPresentationControllerDetentIdentifier>,); + + #[method_id(@__retain_semantics Other largestUndimmedDetentIdentifier)] + pub unsafe fn largestUndimmedDetentIdentifier(&self, ) -> Option>; + + #[method(setLargestUndimmedDetentIdentifier:)] + pub unsafe fn setLargestUndimmedDetentIdentifier(&self, largestUndimmedDetentIdentifier: Option<&UISheetPresentationControllerDetentIdentifier>,); + + #[method(prefersScrollingExpandsWhenScrolledToEdge)] + pub unsafe fn prefersScrollingExpandsWhenScrolledToEdge(&self, ) -> bool; + + #[method(setPrefersScrollingExpandsWhenScrolledToEdge:)] + pub unsafe fn setPrefersScrollingExpandsWhenScrolledToEdge(&self, prefersScrollingExpandsWhenScrolledToEdge: bool,); + + #[method(animateChanges:)] + pub unsafe fn animateChanges(&self, changes: &Block<(), ()>,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UISlider.rs b/crates/icrate-generated/src/UIKit/generated/UISlider.rs new file mode 100644 index 000000000..49e3576bb --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UISlider.rs @@ -0,0 +1,114 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UISlider; + + unsafe impl ClassType for UISlider { + type Super = UIControl; + } +); + +extern_methods!( + unsafe impl UISlider { + #[method(value)] + pub unsafe fn value(&self, ) -> c_float; + + #[method(setValue:)] + pub unsafe fn setValue(&self, value: c_float,); + + #[method(minimumValue)] + pub unsafe fn minimumValue(&self, ) -> c_float; + + #[method(setMinimumValue:)] + pub unsafe fn setMinimumValue(&self, minimumValue: c_float,); + + #[method(maximumValue)] + pub unsafe fn maximumValue(&self, ) -> c_float; + + #[method(setMaximumValue:)] + pub unsafe fn setMaximumValue(&self, maximumValue: c_float,); + + #[method_id(@__retain_semantics Other minimumValueImage)] + pub unsafe fn minimumValueImage(&self, ) -> Option>; + + #[method(setMinimumValueImage:)] + pub unsafe fn setMinimumValueImage(&self, minimumValueImage: Option<&UIImage>,); + + #[method_id(@__retain_semantics Other maximumValueImage)] + pub unsafe fn maximumValueImage(&self, ) -> Option>; + + #[method(setMaximumValueImage:)] + pub unsafe fn setMaximumValueImage(&self, maximumValueImage: Option<&UIImage>,); + + #[method(isContinuous)] + pub unsafe fn isContinuous(&self, ) -> bool; + + #[method(setContinuous:)] + pub unsafe fn setContinuous(&self, continuous: bool,); + + #[method_id(@__retain_semantics Other minimumTrackTintColor)] + pub unsafe fn minimumTrackTintColor(&self, ) -> Option>; + + #[method(setMinimumTrackTintColor:)] + pub unsafe fn setMinimumTrackTintColor(&self, minimumTrackTintColor: Option<&UIColor>,); + + #[method_id(@__retain_semantics Other maximumTrackTintColor)] + pub unsafe fn maximumTrackTintColor(&self, ) -> Option>; + + #[method(setMaximumTrackTintColor:)] + pub unsafe fn setMaximumTrackTintColor(&self, maximumTrackTintColor: Option<&UIColor>,); + + #[method_id(@__retain_semantics Other thumbTintColor)] + pub unsafe fn thumbTintColor(&self, ) -> Option>; + + #[method(setThumbTintColor:)] + pub unsafe fn setThumbTintColor(&self, thumbTintColor: Option<&UIColor>,); + + #[method(setValue:animated:)] + pub unsafe fn setValue_animated(&self, value: c_float,animated: bool,); + + #[method(setThumbImage:forState:)] + pub unsafe fn setThumbImage_forState(&self, image: Option<&UIImage>,state: UIControlState,); + + #[method(setMinimumTrackImage:forState:)] + pub unsafe fn setMinimumTrackImage_forState(&self, image: Option<&UIImage>,state: UIControlState,); + + #[method(setMaximumTrackImage:forState:)] + pub unsafe fn setMaximumTrackImage_forState(&self, image: Option<&UIImage>,state: UIControlState,); + + #[method_id(@__retain_semantics Other thumbImageForState:)] + pub unsafe fn thumbImageForState(&self, state: UIControlState,) -> Option>; + + #[method_id(@__retain_semantics Other minimumTrackImageForState:)] + pub unsafe fn minimumTrackImageForState(&self, state: UIControlState,) -> Option>; + + #[method_id(@__retain_semantics Other maximumTrackImageForState:)] + pub unsafe fn maximumTrackImageForState(&self, state: UIControlState,) -> Option>; + + #[method_id(@__retain_semantics Other currentThumbImage)] + pub unsafe fn currentThumbImage(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other currentMinimumTrackImage)] + pub unsafe fn currentMinimumTrackImage(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other currentMaximumTrackImage)] + pub unsafe fn currentMaximumTrackImage(&self, ) -> Option>; + + #[method(minimumValueImageRectForBounds:)] + pub unsafe fn minimumValueImageRectForBounds(&self, bounds: CGRect,) -> CGRect; + + #[method(maximumValueImageRectForBounds:)] + pub unsafe fn maximumValueImageRectForBounds(&self, bounds: CGRect,) -> CGRect; + + #[method(trackRectForBounds:)] + pub unsafe fn trackRectForBounds(&self, bounds: CGRect,) -> CGRect; + + #[method(thumbRectForBounds:trackRect:value:)] + pub unsafe fn thumbRectForBounds_trackRect_value(&self, bounds: CGRect,rect: CGRect,value: c_float,) -> CGRect; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UISnapBehavior.rs b/crates/icrate-generated/src/UIKit/generated/UISnapBehavior.rs new file mode 100644 index 000000000..fdc1c22a0 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UISnapBehavior.rs @@ -0,0 +1,33 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UISnapBehavior; + + unsafe impl ClassType for UISnapBehavior { + type Super = UIDynamicBehavior; + } +); + +extern_methods!( + unsafe impl UISnapBehavior { + #[method_id(@__retain_semantics Init initWithItem:snapToPoint:)] + pub unsafe fn initWithItem_snapToPoint(this: Option>, item: &UIDynamicItem,point: CGPoint,) -> Id; + + #[method(snapPoint)] + pub unsafe fn snapPoint(&self, ) -> CGPoint; + + #[method(setSnapPoint:)] + pub unsafe fn setSnapPoint(&self, snapPoint: CGPoint,); + + #[method(damping)] + pub unsafe fn damping(&self, ) -> CGFloat; + + #[method(setDamping:)] + pub unsafe fn setDamping(&self, damping: CGFloat,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UISplitViewController.rs b/crates/icrate-generated/src/UIKit/generated/UISplitViewController.rs new file mode 100644 index 000000000..6baaff043 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UISplitViewController.rs @@ -0,0 +1,350 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UISplitViewControllerDisplayMode { + UISplitViewControllerDisplayModeAutomatic = 0, + UISplitViewControllerDisplayModeSecondaryOnly = 1, + UISplitViewControllerDisplayModeOneBesideSecondary = 2, + UISplitViewControllerDisplayModeOneOverSecondary = 3, + UISplitViewControllerDisplayModeTwoBesideSecondary = 4, + UISplitViewControllerDisplayModeTwoOverSecondary = 5, + UISplitViewControllerDisplayModeTwoDisplaceSecondary = 6, + UISplitViewControllerDisplayModePrimaryHidden = UISplitViewControllerDisplayModeSecondaryOnly, + UISplitViewControllerDisplayModeAllVisible = UISplitViewControllerDisplayModeOneBesideSecondary, + UISplitViewControllerDisplayModePrimaryOverlay = UISplitViewControllerDisplayModeOneOverSecondary, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UISplitViewControllerPrimaryEdge { + UISplitViewControllerPrimaryEdgeLeading = 0, + UISplitViewControllerPrimaryEdgeTrailing = 1, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UISplitViewControllerBackgroundStyle { + UISplitViewControllerBackgroundStyleNone = 0, + UISplitViewControllerBackgroundStyleSidebar = 1, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UISplitViewControllerStyle { + UISplitViewControllerStyleUnspecified = 0, + UISplitViewControllerStyleDoubleColumn = 1, + UISplitViewControllerStyleTripleColumn = 2, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UISplitViewControllerColumn { + UISplitViewControllerColumnPrimary = 0, + UISplitViewControllerColumnSupplementary = 1, + UISplitViewControllerColumnSecondary = 2, + UISplitViewControllerColumnCompact = 3, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UISplitViewControllerSplitBehavior { + UISplitViewControllerSplitBehaviorAutomatic = 0, + UISplitViewControllerSplitBehaviorTile = 1, + UISplitViewControllerSplitBehaviorOverlay = 2, + UISplitViewControllerSplitBehaviorDisplace = 3, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UISplitViewControllerDisplayModeButtonVisibility { + UISplitViewControllerDisplayModeButtonVisibilityAutomatic = 0, + UISplitViewControllerDisplayModeButtonVisibilityNever = 1, + UISplitViewControllerDisplayModeButtonVisibilityAlways = 2, + } +); + +extern_static!(UISplitViewControllerAutomaticDimension: CGFloat); + +extern_class!( + #[derive(Debug)] + pub struct UISplitViewController; + + unsafe impl ClassType for UISplitViewController { + type Super = UIViewController; + } +); + +extern_methods!( + unsafe impl UISplitViewController { + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method_id(@__retain_semantics Init initWithNibName:bundle:)] + pub unsafe fn initWithNibName_bundle(this: Option>, nibNameOrNil: Option<&NSString>,nibBundleOrNil: Option<&NSBundle>,) -> Id; + + #[method_id(@__retain_semantics Init initWithStyle:)] + pub unsafe fn initWithStyle(this: Option>, style: UISplitViewControllerStyle,) -> Id; + + #[method(style)] + pub unsafe fn style(&self, ) -> UISplitViewControllerStyle; + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&UISplitViewControllerDelegate>,); + + #[method(showsSecondaryOnlyButton)] + pub unsafe fn showsSecondaryOnlyButton(&self, ) -> bool; + + #[method(setShowsSecondaryOnlyButton:)] + pub unsafe fn setShowsSecondaryOnlyButton(&self, showsSecondaryOnlyButton: bool,); + + #[method(preferredSplitBehavior)] + pub unsafe fn preferredSplitBehavior(&self, ) -> UISplitViewControllerSplitBehavior; + + #[method(setPreferredSplitBehavior:)] + pub unsafe fn setPreferredSplitBehavior(&self, preferredSplitBehavior: UISplitViewControllerSplitBehavior,); + + #[method(splitBehavior)] + pub unsafe fn splitBehavior(&self, ) -> UISplitViewControllerSplitBehavior; + + #[method(setViewController:forColumn:)] + pub unsafe fn setViewController_forColumn(&self, vc: Option<&UIViewController>,column: UISplitViewControllerColumn,); + + #[method_id(@__retain_semantics Other viewControllerForColumn:)] + pub unsafe fn viewControllerForColumn(&self, column: UISplitViewControllerColumn,) -> Option>; + + #[method(hideColumn:)] + pub unsafe fn hideColumn(&self, column: UISplitViewControllerColumn,); + + #[method(showColumn:)] + pub unsafe fn showColumn(&self, column: UISplitViewControllerColumn,); + + #[method_id(@__retain_semantics Other viewControllers)] + pub unsafe fn viewControllers(&self, ) -> Id, Shared>; + + #[method(setViewControllers:)] + pub unsafe fn setViewControllers(&self, viewControllers: &NSArray,); + + #[method(presentsWithGesture)] + pub unsafe fn presentsWithGesture(&self, ) -> bool; + + #[method(setPresentsWithGesture:)] + pub unsafe fn setPresentsWithGesture(&self, presentsWithGesture: bool,); + + #[method(isCollapsed)] + pub unsafe fn isCollapsed(&self, ) -> bool; + + #[method(preferredDisplayMode)] + pub unsafe fn preferredDisplayMode(&self, ) -> UISplitViewControllerDisplayMode; + + #[method(setPreferredDisplayMode:)] + pub unsafe fn setPreferredDisplayMode(&self, preferredDisplayMode: UISplitViewControllerDisplayMode,); + + #[method(displayMode)] + pub unsafe fn displayMode(&self, ) -> UISplitViewControllerDisplayMode; + + #[method_id(@__retain_semantics Other displayModeButtonItem)] + pub unsafe fn displayModeButtonItem(&self, ) -> Id; + + #[method(displayModeButtonVisibility)] + pub unsafe fn displayModeButtonVisibility(&self, ) -> UISplitViewControllerDisplayModeButtonVisibility; + + #[method(setDisplayModeButtonVisibility:)] + pub unsafe fn setDisplayModeButtonVisibility(&self, displayModeButtonVisibility: UISplitViewControllerDisplayModeButtonVisibility,); + + #[method(preferredPrimaryColumnWidthFraction)] + pub unsafe fn preferredPrimaryColumnWidthFraction(&self, ) -> CGFloat; + + #[method(setPreferredPrimaryColumnWidthFraction:)] + pub unsafe fn setPreferredPrimaryColumnWidthFraction(&self, preferredPrimaryColumnWidthFraction: CGFloat,); + + #[method(preferredPrimaryColumnWidth)] + pub unsafe fn preferredPrimaryColumnWidth(&self, ) -> CGFloat; + + #[method(setPreferredPrimaryColumnWidth:)] + pub unsafe fn setPreferredPrimaryColumnWidth(&self, preferredPrimaryColumnWidth: CGFloat,); + + #[method(minimumPrimaryColumnWidth)] + pub unsafe fn minimumPrimaryColumnWidth(&self, ) -> CGFloat; + + #[method(setMinimumPrimaryColumnWidth:)] + pub unsafe fn setMinimumPrimaryColumnWidth(&self, minimumPrimaryColumnWidth: CGFloat,); + + #[method(maximumPrimaryColumnWidth)] + pub unsafe fn maximumPrimaryColumnWidth(&self, ) -> CGFloat; + + #[method(setMaximumPrimaryColumnWidth:)] + pub unsafe fn setMaximumPrimaryColumnWidth(&self, maximumPrimaryColumnWidth: CGFloat,); + + #[method(primaryColumnWidth)] + pub unsafe fn primaryColumnWidth(&self, ) -> CGFloat; + + #[method(preferredSupplementaryColumnWidthFraction)] + pub unsafe fn preferredSupplementaryColumnWidthFraction(&self, ) -> CGFloat; + + #[method(setPreferredSupplementaryColumnWidthFraction:)] + pub unsafe fn setPreferredSupplementaryColumnWidthFraction(&self, preferredSupplementaryColumnWidthFraction: CGFloat,); + + #[method(preferredSupplementaryColumnWidth)] + pub unsafe fn preferredSupplementaryColumnWidth(&self, ) -> CGFloat; + + #[method(setPreferredSupplementaryColumnWidth:)] + pub unsafe fn setPreferredSupplementaryColumnWidth(&self, preferredSupplementaryColumnWidth: CGFloat,); + + #[method(minimumSupplementaryColumnWidth)] + pub unsafe fn minimumSupplementaryColumnWidth(&self, ) -> CGFloat; + + #[method(setMinimumSupplementaryColumnWidth:)] + pub unsafe fn setMinimumSupplementaryColumnWidth(&self, minimumSupplementaryColumnWidth: CGFloat,); + + #[method(maximumSupplementaryColumnWidth)] + pub unsafe fn maximumSupplementaryColumnWidth(&self, ) -> CGFloat; + + #[method(setMaximumSupplementaryColumnWidth:)] + pub unsafe fn setMaximumSupplementaryColumnWidth(&self, maximumSupplementaryColumnWidth: CGFloat,); + + #[method(supplementaryColumnWidth)] + pub unsafe fn supplementaryColumnWidth(&self, ) -> CGFloat; + + #[method(primaryEdge)] + pub unsafe fn primaryEdge(&self, ) -> UISplitViewControllerPrimaryEdge; + + #[method(setPrimaryEdge:)] + pub unsafe fn setPrimaryEdge(&self, primaryEdge: UISplitViewControllerPrimaryEdge,); + + #[method(showViewController:sender:)] + pub unsafe fn showViewController_sender(&self, vc: &UIViewController,sender: Option<&Object>,); + + #[method(showDetailViewController:sender:)] + pub unsafe fn showDetailViewController_sender(&self, vc: &UIViewController,sender: Option<&Object>,); + + #[method(primaryBackgroundStyle)] + pub unsafe fn primaryBackgroundStyle(&self, ) -> UISplitViewControllerBackgroundStyle; + + #[method(setPrimaryBackgroundStyle:)] + pub unsafe fn setPrimaryBackgroundStyle(&self, primaryBackgroundStyle: UISplitViewControllerBackgroundStyle,); + + } +); + +extern_protocol!( + pub struct UISplitViewControllerDelegate; + + unsafe impl UISplitViewControllerDelegate { + #[optional] + #[method(splitViewController:willChangeToDisplayMode:)] + pub unsafe fn splitViewController_willChangeToDisplayMode(&self, svc: &UISplitViewController,displayMode: UISplitViewControllerDisplayMode,); + + #[optional] + #[method(targetDisplayModeForActionInSplitViewController:)] + pub unsafe fn targetDisplayModeForActionInSplitViewController(&self, svc: &UISplitViewController,) -> UISplitViewControllerDisplayMode; + + #[optional] + #[method(splitViewController:showViewController:sender:)] + pub unsafe fn splitViewController_showViewController_sender(&self, splitViewController: &UISplitViewController,vc: &UIViewController,sender: Option<&Object>,) -> bool; + + #[optional] + #[method(splitViewController:showDetailViewController:sender:)] + pub unsafe fn splitViewController_showDetailViewController_sender(&self, splitViewController: &UISplitViewController,vc: &UIViewController,sender: Option<&Object>,) -> bool; + + #[optional] + #[method_id(@__retain_semantics Other primaryViewControllerForCollapsingSplitViewController:)] + pub unsafe fn primaryViewControllerForCollapsingSplitViewController(&self, splitViewController: &UISplitViewController,) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other primaryViewControllerForExpandingSplitViewController:)] + pub unsafe fn primaryViewControllerForExpandingSplitViewController(&self, splitViewController: &UISplitViewController,) -> Option>; + + #[optional] + #[method(splitViewController:collapseSecondaryViewController:ontoPrimaryViewController:)] + pub unsafe fn splitViewController_collapseSecondaryViewController_ontoPrimaryViewController(&self, splitViewController: &UISplitViewController,secondaryViewController: &UIViewController,primaryViewController: &UIViewController,) -> bool; + + #[optional] + #[method_id(@__retain_semantics Other splitViewController:separateSecondaryViewControllerFromPrimaryViewController:)] + pub unsafe fn splitViewController_separateSecondaryViewControllerFromPrimaryViewController(&self, splitViewController: &UISplitViewController,primaryViewController: &UIViewController,) -> Option>; + + #[optional] + #[method(splitViewControllerSupportedInterfaceOrientations:)] + pub unsafe fn splitViewControllerSupportedInterfaceOrientations(&self, splitViewController: &UISplitViewController,) -> UIInterfaceOrientationMask; + + #[optional] + #[method(splitViewControllerPreferredInterfaceOrientationForPresentation:)] + pub unsafe fn splitViewControllerPreferredInterfaceOrientationForPresentation(&self, splitViewController: &UISplitViewController,) -> UIInterfaceOrientation; + + #[optional] + #[method(splitViewController:willHideViewController:withBarButtonItem:forPopoverController:)] + pub unsafe fn splitViewController_willHideViewController_withBarButtonItem_forPopoverController(&self, svc: &UISplitViewController,aViewController: &UIViewController,barButtonItem: &UIBarButtonItem,pc: &UIPopoverController,); + + #[optional] + #[method(splitViewController:willShowViewController:invalidatingBarButtonItem:)] + pub unsafe fn splitViewController_willShowViewController_invalidatingBarButtonItem(&self, svc: &UISplitViewController,aViewController: &UIViewController,barButtonItem: &UIBarButtonItem,); + + #[optional] + #[method(splitViewController:popoverController:willPresentViewController:)] + pub unsafe fn splitViewController_popoverController_willPresentViewController(&self, svc: &UISplitViewController,pc: &UIPopoverController,aViewController: &UIViewController,); + + #[optional] + #[method(splitViewController:shouldHideViewController:inOrientation:)] + pub unsafe fn splitViewController_shouldHideViewController_inOrientation(&self, svc: &UISplitViewController,vc: &UIViewController,orientation: UIInterfaceOrientation,) -> bool; + + #[optional] + #[method(splitViewController:topColumnForCollapsingToProposedTopColumn:)] + pub unsafe fn splitViewController_topColumnForCollapsingToProposedTopColumn(&self, svc: &UISplitViewController,proposedTopColumn: UISplitViewControllerColumn,) -> UISplitViewControllerColumn; + + #[optional] + #[method(splitViewController:displayModeForExpandingToProposedDisplayMode:)] + pub unsafe fn splitViewController_displayModeForExpandingToProposedDisplayMode(&self, svc: &UISplitViewController,proposedDisplayMode: UISplitViewControllerDisplayMode,) -> UISplitViewControllerDisplayMode; + + #[optional] + #[method(splitViewControllerDidCollapse:)] + pub unsafe fn splitViewControllerDidCollapse(&self, svc: &UISplitViewController,); + + #[optional] + #[method(splitViewControllerDidExpand:)] + pub unsafe fn splitViewControllerDidExpand(&self, svc: &UISplitViewController,); + + #[optional] + #[method(splitViewController:willShowColumn:)] + pub unsafe fn splitViewController_willShowColumn(&self, svc: &UISplitViewController,column: UISplitViewControllerColumn,); + + #[optional] + #[method(splitViewController:willHideColumn:)] + pub unsafe fn splitViewController_willHideColumn(&self, svc: &UISplitViewController,column: UISplitViewControllerColumn,); + + #[optional] + #[method(splitViewControllerInteractivePresentationGestureWillBegin:)] + pub unsafe fn splitViewControllerInteractivePresentationGestureWillBegin(&self, svc: &UISplitViewController,); + + #[optional] + #[method(splitViewControllerInteractivePresentationGestureDidEnd:)] + pub unsafe fn splitViewControllerInteractivePresentationGestureDidEnd(&self, svc: &UISplitViewController,); + + } +); + +extern_methods!( + /// UISplitViewController + unsafe impl UIViewController { + #[method_id(@__retain_semantics Other splitViewController)] + pub unsafe fn splitViewController(&self, ) -> Option>; + + #[method(collapseSecondaryViewController:forSplitViewController:)] + pub unsafe fn collapseSecondaryViewController_forSplitViewController(&self, secondaryViewController: &UIViewController,splitViewController: &UISplitViewController,); + + #[method_id(@__retain_semantics Other separateSecondaryViewControllerForSplitViewController:)] + pub unsafe fn separateSecondaryViewControllerForSplitViewController(&self, splitViewController: &UISplitViewController,) -> Option>; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UISpringLoadedInteraction.rs b/crates/icrate-generated/src/UIKit/generated/UISpringLoadedInteraction.rs new file mode 100644 index 000000000..106209736 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UISpringLoadedInteraction.rs @@ -0,0 +1,95 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UISpringLoadedInteractionEffectState { + UISpringLoadedInteractionEffectStateInactive = 0, + UISpringLoadedInteractionEffectStatePossible = 1, + UISpringLoadedInteractionEffectStateActivating = 2, + UISpringLoadedInteractionEffectStateActivated = 3, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UISpringLoadedInteraction; + + unsafe impl ClassType for UISpringLoadedInteraction { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UISpringLoadedInteraction { + #[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 initWithInteractionBehavior:interactionEffect:activationHandler:)] + pub unsafe fn initWithInteractionBehavior_interactionEffect_activationHandler(this: Option>, interactionBehavior: Option<&UISpringLoadedInteractionBehavior>,interactionEffect: Option<&UISpringLoadedInteractionEffect>,handler: &Block<(NonNull, NonNull, ), ()>,) -> Id; + + #[method_id(@__retain_semantics Init initWithActivationHandler:)] + pub unsafe fn initWithActivationHandler(this: Option>, handler: &Block<(NonNull, NonNull, ), ()>,) -> Id; + + #[method_id(@__retain_semantics Other interactionBehavior)] + pub unsafe fn interactionBehavior(&self, ) -> Id; + + #[method_id(@__retain_semantics Other interactionEffect)] + pub unsafe fn interactionEffect(&self, ) -> Id; + + } +); + +extern_protocol!( + pub struct UISpringLoadedInteractionBehavior; + + unsafe impl UISpringLoadedInteractionBehavior { + #[method(shouldAllowInteraction:withContext:)] + pub unsafe fn shouldAllowInteraction_withContext(&self, interaction: &UISpringLoadedInteraction,context: &UISpringLoadedInteractionContext,) -> bool; + + #[optional] + #[method(interactionDidFinish:)] + pub unsafe fn interactionDidFinish(&self, interaction: &UISpringLoadedInteraction,); + + } +); + +extern_protocol!( + pub struct UISpringLoadedInteractionEffect; + + unsafe impl UISpringLoadedInteractionEffect { + #[method(interaction:didChangeWithContext:)] + pub unsafe fn interaction_didChangeWithContext(&self, interaction: &UISpringLoadedInteraction,context: &UISpringLoadedInteractionContext,); + + } +); + +extern_protocol!( + pub struct UISpringLoadedInteractionContext; + + unsafe impl UISpringLoadedInteractionContext { + #[method(state)] + pub unsafe fn state(&self, ) -> UISpringLoadedInteractionEffectState; + + #[method_id(@__retain_semantics Other targetView)] + pub unsafe fn targetView(&self, ) -> Option>; + + #[method(setTargetView:)] + pub unsafe fn setTargetView(&self, targetView: Option<&UIView>,); + + #[method_id(@__retain_semantics Other targetItem)] + pub unsafe fn targetItem(&self, ) -> Option>; + + #[method(setTargetItem:)] + pub unsafe fn setTargetItem(&self, targetItem: Option<&Object>,); + + #[method(locationInView:)] + pub unsafe fn locationInView(&self, view: Option<&UIView>,) -> CGPoint; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UISpringLoadedInteractionSupporting.rs b/crates/icrate-generated/src/UIKit/generated/UISpringLoadedInteractionSupporting.rs new file mode 100644 index 000000000..b03586b92 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UISpringLoadedInteractionSupporting.rs @@ -0,0 +1,17 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_protocol!( + pub struct UISpringLoadedInteractionSupporting; + + unsafe impl UISpringLoadedInteractionSupporting { + #[method(isSpringLoaded)] + pub unsafe fn isSpringLoaded(&self, ) -> bool; + + #[method(setSpringLoaded:)] + pub unsafe fn setSpringLoaded(&self, springLoaded: bool,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIStackView.rs b/crates/icrate-generated/src/UIKit/generated/UIStackView.rs new file mode 100644 index 000000000..9d80c0e9b --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIStackView.rs @@ -0,0 +1,106 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIStackViewDistribution { + UIStackViewDistributionFill = 0, + UIStackViewDistributionFillEqually = 1, + UIStackViewDistributionFillProportionally = 2, + UIStackViewDistributionEqualSpacing = 3, + UIStackViewDistributionEqualCentering = 4, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIStackViewAlignment { + UIStackViewAlignmentFill = 0, + UIStackViewAlignmentLeading = 1, + UIStackViewAlignmentTop = UIStackViewAlignmentLeading, + UIStackViewAlignmentFirstBaseline = 2, + UIStackViewAlignmentCenter = 3, + UIStackViewAlignmentTrailing = 4, + UIStackViewAlignmentBottom = UIStackViewAlignmentTrailing, + UIStackViewAlignmentLastBaseline = 5, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIStackView; + + unsafe impl ClassType for UIStackView { + type Super = UIView; + } +); + +extern_methods!( + unsafe impl UIStackView { + #[method_id(@__retain_semantics Init initWithFrame:)] + pub unsafe fn initWithFrame(this: Option>, frame: CGRect,) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Id; + + #[method_id(@__retain_semantics Init initWithArrangedSubviews:)] + pub unsafe fn initWithArrangedSubviews(this: Option>, views: &NSArray,) -> Id; + + #[method_id(@__retain_semantics Other arrangedSubviews)] + pub unsafe fn arrangedSubviews(&self, ) -> Id, Shared>; + + #[method(addArrangedSubview:)] + pub unsafe fn addArrangedSubview(&self, view: &UIView,); + + #[method(removeArrangedSubview:)] + pub unsafe fn removeArrangedSubview(&self, view: &UIView,); + + #[method(insertArrangedSubview:atIndex:)] + pub unsafe fn insertArrangedSubview_atIndex(&self, view: &UIView,stackIndex: NSUInteger,); + + #[method(axis)] + pub unsafe fn axis(&self, ) -> UILayoutConstraintAxis; + + #[method(setAxis:)] + pub unsafe fn setAxis(&self, axis: UILayoutConstraintAxis,); + + #[method(distribution)] + pub unsafe fn distribution(&self, ) -> UIStackViewDistribution; + + #[method(setDistribution:)] + pub unsafe fn setDistribution(&self, distribution: UIStackViewDistribution,); + + #[method(alignment)] + pub unsafe fn alignment(&self, ) -> UIStackViewAlignment; + + #[method(setAlignment:)] + pub unsafe fn setAlignment(&self, alignment: UIStackViewAlignment,); + + #[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,arrangedSubview: &UIView,); + + #[method(customSpacingAfterView:)] + pub unsafe fn customSpacingAfterView(&self, arrangedSubview: &UIView,) -> CGFloat; + + #[method(isBaselineRelativeArrangement)] + pub unsafe fn isBaselineRelativeArrangement(&self, ) -> bool; + + #[method(setBaselineRelativeArrangement:)] + pub unsafe fn setBaselineRelativeArrangement(&self, baselineRelativeArrangement: bool,); + + #[method(isLayoutMarginsRelativeArrangement)] + pub unsafe fn isLayoutMarginsRelativeArrangement(&self, ) -> bool; + + #[method(setLayoutMarginsRelativeArrangement:)] + pub unsafe fn setLayoutMarginsRelativeArrangement(&self, layoutMarginsRelativeArrangement: bool,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIStateRestoration.rs b/crates/icrate-generated/src/UIKit/generated/UIStateRestoration.rs new file mode 100644 index 000000000..354d10b70 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIStateRestoration.rs @@ -0,0 +1,74 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_static!(UIStateRestorationViewControllerStoryboardKey: &'static NSString); + +extern_static!(UIApplicationStateRestorationBundleVersionKey: &'static NSString); + +extern_static!(UIApplicationStateRestorationUserInterfaceIdiomKey: &'static NSString); + +extern_static!(UIApplicationStateRestorationTimestampKey: &'static NSString); + +extern_static!(UIApplicationStateRestorationSystemVersionKey: &'static NSString); + +extern_protocol!( + pub struct UIViewControllerRestoration; + + unsafe impl UIViewControllerRestoration { + #[method_id(@__retain_semantics Other viewControllerWithRestorationIdentifierPath:coder:)] + pub unsafe fn viewControllerWithRestorationIdentifierPath_coder(identifierComponents: &NSArray,coder: &NSCoder,) -> Option>; + + } +); + +extern_protocol!( + pub struct UIDataSourceModelAssociation; + + unsafe impl UIDataSourceModelAssociation { + #[method_id(@__retain_semantics Other modelIdentifierForElementAtIndexPath:inView:)] + pub unsafe fn modelIdentifierForElementAtIndexPath_inView(&self, idx: &NSIndexPath,view: &UIView,) -> Option>; + + #[method_id(@__retain_semantics Other indexPathForElementWithModelIdentifier:inView:)] + pub unsafe fn indexPathForElementWithModelIdentifier_inView(&self, identifier: &NSString,view: &UIView,) -> Option>; + + } +); + +extern_protocol!( + pub struct UIStateRestoring; + + unsafe impl UIStateRestoring { + #[optional] + #[method_id(@__retain_semantics Other restorationParent)] + pub unsafe fn restorationParent(&self, ) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other objectRestorationClass)] + pub unsafe fn objectRestorationClass(&self, ) -> Option>; + + #[optional] + #[method(encodeRestorableStateWithCoder:)] + pub unsafe fn encodeRestorableStateWithCoder(&self, coder: &NSCoder,); + + #[optional] + #[method(decodeRestorableStateWithCoder:)] + pub unsafe fn decodeRestorableStateWithCoder(&self, coder: &NSCoder,); + + #[optional] + #[method(applicationFinishedRestoringState)] + pub unsafe fn applicationFinishedRestoringState(&self, ); + + } +); + +extern_protocol!( + pub struct UIObjectRestoration; + + unsafe impl UIObjectRestoration { + #[method_id(@__retain_semantics Other objectWithRestorationIdentifierPath:coder:)] + pub unsafe fn objectWithRestorationIdentifierPath_coder(identifierComponents: &NSArray,coder: &NSCoder,) -> Option>; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIStatusBarManager.rs b/crates/icrate-generated/src/UIKit/generated/UIStatusBarManager.rs new file mode 100644 index 000000000..4bb7e0052 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIStatusBarManager.rs @@ -0,0 +1,42 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIStatusBarManager; + + unsafe impl ClassType for UIStatusBarManager { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIStatusBarManager { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics New new)] + pub unsafe fn new() -> Id; + + #[method(statusBarStyle)] + pub unsafe fn statusBarStyle(&self, ) -> UIStatusBarStyle; + + #[method(isStatusBarHidden)] + pub unsafe fn isStatusBarHidden(&self, ) -> bool; + + #[method(statusBarFrame)] + pub unsafe fn statusBarFrame(&self, ) -> CGRect; + + } +); + +extern_methods!( + /// StatusBarManager + unsafe impl UIWindowScene { + #[method_id(@__retain_semantics Other statusBarManager)] + pub unsafe fn statusBarManager(&self, ) -> Option>; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIStepper.rs b/crates/icrate-generated/src/UIKit/generated/UIStepper.rs new file mode 100644 index 000000000..0a9996d0f --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIStepper.rs @@ -0,0 +1,84 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIStepper; + + unsafe impl ClassType for UIStepper { + type Super = UIControl; + } +); + +extern_methods!( + unsafe impl UIStepper { + #[method(isContinuous)] + pub unsafe fn isContinuous(&self, ) -> bool; + + #[method(setContinuous:)] + pub unsafe fn setContinuous(&self, continuous: bool,); + + #[method(autorepeat)] + pub unsafe fn autorepeat(&self, ) -> bool; + + #[method(setAutorepeat:)] + pub unsafe fn setAutorepeat(&self, autorepeat: bool,); + + #[method(wraps)] + pub unsafe fn wraps(&self, ) -> bool; + + #[method(setWraps:)] + pub unsafe fn setWraps(&self, wraps: bool,); + + #[method(value)] + pub unsafe fn value(&self, ) -> c_double; + + #[method(setValue:)] + pub unsafe fn setValue(&self, value: c_double,); + + #[method(minimumValue)] + pub unsafe fn minimumValue(&self, ) -> c_double; + + #[method(setMinimumValue:)] + pub unsafe fn setMinimumValue(&self, minimumValue: c_double,); + + #[method(maximumValue)] + pub unsafe fn maximumValue(&self, ) -> c_double; + + #[method(setMaximumValue:)] + pub unsafe fn setMaximumValue(&self, maximumValue: c_double,); + + #[method(stepValue)] + pub unsafe fn stepValue(&self, ) -> c_double; + + #[method(setStepValue:)] + pub unsafe fn setStepValue(&self, stepValue: c_double,); + + #[method(setBackgroundImage:forState:)] + pub unsafe fn setBackgroundImage_forState(&self, image: Option<&UIImage>,state: UIControlState,); + + #[method_id(@__retain_semantics Other backgroundImageForState:)] + pub unsafe fn backgroundImageForState(&self, state: UIControlState,) -> Option>; + + #[method(setDividerImage:forLeftSegmentState:rightSegmentState:)] + pub unsafe fn setDividerImage_forLeftSegmentState_rightSegmentState(&self, image: Option<&UIImage>,leftState: UIControlState,rightState: UIControlState,); + + #[method_id(@__retain_semantics Other dividerImageForLeftSegmentState:rightSegmentState:)] + pub unsafe fn dividerImageForLeftSegmentState_rightSegmentState(&self, state: UIControlState,state: UIControlState,) -> Option>; + + #[method(setIncrementImage:forState:)] + pub unsafe fn setIncrementImage_forState(&self, image: Option<&UIImage>,state: UIControlState,); + + #[method_id(@__retain_semantics Other incrementImageForState:)] + pub unsafe fn incrementImageForState(&self, state: UIControlState,) -> Option>; + + #[method(setDecrementImage:forState:)] + pub unsafe fn setDecrementImage_forState(&self, image: Option<&UIImage>,state: UIControlState,); + + #[method_id(@__retain_semantics Other decrementImageForState:)] + pub unsafe fn decrementImageForState(&self, state: UIControlState,) -> Option>; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIStoryboard.rs b/crates/icrate-generated/src/UIKit/generated/UIStoryboard.rs new file mode 100644 index 000000000..39c98821b --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIStoryboard.rs @@ -0,0 +1,35 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +pub type UIStoryboardViewControllerCreator = *mut Block<(NonNull, ), *mut UIViewController>; + +extern_class!( + #[derive(Debug)] + pub struct UIStoryboard; + + unsafe impl ClassType for UIStoryboard { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIStoryboard { + #[method_id(@__retain_semantics Other storyboardWithName:bundle:)] + pub unsafe fn storyboardWithName_bundle(name: &NSString,storyboardBundleOrNil: Option<&NSBundle>,) -> Id; + + #[method_id(@__retain_semantics Other instantiateInitialViewController)] + pub unsafe fn instantiateInitialViewController(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other instantiateInitialViewControllerWithCreator:)] + pub unsafe fn instantiateInitialViewControllerWithCreator(&self, block: UIStoryboardViewControllerCreator,) -> Option>; + + #[method_id(@__retain_semantics Other instantiateViewControllerWithIdentifier:)] + pub unsafe fn instantiateViewControllerWithIdentifier(&self, identifier: &NSString,) -> Id; + + #[method_id(@__retain_semantics Other instantiateViewControllerWithIdentifier:creator:)] + pub unsafe fn instantiateViewControllerWithIdentifier_creator(&self, identifier: &NSString,block: UIStoryboardViewControllerCreator,) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIStoryboardPopoverSegue.rs b/crates/icrate-generated/src/UIKit/generated/UIStoryboardPopoverSegue.rs new file mode 100644 index 000000000..91f8928df --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIStoryboardPopoverSegue.rs @@ -0,0 +1,21 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIStoryboardPopoverSegue; + + unsafe impl ClassType for UIStoryboardPopoverSegue { + type Super = UIStoryboardSegue; + } +); + +extern_methods!( + unsafe impl UIStoryboardPopoverSegue { + #[method_id(@__retain_semantics Other popoverController)] + pub unsafe fn popoverController(&self, ) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIStoryboardSegue.rs b/crates/icrate-generated/src/UIKit/generated/UIStoryboardSegue.rs new file mode 100644 index 000000000..d9b7ea63e --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIStoryboardSegue.rs @@ -0,0 +1,65 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIStoryboardSegue; + + unsafe impl ClassType for UIStoryboardSegue { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIStoryboardSegue { + #[method_id(@__retain_semantics Other segueWithIdentifier:source:destination:performHandler:)] + pub unsafe fn segueWithIdentifier_source_destination_performHandler(identifier: Option<&NSString>,source: &UIViewController,destination: &UIViewController,performHandler: &Block<(), ()>,) -> Id; + + #[method_id(@__retain_semantics Init initWithIdentifier:source:destination:)] + pub unsafe fn initWithIdentifier_source_destination(this: Option>, identifier: Option<&NSString>,source: &UIViewController,destination: &UIViewController,) -> Id; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics Other identifier)] + pub unsafe fn identifier(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other sourceViewController)] + pub unsafe fn sourceViewController(&self, ) -> Id; + + #[method_id(@__retain_semantics Other destinationViewController)] + pub unsafe fn destinationViewController(&self, ) -> Id; + + #[method(perform)] + pub unsafe fn perform(&self, ); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIStoryboardUnwindSegueSource; + + unsafe impl ClassType for UIStoryboardUnwindSegueSource { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIStoryboardUnwindSegueSource { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics Other sourceViewController)] + pub unsafe fn sourceViewController(&self, ) -> Id; + + #[method(unwindAction)] + pub unsafe fn unwindAction(&self, ) -> Sel; + + #[method_id(@__retain_semantics Other sender)] + pub unsafe fn sender(&self, ) -> Option>; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIStringDrawing.rs b/crates/icrate-generated/src/UIKit/generated/UIStringDrawing.rs new file mode 100644 index 000000000..74d80f4bd --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIStringDrawing.rs @@ -0,0 +1,84 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_static!(UITextAttributeFont: Option<&'static NSString>); + +extern_static!(UITextAttributeTextColor: Option<&'static NSString>); + +extern_static!(UITextAttributeTextShadowColor: Option<&'static NSString>); + +extern_static!(UITextAttributeTextShadowOffset: Option<&'static NSString>); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UILineBreakMode { + UILineBreakModeWordWrap = 0, + UILineBreakModeCharacterWrap = 1, + UILineBreakModeClip = 2, + UILineBreakModeHeadTruncation = 3, + UILineBreakModeTailTruncation = 4, + UILineBreakModeMiddleTruncation = 5, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UITextAlignment { + UITextAlignmentLeft = 0, + UITextAlignmentCenter = 1, + UITextAlignmentRight = 2, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIBaselineAdjustment { + UIBaselineAdjustmentAlignBaselines = 0, + UIBaselineAdjustmentAlignCenters = 1, + UIBaselineAdjustmentNone = 2, + } +); + +extern_methods!( + /// UIStringDrawing + unsafe impl NSString { + #[method(sizeWithFont:)] + pub unsafe fn sizeWithFont(&self, font: Option<&UIFont>,) -> CGSize; + + #[method(sizeWithFont:forWidth:lineBreakMode:)] + pub unsafe fn sizeWithFont_forWidth_lineBreakMode(&self, font: Option<&UIFont>,width: CGFloat,lineBreakMode: NSLineBreakMode,) -> CGSize; + + #[method(drawAtPoint:withFont:)] + pub unsafe fn drawAtPoint_withFont(&self, point: CGPoint,font: Option<&UIFont>,) -> CGSize; + + #[method(drawAtPoint:forWidth:withFont:lineBreakMode:)] + pub unsafe fn drawAtPoint_forWidth_withFont_lineBreakMode(&self, point: CGPoint,width: CGFloat,font: Option<&UIFont>,lineBreakMode: NSLineBreakMode,) -> CGSize; + + #[method(sizeWithFont:constrainedToSize:)] + pub unsafe fn sizeWithFont_constrainedToSize(&self, font: Option<&UIFont>,size: CGSize,) -> CGSize; + + #[method(sizeWithFont:constrainedToSize:lineBreakMode:)] + pub unsafe fn sizeWithFont_constrainedToSize_lineBreakMode(&self, font: Option<&UIFont>,size: CGSize,lineBreakMode: NSLineBreakMode,) -> CGSize; + + #[method(drawInRect:withFont:)] + pub unsafe fn drawInRect_withFont(&self, rect: CGRect,font: Option<&UIFont>,) -> CGSize; + + #[method(drawInRect:withFont:lineBreakMode:)] + pub unsafe fn drawInRect_withFont_lineBreakMode(&self, rect: CGRect,font: Option<&UIFont>,lineBreakMode: NSLineBreakMode,) -> CGSize; + + #[method(drawInRect:withFont:lineBreakMode:alignment:)] + pub unsafe fn drawInRect_withFont_lineBreakMode_alignment(&self, rect: CGRect,font: Option<&UIFont>,lineBreakMode: NSLineBreakMode,alignment: NSTextAlignment,) -> CGSize; + + #[method(sizeWithFont:minFontSize:actualFontSize:forWidth:lineBreakMode:)] + pub unsafe fn sizeWithFont_minFontSize_actualFontSize_forWidth_lineBreakMode(&self, font: Option<&UIFont>,minFontSize: CGFloat,actualFontSize: *mut CGFloat,width: CGFloat,lineBreakMode: NSLineBreakMode,) -> CGSize; + + #[method(drawAtPoint:forWidth:withFont:fontSize:lineBreakMode:baselineAdjustment:)] + pub unsafe fn drawAtPoint_forWidth_withFont_fontSize_lineBreakMode_baselineAdjustment(&self, point: CGPoint,width: CGFloat,font: Option<&UIFont>,fontSize: CGFloat,lineBreakMode: NSLineBreakMode,baselineAdjustment: UIBaselineAdjustment,) -> CGSize; + + #[method(drawAtPoint:forWidth:withFont:minFontSize:actualFontSize:lineBreakMode:baselineAdjustment:)] + pub unsafe fn drawAtPoint_forWidth_withFont_minFontSize_actualFontSize_lineBreakMode_baselineAdjustment(&self, point: CGPoint,width: CGFloat,font: Option<&UIFont>,minFontSize: CGFloat,actualFontSize: *mut CGFloat,lineBreakMode: NSLineBreakMode,baselineAdjustment: UIBaselineAdjustment,) -> CGSize; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UISwipeActionsConfiguration.rs b/crates/icrate-generated/src/UIKit/generated/UISwipeActionsConfiguration.rs new file mode 100644 index 000000000..d3b0a0c0a --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UISwipeActionsConfiguration.rs @@ -0,0 +1,30 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UISwipeActionsConfiguration; + + unsafe impl ClassType for UISwipeActionsConfiguration { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UISwipeActionsConfiguration { + #[method_id(@__retain_semantics Other configurationWithActions:)] + pub unsafe fn configurationWithActions(actions: &NSArray,) -> Id; + + #[method_id(@__retain_semantics Other actions)] + pub unsafe fn actions(&self, ) -> Id, Shared>; + + #[method(performsFirstActionWithFullSwipe)] + pub unsafe fn performsFirstActionWithFullSwipe(&self, ) -> bool; + + #[method(setPerformsFirstActionWithFullSwipe:)] + pub unsafe fn setPerformsFirstActionWithFullSwipe(&self, performsFirstActionWithFullSwipe: bool,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UISwipeGestureRecognizer.rs b/crates/icrate-generated/src/UIKit/generated/UISwipeGestureRecognizer.rs new file mode 100644 index 000000000..e2fbb48c9 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UISwipeGestureRecognizer.rs @@ -0,0 +1,40 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_options!( + #[underlying(NSUInteger)] + pub enum UISwipeGestureRecognizerDirection { + UISwipeGestureRecognizerDirectionRight = 1<<0, + UISwipeGestureRecognizerDirectionLeft = 1<<1, + UISwipeGestureRecognizerDirectionUp = 1<<2, + UISwipeGestureRecognizerDirectionDown = 1<<3, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UISwipeGestureRecognizer; + + unsafe impl ClassType for UISwipeGestureRecognizer { + type Super = UIGestureRecognizer; + } +); + +extern_methods!( + unsafe impl UISwipeGestureRecognizer { + #[method(numberOfTouchesRequired)] + pub unsafe fn numberOfTouchesRequired(&self, ) -> NSUInteger; + + #[method(setNumberOfTouchesRequired:)] + pub unsafe fn setNumberOfTouchesRequired(&self, numberOfTouchesRequired: NSUInteger,); + + #[method(direction)] + pub unsafe fn direction(&self, ) -> UISwipeGestureRecognizerDirection; + + #[method(setDirection:)] + pub unsafe fn setDirection(&self, direction: UISwipeGestureRecognizerDirection,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UISwitch.rs b/crates/icrate-generated/src/UIKit/generated/UISwitch.rs new file mode 100644 index 000000000..cfc07567b --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UISwitch.rs @@ -0,0 +1,81 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UISwitchStyle { + UISwitchStyleAutomatic = 0, + UISwitchStyleCheckbox = 1, + UISwitchStyleSliding = 2, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UISwitch; + + unsafe impl ClassType for UISwitch { + type Super = UIControl; + } +); + +extern_methods!( + unsafe impl UISwitch { + #[method_id(@__retain_semantics Other onTintColor)] + pub unsafe fn onTintColor(&self, ) -> Option>; + + #[method(setOnTintColor:)] + pub unsafe fn setOnTintColor(&self, onTintColor: Option<&UIColor>,); + + #[method_id(@__retain_semantics Other thumbTintColor)] + pub unsafe fn thumbTintColor(&self, ) -> Option>; + + #[method(setThumbTintColor:)] + pub unsafe fn setThumbTintColor(&self, thumbTintColor: Option<&UIColor>,); + + #[method_id(@__retain_semantics Other onImage)] + pub unsafe fn onImage(&self, ) -> Option>; + + #[method(setOnImage:)] + pub unsafe fn setOnImage(&self, onImage: Option<&UIImage>,); + + #[method_id(@__retain_semantics Other offImage)] + pub unsafe fn offImage(&self, ) -> Option>; + + #[method(setOffImage:)] + pub unsafe fn setOffImage(&self, offImage: Option<&UIImage>,); + + #[method_id(@__retain_semantics Other title)] + pub unsafe fn title(&self, ) -> Option>; + + #[method(setTitle:)] + pub unsafe fn setTitle(&self, title: Option<&NSString>,); + + #[method(style)] + pub unsafe fn style(&self, ) -> UISwitchStyle; + + #[method(preferredStyle)] + pub unsafe fn preferredStyle(&self, ) -> UISwitchStyle; + + #[method(setPreferredStyle:)] + pub unsafe fn setPreferredStyle(&self, preferredStyle: UISwitchStyle,); + + #[method(isOn)] + pub unsafe fn isOn(&self, ) -> bool; + + #[method(setOn:)] + pub unsafe fn setOn(&self, on: bool,); + + #[method_id(@__retain_semantics Init initWithFrame:)] + pub unsafe fn initWithFrame(this: Option>, frame: CGRect,) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method(setOn:animated:)] + pub unsafe fn setOn_animated(&self, on: bool,animated: bool,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UITabBar.rs b/crates/icrate-generated/src/UIKit/generated/UITabBar.rs new file mode 100644 index 000000000..0d68a65d1 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UITabBar.rs @@ -0,0 +1,180 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UITabBarItemPositioning { + UITabBarItemPositioningAutomatic = 0, + UITabBarItemPositioningFill = 1, + UITabBarItemPositioningCentered = 2, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UITabBar; + + unsafe impl ClassType for UITabBar { + type Super = UIView; + } +); + +extern_methods!( + unsafe impl UITabBar { + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&UITabBarDelegate>,); + + #[method_id(@__retain_semantics Other items)] + pub unsafe fn items(&self, ) -> Option, Shared>>; + + #[method(setItems:)] + pub unsafe fn setItems(&self, items: Option<&NSArray>,); + + #[method_id(@__retain_semantics Other selectedItem)] + pub unsafe fn selectedItem(&self, ) -> Option>; + + #[method(setSelectedItem:)] + pub unsafe fn setSelectedItem(&self, selectedItem: Option<&UITabBarItem>,); + + #[method(setItems:animated:)] + pub unsafe fn setItems_animated(&self, items: Option<&NSArray>,animated: bool,); + + #[method(beginCustomizingItems:)] + pub unsafe fn beginCustomizingItems(&self, items: &NSArray,); + + #[method(endCustomizingAnimated:)] + pub unsafe fn endCustomizingAnimated(&self, animated: bool,) -> bool; + + #[method(isCustomizing)] + pub unsafe fn isCustomizing(&self, ) -> bool; + + #[method_id(@__retain_semantics Other tintColor)] + pub unsafe fn tintColor(&self, ) -> Option>; + + #[method(setTintColor:)] + pub unsafe fn setTintColor(&self, tintColor: Option<&UIColor>,); + + #[method_id(@__retain_semantics Other barTintColor)] + pub unsafe fn barTintColor(&self, ) -> Option>; + + #[method(setBarTintColor:)] + pub unsafe fn setBarTintColor(&self, barTintColor: Option<&UIColor>,); + + #[method_id(@__retain_semantics Other unselectedItemTintColor)] + pub unsafe fn unselectedItemTintColor(&self, ) -> Option>; + + #[method(setUnselectedItemTintColor:)] + pub unsafe fn setUnselectedItemTintColor(&self, unselectedItemTintColor: Option<&UIColor>,); + + #[method_id(@__retain_semantics Other selectedImageTintColor)] + pub unsafe fn selectedImageTintColor(&self, ) -> Option>; + + #[method(setSelectedImageTintColor:)] + pub unsafe fn setSelectedImageTintColor(&self, selectedImageTintColor: Option<&UIColor>,); + + #[method_id(@__retain_semantics Other backgroundImage)] + pub unsafe fn backgroundImage(&self, ) -> Option>; + + #[method(setBackgroundImage:)] + pub unsafe fn setBackgroundImage(&self, backgroundImage: Option<&UIImage>,); + + #[method_id(@__retain_semantics Other selectionIndicatorImage)] + pub unsafe fn selectionIndicatorImage(&self, ) -> Option>; + + #[method(setSelectionIndicatorImage:)] + pub unsafe fn setSelectionIndicatorImage(&self, selectionIndicatorImage: Option<&UIImage>,); + + #[method_id(@__retain_semantics Other shadowImage)] + pub unsafe fn shadowImage(&self, ) -> Option>; + + #[method(setShadowImage:)] + pub unsafe fn setShadowImage(&self, shadowImage: Option<&UIImage>,); + + #[method(itemPositioning)] + pub unsafe fn itemPositioning(&self, ) -> UITabBarItemPositioning; + + #[method(setItemPositioning:)] + pub unsafe fn setItemPositioning(&self, itemPositioning: UITabBarItemPositioning,); + + #[method(itemWidth)] + pub unsafe fn itemWidth(&self, ) -> CGFloat; + + #[method(setItemWidth:)] + pub unsafe fn setItemWidth(&self, itemWidth: CGFloat,); + + #[method(itemSpacing)] + pub unsafe fn itemSpacing(&self, ) -> CGFloat; + + #[method(setItemSpacing:)] + pub unsafe fn setItemSpacing(&self, itemSpacing: CGFloat,); + + #[method(barStyle)] + pub unsafe fn barStyle(&self, ) -> UIBarStyle; + + #[method(setBarStyle:)] + pub unsafe fn setBarStyle(&self, barStyle: UIBarStyle,); + + #[method(isTranslucent)] + pub unsafe fn isTranslucent(&self, ) -> bool; + + #[method(setTranslucent:)] + pub unsafe fn setTranslucent(&self, translucent: bool,); + + #[method_id(@__retain_semantics Other standardAppearance)] + pub unsafe fn standardAppearance(&self, ) -> Id; + + #[method(setStandardAppearance:)] + pub unsafe fn setStandardAppearance(&self, standardAppearance: &UITabBarAppearance,); + + #[method_id(@__retain_semantics Other scrollEdgeAppearance)] + pub unsafe fn scrollEdgeAppearance(&self, ) -> Option>; + + #[method(setScrollEdgeAppearance:)] + pub unsafe fn setScrollEdgeAppearance(&self, scrollEdgeAppearance: Option<&UITabBarAppearance>,); + + #[method_id(@__retain_semantics Other leadingAccessoryView)] + pub unsafe fn leadingAccessoryView(&self, ) -> Id; + + #[method_id(@__retain_semantics Other trailingAccessoryView)] + pub unsafe fn trailingAccessoryView(&self, ) -> Id; + + } +); + +extern_protocol!( + pub struct UITabBarDelegate; + + unsafe impl UITabBarDelegate { + #[optional] + #[method(tabBar:didSelectItem:)] + pub unsafe fn tabBar_didSelectItem(&self, tabBar: &UITabBar,item: &UITabBarItem,); + + #[optional] + #[method(tabBar:willBeginCustomizingItems:)] + pub unsafe fn tabBar_willBeginCustomizingItems(&self, tabBar: &UITabBar,items: &NSArray,); + + #[optional] + #[method(tabBar:didBeginCustomizingItems:)] + pub unsafe fn tabBar_didBeginCustomizingItems(&self, tabBar: &UITabBar,items: &NSArray,); + + #[optional] + #[method(tabBar:willEndCustomizingItems:changed:)] + pub unsafe fn tabBar_willEndCustomizingItems_changed(&self, tabBar: &UITabBar,items: &NSArray,changed: bool,); + + #[optional] + #[method(tabBar:didEndCustomizingItems:changed:)] + pub unsafe fn tabBar_didEndCustomizingItems_changed(&self, tabBar: &UITabBar,items: &NSArray,changed: bool,); + + } +); + +extern_methods!( + /// SpringLoading + unsafe impl UITabBar { + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UITabBarAppearance.rs b/crates/icrate-generated/src/UIKit/generated/UITabBarAppearance.rs new file mode 100644 index 000000000..7d6c1d324 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UITabBarAppearance.rs @@ -0,0 +1,178 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UITabBarItemStateAppearance; + + unsafe impl ClassType for UITabBarItemStateAppearance { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UITabBarItemStateAppearance { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics New new)] + pub unsafe fn new() -> Id; + + #[method_id(@__retain_semantics Other titleTextAttributes)] + pub unsafe fn titleTextAttributes(&self, ) -> Id, Shared>; + + #[method(setTitleTextAttributes:)] + pub unsafe fn setTitleTextAttributes(&self, titleTextAttributes: &NSDictionary,); + + #[method(titlePositionAdjustment)] + pub unsafe fn titlePositionAdjustment(&self, ) -> UIOffset; + + #[method(setTitlePositionAdjustment:)] + pub unsafe fn setTitlePositionAdjustment(&self, titlePositionAdjustment: UIOffset,); + + #[method_id(@__retain_semantics Other iconColor)] + pub unsafe fn iconColor(&self, ) -> Option>; + + #[method(setIconColor:)] + pub unsafe fn setIconColor(&self, iconColor: Option<&UIColor>,); + + #[method(badgePositionAdjustment)] + pub unsafe fn badgePositionAdjustment(&self, ) -> UIOffset; + + #[method(setBadgePositionAdjustment:)] + pub unsafe fn setBadgePositionAdjustment(&self, badgePositionAdjustment: UIOffset,); + + #[method_id(@__retain_semantics Other badgeBackgroundColor)] + pub unsafe fn badgeBackgroundColor(&self, ) -> Option>; + + #[method(setBadgeBackgroundColor:)] + pub unsafe fn setBadgeBackgroundColor(&self, badgeBackgroundColor: Option<&UIColor>,); + + #[method_id(@__retain_semantics Other badgeTextAttributes)] + pub unsafe fn badgeTextAttributes(&self, ) -> Id, Shared>; + + #[method(setBadgeTextAttributes:)] + pub unsafe fn setBadgeTextAttributes(&self, badgeTextAttributes: &NSDictionary,); + + #[method(badgeTitlePositionAdjustment)] + pub unsafe fn badgeTitlePositionAdjustment(&self, ) -> UIOffset; + + #[method(setBadgeTitlePositionAdjustment:)] + pub unsafe fn setBadgeTitlePositionAdjustment(&self, badgeTitlePositionAdjustment: UIOffset,); + + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UITabBarItemAppearanceStyle { + UITabBarItemAppearanceStyleStacked = 0, + UITabBarItemAppearanceStyleInline = 1, + UITabBarItemAppearanceStyleCompactInline = 2, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UITabBarItemAppearance; + + unsafe impl ClassType for UITabBarItemAppearance { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UITabBarItemAppearance { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics Init initWithStyle:)] + pub unsafe fn initWithStyle(this: Option>, style: UITabBarItemAppearanceStyle,) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Id; + + #[method_id(@__retain_semantics CopyOrMutCopy copy)] + pub unsafe fn copy(&self, ) -> Id; + + #[method(configureWithDefaultForStyle:)] + pub unsafe fn configureWithDefaultForStyle(&self, style: UITabBarItemAppearanceStyle,); + + #[method_id(@__retain_semantics Other normal)] + pub unsafe fn normal(&self, ) -> Id; + + #[method_id(@__retain_semantics Other selected)] + pub unsafe fn selected(&self, ) -> Id; + + #[method_id(@__retain_semantics Other disabled)] + pub unsafe fn disabled(&self, ) -> Id; + + #[method_id(@__retain_semantics Other focused)] + pub unsafe fn focused(&self, ) -> Id; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UITabBarAppearance; + + unsafe impl ClassType for UITabBarAppearance { + type Super = UIBarAppearance; + } +); + +extern_methods!( + unsafe impl UITabBarAppearance { + #[method_id(@__retain_semantics Other stackedLayoutAppearance)] + pub unsafe fn stackedLayoutAppearance(&self, ) -> Id; + + #[method(setStackedLayoutAppearance:)] + pub unsafe fn setStackedLayoutAppearance(&self, stackedLayoutAppearance: &UITabBarItemAppearance,); + + #[method_id(@__retain_semantics Other inlineLayoutAppearance)] + pub unsafe fn inlineLayoutAppearance(&self, ) -> Id; + + #[method(setInlineLayoutAppearance:)] + pub unsafe fn setInlineLayoutAppearance(&self, inlineLayoutAppearance: &UITabBarItemAppearance,); + + #[method_id(@__retain_semantics Other compactInlineLayoutAppearance)] + pub unsafe fn compactInlineLayoutAppearance(&self, ) -> Id; + + #[method(setCompactInlineLayoutAppearance:)] + pub unsafe fn setCompactInlineLayoutAppearance(&self, compactInlineLayoutAppearance: &UITabBarItemAppearance,); + + #[method_id(@__retain_semantics Other selectionIndicatorTintColor)] + pub unsafe fn selectionIndicatorTintColor(&self, ) -> Option>; + + #[method(setSelectionIndicatorTintColor:)] + pub unsafe fn setSelectionIndicatorTintColor(&self, selectionIndicatorTintColor: Option<&UIColor>,); + + #[method_id(@__retain_semantics Other selectionIndicatorImage)] + pub unsafe fn selectionIndicatorImage(&self, ) -> Option>; + + #[method(setSelectionIndicatorImage:)] + pub unsafe fn setSelectionIndicatorImage(&self, selectionIndicatorImage: Option<&UIImage>,); + + #[method(stackedItemPositioning)] + pub unsafe fn stackedItemPositioning(&self, ) -> UITabBarItemPositioning; + + #[method(setStackedItemPositioning:)] + pub unsafe fn setStackedItemPositioning(&self, stackedItemPositioning: UITabBarItemPositioning,); + + #[method(stackedItemWidth)] + pub unsafe fn stackedItemWidth(&self, ) -> CGFloat; + + #[method(setStackedItemWidth:)] + pub unsafe fn setStackedItemWidth(&self, stackedItemWidth: CGFloat,); + + #[method(stackedItemSpacing)] + pub unsafe fn stackedItemSpacing(&self, ) -> CGFloat; + + #[method(setStackedItemSpacing:)] + pub unsafe fn setStackedItemSpacing(&self, stackedItemSpacing: CGFloat,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UITabBarController.rs b/crates/icrate-generated/src/UIKit/generated/UITabBarController.rs new file mode 100644 index 000000000..3a03ac0a7 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UITabBarController.rs @@ -0,0 +1,121 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UITabBarController; + + unsafe impl ClassType for UITabBarController { + type Super = UIViewController; + } +); + +extern_methods!( + unsafe impl UITabBarController { + #[method_id(@__retain_semantics Other viewControllers)] + pub unsafe fn viewControllers(&self, ) -> Option, Shared>>; + + #[method(setViewControllers:)] + pub unsafe fn setViewControllers(&self, viewControllers: Option<&NSArray>,); + + #[method(setViewControllers:animated:)] + pub unsafe fn setViewControllers_animated(&self, viewControllers: Option<&NSArray>,animated: bool,); + + #[method_id(@__retain_semantics Other selectedViewController)] + pub unsafe fn selectedViewController(&self, ) -> Option>; + + #[method(setSelectedViewController:)] + pub unsafe fn setSelectedViewController(&self, selectedViewController: Option<&UIViewController>,); + + #[method(selectedIndex)] + pub unsafe fn selectedIndex(&self, ) -> NSUInteger; + + #[method(setSelectedIndex:)] + pub unsafe fn setSelectedIndex(&self, selectedIndex: NSUInteger,); + + #[method_id(@__retain_semantics Other moreNavigationController)] + pub unsafe fn moreNavigationController(&self, ) -> Id; + + #[method_id(@__retain_semantics Other customizableViewControllers)] + pub unsafe fn customizableViewControllers(&self, ) -> Option, Shared>>; + + #[method(setCustomizableViewControllers:)] + pub unsafe fn setCustomizableViewControllers(&self, customizableViewControllers: Option<&NSArray>,); + + #[method_id(@__retain_semantics Other tabBar)] + pub unsafe fn tabBar(&self, ) -> Id; + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&UITabBarControllerDelegate>,); + + } +); + +extern_protocol!( + pub struct UITabBarControllerDelegate; + + unsafe impl UITabBarControllerDelegate { + #[optional] + #[method(tabBarController:shouldSelectViewController:)] + pub unsafe fn tabBarController_shouldSelectViewController(&self, tabBarController: &UITabBarController,viewController: &UIViewController,) -> bool; + + #[optional] + #[method(tabBarController:didSelectViewController:)] + pub unsafe fn tabBarController_didSelectViewController(&self, tabBarController: &UITabBarController,viewController: &UIViewController,); + + #[optional] + #[method(tabBarController:willBeginCustomizingViewControllers:)] + pub unsafe fn tabBarController_willBeginCustomizingViewControllers(&self, tabBarController: &UITabBarController,viewControllers: &NSArray,); + + #[optional] + #[method(tabBarController:willEndCustomizingViewControllers:changed:)] + pub unsafe fn tabBarController_willEndCustomizingViewControllers_changed(&self, tabBarController: &UITabBarController,viewControllers: &NSArray,changed: bool,); + + #[optional] + #[method(tabBarController:didEndCustomizingViewControllers:changed:)] + pub unsafe fn tabBarController_didEndCustomizingViewControllers_changed(&self, tabBarController: &UITabBarController,viewControllers: &NSArray,changed: bool,); + + #[optional] + #[method(tabBarControllerSupportedInterfaceOrientations:)] + pub unsafe fn tabBarControllerSupportedInterfaceOrientations(&self, tabBarController: &UITabBarController,) -> UIInterfaceOrientationMask; + + #[optional] + #[method(tabBarControllerPreferredInterfaceOrientationForPresentation:)] + pub unsafe fn tabBarControllerPreferredInterfaceOrientationForPresentation(&self, tabBarController: &UITabBarController,) -> UIInterfaceOrientation; + + #[optional] + #[method_id(@__retain_semantics Other tabBarController:interactionControllerForAnimationController:)] + pub unsafe fn tabBarController_interactionControllerForAnimationController(&self, tabBarController: &UITabBarController,animationController: &UIViewControllerAnimatedTransitioning,) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other tabBarController:animationControllerForTransitionFromViewController:toViewController:)] + pub unsafe fn tabBarController_animationControllerForTransitionFromViewController_toViewController(&self, tabBarController: &UITabBarController,fromVC: &UIViewController,toVC: &UIViewController,) -> Option>; + + } +); + +extern_methods!( + /// UITabBarControllerItem + unsafe impl UIViewController { + #[method_id(@__retain_semantics Other tabBarItem)] + pub unsafe fn tabBarItem(&self, ) -> Option>; + + #[method(setTabBarItem:)] + pub unsafe fn setTabBarItem(&self, tabBarItem: Option<&UITabBarItem>,); + + #[method_id(@__retain_semantics Other tabBarController)] + pub unsafe fn tabBarController(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other tabBarObservedScrollView)] + pub unsafe fn tabBarObservedScrollView(&self, ) -> Option>; + + #[method(setTabBarObservedScrollView:)] + pub unsafe fn setTabBarObservedScrollView(&self, tabBarObservedScrollView: Option<&UIScrollView>,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UITabBarItem.rs b/crates/icrate-generated/src/UIKit/generated/UITabBarItem.rs new file mode 100644 index 000000000..f4a59da2a --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UITabBarItem.rs @@ -0,0 +1,108 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UITabBarSystemItem { + UITabBarSystemItemMore = 0, + UITabBarSystemItemFavorites = 1, + UITabBarSystemItemFeatured = 2, + UITabBarSystemItemTopRated = 3, + UITabBarSystemItemRecents = 4, + UITabBarSystemItemContacts = 5, + UITabBarSystemItemHistory = 6, + UITabBarSystemItemBookmarks = 7, + UITabBarSystemItemSearch = 8, + UITabBarSystemItemDownloads = 9, + UITabBarSystemItemMostRecent = 10, + UITabBarSystemItemMostViewed = 11, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UITabBarItem; + + unsafe impl ClassType for UITabBarItem { + type Super = UIBarItem; + } +); + +extern_methods!( + unsafe impl UITabBarItem { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method_id(@__retain_semantics Init initWithTitle:image:tag:)] + pub unsafe fn initWithTitle_image_tag(this: Option>, title: Option<&NSString>,image: Option<&UIImage>,tag: NSInteger,) -> Id; + + #[method_id(@__retain_semantics Init initWithTitle:image:selectedImage:)] + pub unsafe fn initWithTitle_image_selectedImage(this: Option>, title: Option<&NSString>,image: Option<&UIImage>,selectedImage: Option<&UIImage>,) -> Id; + + #[method_id(@__retain_semantics Init initWithTabBarSystemItem:tag:)] + pub unsafe fn initWithTabBarSystemItem_tag(this: Option>, systemItem: UITabBarSystemItem,tag: NSInteger,) -> Id; + + #[method_id(@__retain_semantics Other selectedImage)] + pub unsafe fn selectedImage(&self, ) -> Option>; + + #[method(setSelectedImage:)] + pub unsafe fn setSelectedImage(&self, selectedImage: Option<&UIImage>,); + + #[method_id(@__retain_semantics Other badgeValue)] + pub unsafe fn badgeValue(&self, ) -> Option>; + + #[method(setBadgeValue:)] + pub unsafe fn setBadgeValue(&self, badgeValue: Option<&NSString>,); + + #[method(setFinishedSelectedImage:withFinishedUnselectedImage:)] + pub unsafe fn setFinishedSelectedImage_withFinishedUnselectedImage(&self, selectedImage: Option<&UIImage>,unselectedImage: Option<&UIImage>,); + + #[method_id(@__retain_semantics Other finishedSelectedImage)] + pub unsafe fn finishedSelectedImage(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other finishedUnselectedImage)] + pub unsafe fn finishedUnselectedImage(&self, ) -> Option>; + + #[method(titlePositionAdjustment)] + pub unsafe fn titlePositionAdjustment(&self, ) -> UIOffset; + + #[method(setTitlePositionAdjustment:)] + pub unsafe fn setTitlePositionAdjustment(&self, titlePositionAdjustment: UIOffset,); + + #[method_id(@__retain_semantics Other badgeColor)] + pub unsafe fn badgeColor(&self, ) -> Option>; + + #[method(setBadgeColor:)] + pub unsafe fn setBadgeColor(&self, badgeColor: Option<&UIColor>,); + + #[method(setBadgeTextAttributes:forState:)] + pub unsafe fn setBadgeTextAttributes_forState(&self, textAttributes: Option<&NSDictionary>,state: UIControlState,); + + #[method_id(@__retain_semantics Other badgeTextAttributesForState:)] + pub unsafe fn badgeTextAttributesForState(&self, state: UIControlState,) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other standardAppearance)] + pub unsafe fn standardAppearance(&self, ) -> Option>; + + #[method(setStandardAppearance:)] + pub unsafe fn setStandardAppearance(&self, standardAppearance: Option<&UITabBarAppearance>,); + + #[method_id(@__retain_semantics Other scrollEdgeAppearance)] + pub unsafe fn scrollEdgeAppearance(&self, ) -> Option>; + + #[method(setScrollEdgeAppearance:)] + pub unsafe fn setScrollEdgeAppearance(&self, scrollEdgeAppearance: Option<&UITabBarAppearance>,); + + } +); + +extern_methods!( + /// SpringLoading + unsafe impl UITabBarItem { + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UITableView.rs b/crates/icrate-generated/src/UIKit/generated/UITableView.rs new file mode 100644 index 000000000..51694e03c --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UITableView.rs @@ -0,0 +1,1020 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UITableViewStyle { + UITableViewStylePlain = 0, + UITableViewStyleGrouped = 1, + UITableViewStyleInsetGrouped = 2, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UITableViewScrollPosition { + UITableViewScrollPositionNone = 0, + UITableViewScrollPositionTop = 1, + UITableViewScrollPositionMiddle = 2, + UITableViewScrollPositionBottom = 3, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UITableViewRowAnimation { + UITableViewRowAnimationFade = 0, + UITableViewRowAnimationRight = 1, + UITableViewRowAnimationLeft = 2, + UITableViewRowAnimationTop = 3, + UITableViewRowAnimationBottom = 4, + UITableViewRowAnimationNone = 5, + UITableViewRowAnimationMiddle = 6, + UITableViewRowAnimationAutomatic = 100, + } +); + +extern_static!(UITableViewIndexSearch: &'static NSString); + +extern_static!(UITableViewAutomaticDimension: CGFloat); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UITableViewRowActionStyle { + UITableViewRowActionStyleDefault = 0, + UITableViewRowActionStyleDestructive = UITableViewRowActionStyleDefault, + UITableViewRowActionStyleNormal = 1, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UITableViewRowAction; + + unsafe impl ClassType for UITableViewRowAction { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UITableViewRowAction { + #[method_id(@__retain_semantics Other rowActionWithStyle:title:handler:)] + pub unsafe fn rowActionWithStyle_title_handler(style: UITableViewRowActionStyle,title: Option<&NSString>,handler: &Block<(NonNull, NonNull, ), ()>,) -> Id; + + #[method(style)] + pub unsafe fn style(&self, ) -> UITableViewRowActionStyle; + + #[method_id(@__retain_semantics Other title)] + pub unsafe fn title(&self, ) -> Option>; + + #[method(setTitle:)] + pub unsafe fn setTitle(&self, title: Option<&NSString>,); + + #[method_id(@__retain_semantics Other backgroundColor)] + pub unsafe fn backgroundColor(&self, ) -> Option>; + + #[method(setBackgroundColor:)] + pub unsafe fn setBackgroundColor(&self, backgroundColor: Option<&UIColor>,); + + #[method_id(@__retain_semantics Other backgroundEffect)] + pub unsafe fn backgroundEffect(&self, ) -> Option>; + + #[method(setBackgroundEffect:)] + pub unsafe fn setBackgroundEffect(&self, backgroundEffect: Option<&UIVisualEffect>,); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UITableViewFocusUpdateContext; + + unsafe impl ClassType for UITableViewFocusUpdateContext { + type Super = UIFocusUpdateContext; + } +); + +extern_methods!( + unsafe impl UITableViewFocusUpdateContext { + #[method_id(@__retain_semantics Other previouslyFocusedIndexPath)] + pub unsafe fn previouslyFocusedIndexPath(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other nextFocusedIndexPath)] + pub unsafe fn nextFocusedIndexPath(&self, ) -> Option>; + + } +); + +extern_protocol!( + pub struct UITableViewDelegate; + + unsafe impl UITableViewDelegate { + #[optional] + #[method(tableView:willDisplayCell:forRowAtIndexPath:)] + pub unsafe fn tableView_willDisplayCell_forRowAtIndexPath(&self, tableView: &UITableView,cell: &UITableViewCell,indexPath: &NSIndexPath,); + + #[optional] + #[method(tableView:willDisplayHeaderView:forSection:)] + pub unsafe fn tableView_willDisplayHeaderView_forSection(&self, tableView: &UITableView,view: &UIView,section: NSInteger,); + + #[optional] + #[method(tableView:willDisplayFooterView:forSection:)] + pub unsafe fn tableView_willDisplayFooterView_forSection(&self, tableView: &UITableView,view: &UIView,section: NSInteger,); + + #[optional] + #[method(tableView:didEndDisplayingCell:forRowAtIndexPath:)] + pub unsafe fn tableView_didEndDisplayingCell_forRowAtIndexPath(&self, tableView: &UITableView,cell: &UITableViewCell,indexPath: &NSIndexPath,); + + #[optional] + #[method(tableView:didEndDisplayingHeaderView:forSection:)] + pub unsafe fn tableView_didEndDisplayingHeaderView_forSection(&self, tableView: &UITableView,view: &UIView,section: NSInteger,); + + #[optional] + #[method(tableView:didEndDisplayingFooterView:forSection:)] + pub unsafe fn tableView_didEndDisplayingFooterView_forSection(&self, tableView: &UITableView,view: &UIView,section: NSInteger,); + + #[optional] + #[method(tableView:heightForRowAtIndexPath:)] + pub unsafe fn tableView_heightForRowAtIndexPath(&self, tableView: &UITableView,indexPath: &NSIndexPath,) -> CGFloat; + + #[optional] + #[method(tableView:heightForHeaderInSection:)] + pub unsafe fn tableView_heightForHeaderInSection(&self, tableView: &UITableView,section: NSInteger,) -> CGFloat; + + #[optional] + #[method(tableView:heightForFooterInSection:)] + pub unsafe fn tableView_heightForFooterInSection(&self, tableView: &UITableView,section: NSInteger,) -> CGFloat; + + #[optional] + #[method(tableView:estimatedHeightForRowAtIndexPath:)] + pub unsafe fn tableView_estimatedHeightForRowAtIndexPath(&self, tableView: &UITableView,indexPath: &NSIndexPath,) -> CGFloat; + + #[optional] + #[method(tableView:estimatedHeightForHeaderInSection:)] + pub unsafe fn tableView_estimatedHeightForHeaderInSection(&self, tableView: &UITableView,section: NSInteger,) -> CGFloat; + + #[optional] + #[method(tableView:estimatedHeightForFooterInSection:)] + pub unsafe fn tableView_estimatedHeightForFooterInSection(&self, tableView: &UITableView,section: NSInteger,) -> CGFloat; + + #[optional] + #[method_id(@__retain_semantics Other tableView:viewForHeaderInSection:)] + pub unsafe fn tableView_viewForHeaderInSection(&self, tableView: &UITableView,section: NSInteger,) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other tableView:viewForFooterInSection:)] + pub unsafe fn tableView_viewForFooterInSection(&self, tableView: &UITableView,section: NSInteger,) -> Option>; + + #[optional] + #[method(tableView:accessoryTypeForRowWithIndexPath:)] + pub unsafe fn tableView_accessoryTypeForRowWithIndexPath(&self, tableView: &UITableView,indexPath: &NSIndexPath,) -> UITableViewCellAccessoryType; + + #[optional] + #[method(tableView:accessoryButtonTappedForRowWithIndexPath:)] + pub unsafe fn tableView_accessoryButtonTappedForRowWithIndexPath(&self, tableView: &UITableView,indexPath: &NSIndexPath,); + + #[optional] + #[method(tableView:shouldHighlightRowAtIndexPath:)] + pub unsafe fn tableView_shouldHighlightRowAtIndexPath(&self, tableView: &UITableView,indexPath: &NSIndexPath,) -> bool; + + #[optional] + #[method(tableView:didHighlightRowAtIndexPath:)] + pub unsafe fn tableView_didHighlightRowAtIndexPath(&self, tableView: &UITableView,indexPath: &NSIndexPath,); + + #[optional] + #[method(tableView:didUnhighlightRowAtIndexPath:)] + pub unsafe fn tableView_didUnhighlightRowAtIndexPath(&self, tableView: &UITableView,indexPath: &NSIndexPath,); + + #[optional] + #[method_id(@__retain_semantics Other tableView:willSelectRowAtIndexPath:)] + pub unsafe fn tableView_willSelectRowAtIndexPath(&self, tableView: &UITableView,indexPath: &NSIndexPath,) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other tableView:willDeselectRowAtIndexPath:)] + pub unsafe fn tableView_willDeselectRowAtIndexPath(&self, tableView: &UITableView,indexPath: &NSIndexPath,) -> Option>; + + #[optional] + #[method(tableView:didSelectRowAtIndexPath:)] + pub unsafe fn tableView_didSelectRowAtIndexPath(&self, tableView: &UITableView,indexPath: &NSIndexPath,); + + #[optional] + #[method(tableView:didDeselectRowAtIndexPath:)] + pub unsafe fn tableView_didDeselectRowAtIndexPath(&self, tableView: &UITableView,indexPath: &NSIndexPath,); + + #[optional] + #[method(tableView:canPerformPrimaryActionForRowAtIndexPath:)] + pub unsafe fn tableView_canPerformPrimaryActionForRowAtIndexPath(&self, tableView: &UITableView,indexPath: &NSIndexPath,) -> bool; + + #[optional] + #[method(tableView:performPrimaryActionForRowAtIndexPath:)] + pub unsafe fn tableView_performPrimaryActionForRowAtIndexPath(&self, tableView: &UITableView,indexPath: &NSIndexPath,); + + #[optional] + #[method(tableView:editingStyleForRowAtIndexPath:)] + pub unsafe fn tableView_editingStyleForRowAtIndexPath(&self, tableView: &UITableView,indexPath: &NSIndexPath,) -> UITableViewCellEditingStyle; + + #[optional] + #[method_id(@__retain_semantics Other tableView:titleForDeleteConfirmationButtonForRowAtIndexPath:)] + pub unsafe fn tableView_titleForDeleteConfirmationButtonForRowAtIndexPath(&self, tableView: &UITableView,indexPath: &NSIndexPath,) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other tableView:editActionsForRowAtIndexPath:)] + pub unsafe fn tableView_editActionsForRowAtIndexPath(&self, tableView: &UITableView,indexPath: &NSIndexPath,) -> Option, Shared>>; + + #[optional] + #[method_id(@__retain_semantics Other tableView:leadingSwipeActionsConfigurationForRowAtIndexPath:)] + pub unsafe fn tableView_leadingSwipeActionsConfigurationForRowAtIndexPath(&self, tableView: &UITableView,indexPath: &NSIndexPath,) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other tableView:trailingSwipeActionsConfigurationForRowAtIndexPath:)] + pub unsafe fn tableView_trailingSwipeActionsConfigurationForRowAtIndexPath(&self, tableView: &UITableView,indexPath: &NSIndexPath,) -> Option>; + + #[optional] + #[method(tableView:shouldIndentWhileEditingRowAtIndexPath:)] + pub unsafe fn tableView_shouldIndentWhileEditingRowAtIndexPath(&self, tableView: &UITableView,indexPath: &NSIndexPath,) -> bool; + + #[optional] + #[method(tableView:willBeginEditingRowAtIndexPath:)] + pub unsafe fn tableView_willBeginEditingRowAtIndexPath(&self, tableView: &UITableView,indexPath: &NSIndexPath,); + + #[optional] + #[method(tableView:didEndEditingRowAtIndexPath:)] + pub unsafe fn tableView_didEndEditingRowAtIndexPath(&self, tableView: &UITableView,indexPath: Option<&NSIndexPath>,); + + #[optional] + #[method_id(@__retain_semantics Other tableView:targetIndexPathForMoveFromRowAtIndexPath:toProposedIndexPath:)] + pub unsafe fn tableView_targetIndexPathForMoveFromRowAtIndexPath_toProposedIndexPath(&self, tableView: &UITableView,sourceIndexPath: &NSIndexPath,proposedDestinationIndexPath: &NSIndexPath,) -> Id; + + #[optional] + #[method(tableView:indentationLevelForRowAtIndexPath:)] + pub unsafe fn tableView_indentationLevelForRowAtIndexPath(&self, tableView: &UITableView,indexPath: &NSIndexPath,) -> NSInteger; + + #[optional] + #[method(tableView:shouldShowMenuForRowAtIndexPath:)] + pub unsafe fn tableView_shouldShowMenuForRowAtIndexPath(&self, tableView: &UITableView,indexPath: &NSIndexPath,) -> bool; + + #[optional] + #[method(tableView:canPerformAction:forRowAtIndexPath:withSender:)] + pub unsafe fn tableView_canPerformAction_forRowAtIndexPath_withSender(&self, tableView: &UITableView,action: Sel,indexPath: &NSIndexPath,sender: Option<&Object>,) -> bool; + + #[optional] + #[method(tableView:performAction:forRowAtIndexPath:withSender:)] + pub unsafe fn tableView_performAction_forRowAtIndexPath_withSender(&self, tableView: &UITableView,action: Sel,indexPath: &NSIndexPath,sender: Option<&Object>,); + + #[optional] + #[method(tableView:canFocusRowAtIndexPath:)] + pub unsafe fn tableView_canFocusRowAtIndexPath(&self, tableView: &UITableView,indexPath: &NSIndexPath,) -> bool; + + #[optional] + #[method(tableView:shouldUpdateFocusInContext:)] + pub unsafe fn tableView_shouldUpdateFocusInContext(&self, tableView: &UITableView,context: &UITableViewFocusUpdateContext,) -> bool; + + #[optional] + #[method(tableView:didUpdateFocusInContext:withAnimationCoordinator:)] + pub unsafe fn tableView_didUpdateFocusInContext_withAnimationCoordinator(&self, tableView: &UITableView,context: &UITableViewFocusUpdateContext,coordinator: &UIFocusAnimationCoordinator,); + + #[optional] + #[method_id(@__retain_semantics Other indexPathForPreferredFocusedViewInTableView:)] + pub unsafe fn indexPathForPreferredFocusedViewInTableView(&self, tableView: &UITableView,) -> Option>; + + #[optional] + #[method(tableView:selectionFollowsFocusForRowAtIndexPath:)] + pub unsafe fn tableView_selectionFollowsFocusForRowAtIndexPath(&self, tableView: &UITableView,indexPath: &NSIndexPath,) -> bool; + + #[optional] + #[method(tableView:shouldSpringLoadRowAtIndexPath:withContext:)] + pub unsafe fn tableView_shouldSpringLoadRowAtIndexPath_withContext(&self, tableView: &UITableView,indexPath: &NSIndexPath,context: &UISpringLoadedInteractionContext,) -> bool; + + #[optional] + #[method(tableView:shouldBeginMultipleSelectionInteractionAtIndexPath:)] + pub unsafe fn tableView_shouldBeginMultipleSelectionInteractionAtIndexPath(&self, tableView: &UITableView,indexPath: &NSIndexPath,) -> bool; + + #[optional] + #[method(tableView:didBeginMultipleSelectionInteractionAtIndexPath:)] + pub unsafe fn tableView_didBeginMultipleSelectionInteractionAtIndexPath(&self, tableView: &UITableView,indexPath: &NSIndexPath,); + + #[optional] + #[method(tableViewDidEndMultipleSelectionInteraction:)] + pub unsafe fn tableViewDidEndMultipleSelectionInteraction(&self, tableView: &UITableView,); + + #[optional] + #[method_id(@__retain_semantics Other tableView:contextMenuConfigurationForRowAtIndexPath:point:)] + pub unsafe fn tableView_contextMenuConfigurationForRowAtIndexPath_point(&self, tableView: &UITableView,indexPath: &NSIndexPath,point: CGPoint,) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other tableView:previewForHighlightingContextMenuWithConfiguration:)] + pub unsafe fn tableView_previewForHighlightingContextMenuWithConfiguration(&self, tableView: &UITableView,configuration: &UIContextMenuConfiguration,) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other tableView:previewForDismissingContextMenuWithConfiguration:)] + pub unsafe fn tableView_previewForDismissingContextMenuWithConfiguration(&self, tableView: &UITableView,configuration: &UIContextMenuConfiguration,) -> Option>; + + #[optional] + #[method(tableView:willPerformPreviewActionForMenuWithConfiguration:animator:)] + pub unsafe fn tableView_willPerformPreviewActionForMenuWithConfiguration_animator(&self, tableView: &UITableView,configuration: &UIContextMenuConfiguration,animator: &UIContextMenuInteractionCommitAnimating,); + + #[optional] + #[method(tableView:willDisplayContextMenuWithConfiguration:animator:)] + pub unsafe fn tableView_willDisplayContextMenuWithConfiguration_animator(&self, tableView: &UITableView,configuration: &UIContextMenuConfiguration,animator: Option<&UIContextMenuInteractionAnimating>,); + + #[optional] + #[method(tableView:willEndContextMenuInteractionWithConfiguration:animator:)] + pub unsafe fn tableView_willEndContextMenuInteractionWithConfiguration_animator(&self, tableView: &UITableView,configuration: &UIContextMenuConfiguration,animator: Option<&UIContextMenuInteractionAnimating>,); + + } +); + +extern_static!(UITableViewSelectionDidChangeNotification: &'static NSNotificationName); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UITableViewSeparatorInsetReference { + UITableViewSeparatorInsetFromCellEdges = 0, + UITableViewSeparatorInsetFromAutomaticInsets = 1, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UITableViewSelfSizingInvalidation { + UITableViewSelfSizingInvalidationDisabled = 0, + UITableViewSelfSizingInvalidationEnabled = 1, + UITableViewSelfSizingInvalidationEnabledIncludingConstraints = 2, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UITableView; + + unsafe impl ClassType for UITableView { + type Super = UIScrollView; + } +); + +extern_methods!( + unsafe impl UITableView { + #[method_id(@__retain_semantics Init initWithFrame:style:)] + pub unsafe fn initWithFrame_style(this: Option>, frame: CGRect,style: UITableViewStyle,) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method(style)] + pub unsafe fn style(&self, ) -> UITableViewStyle; + + #[method_id(@__retain_semantics Other dataSource)] + pub unsafe fn dataSource(&self, ) -> Option>; + + #[method(setDataSource:)] + pub unsafe fn setDataSource(&self, dataSource: Option<&UITableViewDataSource>,); + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&UITableViewDelegate>,); + + #[method_id(@__retain_semantics Other prefetchDataSource)] + pub unsafe fn prefetchDataSource(&self, ) -> Option>; + + #[method(setPrefetchDataSource:)] + pub unsafe fn setPrefetchDataSource(&self, prefetchDataSource: Option<&UITableViewDataSourcePrefetching>,); + + #[method(isPrefetchingEnabled)] + pub unsafe fn isPrefetchingEnabled(&self, ) -> bool; + + #[method(setPrefetchingEnabled:)] + pub unsafe fn setPrefetchingEnabled(&self, prefetchingEnabled: bool,); + + #[method_id(@__retain_semantics Other dragDelegate)] + pub unsafe fn dragDelegate(&self, ) -> Option>; + + #[method(setDragDelegate:)] + pub unsafe fn setDragDelegate(&self, dragDelegate: Option<&UITableViewDragDelegate>,); + + #[method_id(@__retain_semantics Other dropDelegate)] + pub unsafe fn dropDelegate(&self, ) -> Option>; + + #[method(setDropDelegate:)] + pub unsafe fn setDropDelegate(&self, dropDelegate: Option<&UITableViewDropDelegate>,); + + #[method(rowHeight)] + pub unsafe fn rowHeight(&self, ) -> CGFloat; + + #[method(setRowHeight:)] + pub unsafe fn setRowHeight(&self, rowHeight: CGFloat,); + + #[method(sectionHeaderHeight)] + pub unsafe fn sectionHeaderHeight(&self, ) -> CGFloat; + + #[method(setSectionHeaderHeight:)] + pub unsafe fn setSectionHeaderHeight(&self, sectionHeaderHeight: CGFloat,); + + #[method(sectionFooterHeight)] + pub unsafe fn sectionFooterHeight(&self, ) -> CGFloat; + + #[method(setSectionFooterHeight:)] + pub unsafe fn setSectionFooterHeight(&self, sectionFooterHeight: CGFloat,); + + #[method(estimatedRowHeight)] + pub unsafe fn estimatedRowHeight(&self, ) -> CGFloat; + + #[method(setEstimatedRowHeight:)] + pub unsafe fn setEstimatedRowHeight(&self, estimatedRowHeight: CGFloat,); + + #[method(estimatedSectionHeaderHeight)] + pub unsafe fn estimatedSectionHeaderHeight(&self, ) -> CGFloat; + + #[method(setEstimatedSectionHeaderHeight:)] + pub unsafe fn setEstimatedSectionHeaderHeight(&self, estimatedSectionHeaderHeight: CGFloat,); + + #[method(estimatedSectionFooterHeight)] + pub unsafe fn estimatedSectionFooterHeight(&self, ) -> CGFloat; + + #[method(setEstimatedSectionFooterHeight:)] + pub unsafe fn setEstimatedSectionFooterHeight(&self, estimatedSectionFooterHeight: CGFloat,); + + #[method(fillerRowHeight)] + pub unsafe fn fillerRowHeight(&self, ) -> CGFloat; + + #[method(setFillerRowHeight:)] + pub unsafe fn setFillerRowHeight(&self, fillerRowHeight: CGFloat,); + + #[method(sectionHeaderTopPadding)] + pub unsafe fn sectionHeaderTopPadding(&self, ) -> CGFloat; + + #[method(setSectionHeaderTopPadding:)] + pub unsafe fn setSectionHeaderTopPadding(&self, sectionHeaderTopPadding: CGFloat,); + + #[method(separatorInset)] + pub unsafe fn separatorInset(&self, ) -> UIEdgeInsets; + + #[method(setSeparatorInset:)] + pub unsafe fn setSeparatorInset(&self, separatorInset: UIEdgeInsets,); + + #[method(separatorInsetReference)] + pub unsafe fn separatorInsetReference(&self, ) -> UITableViewSeparatorInsetReference; + + #[method(setSeparatorInsetReference:)] + pub unsafe fn setSeparatorInsetReference(&self, separatorInsetReference: UITableViewSeparatorInsetReference,); + + #[method(selfSizingInvalidation)] + pub unsafe fn selfSizingInvalidation(&self, ) -> UITableViewSelfSizingInvalidation; + + #[method(setSelfSizingInvalidation:)] + pub unsafe fn setSelfSizingInvalidation(&self, selfSizingInvalidation: UITableViewSelfSizingInvalidation,); + + #[method_id(@__retain_semantics Other backgroundView)] + pub unsafe fn backgroundView(&self, ) -> Option>; + + #[method(setBackgroundView:)] + pub unsafe fn setBackgroundView(&self, backgroundView: Option<&UIView>,); + + #[method_id(@__retain_semantics Other contextMenuInteraction)] + pub unsafe fn contextMenuInteraction(&self, ) -> Option>; + + #[method(numberOfSections)] + pub unsafe fn numberOfSections(&self, ) -> NSInteger; + + #[method(numberOfRowsInSection:)] + pub unsafe fn numberOfRowsInSection(&self, section: NSInteger,) -> NSInteger; + + #[method(rectForSection:)] + pub unsafe fn rectForSection(&self, section: NSInteger,) -> CGRect; + + #[method(rectForHeaderInSection:)] + pub unsafe fn rectForHeaderInSection(&self, section: NSInteger,) -> CGRect; + + #[method(rectForFooterInSection:)] + pub unsafe fn rectForFooterInSection(&self, section: NSInteger,) -> CGRect; + + #[method(rectForRowAtIndexPath:)] + pub unsafe fn rectForRowAtIndexPath(&self, indexPath: &NSIndexPath,) -> CGRect; + + #[method_id(@__retain_semantics Other indexPathForRowAtPoint:)] + pub unsafe fn indexPathForRowAtPoint(&self, point: CGPoint,) -> Option>; + + #[method_id(@__retain_semantics Other indexPathForCell:)] + pub unsafe fn indexPathForCell(&self, cell: &UITableViewCell,) -> Option>; + + #[method_id(@__retain_semantics Other indexPathsForRowsInRect:)] + pub unsafe fn indexPathsForRowsInRect(&self, rect: CGRect,) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other cellForRowAtIndexPath:)] + pub unsafe fn cellForRowAtIndexPath(&self, indexPath: &NSIndexPath,) -> Option>; + + #[method_id(@__retain_semantics Other visibleCells)] + pub unsafe fn visibleCells(&self, ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other indexPathsForVisibleRows)] + pub unsafe fn indexPathsForVisibleRows(&self, ) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other headerViewForSection:)] + pub unsafe fn headerViewForSection(&self, section: NSInteger,) -> Option>; + + #[method_id(@__retain_semantics Other footerViewForSection:)] + pub unsafe fn footerViewForSection(&self, section: NSInteger,) -> Option>; + + #[method(scrollToRowAtIndexPath:atScrollPosition:animated:)] + pub unsafe fn scrollToRowAtIndexPath_atScrollPosition_animated(&self, indexPath: &NSIndexPath,scrollPosition: UITableViewScrollPosition,animated: bool,); + + #[method(scrollToNearestSelectedRowAtScrollPosition:animated:)] + pub unsafe fn scrollToNearestSelectedRowAtScrollPosition_animated(&self, scrollPosition: UITableViewScrollPosition,animated: bool,); + + #[method(performBatchUpdates:completion:)] + pub unsafe fn performBatchUpdates_completion(&self, updates: Option<&Block<(), ()>>,completion: Option<&Block<(Bool, ), ()>>,); + + #[method(beginUpdates)] + pub unsafe fn beginUpdates(&self, ); + + #[method(endUpdates)] + pub unsafe fn endUpdates(&self, ); + + #[method(insertSections:withRowAnimation:)] + pub unsafe fn insertSections_withRowAnimation(&self, sections: &NSIndexSet,animation: UITableViewRowAnimation,); + + #[method(deleteSections:withRowAnimation:)] + pub unsafe fn deleteSections_withRowAnimation(&self, sections: &NSIndexSet,animation: UITableViewRowAnimation,); + + #[method(moveSection:toSection:)] + pub unsafe fn moveSection_toSection(&self, section: NSInteger,newSection: NSInteger,); + + #[method(reloadSections:withRowAnimation:)] + pub unsafe fn reloadSections_withRowAnimation(&self, sections: &NSIndexSet,animation: UITableViewRowAnimation,); + + #[method(insertRowsAtIndexPaths:withRowAnimation:)] + pub unsafe fn insertRowsAtIndexPaths_withRowAnimation(&self, indexPaths: &NSArray,animation: UITableViewRowAnimation,); + + #[method(deleteRowsAtIndexPaths:withRowAnimation:)] + pub unsafe fn deleteRowsAtIndexPaths_withRowAnimation(&self, indexPaths: &NSArray,animation: UITableViewRowAnimation,); + + #[method(moveRowAtIndexPath:toIndexPath:)] + pub unsafe fn moveRowAtIndexPath_toIndexPath(&self, indexPath: &NSIndexPath,newIndexPath: &NSIndexPath,); + + #[method(reloadRowsAtIndexPaths:withRowAnimation:)] + pub unsafe fn reloadRowsAtIndexPaths_withRowAnimation(&self, indexPaths: &NSArray,animation: UITableViewRowAnimation,); + + #[method(reconfigureRowsAtIndexPaths:)] + pub unsafe fn reconfigureRowsAtIndexPaths(&self, indexPaths: &NSArray,); + + #[method(hasUncommittedUpdates)] + pub unsafe fn hasUncommittedUpdates(&self, ) -> bool; + + #[method(reloadData)] + pub unsafe fn reloadData(&self, ); + + #[method(reloadSectionIndexTitles)] + pub unsafe fn reloadSectionIndexTitles(&self, ); + + #[method(isEditing)] + pub unsafe fn isEditing(&self, ) -> bool; + + #[method(setEditing:)] + pub unsafe fn setEditing(&self, editing: bool,); + + #[method(setEditing:animated:)] + pub unsafe fn setEditing_animated(&self, editing: bool,animated: bool,); + + #[method(allowsSelection)] + pub unsafe fn allowsSelection(&self, ) -> bool; + + #[method(setAllowsSelection:)] + pub unsafe fn setAllowsSelection(&self, allowsSelection: bool,); + + #[method(allowsSelectionDuringEditing)] + pub unsafe fn allowsSelectionDuringEditing(&self, ) -> bool; + + #[method(setAllowsSelectionDuringEditing:)] + pub unsafe fn setAllowsSelectionDuringEditing(&self, allowsSelectionDuringEditing: bool,); + + #[method(allowsMultipleSelection)] + pub unsafe fn allowsMultipleSelection(&self, ) -> bool; + + #[method(setAllowsMultipleSelection:)] + pub unsafe fn setAllowsMultipleSelection(&self, allowsMultipleSelection: bool,); + + #[method(allowsMultipleSelectionDuringEditing)] + pub unsafe fn allowsMultipleSelectionDuringEditing(&self, ) -> bool; + + #[method(setAllowsMultipleSelectionDuringEditing:)] + pub unsafe fn setAllowsMultipleSelectionDuringEditing(&self, allowsMultipleSelectionDuringEditing: bool,); + + #[method_id(@__retain_semantics Other indexPathForSelectedRow)] + pub unsafe fn indexPathForSelectedRow(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other indexPathsForSelectedRows)] + pub unsafe fn indexPathsForSelectedRows(&self, ) -> Option, Shared>>; + + #[method(selectRowAtIndexPath:animated:scrollPosition:)] + pub unsafe fn selectRowAtIndexPath_animated_scrollPosition(&self, indexPath: Option<&NSIndexPath>,animated: bool,scrollPosition: UITableViewScrollPosition,); + + #[method(deselectRowAtIndexPath:animated:)] + pub unsafe fn deselectRowAtIndexPath_animated(&self, indexPath: &NSIndexPath,animated: bool,); + + #[method(sectionIndexMinimumDisplayRowCount)] + pub unsafe fn sectionIndexMinimumDisplayRowCount(&self, ) -> NSInteger; + + #[method(setSectionIndexMinimumDisplayRowCount:)] + pub unsafe fn setSectionIndexMinimumDisplayRowCount(&self, sectionIndexMinimumDisplayRowCount: NSInteger,); + + #[method_id(@__retain_semantics Other sectionIndexColor)] + pub unsafe fn sectionIndexColor(&self, ) -> Option>; + + #[method(setSectionIndexColor:)] + pub unsafe fn setSectionIndexColor(&self, sectionIndexColor: Option<&UIColor>,); + + #[method_id(@__retain_semantics Other sectionIndexBackgroundColor)] + pub unsafe fn sectionIndexBackgroundColor(&self, ) -> Option>; + + #[method(setSectionIndexBackgroundColor:)] + pub unsafe fn setSectionIndexBackgroundColor(&self, sectionIndexBackgroundColor: Option<&UIColor>,); + + #[method_id(@__retain_semantics Other sectionIndexTrackingBackgroundColor)] + pub unsafe fn sectionIndexTrackingBackgroundColor(&self, ) -> Option>; + + #[method(setSectionIndexTrackingBackgroundColor:)] + pub unsafe fn setSectionIndexTrackingBackgroundColor(&self, sectionIndexTrackingBackgroundColor: Option<&UIColor>,); + + #[method(separatorStyle)] + pub unsafe fn separatorStyle(&self, ) -> UITableViewCellSeparatorStyle; + + #[method(setSeparatorStyle:)] + pub unsafe fn setSeparatorStyle(&self, separatorStyle: UITableViewCellSeparatorStyle,); + + #[method_id(@__retain_semantics Other separatorColor)] + pub unsafe fn separatorColor(&self, ) -> Option>; + + #[method(setSeparatorColor:)] + pub unsafe fn setSeparatorColor(&self, separatorColor: Option<&UIColor>,); + + #[method_id(@__retain_semantics Other separatorEffect)] + pub unsafe fn separatorEffect(&self, ) -> Option>; + + #[method(setSeparatorEffect:)] + pub unsafe fn setSeparatorEffect(&self, separatorEffect: Option<&UIVisualEffect>,); + + #[method(cellLayoutMarginsFollowReadableWidth)] + pub unsafe fn cellLayoutMarginsFollowReadableWidth(&self, ) -> bool; + + #[method(setCellLayoutMarginsFollowReadableWidth:)] + pub unsafe fn setCellLayoutMarginsFollowReadableWidth(&self, cellLayoutMarginsFollowReadableWidth: bool,); + + #[method(insetsContentViewsToSafeArea)] + pub unsafe fn insetsContentViewsToSafeArea(&self, ) -> bool; + + #[method(setInsetsContentViewsToSafeArea:)] + pub unsafe fn setInsetsContentViewsToSafeArea(&self, insetsContentViewsToSafeArea: bool,); + + #[method_id(@__retain_semantics Other tableHeaderView)] + pub unsafe fn tableHeaderView(&self, ) -> Option>; + + #[method(setTableHeaderView:)] + pub unsafe fn setTableHeaderView(&self, tableHeaderView: Option<&UIView>,); + + #[method_id(@__retain_semantics Other tableFooterView)] + pub unsafe fn tableFooterView(&self, ) -> Option>; + + #[method(setTableFooterView:)] + pub unsafe fn setTableFooterView(&self, tableFooterView: Option<&UIView>,); + + #[method_id(@__retain_semantics Other dequeueReusableCellWithIdentifier:)] + pub unsafe fn dequeueReusableCellWithIdentifier(&self, identifier: &NSString,) -> Option>; + + #[method_id(@__retain_semantics Other dequeueReusableCellWithIdentifier:forIndexPath:)] + pub unsafe fn dequeueReusableCellWithIdentifier_forIndexPath(&self, identifier: &NSString,indexPath: &NSIndexPath,) -> Id; + + #[method_id(@__retain_semantics Other dequeueReusableHeaderFooterViewWithIdentifier:)] + pub unsafe fn dequeueReusableHeaderFooterViewWithIdentifier(&self, identifier: &NSString,) -> Option>; + + #[method(registerNib:forCellReuseIdentifier:)] + pub unsafe fn registerNib_forCellReuseIdentifier(&self, nib: Option<&UINib>,identifier: &NSString,); + + #[method(registerClass:forCellReuseIdentifier:)] + pub unsafe fn registerClass_forCellReuseIdentifier(&self, cellClass: Option<&Class>,identifier: &NSString,); + + #[method(registerNib:forHeaderFooterViewReuseIdentifier:)] + pub unsafe fn registerNib_forHeaderFooterViewReuseIdentifier(&self, nib: Option<&UINib>,identifier: &NSString,); + + #[method(registerClass:forHeaderFooterViewReuseIdentifier:)] + pub unsafe fn registerClass_forHeaderFooterViewReuseIdentifier(&self, aClass: Option<&Class>,identifier: &NSString,); + + #[method(remembersLastFocusedIndexPath)] + pub unsafe fn remembersLastFocusedIndexPath(&self, ) -> bool; + + #[method(setRemembersLastFocusedIndexPath:)] + pub unsafe fn setRemembersLastFocusedIndexPath(&self, remembersLastFocusedIndexPath: bool,); + + #[method(selectionFollowsFocus)] + pub unsafe fn selectionFollowsFocus(&self, ) -> bool; + + #[method(setSelectionFollowsFocus:)] + pub unsafe fn setSelectionFollowsFocus(&self, selectionFollowsFocus: bool,); + + #[method(allowsFocus)] + pub unsafe fn allowsFocus(&self, ) -> bool; + + #[method(setAllowsFocus:)] + pub unsafe fn setAllowsFocus(&self, allowsFocus: bool,); + + #[method(allowsFocusDuringEditing)] + pub unsafe fn allowsFocusDuringEditing(&self, ) -> bool; + + #[method(setAllowsFocusDuringEditing:)] + pub unsafe fn setAllowsFocusDuringEditing(&self, allowsFocusDuringEditing: bool,); + + #[method(dragInteractionEnabled)] + pub unsafe fn dragInteractionEnabled(&self, ) -> bool; + + #[method(setDragInteractionEnabled:)] + pub unsafe fn setDragInteractionEnabled(&self, dragInteractionEnabled: bool,); + + #[method(hasActiveDrag)] + pub unsafe fn hasActiveDrag(&self, ) -> bool; + + #[method(hasActiveDrop)] + pub unsafe fn hasActiveDrop(&self, ) -> bool; + + } +); + +extern_methods!( + /// UIDragAndDrop + unsafe impl UITableView { + } +); + +extern_protocol!( + pub struct UITableViewDataSource; + + unsafe impl UITableViewDataSource { + #[method(tableView:numberOfRowsInSection:)] + pub unsafe fn tableView_numberOfRowsInSection(&self, tableView: &UITableView,section: NSInteger,) -> NSInteger; + + #[method_id(@__retain_semantics Other tableView:cellForRowAtIndexPath:)] + pub unsafe fn tableView_cellForRowAtIndexPath(&self, tableView: &UITableView,indexPath: &NSIndexPath,) -> Id; + + #[optional] + #[method(numberOfSectionsInTableView:)] + pub unsafe fn numberOfSectionsInTableView(&self, tableView: &UITableView,) -> NSInteger; + + #[optional] + #[method_id(@__retain_semantics Other tableView:titleForHeaderInSection:)] + pub unsafe fn tableView_titleForHeaderInSection(&self, tableView: &UITableView,section: NSInteger,) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other tableView:titleForFooterInSection:)] + pub unsafe fn tableView_titleForFooterInSection(&self, tableView: &UITableView,section: NSInteger,) -> Option>; + + #[optional] + #[method(tableView:canEditRowAtIndexPath:)] + pub unsafe fn tableView_canEditRowAtIndexPath(&self, tableView: &UITableView,indexPath: &NSIndexPath,) -> bool; + + #[optional] + #[method(tableView:canMoveRowAtIndexPath:)] + pub unsafe fn tableView_canMoveRowAtIndexPath(&self, tableView: &UITableView,indexPath: &NSIndexPath,) -> bool; + + #[optional] + #[method_id(@__retain_semantics Other sectionIndexTitlesForTableView:)] + pub unsafe fn sectionIndexTitlesForTableView(&self, tableView: &UITableView,) -> Option, Shared>>; + + #[optional] + #[method(tableView:sectionForSectionIndexTitle:atIndex:)] + pub unsafe fn tableView_sectionForSectionIndexTitle_atIndex(&self, tableView: &UITableView,title: &NSString,index: NSInteger,) -> NSInteger; + + #[optional] + #[method(tableView:commitEditingStyle:forRowAtIndexPath:)] + pub unsafe fn tableView_commitEditingStyle_forRowAtIndexPath(&self, tableView: &UITableView,editingStyle: UITableViewCellEditingStyle,indexPath: &NSIndexPath,); + + #[optional] + #[method(tableView:moveRowAtIndexPath:toIndexPath:)] + pub unsafe fn tableView_moveRowAtIndexPath_toIndexPath(&self, tableView: &UITableView,sourceIndexPath: &NSIndexPath,destinationIndexPath: &NSIndexPath,); + + } +); + +extern_protocol!( + pub struct UITableViewDataSourcePrefetching; + + unsafe impl UITableViewDataSourcePrefetching { + #[method(tableView:prefetchRowsAtIndexPaths:)] + pub unsafe fn tableView_prefetchRowsAtIndexPaths(&self, tableView: &UITableView,indexPaths: &NSArray,); + + #[optional] + #[method(tableView:cancelPrefetchingForRowsAtIndexPaths:)] + pub unsafe fn tableView_cancelPrefetchingForRowsAtIndexPaths(&self, tableView: &UITableView,indexPaths: &NSArray,); + + } +); + +extern_protocol!( + pub struct UITableViewDragDelegate; + + unsafe impl UITableViewDragDelegate { + #[method_id(@__retain_semantics Other tableView:itemsForBeginningDragSession:atIndexPath:)] + pub unsafe fn tableView_itemsForBeginningDragSession_atIndexPath(&self, tableView: &UITableView,session: &UIDragSession,indexPath: &NSIndexPath,) -> Id, Shared>; + + #[optional] + #[method_id(@__retain_semantics Other tableView:itemsForAddingToDragSession:atIndexPath:point:)] + pub unsafe fn tableView_itemsForAddingToDragSession_atIndexPath_point(&self, tableView: &UITableView,session: &UIDragSession,indexPath: &NSIndexPath,point: CGPoint,) -> Id, Shared>; + + #[optional] + #[method_id(@__retain_semantics Other tableView:dragPreviewParametersForRowAtIndexPath:)] + pub unsafe fn tableView_dragPreviewParametersForRowAtIndexPath(&self, tableView: &UITableView,indexPath: &NSIndexPath,) -> Option>; + + #[optional] + #[method(tableView:dragSessionWillBegin:)] + pub unsafe fn tableView_dragSessionWillBegin(&self, tableView: &UITableView,session: &UIDragSession,); + + #[optional] + #[method(tableView:dragSessionDidEnd:)] + pub unsafe fn tableView_dragSessionDidEnd(&self, tableView: &UITableView,session: &UIDragSession,); + + #[optional] + #[method(tableView:dragSessionAllowsMoveOperation:)] + pub unsafe fn tableView_dragSessionAllowsMoveOperation(&self, tableView: &UITableView,session: &UIDragSession,) -> bool; + + #[optional] + #[method(tableView:dragSessionIsRestrictedToDraggingApplication:)] + pub unsafe fn tableView_dragSessionIsRestrictedToDraggingApplication(&self, tableView: &UITableView,session: &UIDragSession,) -> bool; + + } +); + +extern_protocol!( + pub struct UITableViewDropDelegate; + + unsafe impl UITableViewDropDelegate { + #[method(tableView:performDropWithCoordinator:)] + pub unsafe fn tableView_performDropWithCoordinator(&self, tableView: &UITableView,coordinator: &UITableViewDropCoordinator,); + + #[optional] + #[method(tableView:canHandleDropSession:)] + pub unsafe fn tableView_canHandleDropSession(&self, tableView: &UITableView,session: &UIDropSession,) -> bool; + + #[optional] + #[method(tableView:dropSessionDidEnter:)] + pub unsafe fn tableView_dropSessionDidEnter(&self, tableView: &UITableView,session: &UIDropSession,); + + #[optional] + #[method_id(@__retain_semantics Other tableView:dropSessionDidUpdate:withDestinationIndexPath:)] + pub unsafe fn tableView_dropSessionDidUpdate_withDestinationIndexPath(&self, tableView: &UITableView,session: &UIDropSession,destinationIndexPath: Option<&NSIndexPath>,) -> Id; + + #[optional] + #[method(tableView:dropSessionDidExit:)] + pub unsafe fn tableView_dropSessionDidExit(&self, tableView: &UITableView,session: &UIDropSession,); + + #[optional] + #[method(tableView:dropSessionDidEnd:)] + pub unsafe fn tableView_dropSessionDidEnd(&self, tableView: &UITableView,session: &UIDropSession,); + + #[optional] + #[method_id(@__retain_semantics Other tableView:dropPreviewParametersForRowAtIndexPath:)] + pub unsafe fn tableView_dropPreviewParametersForRowAtIndexPath(&self, tableView: &UITableView,indexPath: &NSIndexPath,) -> Option>; + + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UITableViewDropIntent { + UITableViewDropIntentUnspecified = 0, + UITableViewDropIntentInsertAtDestinationIndexPath = 1, + UITableViewDropIntentInsertIntoDestinationIndexPath = 2, + UITableViewDropIntentAutomatic = 3, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UITableViewDropProposal; + + unsafe impl ClassType for UITableViewDropProposal { + type Super = UIDropProposal; + } +); + +extern_methods!( + unsafe impl UITableViewDropProposal { + #[method_id(@__retain_semantics Init initWithDropOperation:intent:)] + pub unsafe fn initWithDropOperation_intent(this: Option>, operation: UIDropOperation,intent: UITableViewDropIntent,) -> Id; + + #[method(intent)] + pub unsafe fn intent(&self, ) -> UITableViewDropIntent; + + } +); + +extern_protocol!( + pub struct UITableViewDropCoordinator; + + unsafe impl UITableViewDropCoordinator { + #[method_id(@__retain_semantics Other items)] + pub unsafe fn items(&self, ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other destinationIndexPath)] + pub unsafe fn destinationIndexPath(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other proposal)] + pub unsafe fn proposal(&self, ) -> Id; + + #[method_id(@__retain_semantics Other session)] + pub unsafe fn session(&self, ) -> Id; + + #[method_id(@__retain_semantics Other dropItem:toPlaceholder:)] + pub unsafe fn dropItem_toPlaceholder(&self, dragItem: &UIDragItem,placeholder: &UITableViewDropPlaceholder,) -> Id; + + #[method_id(@__retain_semantics Other dropItem:toRowAtIndexPath:)] + pub unsafe fn dropItem_toRowAtIndexPath(&self, dragItem: &UIDragItem,indexPath: &NSIndexPath,) -> Id; + + #[method_id(@__retain_semantics Other dropItem:intoRowAtIndexPath:rect:)] + pub unsafe fn dropItem_intoRowAtIndexPath_rect(&self, dragItem: &UIDragItem,indexPath: &NSIndexPath,rect: CGRect,) -> Id; + + #[method_id(@__retain_semantics Other dropItem:toTarget:)] + pub unsafe fn dropItem_toTarget(&self, dragItem: &UIDragItem,target: &UIDragPreviewTarget,) -> Id; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UITableViewPlaceholder; + + unsafe impl ClassType for UITableViewPlaceholder { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UITableViewPlaceholder { + #[method_id(@__retain_semantics Init initWithInsertionIndexPath:reuseIdentifier:rowHeight:)] + pub unsafe fn initWithInsertionIndexPath_reuseIdentifier_rowHeight(this: Option>, insertionIndexPath: &NSIndexPath,reuseIdentifier: &NSString,rowHeight: CGFloat,) -> 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; + + #[method(cellUpdateHandler)] + pub unsafe fn cellUpdateHandler(&self, ) -> *mut Block<(NonNull, ), ()>; + + #[method(setCellUpdateHandler:)] + pub unsafe fn setCellUpdateHandler(&self, cellUpdateHandler: Option<&Block<(NonNull, ), ()>>,); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UITableViewDropPlaceholder; + + unsafe impl ClassType for UITableViewDropPlaceholder { + type Super = UITableViewPlaceholder; + } +); + +extern_methods!( + unsafe impl UITableViewDropPlaceholder { + #[method(previewParametersProvider)] + pub unsafe fn previewParametersProvider(&self, ) -> *mut Block<(NonNull, ), *mut UIDragPreviewParameters>; + + #[method(setPreviewParametersProvider:)] + pub unsafe fn setPreviewParametersProvider(&self, previewParametersProvider: Option<&Block<(NonNull, ), *mut UIDragPreviewParameters>>,); + + } +); + +extern_protocol!( + pub struct UITableViewDropItem; + + unsafe impl UITableViewDropItem { + #[method_id(@__retain_semantics Other dragItem)] + pub unsafe fn dragItem(&self, ) -> Id; + + #[method_id(@__retain_semantics Other sourceIndexPath)] + pub unsafe fn sourceIndexPath(&self, ) -> Option>; + + #[method(previewSize)] + pub unsafe fn previewSize(&self, ) -> CGSize; + + } +); + +extern_protocol!( + pub struct UITableViewDropPlaceholderContext; + + unsafe impl UITableViewDropPlaceholderContext { + #[method_id(@__retain_semantics Other dragItem)] + pub unsafe fn dragItem(&self, ) -> Id; + + #[method(commitInsertionWithDataSourceUpdates:)] + pub unsafe fn commitInsertionWithDataSourceUpdates(&self, dataSourceUpdates: &Block<(NonNull, ), ()>,) -> bool; + + #[method(deletePlaceholder)] + pub unsafe fn deletePlaceholder(&self, ) -> bool; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UITableViewCell.rs b/crates/icrate-generated/src/UIKit/generated/UITableViewCell.rs new file mode 100644 index 000000000..f759287f9 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UITableViewCell.rs @@ -0,0 +1,377 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UITableViewCellStyle { + UITableViewCellStyleDefault = 0, + UITableViewCellStyleValue1 = 1, + UITableViewCellStyleValue2 = 2, + UITableViewCellStyleSubtitle = 3, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UITableViewCellSeparatorStyle { + UITableViewCellSeparatorStyleNone = 0, + UITableViewCellSeparatorStyleSingleLine = 1, + UITableViewCellSeparatorStyleSingleLineEtched = 2, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UITableViewCellSelectionStyle { + UITableViewCellSelectionStyleNone = 0, + UITableViewCellSelectionStyleBlue = 1, + UITableViewCellSelectionStyleGray = 2, + UITableViewCellSelectionStyleDefault = 3, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UITableViewCellFocusStyle { + UITableViewCellFocusStyleDefault = 0, + UITableViewCellFocusStyleCustom = 1, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UITableViewCellEditingStyle { + UITableViewCellEditingStyleNone = 0, + UITableViewCellEditingStyleDelete = 1, + UITableViewCellEditingStyleInsert = 2, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UITableViewCellAccessoryType { + UITableViewCellAccessoryNone = 0, + UITableViewCellAccessoryDisclosureIndicator = 1, + UITableViewCellAccessoryDetailDisclosureButton = 2, + UITableViewCellAccessoryCheckmark = 3, + UITableViewCellAccessoryDetailButton = 4, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum UITableViewCellStateMask { + UITableViewCellStateDefaultMask = 0, + UITableViewCellStateShowingEditControlMask = 1<<0, + UITableViewCellStateShowingDeleteConfirmationMask = 1<<1, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UITableViewCellDragState { + UITableViewCellDragStateNone = 0, + UITableViewCellDragStateLifting = 1, + UITableViewCellDragStateDragging = 2, + } +); + +pub type UITableViewCellConfigurationUpdateHandler = *mut Block<(NonNull, NonNull, ), ()>; + +extern_class!( + #[derive(Debug)] + pub struct UITableViewCell; + + unsafe impl ClassType for UITableViewCell { + type Super = UIView; + } +); + +extern_methods!( + unsafe impl UITableViewCell { + #[method_id(@__retain_semantics Init initWithStyle:reuseIdentifier:)] + pub unsafe fn initWithStyle_reuseIdentifier(this: Option>, style: UITableViewCellStyle,reuseIdentifier: Option<&NSString>,) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method_id(@__retain_semantics Other configurationState)] + pub unsafe fn configurationState(&self, ) -> Id; + + #[method(setNeedsUpdateConfiguration)] + pub unsafe fn setNeedsUpdateConfiguration(&self, ); + + #[method(updateConfigurationUsingState:)] + pub unsafe fn updateConfigurationUsingState(&self, state: &UICellConfigurationState,); + + #[method(configurationUpdateHandler)] + pub unsafe fn configurationUpdateHandler(&self, ) -> UITableViewCellConfigurationUpdateHandler; + + #[method(setConfigurationUpdateHandler:)] + pub unsafe fn setConfigurationUpdateHandler(&self, configurationUpdateHandler: UITableViewCellConfigurationUpdateHandler,); + + #[method_id(@__retain_semantics Other defaultContentConfiguration)] + pub unsafe fn defaultContentConfiguration(&self, ) -> Id; + + #[method_id(@__retain_semantics Other contentConfiguration)] + pub unsafe fn contentConfiguration(&self, ) -> Option>; + + #[method(setContentConfiguration:)] + pub unsafe fn setContentConfiguration(&self, contentConfiguration: Option<&UIContentConfiguration>,); + + #[method(automaticallyUpdatesContentConfiguration)] + pub unsafe fn automaticallyUpdatesContentConfiguration(&self, ) -> bool; + + #[method(setAutomaticallyUpdatesContentConfiguration:)] + pub unsafe fn setAutomaticallyUpdatesContentConfiguration(&self, automaticallyUpdatesContentConfiguration: bool,); + + #[method_id(@__retain_semantics Other contentView)] + pub unsafe fn contentView(&self, ) -> Id; + + #[method_id(@__retain_semantics Other imageView)] + pub unsafe fn imageView(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other textLabel)] + pub unsafe fn textLabel(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other detailTextLabel)] + pub unsafe fn detailTextLabel(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other defaultBackgroundConfiguration)] + pub unsafe fn defaultBackgroundConfiguration(&self, ) -> Id; + + #[method_id(@__retain_semantics Other backgroundConfiguration)] + pub unsafe fn backgroundConfiguration(&self, ) -> Option>; + + #[method(setBackgroundConfiguration:)] + pub unsafe fn setBackgroundConfiguration(&self, backgroundConfiguration: Option<&UIBackgroundConfiguration>,); + + #[method(automaticallyUpdatesBackgroundConfiguration)] + pub unsafe fn automaticallyUpdatesBackgroundConfiguration(&self, ) -> bool; + + #[method(setAutomaticallyUpdatesBackgroundConfiguration:)] + pub unsafe fn setAutomaticallyUpdatesBackgroundConfiguration(&self, automaticallyUpdatesBackgroundConfiguration: bool,); + + #[method_id(@__retain_semantics Other backgroundView)] + pub unsafe fn backgroundView(&self, ) -> Option>; + + #[method(setBackgroundView:)] + pub unsafe fn setBackgroundView(&self, backgroundView: Option<&UIView>,); + + #[method_id(@__retain_semantics Other selectedBackgroundView)] + pub unsafe fn selectedBackgroundView(&self, ) -> Option>; + + #[method(setSelectedBackgroundView:)] + pub unsafe fn setSelectedBackgroundView(&self, selectedBackgroundView: Option<&UIView>,); + + #[method_id(@__retain_semantics Other multipleSelectionBackgroundView)] + pub unsafe fn multipleSelectionBackgroundView(&self, ) -> Option>; + + #[method(setMultipleSelectionBackgroundView:)] + pub unsafe fn setMultipleSelectionBackgroundView(&self, multipleSelectionBackgroundView: Option<&UIView>,); + + #[method_id(@__retain_semantics Other reuseIdentifier)] + pub unsafe fn reuseIdentifier(&self, ) -> Option>; + + #[method(prepareForReuse)] + pub unsafe fn prepareForReuse(&self, ); + + #[method(selectionStyle)] + pub unsafe fn selectionStyle(&self, ) -> UITableViewCellSelectionStyle; + + #[method(setSelectionStyle:)] + pub unsafe fn setSelectionStyle(&self, selectionStyle: UITableViewCellSelectionStyle,); + + #[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(setSelected:animated:)] + pub unsafe fn setSelected_animated(&self, selected: bool,animated: bool,); + + #[method(setHighlighted:animated:)] + pub unsafe fn setHighlighted_animated(&self, highlighted: bool,animated: bool,); + + #[method(editingStyle)] + pub unsafe fn editingStyle(&self, ) -> UITableViewCellEditingStyle; + + #[method(showsReorderControl)] + pub unsafe fn showsReorderControl(&self, ) -> bool; + + #[method(setShowsReorderControl:)] + pub unsafe fn setShowsReorderControl(&self, showsReorderControl: bool,); + + #[method(shouldIndentWhileEditing)] + pub unsafe fn shouldIndentWhileEditing(&self, ) -> bool; + + #[method(setShouldIndentWhileEditing:)] + pub unsafe fn setShouldIndentWhileEditing(&self, shouldIndentWhileEditing: bool,); + + #[method(accessoryType)] + pub unsafe fn accessoryType(&self, ) -> UITableViewCellAccessoryType; + + #[method(setAccessoryType:)] + pub unsafe fn setAccessoryType(&self, accessoryType: UITableViewCellAccessoryType,); + + #[method_id(@__retain_semantics Other accessoryView)] + pub unsafe fn accessoryView(&self, ) -> Option>; + + #[method(setAccessoryView:)] + pub unsafe fn setAccessoryView(&self, accessoryView: Option<&UIView>,); + + #[method(editingAccessoryType)] + pub unsafe fn editingAccessoryType(&self, ) -> UITableViewCellAccessoryType; + + #[method(setEditingAccessoryType:)] + pub unsafe fn setEditingAccessoryType(&self, editingAccessoryType: UITableViewCellAccessoryType,); + + #[method_id(@__retain_semantics Other editingAccessoryView)] + pub unsafe fn editingAccessoryView(&self, ) -> Option>; + + #[method(setEditingAccessoryView:)] + pub unsafe fn setEditingAccessoryView(&self, editingAccessoryView: Option<&UIView>,); + + #[method(indentationLevel)] + pub unsafe fn indentationLevel(&self, ) -> NSInteger; + + #[method(setIndentationLevel:)] + pub unsafe fn setIndentationLevel(&self, indentationLevel: NSInteger,); + + #[method(indentationWidth)] + pub unsafe fn indentationWidth(&self, ) -> CGFloat; + + #[method(setIndentationWidth:)] + pub unsafe fn setIndentationWidth(&self, indentationWidth: CGFloat,); + + #[method(separatorInset)] + pub unsafe fn separatorInset(&self, ) -> UIEdgeInsets; + + #[method(setSeparatorInset:)] + pub unsafe fn setSeparatorInset(&self, separatorInset: UIEdgeInsets,); + + #[method(isEditing)] + pub unsafe fn isEditing(&self, ) -> bool; + + #[method(setEditing:)] + pub unsafe fn setEditing(&self, editing: bool,); + + #[method(setEditing:animated:)] + pub unsafe fn setEditing_animated(&self, editing: bool,animated: bool,); + + #[method(showingDeleteConfirmation)] + pub unsafe fn showingDeleteConfirmation(&self, ) -> bool; + + #[method(focusStyle)] + pub unsafe fn focusStyle(&self, ) -> UITableViewCellFocusStyle; + + #[method(setFocusStyle:)] + pub unsafe fn setFocusStyle(&self, focusStyle: UITableViewCellFocusStyle,); + + #[method(willTransitionToState:)] + pub unsafe fn willTransitionToState(&self, state: UITableViewCellStateMask,); + + #[method(didTransitionToState:)] + pub unsafe fn didTransitionToState(&self, state: UITableViewCellStateMask,); + + #[method(dragStateDidChange:)] + pub unsafe fn dragStateDidChange(&self, dragState: UITableViewCellDragState,); + + #[method(userInteractionEnabledWhileDragging)] + pub unsafe fn userInteractionEnabledWhileDragging(&self, ) -> bool; + + #[method(setUserInteractionEnabledWhileDragging:)] + pub unsafe fn setUserInteractionEnabledWhileDragging(&self, userInteractionEnabledWhileDragging: bool,); + + } +); + +extern_methods!( + /// UIDeprecated + unsafe impl UITableViewCell { + #[method_id(@__retain_semantics Init initWithFrame:reuseIdentifier:)] + pub unsafe fn initWithFrame_reuseIdentifier(this: Option>, frame: CGRect,reuseIdentifier: Option<&NSString>,) -> Id; + + #[method_id(@__retain_semantics Other text)] + pub unsafe fn text(&self, ) -> Option>; + + #[method(setText:)] + pub unsafe fn setText(&self, text: Option<&NSString>,); + + #[method_id(@__retain_semantics Other font)] + pub unsafe fn font(&self, ) -> Option>; + + #[method(setFont:)] + pub unsafe fn setFont(&self, font: Option<&UIFont>,); + + #[method(textAlignment)] + pub unsafe fn textAlignment(&self, ) -> NSTextAlignment; + + #[method(setTextAlignment:)] + pub unsafe fn setTextAlignment(&self, textAlignment: NSTextAlignment,); + + #[method(lineBreakMode)] + pub unsafe fn lineBreakMode(&self, ) -> NSLineBreakMode; + + #[method(setLineBreakMode:)] + pub unsafe fn setLineBreakMode(&self, lineBreakMode: NSLineBreakMode,); + + #[method_id(@__retain_semantics Other textColor)] + pub unsafe fn textColor(&self, ) -> Option>; + + #[method(setTextColor:)] + pub unsafe fn setTextColor(&self, textColor: Option<&UIColor>,); + + #[method_id(@__retain_semantics Other selectedTextColor)] + pub unsafe fn selectedTextColor(&self, ) -> Option>; + + #[method(setSelectedTextColor:)] + pub unsafe fn setSelectedTextColor(&self, selectedTextColor: Option<&UIColor>,); + + #[method_id(@__retain_semantics Other image)] + pub unsafe fn image(&self, ) -> Option>; + + #[method(setImage:)] + pub unsafe fn setImage(&self, image: Option<&UIImage>,); + + #[method_id(@__retain_semantics Other selectedImage)] + pub unsafe fn selectedImage(&self, ) -> Option>; + + #[method(setSelectedImage:)] + pub unsafe fn setSelectedImage(&self, selectedImage: Option<&UIImage>,); + + #[method(hidesAccessoryWhenEditing)] + pub unsafe fn hidesAccessoryWhenEditing(&self, ) -> bool; + + #[method(setHidesAccessoryWhenEditing:)] + pub unsafe fn setHidesAccessoryWhenEditing(&self, hidesAccessoryWhenEditing: bool,); + + #[method_id(@__retain_semantics Other target)] + pub unsafe fn target(&self, ) -> Option>; + + #[method(setTarget:)] + pub unsafe fn setTarget(&self, target: Option<&Object>,); + + #[method(editAction)] + pub unsafe fn editAction(&self, ) -> OptionSel; + + #[method(setEditAction:)] + pub unsafe fn setEditAction(&self, editAction: OptionSel,); + + #[method(accessoryAction)] + pub unsafe fn accessoryAction(&self, ) -> OptionSel; + + #[method(setAccessoryAction:)] + pub unsafe fn setAccessoryAction(&self, accessoryAction: OptionSel,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UITableViewController.rs b/crates/icrate-generated/src/UIKit/generated/UITableViewController.rs new file mode 100644 index 000000000..f97f8e4d0 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UITableViewController.rs @@ -0,0 +1,45 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UITableViewController; + + unsafe impl ClassType for UITableViewController { + type Super = UIViewController; + } +); + +extern_methods!( + unsafe impl UITableViewController { + #[method_id(@__retain_semantics Init initWithStyle:)] + pub unsafe fn initWithStyle(this: Option>, style: UITableViewStyle,) -> Id; + + #[method_id(@__retain_semantics Init initWithNibName:bundle:)] + pub unsafe fn initWithNibName_bundle(this: Option>, nibNameOrNil: Option<&NSString>,nibBundleOrNil: Option<&NSBundle>,) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method_id(@__retain_semantics Other tableView)] + pub unsafe fn tableView(&self, ) -> Option>; + + #[method(setTableView:)] + pub unsafe fn setTableView(&self, tableView: Option<&UITableView>,); + + #[method(clearsSelectionOnViewWillAppear)] + pub unsafe fn clearsSelectionOnViewWillAppear(&self, ) -> bool; + + #[method(setClearsSelectionOnViewWillAppear:)] + pub unsafe fn setClearsSelectionOnViewWillAppear(&self, clearsSelectionOnViewWillAppear: bool,); + + #[method_id(@__retain_semantics Other refreshControl)] + pub unsafe fn refreshControl(&self, ) -> Option>; + + #[method(setRefreshControl:)] + pub unsafe fn setRefreshControl(&self, refreshControl: Option<&UIRefreshControl>,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UITableViewHeaderFooterView.rs b/crates/icrate-generated/src/UIKit/generated/UITableViewHeaderFooterView.rs new file mode 100644 index 000000000..ed330b1e3 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UITableViewHeaderFooterView.rs @@ -0,0 +1,92 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +pub type UITableViewHeaderFooterViewConfigurationUpdateHandler = *mut Block<(NonNull, NonNull, ), ()>; + +extern_class!( + #[derive(Debug)] + pub struct UITableViewHeaderFooterView; + + unsafe impl ClassType for UITableViewHeaderFooterView { + type Super = UIView; + } +); + +extern_methods!( + unsafe impl UITableViewHeaderFooterView { + #[method_id(@__retain_semantics Init initWithReuseIdentifier:)] + pub unsafe fn initWithReuseIdentifier(this: Option>, reuseIdentifier: Option<&NSString>,) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method_id(@__retain_semantics Other configurationState)] + pub unsafe fn configurationState(&self, ) -> Id; + + #[method(setNeedsUpdateConfiguration)] + pub unsafe fn setNeedsUpdateConfiguration(&self, ); + + #[method(updateConfigurationUsingState:)] + pub unsafe fn updateConfigurationUsingState(&self, state: &UIViewConfigurationState,); + + #[method(configurationUpdateHandler)] + pub unsafe fn configurationUpdateHandler(&self, ) -> UITableViewHeaderFooterViewConfigurationUpdateHandler; + + #[method(setConfigurationUpdateHandler:)] + pub unsafe fn setConfigurationUpdateHandler(&self, configurationUpdateHandler: UITableViewHeaderFooterViewConfigurationUpdateHandler,); + + #[method_id(@__retain_semantics Other defaultContentConfiguration)] + pub unsafe fn defaultContentConfiguration(&self, ) -> Id; + + #[method_id(@__retain_semantics Other contentConfiguration)] + pub unsafe fn contentConfiguration(&self, ) -> Option>; + + #[method(setContentConfiguration:)] + pub unsafe fn setContentConfiguration(&self, contentConfiguration: Option<&UIContentConfiguration>,); + + #[method(automaticallyUpdatesContentConfiguration)] + pub unsafe fn automaticallyUpdatesContentConfiguration(&self, ) -> bool; + + #[method(setAutomaticallyUpdatesContentConfiguration:)] + pub unsafe fn setAutomaticallyUpdatesContentConfiguration(&self, automaticallyUpdatesContentConfiguration: bool,); + + #[method_id(@__retain_semantics Other contentView)] + pub unsafe fn contentView(&self, ) -> Id; + + #[method_id(@__retain_semantics Other textLabel)] + pub unsafe fn textLabel(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other detailTextLabel)] + pub unsafe fn detailTextLabel(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other defaultBackgroundConfiguration)] + pub unsafe fn defaultBackgroundConfiguration(&self, ) -> Id; + + #[method_id(@__retain_semantics Other backgroundConfiguration)] + pub unsafe fn backgroundConfiguration(&self, ) -> Option>; + + #[method(setBackgroundConfiguration:)] + pub unsafe fn setBackgroundConfiguration(&self, backgroundConfiguration: Option<&UIBackgroundConfiguration>,); + + #[method(automaticallyUpdatesBackgroundConfiguration)] + pub unsafe fn automaticallyUpdatesBackgroundConfiguration(&self, ) -> bool; + + #[method(setAutomaticallyUpdatesBackgroundConfiguration:)] + pub unsafe fn setAutomaticallyUpdatesBackgroundConfiguration(&self, automaticallyUpdatesBackgroundConfiguration: bool,); + + #[method_id(@__retain_semantics Other backgroundView)] + pub unsafe fn backgroundView(&self, ) -> Option>; + + #[method(setBackgroundView:)] + pub unsafe fn setBackgroundView(&self, backgroundView: Option<&UIView>,); + + #[method_id(@__retain_semantics Other reuseIdentifier)] + pub unsafe fn reuseIdentifier(&self, ) -> Option>; + + #[method(prepareForReuse)] + pub unsafe fn prepareForReuse(&self, ); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UITapGestureRecognizer.rs b/crates/icrate-generated/src/UIKit/generated/UITapGestureRecognizer.rs new file mode 100644 index 000000000..010441f38 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UITapGestureRecognizer.rs @@ -0,0 +1,36 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UITapGestureRecognizer; + + unsafe impl ClassType for UITapGestureRecognizer { + type Super = UIGestureRecognizer; + } +); + +extern_methods!( + unsafe impl UITapGestureRecognizer { + #[method(numberOfTapsRequired)] + pub unsafe fn numberOfTapsRequired(&self, ) -> NSUInteger; + + #[method(setNumberOfTapsRequired:)] + pub unsafe fn setNumberOfTapsRequired(&self, numberOfTapsRequired: NSUInteger,); + + #[method(numberOfTouchesRequired)] + pub unsafe fn numberOfTouchesRequired(&self, ) -> NSUInteger; + + #[method(setNumberOfTouchesRequired:)] + pub unsafe fn setNumberOfTouchesRequired(&self, numberOfTouchesRequired: NSUInteger,); + + #[method(buttonMaskRequired)] + pub unsafe fn buttonMaskRequired(&self, ) -> UIEventButtonMask; + + #[method(setButtonMaskRequired:)] + pub unsafe fn setButtonMaskRequired(&self, buttonMaskRequired: UIEventButtonMask,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UITargetedDragPreview.rs b/crates/icrate-generated/src/UIKit/generated/UITargetedDragPreview.rs new file mode 100644 index 000000000..794bb365d --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UITargetedDragPreview.rs @@ -0,0 +1,35 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIDragPreviewTarget; + + unsafe impl ClassType for UIDragPreviewTarget { + type Super = UIPreviewTarget; + } +); + +extern_methods!( + unsafe impl UIDragPreviewTarget { + } +); + +extern_class!( + #[derive(Debug)] + pub struct UITargetedDragPreview; + + unsafe impl ClassType for UITargetedDragPreview { + type Super = UITargetedPreview; + } +); + +extern_methods!( + unsafe impl UITargetedDragPreview { + #[method_id(@__retain_semantics Other retargetedPreviewWithTarget:)] + pub unsafe fn retargetedPreviewWithTarget(&self, newTarget: &UIDragPreviewTarget,) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UITargetedPreview.rs b/crates/icrate-generated/src/UIKit/generated/UITargetedPreview.rs new file mode 100644 index 000000000..f0cb2b5db --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UITargetedPreview.rs @@ -0,0 +1,83 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIPreviewTarget; + + unsafe impl ClassType for UIPreviewTarget { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIPreviewTarget { + #[method_id(@__retain_semantics Init initWithContainer:center:transform:)] + pub unsafe fn initWithContainer_center_transform(this: Option>, container: &UIView,center: CGPoint,transform: CGAffineTransform,) -> Id; + + #[method_id(@__retain_semantics Init initWithContainer:center:)] + pub unsafe fn initWithContainer_center(this: Option>, container: &UIView,center: CGPoint,) -> 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; + + #[method_id(@__retain_semantics Other container)] + pub unsafe fn container(&self, ) -> Id; + + #[method(center)] + pub unsafe fn center(&self, ) -> CGPoint; + + #[method(transform)] + pub unsafe fn transform(&self, ) -> CGAffineTransform; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UITargetedPreview; + + unsafe impl ClassType for UITargetedPreview { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UITargetedPreview { + #[method_id(@__retain_semantics Init initWithView:parameters:target:)] + pub unsafe fn initWithView_parameters_target(this: Option>, view: &UIView,parameters: &UIPreviewParameters,target: &UIPreviewTarget,) -> Id; + + #[method_id(@__retain_semantics Init initWithView:parameters:)] + pub unsafe fn initWithView_parameters(this: Option>, view: &UIView,parameters: &UIPreviewParameters,) -> Id; + + #[method_id(@__retain_semantics Init initWithView:)] + pub unsafe fn initWithView(this: Option>, view: &UIView,) -> 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; + + #[method_id(@__retain_semantics Other target)] + pub unsafe fn target(&self, ) -> Id; + + #[method_id(@__retain_semantics Other view)] + pub unsafe fn view(&self, ) -> Id; + + #[method_id(@__retain_semantics Other parameters)] + pub unsafe fn parameters(&self, ) -> Id; + + #[method(size)] + pub unsafe fn size(&self, ) -> CGSize; + + #[method_id(@__retain_semantics Other retargetedPreviewWithTarget:)] + pub unsafe fn retargetedPreviewWithTarget(&self, newTarget: &UIPreviewTarget,) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UITextChecker.rs b/crates/icrate-generated/src/UIKit/generated/UITextChecker.rs new file mode 100644 index 000000000..71aa51735 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UITextChecker.rs @@ -0,0 +1,48 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UITextChecker; + + unsafe impl ClassType for UITextChecker { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UITextChecker { + #[method(rangeOfMisspelledWordInString:range:startingAt:wrap:language:)] + pub unsafe fn rangeOfMisspelledWordInString_range_startingAt_wrap_language(&self, stringToCheck: &NSString,range: NSRange,startingOffset: NSInteger,wrapFlag: bool,language: &NSString,) -> NSRange; + + #[method_id(@__retain_semantics Other guessesForWordRange:inString:language:)] + pub unsafe fn guessesForWordRange_inString_language(&self, range: NSRange,string: &NSString,language: &NSString,) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other completionsForPartialWordRange:inString:language:)] + pub unsafe fn completionsForPartialWordRange_inString_language(&self, range: NSRange,string: &NSString,language: &NSString,) -> Option, Shared>>; + + #[method(ignoreWord:)] + pub unsafe fn ignoreWord(&self, wordToIgnore: &NSString,); + + #[method_id(@__retain_semantics Other ignoredWords)] + pub unsafe fn ignoredWords(&self, ) -> Option, Shared>>; + + #[method(setIgnoredWords:)] + pub unsafe fn setIgnoredWords(&self, ignoredWords: Option<&NSArray>,); + + #[method(learnWord:)] + pub unsafe fn learnWord(word: &NSString,); + + #[method(hasLearnedWord:)] + pub unsafe fn hasLearnedWord(word: &NSString,) -> bool; + + #[method(unlearnWord:)] + pub unsafe fn unlearnWord(word: &NSString,); + + #[method_id(@__retain_semantics Other availableLanguages)] + pub unsafe fn availableLanguages() -> Id, Shared>; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UITextDragPreviewRenderer.rs b/crates/icrate-generated/src/UIKit/generated/UITextDragPreviewRenderer.rs new file mode 100644 index 000000000..172fed16a --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UITextDragPreviewRenderer.rs @@ -0,0 +1,48 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UITextDragPreviewRenderer; + + unsafe impl ClassType for UITextDragPreviewRenderer { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UITextDragPreviewRenderer { + #[method_id(@__retain_semantics Init initWithLayoutManager:range:)] + pub unsafe fn initWithLayoutManager_range(this: Option>, layoutManager: &NSLayoutManager,range: NSRange,) -> Id; + + #[method_id(@__retain_semantics Init initWithLayoutManager:range:unifyRects:)] + pub unsafe fn initWithLayoutManager_range_unifyRects(this: Option>, layoutManager: &NSLayoutManager,range: NSRange,unifyRects: bool,) -> 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 layoutManager)] + pub unsafe fn layoutManager(&self, ) -> Id; + + #[method_id(@__retain_semantics Other image)] + pub unsafe fn image(&self, ) -> Id; + + #[method(firstLineRect)] + pub unsafe fn firstLineRect(&self, ) -> CGRect; + + #[method(bodyRect)] + pub unsafe fn bodyRect(&self, ) -> CGRect; + + #[method(lastLineRect)] + pub unsafe fn lastLineRect(&self, ) -> CGRect; + + #[method(adjustFirstLineRect:bodyRect:lastLineRect:textOrigin:)] + pub unsafe fn adjustFirstLineRect_bodyRect_lastLineRect_textOrigin(&self, firstLineRect: NonNull,bodyRect: NonNull,lastLineRect: NonNull,origin: CGPoint,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UITextDragURLPreviews.rs b/crates/icrate-generated/src/UIKit/generated/UITextDragURLPreviews.rs new file mode 100644 index 000000000..0676ccbdc --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UITextDragURLPreviews.rs @@ -0,0 +1,28 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_methods!( + /// URLPreviews + unsafe impl UIDragPreview { + #[method_id(@__retain_semantics Other previewForURL:)] + pub unsafe fn previewForURL(url: &NSURL,) -> Id; + + #[method_id(@__retain_semantics Other previewForURL:title:)] + pub unsafe fn previewForURL_title(url: &NSURL,title: Option<&NSString>,) -> Id; + + } +); + +extern_methods!( + /// URLPreviews + unsafe impl UITargetedDragPreview { + #[method_id(@__retain_semantics Other previewForURL:target:)] + pub unsafe fn previewForURL_target(url: &NSURL,target: &UIDragPreviewTarget,) -> Id; + + #[method_id(@__retain_semantics Other previewForURL:title:target:)] + pub unsafe fn previewForURL_title_target(url: &NSURL,title: Option<&NSString>,target: &UIDragPreviewTarget,) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UITextDragging.rs b/crates/icrate-generated/src/UIKit/generated/UITextDragging.rs new file mode 100644 index 000000000..7268653d3 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UITextDragging.rs @@ -0,0 +1,86 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_options!( + #[underlying(NSInteger)] + pub enum UITextDragOptions { + UITextDragOptionsNone = 0, + UITextDragOptionStripTextColorFromPreviews = 1<<0, + } +); + +extern_protocol!( + pub struct UITextDraggable; + + unsafe impl UITextDraggable { + #[method_id(@__retain_semantics Other textDragDelegate)] + pub unsafe fn textDragDelegate(&self, ) -> Option>; + + #[method(setTextDragDelegate:)] + pub unsafe fn setTextDragDelegate(&self, textDragDelegate: Option<&UITextDragDelegate>,); + + #[method_id(@__retain_semantics Other textDragInteraction)] + pub unsafe fn textDragInteraction(&self, ) -> Option>; + + #[method(isTextDragActive)] + pub unsafe fn isTextDragActive(&self, ) -> bool; + + #[method(textDragOptions)] + pub unsafe fn textDragOptions(&self, ) -> UITextDragOptions; + + #[method(setTextDragOptions:)] + pub unsafe fn setTextDragOptions(&self, textDragOptions: UITextDragOptions,); + + } +); + +extern_protocol!( + pub struct UITextDragDelegate; + + unsafe impl UITextDragDelegate { + #[optional] + #[method_id(@__retain_semantics Other textDraggableView:itemsForDrag:)] + pub unsafe fn textDraggableView_itemsForDrag(&self, textDraggableView: &TodoProtocols,dragRequest: &UITextDragRequest,) -> Id, Shared>; + + #[optional] + #[method_id(@__retain_semantics Other textDraggableView:dragPreviewForLiftingItem:session:)] + pub unsafe fn textDraggableView_dragPreviewForLiftingItem_session(&self, textDraggableView: &TodoProtocols,item: &UIDragItem,session: &UIDragSession,) -> Option>; + + #[optional] + #[method(textDraggableView:willAnimateLiftWithAnimator:session:)] + pub unsafe fn textDraggableView_willAnimateLiftWithAnimator_session(&self, textDraggableView: &TodoProtocols,animator: &UIDragAnimating,session: &UIDragSession,); + + #[optional] + #[method(textDraggableView:dragSessionWillBegin:)] + pub unsafe fn textDraggableView_dragSessionWillBegin(&self, textDraggableView: &TodoProtocols,session: &UIDragSession,); + + #[optional] + #[method(textDraggableView:dragSessionDidEnd:withOperation:)] + pub unsafe fn textDraggableView_dragSessionDidEnd_withOperation(&self, textDraggableView: &TodoProtocols,session: &UIDragSession,operation: UIDropOperation,); + + } +); + +extern_protocol!( + pub struct UITextDragRequest; + + unsafe impl UITextDragRequest { + #[method_id(@__retain_semantics Other dragRange)] + pub unsafe fn dragRange(&self, ) -> Id; + + #[method_id(@__retain_semantics Other suggestedItems)] + pub unsafe fn suggestedItems(&self, ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other existingItems)] + pub unsafe fn existingItems(&self, ) -> Id, Shared>; + + #[method(isSelected)] + pub unsafe fn isSelected(&self, ) -> bool; + + #[method_id(@__retain_semantics Other dragSession)] + pub unsafe fn dragSession(&self, ) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UITextDropProposal.rs b/crates/icrate-generated/src/UIKit/generated/UITextDropProposal.rs new file mode 100644 index 000000000..c4d86aed3 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UITextDropProposal.rs @@ -0,0 +1,67 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSUInteger)] + pub enum UITextDropAction { + UITextDropActionInsert = 0, + UITextDropActionReplaceSelection = 1, + UITextDropActionReplaceAll = 2, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum UITextDropProgressMode { + UITextDropProgressModeSystem = 0, + UITextDropProgressModeCustom = 1, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum UITextDropPerformer { + UITextDropPerformerView = 0, + UITextDropPerformerDelegate = 1, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UITextDropProposal; + + unsafe impl ClassType for UITextDropProposal { + type Super = UIDropProposal; + } +); + +extern_methods!( + unsafe impl UITextDropProposal { + #[method(dropAction)] + pub unsafe fn dropAction(&self, ) -> UITextDropAction; + + #[method(setDropAction:)] + pub unsafe fn setDropAction(&self, dropAction: UITextDropAction,); + + #[method(dropProgressMode)] + pub unsafe fn dropProgressMode(&self, ) -> UITextDropProgressMode; + + #[method(setDropProgressMode:)] + pub unsafe fn setDropProgressMode(&self, dropProgressMode: UITextDropProgressMode,); + + #[method(useFastSameViewOperations)] + pub unsafe fn useFastSameViewOperations(&self, ) -> bool; + + #[method(setUseFastSameViewOperations:)] + pub unsafe fn setUseFastSameViewOperations(&self, useFastSameViewOperations: bool,); + + #[method(dropPerformer)] + pub unsafe fn dropPerformer(&self, ) -> UITextDropPerformer; + + #[method(setDropPerformer:)] + pub unsafe fn setDropPerformer(&self, dropPerformer: UITextDropPerformer,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UITextDropping.rs b/crates/icrate-generated/src/UIKit/generated/UITextDropping.rs new file mode 100644 index 000000000..7345bfa1b --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UITextDropping.rs @@ -0,0 +1,90 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_protocol!( + pub struct UITextDroppable; + + unsafe impl UITextDroppable { + #[method_id(@__retain_semantics Other textDropDelegate)] + pub unsafe fn textDropDelegate(&self, ) -> Option>; + + #[method(setTextDropDelegate:)] + pub unsafe fn setTextDropDelegate(&self, textDropDelegate: Option<&UITextDropDelegate>,); + + #[method_id(@__retain_semantics Other textDropInteraction)] + pub unsafe fn textDropInteraction(&self, ) -> Option>; + + #[method(isTextDropActive)] + pub unsafe fn isTextDropActive(&self, ) -> bool; + + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum UITextDropEditability { + UITextDropEditabilityNo = 0, + UITextDropEditabilityTemporary = 1, + UITextDropEditabilityYes = 2, + } +); + +extern_protocol!( + pub struct UITextDropDelegate; + + unsafe impl UITextDropDelegate { + #[optional] + #[method(textDroppableView:willBecomeEditableForDrop:)] + pub unsafe fn textDroppableView_willBecomeEditableForDrop(&self, textDroppableView: &TodoProtocols,drop: &UITextDropRequest,) -> UITextDropEditability; + + #[optional] + #[method_id(@__retain_semantics Other textDroppableView:proposalForDrop:)] + pub unsafe fn textDroppableView_proposalForDrop(&self, textDroppableView: &TodoProtocols,drop: &UITextDropRequest,) -> Id; + + #[optional] + #[method(textDroppableView:willPerformDrop:)] + pub unsafe fn textDroppableView_willPerformDrop(&self, textDroppableView: &TodoProtocols,drop: &UITextDropRequest,); + + #[optional] + #[method_id(@__retain_semantics Other textDroppableView:previewForDroppingAllItemsWithDefault:)] + pub unsafe fn textDroppableView_previewForDroppingAllItemsWithDefault(&self, textDroppableView: &TodoProtocols,defaultPreview: &UITargetedDragPreview,) -> Option>; + + #[optional] + #[method(textDroppableView:dropSessionDidEnter:)] + pub unsafe fn textDroppableView_dropSessionDidEnter(&self, textDroppableView: &TodoProtocols,session: &UIDropSession,); + + #[optional] + #[method(textDroppableView:dropSessionDidUpdate:)] + pub unsafe fn textDroppableView_dropSessionDidUpdate(&self, textDroppableView: &TodoProtocols,session: &UIDropSession,); + + #[optional] + #[method(textDroppableView:dropSessionDidExit:)] + pub unsafe fn textDroppableView_dropSessionDidExit(&self, textDroppableView: &TodoProtocols,session: &UIDropSession,); + + #[optional] + #[method(textDroppableView:dropSessionDidEnd:)] + pub unsafe fn textDroppableView_dropSessionDidEnd(&self, textDroppableView: &TodoProtocols,session: &UIDropSession,); + + } +); + +extern_protocol!( + pub struct UITextDropRequest; + + unsafe impl UITextDropRequest { + #[method_id(@__retain_semantics Other dropPosition)] + pub unsafe fn dropPosition(&self, ) -> Id; + + #[method_id(@__retain_semantics Other suggestedProposal)] + pub unsafe fn suggestedProposal(&self, ) -> Id; + + #[method(isSameView)] + pub unsafe fn isSameView(&self, ) -> bool; + + #[method_id(@__retain_semantics Other dropSession)] + pub unsafe fn dropSession(&self, ) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UITextField.rs b/crates/icrate-generated/src/UIKit/generated/UITextField.rs new file mode 100644 index 000000000..5562ee4df --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UITextField.rs @@ -0,0 +1,315 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UITextBorderStyle { + UITextBorderStyleNone = 0, + UITextBorderStyleLine = 1, + UITextBorderStyleBezel = 2, + UITextBorderStyleRoundedRect = 3, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UITextFieldViewMode { + UITextFieldViewModeNever = 0, + UITextFieldViewModeWhileEditing = 1, + UITextFieldViewModeUnlessEditing = 2, + UITextFieldViewModeAlways = 3, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UITextFieldDidEndEditingReason { + UITextFieldDidEndEditingReasonCommitted = 0, + UITextFieldDidEndEditingReasonCancelled = 1, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UITextField; + + unsafe impl ClassType for UITextField { + type Super = UIControl; + } +); + +extern_methods!( + unsafe impl UITextField { + #[method_id(@__retain_semantics Other text)] + pub unsafe fn text(&self, ) -> Option>; + + #[method(setText:)] + pub unsafe fn setText(&self, text: Option<&NSString>,); + + #[method_id(@__retain_semantics Other attributedText)] + pub unsafe fn attributedText(&self, ) -> Option>; + + #[method(setAttributedText:)] + pub unsafe fn setAttributedText(&self, attributedText: Option<&NSAttributedString>,); + + #[method_id(@__retain_semantics Other textColor)] + pub unsafe fn textColor(&self, ) -> Option>; + + #[method(setTextColor:)] + pub unsafe fn setTextColor(&self, textColor: Option<&UIColor>,); + + #[method_id(@__retain_semantics Other font)] + pub unsafe fn font(&self, ) -> Option>; + + #[method(setFont:)] + pub unsafe fn setFont(&self, font: Option<&UIFont>,); + + #[method(textAlignment)] + pub unsafe fn textAlignment(&self, ) -> NSTextAlignment; + + #[method(setTextAlignment:)] + pub unsafe fn setTextAlignment(&self, textAlignment: NSTextAlignment,); + + #[method(borderStyle)] + pub unsafe fn borderStyle(&self, ) -> UITextBorderStyle; + + #[method(setBorderStyle:)] + pub unsafe fn setBorderStyle(&self, borderStyle: UITextBorderStyle,); + + #[method_id(@__retain_semantics Other defaultTextAttributes)] + pub unsafe fn defaultTextAttributes(&self, ) -> Id, Shared>; + + #[method(setDefaultTextAttributes:)] + pub unsafe fn setDefaultTextAttributes(&self, defaultTextAttributes: &NSDictionary,); + + #[method_id(@__retain_semantics Other placeholder)] + pub unsafe fn placeholder(&self, ) -> Option>; + + #[method(setPlaceholder:)] + pub unsafe fn setPlaceholder(&self, placeholder: Option<&NSString>,); + + #[method_id(@__retain_semantics Other attributedPlaceholder)] + pub unsafe fn attributedPlaceholder(&self, ) -> Option>; + + #[method(setAttributedPlaceholder:)] + pub unsafe fn setAttributedPlaceholder(&self, attributedPlaceholder: Option<&NSAttributedString>,); + + #[method(clearsOnBeginEditing)] + pub unsafe fn clearsOnBeginEditing(&self, ) -> bool; + + #[method(setClearsOnBeginEditing:)] + pub unsafe fn setClearsOnBeginEditing(&self, clearsOnBeginEditing: bool,); + + #[method(adjustsFontSizeToFitWidth)] + pub unsafe fn adjustsFontSizeToFitWidth(&self, ) -> bool; + + #[method(setAdjustsFontSizeToFitWidth:)] + pub unsafe fn setAdjustsFontSizeToFitWidth(&self, adjustsFontSizeToFitWidth: bool,); + + #[method(minimumFontSize)] + pub unsafe fn minimumFontSize(&self, ) -> CGFloat; + + #[method(setMinimumFontSize:)] + pub unsafe fn setMinimumFontSize(&self, minimumFontSize: CGFloat,); + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&UITextFieldDelegate>,); + + #[method_id(@__retain_semantics Other background)] + pub unsafe fn background(&self, ) -> Option>; + + #[method(setBackground:)] + pub unsafe fn setBackground(&self, background: Option<&UIImage>,); + + #[method_id(@__retain_semantics Other disabledBackground)] + pub unsafe fn disabledBackground(&self, ) -> Option>; + + #[method(setDisabledBackground:)] + pub unsafe fn setDisabledBackground(&self, disabledBackground: Option<&UIImage>,); + + #[method(isEditing)] + pub unsafe fn isEditing(&self, ) -> bool; + + #[method(allowsEditingTextAttributes)] + pub unsafe fn allowsEditingTextAttributes(&self, ) -> bool; + + #[method(setAllowsEditingTextAttributes:)] + pub unsafe fn setAllowsEditingTextAttributes(&self, allowsEditingTextAttributes: bool,); + + #[method_id(@__retain_semantics Other typingAttributes)] + pub unsafe fn typingAttributes(&self, ) -> Option, Shared>>; + + #[method(setTypingAttributes:)] + pub unsafe fn setTypingAttributes(&self, typingAttributes: Option<&NSDictionary>,); + + #[method(clearButtonMode)] + pub unsafe fn clearButtonMode(&self, ) -> UITextFieldViewMode; + + #[method(setClearButtonMode:)] + pub unsafe fn setClearButtonMode(&self, clearButtonMode: UITextFieldViewMode,); + + #[method_id(@__retain_semantics Other leftView)] + pub unsafe fn leftView(&self, ) -> Option>; + + #[method(setLeftView:)] + pub unsafe fn setLeftView(&self, leftView: Option<&UIView>,); + + #[method(leftViewMode)] + pub unsafe fn leftViewMode(&self, ) -> UITextFieldViewMode; + + #[method(setLeftViewMode:)] + pub unsafe fn setLeftViewMode(&self, leftViewMode: UITextFieldViewMode,); + + #[method_id(@__retain_semantics Other rightView)] + pub unsafe fn rightView(&self, ) -> Option>; + + #[method(setRightView:)] + pub unsafe fn setRightView(&self, rightView: Option<&UIView>,); + + #[method(rightViewMode)] + pub unsafe fn rightViewMode(&self, ) -> UITextFieldViewMode; + + #[method(setRightViewMode:)] + pub unsafe fn setRightViewMode(&self, rightViewMode: UITextFieldViewMode,); + + #[method(borderRectForBounds:)] + pub unsafe fn borderRectForBounds(&self, bounds: CGRect,) -> CGRect; + + #[method(textRectForBounds:)] + pub unsafe fn textRectForBounds(&self, bounds: CGRect,) -> CGRect; + + #[method(placeholderRectForBounds:)] + pub unsafe fn placeholderRectForBounds(&self, bounds: CGRect,) -> CGRect; + + #[method(editingRectForBounds:)] + pub unsafe fn editingRectForBounds(&self, bounds: CGRect,) -> CGRect; + + #[method(clearButtonRectForBounds:)] + pub unsafe fn clearButtonRectForBounds(&self, bounds: CGRect,) -> CGRect; + + #[method(leftViewRectForBounds:)] + pub unsafe fn leftViewRectForBounds(&self, bounds: CGRect,) -> CGRect; + + #[method(rightViewRectForBounds:)] + pub unsafe fn rightViewRectForBounds(&self, bounds: CGRect,) -> CGRect; + + #[method(drawTextInRect:)] + pub unsafe fn drawTextInRect(&self, rect: CGRect,); + + #[method(drawPlaceholderInRect:)] + pub unsafe fn drawPlaceholderInRect(&self, rect: CGRect,); + + #[method_id(@__retain_semantics Other inputView)] + pub unsafe fn inputView(&self, ) -> Option>; + + #[method(setInputView:)] + pub unsafe fn setInputView(&self, inputView: Option<&UIView>,); + + #[method_id(@__retain_semantics Other inputAccessoryView)] + pub unsafe fn inputAccessoryView(&self, ) -> Option>; + + #[method(setInputAccessoryView:)] + pub unsafe fn setInputAccessoryView(&self, inputAccessoryView: Option<&UIView>,); + + #[method(clearsOnInsertion)] + pub unsafe fn clearsOnInsertion(&self, ) -> bool; + + #[method(setClearsOnInsertion:)] + pub unsafe fn setClearsOnInsertion(&self, clearsOnInsertion: bool,); + + } +); + +extern_methods!( + unsafe impl UITextField { + } +); + +extern_methods!( + /// UIInteractionStateRestorable + unsafe impl UITextField { + #[method_id(@__retain_semantics Other interactionState)] + pub unsafe fn interactionState(&self, ) -> Id; + + #[method(setInteractionState:)] + pub unsafe fn setInteractionState(&self, interactionState: &Object,); + + } +); + +extern_methods!( + /// UITextField + unsafe impl UIView { + #[method(endEditing:)] + pub unsafe fn endEditing(&self, force: bool,) -> bool; + + } +); + +extern_protocol!( + pub struct UITextFieldDelegate; + + unsafe impl UITextFieldDelegate { + #[optional] + #[method(textFieldShouldBeginEditing:)] + pub unsafe fn textFieldShouldBeginEditing(&self, textField: &UITextField,) -> bool; + + #[optional] + #[method(textFieldDidBeginEditing:)] + pub unsafe fn textFieldDidBeginEditing(&self, textField: &UITextField,); + + #[optional] + #[method(textFieldShouldEndEditing:)] + pub unsafe fn textFieldShouldEndEditing(&self, textField: &UITextField,) -> bool; + + #[optional] + #[method(textFieldDidEndEditing:)] + pub unsafe fn textFieldDidEndEditing(&self, textField: &UITextField,); + + #[optional] + #[method(textFieldDidEndEditing:reason:)] + pub unsafe fn textFieldDidEndEditing_reason(&self, textField: &UITextField,reason: UITextFieldDidEndEditingReason,); + + #[optional] + #[method(textField:shouldChangeCharactersInRange:replacementString:)] + pub unsafe fn textField_shouldChangeCharactersInRange_replacementString(&self, textField: &UITextField,range: NSRange,string: &NSString,) -> bool; + + #[optional] + #[method(textFieldDidChangeSelection:)] + pub unsafe fn textFieldDidChangeSelection(&self, textField: &UITextField,); + + #[optional] + #[method(textFieldShouldClear:)] + pub unsafe fn textFieldShouldClear(&self, textField: &UITextField,) -> bool; + + #[optional] + #[method(textFieldShouldReturn:)] + pub unsafe fn textFieldShouldReturn(&self, textField: &UITextField,) -> bool; + + #[optional] + #[method_id(@__retain_semantics Other textField:editMenuForCharactersInRange:suggestedActions:)] + pub unsafe fn textField_editMenuForCharactersInRange_suggestedActions(&self, textField: &UITextField,range: NSRange,suggestedActions: &NSArray,) -> Option>; + + #[optional] + #[method(textField:willPresentEditMenuWithAnimator:)] + pub unsafe fn textField_willPresentEditMenuWithAnimator(&self, textField: &UITextField,animator: &UIEditMenuInteractionAnimating,); + + #[optional] + #[method(textField:willDismissEditMenuWithAnimator:)] + pub unsafe fn textField_willDismissEditMenuWithAnimator(&self, textField: &UITextField,animator: &UIEditMenuInteractionAnimating,); + + } +); + +extern_static!(UITextFieldTextDidBeginEditingNotification: &'static NSNotificationName); + +extern_static!(UITextFieldTextDidEndEditingNotification: &'static NSNotificationName); + +extern_static!(UITextFieldTextDidChangeNotification: &'static NSNotificationName); + +extern_static!(UITextFieldDidEndEditingReasonKey: &'static NSString); + diff --git a/crates/icrate-generated/src/UIKit/generated/UITextFormattingCoordinator.rs b/crates/icrate-generated/src/UIKit/generated/UITextFormattingCoordinator.rs new file mode 100644 index 000000000..42635fc11 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UITextFormattingCoordinator.rs @@ -0,0 +1,52 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_protocol!( + pub struct UITextFormattingCoordinatorDelegate; + + unsafe impl UITextFormattingCoordinatorDelegate { + #[method(updateTextAttributesWithConversionHandler:)] + pub unsafe fn updateTextAttributesWithConversionHandler(&self, conversionHandler: UITextAttributesConversionHandler,); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UITextFormattingCoordinator; + + unsafe impl ClassType for UITextFormattingCoordinator { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UITextFormattingCoordinator { + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&UITextFormattingCoordinatorDelegate>,); + + #[method(isFontPanelVisible)] + pub unsafe fn isFontPanelVisible() -> bool; + + #[method_id(@__retain_semantics Other textFormattingCoordinatorForWindowScene:)] + pub unsafe fn textFormattingCoordinatorForWindowScene(windowScene: &UIWindowScene,) -> Id; + + #[method_id(@__retain_semantics Init initWithWindowScene:)] + pub unsafe fn initWithWindowScene(this: Option>, windowScene: &UIWindowScene,) -> Id; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method(setSelectedAttributes:isMultiple:)] + pub unsafe fn setSelectedAttributes_isMultiple(&self, attributes: &NSDictionary,flag: bool,); + + #[method(toggleFontPanel:)] + pub unsafe fn toggleFontPanel(sender: &Object,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UITextInput.rs b/crates/icrate-generated/src/UIKit/generated/UITextInput.rs new file mode 100644 index 000000000..aa351ac0f --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UITextInput.rs @@ -0,0 +1,475 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_protocol!( + pub struct UIKeyInput; + + unsafe impl UIKeyInput { + #[method(hasText)] + pub unsafe fn hasText(&self, ) -> bool; + + #[method(insertText:)] + pub unsafe fn insertText(&self, text: &NSString,); + + #[method(deleteBackward)] + pub unsafe fn deleteBackward(&self, ); + + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UITextStorageDirection { + UITextStorageDirectionForward = 0, + UITextStorageDirectionBackward = 1, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UITextLayoutDirection { + UITextLayoutDirectionRight = 2, + UITextLayoutDirectionLeft = 3, + UITextLayoutDirectionUp = 4, + UITextLayoutDirectionDown = 5, + } +); + +pub type UITextDirection = NSInteger; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UITextGranularity { + UITextGranularityCharacter = 0, + UITextGranularityWord = 1, + UITextGranularitySentence = 2, + UITextGranularityParagraph = 3, + UITextGranularityLine = 4, + UITextGranularityDocument = 5, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIDictationPhrase; + + unsafe impl ClassType for UIDictationPhrase { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIDictationPhrase { + #[method_id(@__retain_semantics Other text)] + pub unsafe fn text(&self, ) -> Id; + + #[method_id(@__retain_semantics Other alternativeInterpretations)] + pub unsafe fn alternativeInterpretations(&self, ) -> Option, Shared>>; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UITextInputAssistantItem; + + unsafe impl ClassType for UITextInputAssistantItem { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UITextInputAssistantItem { + #[method(allowsHidingShortcuts)] + pub unsafe fn allowsHidingShortcuts(&self, ) -> bool; + + #[method(setAllowsHidingShortcuts:)] + pub unsafe fn setAllowsHidingShortcuts(&self, allowsHidingShortcuts: bool,); + + #[method_id(@__retain_semantics Other leadingBarButtonGroups)] + pub unsafe fn leadingBarButtonGroups(&self, ) -> Id, Shared>; + + #[method(setLeadingBarButtonGroups:)] + pub unsafe fn setLeadingBarButtonGroups(&self, leadingBarButtonGroups: &NSArray,); + + #[method_id(@__retain_semantics Other trailingBarButtonGroups)] + pub unsafe fn trailingBarButtonGroups(&self, ) -> Id, Shared>; + + #[method(setTrailingBarButtonGroups:)] + pub unsafe fn setTrailingBarButtonGroups(&self, trailingBarButtonGroups: &NSArray,); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UITextPlaceholder; + + unsafe impl ClassType for UITextPlaceholder { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UITextPlaceholder { + #[method_id(@__retain_semantics Other rects)] + pub unsafe fn rects(&self, ) -> Id, Shared>; + + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UITextAlternativeStyle { + UITextAlternativeStyleNone = 0, + UITextAlternativeStyleLowConfidence = 1, + } +); + +extern_protocol!( + pub struct UITextInput; + + unsafe impl UITextInput { + #[method_id(@__retain_semantics Other textInRange:)] + pub unsafe fn textInRange(&self, range: &UITextRange,) -> Option>; + + #[method(replaceRange:withText:)] + pub unsafe fn replaceRange_withText(&self, range: &UITextRange,text: &NSString,); + + #[method_id(@__retain_semantics Other selectedTextRange)] + pub unsafe fn selectedTextRange(&self, ) -> Option>; + + #[method(setSelectedTextRange:)] + pub unsafe fn setSelectedTextRange(&self, selectedTextRange: Option<&UITextRange>,); + + #[method_id(@__retain_semantics Other markedTextRange)] + pub unsafe fn markedTextRange(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other markedTextStyle)] + pub unsafe fn markedTextStyle(&self, ) -> Option, Shared>>; + + #[method(setMarkedTextStyle:)] + pub unsafe fn setMarkedTextStyle(&self, markedTextStyle: Option<&NSDictionary>,); + + #[method(setMarkedText:selectedRange:)] + pub unsafe fn setMarkedText_selectedRange(&self, markedText: Option<&NSString>,selectedRange: NSRange,); + + #[method(unmarkText)] + pub unsafe fn unmarkText(&self, ); + + #[method_id(@__retain_semantics Other beginningOfDocument)] + pub unsafe fn beginningOfDocument(&self, ) -> Id; + + #[method_id(@__retain_semantics Other endOfDocument)] + pub unsafe fn endOfDocument(&self, ) -> Id; + + #[method_id(@__retain_semantics Other textRangeFromPosition:toPosition:)] + pub unsafe fn textRangeFromPosition_toPosition(&self, fromPosition: &UITextPosition,toPosition: &UITextPosition,) -> Option>; + + #[method_id(@__retain_semantics Other positionFromPosition:offset:)] + pub unsafe fn positionFromPosition_offset(&self, position: &UITextPosition,offset: NSInteger,) -> Option>; + + #[method_id(@__retain_semantics Other positionFromPosition:inDirection:offset:)] + pub unsafe fn positionFromPosition_inDirection_offset(&self, position: &UITextPosition,direction: UITextLayoutDirection,offset: NSInteger,) -> Option>; + + #[method(comparePosition:toPosition:)] + pub unsafe fn comparePosition_toPosition(&self, position: &UITextPosition,other: &UITextPosition,) -> NSComparisonResult; + + #[method(offsetFromPosition:toPosition:)] + pub unsafe fn offsetFromPosition_toPosition(&self, from: &UITextPosition,toPosition: &UITextPosition,) -> NSInteger; + + #[method_id(@__retain_semantics Other inputDelegate)] + pub unsafe fn inputDelegate(&self, ) -> Option>; + + #[method(setInputDelegate:)] + pub unsafe fn setInputDelegate(&self, inputDelegate: Option<&UITextInputDelegate>,); + + #[method_id(@__retain_semantics Other tokenizer)] + pub unsafe fn tokenizer(&self, ) -> Id; + + #[method_id(@__retain_semantics Other positionWithinRange:farthestInDirection:)] + pub unsafe fn positionWithinRange_farthestInDirection(&self, range: &UITextRange,direction: UITextLayoutDirection,) -> Option>; + + #[method_id(@__retain_semantics Other characterRangeByExtendingPosition:inDirection:)] + pub unsafe fn characterRangeByExtendingPosition_inDirection(&self, position: &UITextPosition,direction: UITextLayoutDirection,) -> Option>; + + #[method(baseWritingDirectionForPosition:inDirection:)] + pub unsafe fn baseWritingDirectionForPosition_inDirection(&self, position: &UITextPosition,direction: UITextStorageDirection,) -> NSWritingDirection; + + #[method(setBaseWritingDirection:forRange:)] + pub unsafe fn setBaseWritingDirection_forRange(&self, writingDirection: NSWritingDirection,range: &UITextRange,); + + #[method(firstRectForRange:)] + pub unsafe fn firstRectForRange(&self, range: &UITextRange,) -> CGRect; + + #[method(caretRectForPosition:)] + pub unsafe fn caretRectForPosition(&self, position: &UITextPosition,) -> CGRect; + + #[method_id(@__retain_semantics Other selectionRectsForRange:)] + pub unsafe fn selectionRectsForRange(&self, range: &UITextRange,) -> Id, Shared>; + + #[method_id(@__retain_semantics Other closestPositionToPoint:)] + pub unsafe fn closestPositionToPoint(&self, point: CGPoint,) -> Option>; + + #[method_id(@__retain_semantics Other closestPositionToPoint:withinRange:)] + pub unsafe fn closestPositionToPoint_withinRange(&self, point: CGPoint,range: &UITextRange,) -> Option>; + + #[method_id(@__retain_semantics Other characterRangeAtPoint:)] + pub unsafe fn characterRangeAtPoint(&self, point: CGPoint,) -> Option>; + + #[optional] + #[method(shouldChangeTextInRange:replacementText:)] + pub unsafe fn shouldChangeTextInRange_replacementText(&self, range: &UITextRange,text: &NSString,) -> bool; + + #[optional] + #[method_id(@__retain_semantics Other textStylingAtPosition:inDirection:)] + pub unsafe fn textStylingAtPosition_inDirection(&self, position: &UITextPosition,direction: UITextStorageDirection,) -> Option, Shared>>; + + #[optional] + #[method_id(@__retain_semantics Other positionWithinRange:atCharacterOffset:)] + pub unsafe fn positionWithinRange_atCharacterOffset(&self, range: &UITextRange,offset: NSInteger,) -> Option>; + + #[optional] + #[method(characterOffsetOfPosition:withinRange:)] + pub unsafe fn characterOffsetOfPosition_withinRange(&self, position: &UITextPosition,range: &UITextRange,) -> NSInteger; + + #[optional] + #[method_id(@__retain_semantics Other textInputView)] + pub unsafe fn textInputView(&self, ) -> Id; + + #[optional] + #[method(selectionAffinity)] + pub unsafe fn selectionAffinity(&self, ) -> UITextStorageDirection; + + #[optional] + #[method(setSelectionAffinity:)] + pub unsafe fn setSelectionAffinity(&self, selectionAffinity: UITextStorageDirection,); + + #[optional] + #[method(insertDictationResult:)] + pub unsafe fn insertDictationResult(&self, dictationResult: &NSArray,); + + #[optional] + #[method(dictationRecordingDidEnd)] + pub unsafe fn dictationRecordingDidEnd(&self, ); + + #[optional] + #[method(dictationRecognitionFailed)] + pub unsafe fn dictationRecognitionFailed(&self, ); + + #[optional] + #[method_id(@__retain_semantics Other insertDictationResultPlaceholder)] + pub unsafe fn insertDictationResultPlaceholder(&self, ) -> Id; + + #[optional] + #[method(frameForDictationResultPlaceholder:)] + pub unsafe fn frameForDictationResultPlaceholder(&self, placeholder: &Object,) -> CGRect; + + #[optional] + #[method(removeDictationResultPlaceholder:willInsertResult:)] + pub unsafe fn removeDictationResultPlaceholder_willInsertResult(&self, placeholder: &Object,willInsertResult: bool,); + + #[optional] + #[method(insertText:alternatives:style:)] + pub unsafe fn insertText_alternatives_style(&self, text: &NSString,alternatives: &NSArray,style: UITextAlternativeStyle,); + + #[optional] + #[method(setAttributedMarkedText:selectedRange:)] + pub unsafe fn setAttributedMarkedText_selectedRange(&self, markedText: Option<&NSAttributedString>,selectedRange: NSRange,); + + #[optional] + #[method_id(@__retain_semantics Other insertTextPlaceholderWithSize:)] + pub unsafe fn insertTextPlaceholderWithSize(&self, size: CGSize,) -> Id; + + #[optional] + #[method(removeTextPlaceholder:)] + pub unsafe fn removeTextPlaceholder(&self, textPlaceholder: &UITextPlaceholder,); + + #[optional] + #[method(beginFloatingCursorAtPoint:)] + pub unsafe fn beginFloatingCursorAtPoint(&self, point: CGPoint,); + + #[optional] + #[method(updateFloatingCursorAtPoint:)] + pub unsafe fn updateFloatingCursorAtPoint(&self, point: CGPoint,); + + #[optional] + #[method(endFloatingCursor)] + pub unsafe fn endFloatingCursor(&self, ); + + #[optional] + #[method_id(@__retain_semantics Other editMenuForTextRange:suggestedActions:)] + pub unsafe fn editMenuForTextRange_suggestedActions(&self, textRange: &UITextRange,suggestedActions: &NSArray,) -> Option>; + + #[optional] + #[method(willPresentEditMenuWithAnimator:)] + pub unsafe fn willPresentEditMenuWithAnimator(&self, animator: &UIEditMenuInteractionAnimating,); + + #[optional] + #[method(willDismissEditMenuWithAnimator:)] + pub unsafe fn willDismissEditMenuWithAnimator(&self, animator: &UIEditMenuInteractionAnimating,); + + } +); + +extern_static!(UITextInputTextBackgroundColorKey: &'static NSString); + +extern_static!(UITextInputTextColorKey: &'static NSString); + +extern_static!(UITextInputTextFontKey: &'static NSString); + +extern_class!( + #[derive(Debug)] + pub struct UITextPosition; + + unsafe impl ClassType for UITextPosition { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UITextPosition { + } +); + +extern_class!( + #[derive(Debug)] + pub struct UITextRange; + + unsafe impl ClassType for UITextRange { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UITextRange { + #[method(isEmpty)] + pub unsafe fn isEmpty(&self, ) -> bool; + + #[method_id(@__retain_semantics Other start)] + pub unsafe fn start(&self, ) -> Id; + + #[method_id(@__retain_semantics Other end)] + pub unsafe fn end(&self, ) -> Id; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UITextSelectionRect; + + unsafe impl ClassType for UITextSelectionRect { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UITextSelectionRect { + #[method(rect)] + pub unsafe fn rect(&self, ) -> CGRect; + + #[method(writingDirection)] + pub unsafe fn writingDirection(&self, ) -> NSWritingDirection; + + #[method(containsStart)] + pub unsafe fn containsStart(&self, ) -> bool; + + #[method(containsEnd)] + pub unsafe fn containsEnd(&self, ) -> bool; + + #[method(isVertical)] + pub unsafe fn isVertical(&self, ) -> bool; + + } +); + +extern_protocol!( + pub struct UITextInputDelegate; + + unsafe impl UITextInputDelegate { + #[method(selectionWillChange:)] + pub unsafe fn selectionWillChange(&self, textInput: Option<&UITextInput>,); + + #[method(selectionDidChange:)] + pub unsafe fn selectionDidChange(&self, textInput: Option<&UITextInput>,); + + #[method(textWillChange:)] + pub unsafe fn textWillChange(&self, textInput: Option<&UITextInput>,); + + #[method(textDidChange:)] + pub unsafe fn textDidChange(&self, textInput: Option<&UITextInput>,); + + } +); + +extern_protocol!( + pub struct UITextInputTokenizer; + + unsafe impl UITextInputTokenizer { + #[method_id(@__retain_semantics Other rangeEnclosingPosition:withGranularity:inDirection:)] + pub unsafe fn rangeEnclosingPosition_withGranularity_inDirection(&self, position: &UITextPosition,granularity: UITextGranularity,direction: UITextDirection,) -> Option>; + + #[method(isPosition:atBoundary:inDirection:)] + pub unsafe fn isPosition_atBoundary_inDirection(&self, position: &UITextPosition,granularity: UITextGranularity,direction: UITextDirection,) -> bool; + + #[method_id(@__retain_semantics Other positionFromPosition:toBoundary:inDirection:)] + pub unsafe fn positionFromPosition_toBoundary_inDirection(&self, position: &UITextPosition,granularity: UITextGranularity,direction: UITextDirection,) -> Option>; + + #[method(isPosition:withinTextUnit:inDirection:)] + pub unsafe fn isPosition_withinTextUnit_inDirection(&self, position: &UITextPosition,granularity: UITextGranularity,direction: UITextDirection,) -> bool; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UITextInputStringTokenizer; + + unsafe impl ClassType for UITextInputStringTokenizer { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UITextInputStringTokenizer { + #[method_id(@__retain_semantics Init initWithTextInput:)] + pub unsafe fn initWithTextInput(this: Option>, textInput: &TodoProtocols,) -> Id; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UITextInputMode; + + unsafe impl ClassType for UITextInputMode { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UITextInputMode { + #[method_id(@__retain_semantics Other primaryLanguage)] + pub unsafe fn primaryLanguage(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other currentInputMode)] + pub unsafe fn currentInputMode() -> Option>; + + #[method_id(@__retain_semantics Other activeInputModes)] + pub unsafe fn activeInputModes() -> Id, Shared>; + + } +); + +extern_static!(UITextInputCurrentInputModeDidChangeNotification: &'static NSNotificationName); + +pub type UITextWritingDirection = NSWritingDirection; + +extern_static!(UITextWritingDirectionNatural: UITextWritingDirection = NSWritingDirectionNatural); + +extern_static!(UITextWritingDirectionLeftToRight: UITextWritingDirection = NSWritingDirectionLeftToRight); + +extern_static!(UITextWritingDirectionRightToLeft: UITextWritingDirection = NSWritingDirectionRightToLeft); + diff --git a/crates/icrate-generated/src/UIKit/generated/UITextInputTraits.rs b/crates/icrate-generated/src/UIKit/generated/UITextInputTraits.rs new file mode 100644 index 000000000..cb4c2de01 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UITextInputTraits.rs @@ -0,0 +1,305 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UITextAutocapitalizationType { + UITextAutocapitalizationTypeNone = 0, + UITextAutocapitalizationTypeWords = 1, + UITextAutocapitalizationTypeSentences = 2, + UITextAutocapitalizationTypeAllCharacters = 3, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UITextAutocorrectionType { + UITextAutocorrectionTypeDefault = 0, + UITextAutocorrectionTypeNo = 1, + UITextAutocorrectionTypeYes = 2, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UITextSpellCheckingType { + UITextSpellCheckingTypeDefault = 0, + UITextSpellCheckingTypeNo = 1, + UITextSpellCheckingTypeYes = 2, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UITextSmartQuotesType { + UITextSmartQuotesTypeDefault = 0, + UITextSmartQuotesTypeNo = 1, + UITextSmartQuotesTypeYes = 2, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UITextSmartDashesType { + UITextSmartDashesTypeDefault = 0, + UITextSmartDashesTypeNo = 1, + UITextSmartDashesTypeYes = 2, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UITextSmartInsertDeleteType { + UITextSmartInsertDeleteTypeDefault = 0, + UITextSmartInsertDeleteTypeNo = 1, + UITextSmartInsertDeleteTypeYes = 2, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIKeyboardType { + UIKeyboardTypeDefault = 0, + UIKeyboardTypeASCIICapable = 1, + UIKeyboardTypeNumbersAndPunctuation = 2, + UIKeyboardTypeURL = 3, + UIKeyboardTypeNumberPad = 4, + UIKeyboardTypePhonePad = 5, + UIKeyboardTypeNamePhonePad = 6, + UIKeyboardTypeEmailAddress = 7, + UIKeyboardTypeDecimalPad = 8, + UIKeyboardTypeTwitter = 9, + UIKeyboardTypeWebSearch = 10, + UIKeyboardTypeASCIICapableNumberPad = 11, + UIKeyboardTypeAlphabet = UIKeyboardTypeASCIICapable, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIKeyboardAppearance { + UIKeyboardAppearanceDefault = 0, + UIKeyboardAppearanceDark = 1, + UIKeyboardAppearanceLight = 2, + UIKeyboardAppearanceAlert = UIKeyboardAppearanceDark, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIReturnKeyType { + UIReturnKeyDefault = 0, + UIReturnKeyGo = 1, + UIReturnKeyGoogle = 2, + UIReturnKeyJoin = 3, + UIReturnKeyNext = 4, + UIReturnKeyRoute = 5, + UIReturnKeySearch = 6, + UIReturnKeySend = 7, + UIReturnKeyYahoo = 8, + UIReturnKeyDone = 9, + UIReturnKeyEmergencyCall = 10, + UIReturnKeyContinue = 11, + } +); + +pub type UITextContentType = NSString; + +extern_class!( + #[derive(Debug)] + pub struct UITextInputPasswordRules; + + unsafe impl ClassType for UITextInputPasswordRules { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UITextInputPasswordRules { + #[method_id(@__retain_semantics Other passwordRulesDescriptor)] + pub unsafe fn passwordRulesDescriptor(&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; + + #[method_id(@__retain_semantics Other passwordRulesWithDescriptor:)] + pub unsafe fn passwordRulesWithDescriptor(passwordRulesDescriptor: &NSString,) -> Id; + + } +); + +extern_protocol!( + pub struct UITextInputTraits; + + unsafe impl UITextInputTraits { + #[optional] + #[method(autocapitalizationType)] + pub unsafe fn autocapitalizationType(&self, ) -> UITextAutocapitalizationType; + + #[optional] + #[method(setAutocapitalizationType:)] + pub unsafe fn setAutocapitalizationType(&self, autocapitalizationType: UITextAutocapitalizationType,); + + #[optional] + #[method(autocorrectionType)] + pub unsafe fn autocorrectionType(&self, ) -> UITextAutocorrectionType; + + #[optional] + #[method(setAutocorrectionType:)] + pub unsafe fn setAutocorrectionType(&self, autocorrectionType: UITextAutocorrectionType,); + + #[optional] + #[method(spellCheckingType)] + pub unsafe fn spellCheckingType(&self, ) -> UITextSpellCheckingType; + + #[optional] + #[method(setSpellCheckingType:)] + pub unsafe fn setSpellCheckingType(&self, spellCheckingType: UITextSpellCheckingType,); + + #[optional] + #[method(smartQuotesType)] + pub unsafe fn smartQuotesType(&self, ) -> UITextSmartQuotesType; + + #[optional] + #[method(setSmartQuotesType:)] + pub unsafe fn setSmartQuotesType(&self, smartQuotesType: UITextSmartQuotesType,); + + #[optional] + #[method(smartDashesType)] + pub unsafe fn smartDashesType(&self, ) -> UITextSmartDashesType; + + #[optional] + #[method(setSmartDashesType:)] + pub unsafe fn setSmartDashesType(&self, smartDashesType: UITextSmartDashesType,); + + #[optional] + #[method(smartInsertDeleteType)] + pub unsafe fn smartInsertDeleteType(&self, ) -> UITextSmartInsertDeleteType; + + #[optional] + #[method(setSmartInsertDeleteType:)] + pub unsafe fn setSmartInsertDeleteType(&self, smartInsertDeleteType: UITextSmartInsertDeleteType,); + + #[optional] + #[method(keyboardType)] + pub unsafe fn keyboardType(&self, ) -> UIKeyboardType; + + #[optional] + #[method(setKeyboardType:)] + pub unsafe fn setKeyboardType(&self, keyboardType: UIKeyboardType,); + + #[optional] + #[method(keyboardAppearance)] + pub unsafe fn keyboardAppearance(&self, ) -> UIKeyboardAppearance; + + #[optional] + #[method(setKeyboardAppearance:)] + pub unsafe fn setKeyboardAppearance(&self, keyboardAppearance: UIKeyboardAppearance,); + + #[optional] + #[method(returnKeyType)] + pub unsafe fn returnKeyType(&self, ) -> UIReturnKeyType; + + #[optional] + #[method(setReturnKeyType:)] + pub unsafe fn setReturnKeyType(&self, returnKeyType: UIReturnKeyType,); + + #[optional] + #[method(enablesReturnKeyAutomatically)] + pub unsafe fn enablesReturnKeyAutomatically(&self, ) -> bool; + + #[optional] + #[method(setEnablesReturnKeyAutomatically:)] + pub unsafe fn setEnablesReturnKeyAutomatically(&self, enablesReturnKeyAutomatically: bool,); + + #[optional] + #[method(isSecureTextEntry)] + pub unsafe fn isSecureTextEntry(&self, ) -> bool; + + #[optional] + #[method(setSecureTextEntry:)] + pub unsafe fn setSecureTextEntry(&self, secureTextEntry: bool,); + + #[optional] + #[method_id(@__retain_semantics Other textContentType)] + pub unsafe fn textContentType(&self, ) -> Id; + + #[optional] + #[method(setTextContentType:)] + pub unsafe fn setTextContentType(&self, textContentType: Option<&UITextContentType>,); + + #[optional] + #[method_id(@__retain_semantics Other passwordRules)] + pub unsafe fn passwordRules(&self, ) -> Option>; + + #[optional] + #[method(setPasswordRules:)] + pub unsafe fn setPasswordRules(&self, passwordRules: Option<&UITextInputPasswordRules>,); + + } +); + +extern_static!(UITextContentTypeName: &'static UITextContentType); + +extern_static!(UITextContentTypeNamePrefix: &'static UITextContentType); + +extern_static!(UITextContentTypeGivenName: &'static UITextContentType); + +extern_static!(UITextContentTypeMiddleName: &'static UITextContentType); + +extern_static!(UITextContentTypeFamilyName: &'static UITextContentType); + +extern_static!(UITextContentTypeNameSuffix: &'static UITextContentType); + +extern_static!(UITextContentTypeNickname: &'static UITextContentType); + +extern_static!(UITextContentTypeJobTitle: &'static UITextContentType); + +extern_static!(UITextContentTypeOrganizationName: &'static UITextContentType); + +extern_static!(UITextContentTypeLocation: &'static UITextContentType); + +extern_static!(UITextContentTypeFullStreetAddress: &'static UITextContentType); + +extern_static!(UITextContentTypeStreetAddressLine1: &'static UITextContentType); + +extern_static!(UITextContentTypeStreetAddressLine2: &'static UITextContentType); + +extern_static!(UITextContentTypeAddressCity: &'static UITextContentType); + +extern_static!(UITextContentTypeAddressState: &'static UITextContentType); + +extern_static!(UITextContentTypeAddressCityAndState: &'static UITextContentType); + +extern_static!(UITextContentTypeSublocality: &'static UITextContentType); + +extern_static!(UITextContentTypeCountryName: &'static UITextContentType); + +extern_static!(UITextContentTypePostalCode: &'static UITextContentType); + +extern_static!(UITextContentTypeTelephoneNumber: &'static UITextContentType); + +extern_static!(UITextContentTypeEmailAddress: &'static UITextContentType); + +extern_static!(UITextContentTypeURL: &'static UITextContentType); + +extern_static!(UITextContentTypeCreditCardNumber: &'static UITextContentType); + +extern_static!(UITextContentTypeUsername: &'static UITextContentType); + +extern_static!(UITextContentTypePassword: &'static UITextContentType); + +extern_static!(UITextContentTypeNewPassword: &'static UITextContentType); + +extern_static!(UITextContentTypeOneTimeCode: &'static UITextContentType); + +extern_static!(UITextContentTypeShipmentTrackingNumber: &'static UITextContentType); + +extern_static!(UITextContentTypeFlightNumber: &'static UITextContentType); + +extern_static!(UITextContentTypeDateTime: &'static UITextContentType); + diff --git a/crates/icrate-generated/src/UIKit/generated/UITextInteraction.rs b/crates/icrate-generated/src/UIKit/generated/UITextInteraction.rs new file mode 100644 index 000000000..81e259555 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UITextInteraction.rs @@ -0,0 +1,66 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UITextInteractionMode { + UITextInteractionModeEditable = 0, + UITextInteractionModeNonEditable = 1, + } +); + +extern_protocol!( + pub struct UITextInteractionDelegate; + + unsafe impl UITextInteractionDelegate { + #[optional] + #[method(interactionShouldBegin:atPoint:)] + pub unsafe fn interactionShouldBegin_atPoint(&self, interaction: &UITextInteraction,point: CGPoint,) -> bool; + + #[optional] + #[method(interactionWillBegin:)] + pub unsafe fn interactionWillBegin(&self, interaction: &UITextInteraction,); + + #[optional] + #[method(interactionDidEnd:)] + pub unsafe fn interactionDidEnd(&self, interaction: &UITextInteraction,); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UITextInteraction; + + unsafe impl ClassType for UITextInteraction { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UITextInteraction { + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&UITextInteractionDelegate>,); + + #[method_id(@__retain_semantics Other textInput)] + pub unsafe fn textInput(&self, ) -> Option>; + + #[method(setTextInput:)] + pub unsafe fn setTextInput(&self, textInput: Option<&TodoProtocols>,); + + #[method(textInteractionMode)] + pub unsafe fn textInteractionMode(&self, ) -> UITextInteractionMode; + + #[method_id(@__retain_semantics Other gesturesForFailureRequirements)] + pub unsafe fn gesturesForFailureRequirements(&self, ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other textInteractionForMode:)] + pub unsafe fn textInteractionForMode(mode: UITextInteractionMode,) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UITextItemInteraction.rs b/crates/icrate-generated/src/UIKit/generated/UITextItemInteraction.rs new file mode 100644 index 000000000..3f3c55b94 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UITextItemInteraction.rs @@ -0,0 +1,13 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UITextItemInteraction { + UITextItemInteractionInvokeDefaultAction = 0, + UITextItemInteractionPresentActions = 1, + UITextItemInteractionPreview = 2, + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UITextPasteConfigurationSupporting.rs b/crates/icrate-generated/src/UIKit/generated/UITextPasteConfigurationSupporting.rs new file mode 100644 index 000000000..030b5bc2d --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UITextPasteConfigurationSupporting.rs @@ -0,0 +1,17 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_protocol!( + pub struct UITextPasteConfigurationSupporting; + + unsafe impl UITextPasteConfigurationSupporting { + #[method_id(@__retain_semantics Other pasteDelegate)] + pub unsafe fn pasteDelegate(&self, ) -> Option>; + + #[method(setPasteDelegate:)] + pub unsafe fn setPasteDelegate(&self, pasteDelegate: Option<&UITextPasteDelegate>,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UITextPasteDelegate.rs b/crates/icrate-generated/src/UIKit/generated/UITextPasteDelegate.rs new file mode 100644 index 000000000..e77bded48 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UITextPasteDelegate.rs @@ -0,0 +1,58 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_protocol!( + pub struct UITextPasteDelegate; + + unsafe impl UITextPasteDelegate { + #[optional] + #[method(textPasteConfigurationSupporting:transformPasteItem:)] + pub unsafe fn textPasteConfigurationSupporting_transformPasteItem(&self, textPasteConfigurationSupporting: &UITextPasteConfigurationSupporting,item: &UITextPasteItem,); + + #[optional] + #[method_id(@__retain_semantics Other textPasteConfigurationSupporting:combineItemAttributedStrings:forRange:)] + pub unsafe fn textPasteConfigurationSupporting_combineItemAttributedStrings_forRange(&self, textPasteConfigurationSupporting: &UITextPasteConfigurationSupporting,itemStrings: &NSArray,textRange: &UITextRange,) -> Id; + + #[optional] + #[method_id(@__retain_semantics Other textPasteConfigurationSupporting:performPasteOfAttributedString:toRange:)] + pub unsafe fn textPasteConfigurationSupporting_performPasteOfAttributedString_toRange(&self, textPasteConfigurationSupporting: &UITextPasteConfigurationSupporting,attributedString: &NSAttributedString,textRange: &UITextRange,) -> Id; + + #[optional] + #[method(textPasteConfigurationSupporting:shouldAnimatePasteOfAttributedString:toRange:)] + pub unsafe fn textPasteConfigurationSupporting_shouldAnimatePasteOfAttributedString_toRange(&self, textPasteConfigurationSupporting: &UITextPasteConfigurationSupporting,attributedString: &NSAttributedString,textRange: &UITextRange,) -> bool; + + } +); + +extern_protocol!( + pub struct UITextPasteItem; + + unsafe impl UITextPasteItem { + #[method_id(@__retain_semantics Other itemProvider)] + pub unsafe fn itemProvider(&self, ) -> Id; + + #[method_id(@__retain_semantics Other localObject)] + pub unsafe fn localObject(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other defaultAttributes)] + pub unsafe fn defaultAttributes(&self, ) -> Id, Shared>; + + #[method(setStringResult:)] + pub unsafe fn setStringResult(&self, string: &NSString,); + + #[method(setAttributedStringResult:)] + pub unsafe fn setAttributedStringResult(&self, string: &NSAttributedString,); + + #[method(setAttachmentResult:)] + pub unsafe fn setAttachmentResult(&self, textAttachment: &NSTextAttachment,); + + #[method(setNoResult)] + pub unsafe fn setNoResult(&self, ); + + #[method(setDefaultResult)] + pub unsafe fn setDefaultResult(&self, ); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UITextSearching.rs b/crates/icrate-generated/src/UIKit/generated/UITextSearching.rs new file mode 100644 index 000000000..7b6fad33e --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UITextSearching.rs @@ -0,0 +1,91 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +pub type UITextSearchDocumentIdentifier = TodoProtocols; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UITextSearchFoundTextStyle { + UITextSearchFoundTextStyleNormal = 0, + UITextSearchFoundTextStyleFound = 1, + UITextSearchFoundTextStyleHighlighted = 2, + } +); + +extern_protocol!( + pub struct UITextSearchAggregator; + + unsafe impl UITextSearchAggregator { + #[method_id(@__retain_semantics Other allFoundRanges)] + pub unsafe fn allFoundRanges(&self, ) -> Id, Shared>; + + #[method(foundRange:forSearchString:inDocument:)] + pub unsafe fn foundRange_forSearchString_inDocument(&self, range: &UITextRange,string: &NSString,document: Option<&UITextSearchDocumentIdentifier>,); + + #[method(invalidateFoundRange:inDocument:)] + pub unsafe fn invalidateFoundRange_inDocument(&self, range: &UITextRange,document: Option<&UITextSearchDocumentIdentifier>,); + + #[method(invalidate)] + pub unsafe fn invalidate(&self, ); + + #[method(finishedSearching)] + pub unsafe fn finishedSearching(&self, ); + + } +); + +extern_protocol!( + pub struct UITextSearching; + + unsafe impl UITextSearching { + #[method_id(@__retain_semantics Other selectedTextRange)] + pub unsafe fn selectedTextRange(&self, ) -> Option>; + + #[method(compareFoundRange:toRange:inDocument:)] + pub unsafe fn compareFoundRange_toRange_inDocument(&self, foundRange: &UITextRange,toRange: &UITextRange,document: Option<&UITextSearchDocumentIdentifier>,) -> NSComparisonResult; + + #[method(performTextSearchWithQueryString:usingOptions:resultAggregator:)] + pub unsafe fn performTextSearchWithQueryString_usingOptions_resultAggregator(&self, string: &NSString,options: &UITextSearchOptions,aggregator: &UITextSearchAggregator,); + + #[method(decorateFoundTextRange:inDocument:usingStyle:)] + pub unsafe fn decorateFoundTextRange_inDocument_usingStyle(&self, range: &UITextRange,document: Option<&UITextSearchDocumentIdentifier>,style: UITextSearchFoundTextStyle,); + + #[method(clearAllDecoratedFoundText)] + pub unsafe fn clearAllDecoratedFoundText(&self, ); + + #[optional] + #[method(supportsTextReplacement)] + pub unsafe fn supportsTextReplacement(&self, ) -> bool; + + #[optional] + #[method(shouldReplaceFoundTextInRange:inDocument:withText:)] + pub unsafe fn shouldReplaceFoundTextInRange_inDocument_withText(&self, range: &UITextRange,document: Option<&UITextSearchDocumentIdentifier>,replacementText: &NSString,) -> bool; + + #[optional] + #[method(replaceFoundTextInRange:inDocument:withText:)] + pub unsafe fn replaceFoundTextInRange_inDocument_withText(&self, range: &UITextRange,document: Option<&UITextSearchDocumentIdentifier>,replacementText: &NSString,); + + #[optional] + #[method(replaceAllOccurrencesOfQueryString:usingOptions:withText:)] + pub unsafe fn replaceAllOccurrencesOfQueryString_usingOptions_withText(&self, queryString: &NSString,options: &UITextSearchOptions,replacementText: &NSString,); + + #[optional] + #[method(willHighlightFoundTextRange:inDocument:)] + pub unsafe fn willHighlightFoundTextRange_inDocument(&self, range: &UITextRange,document: Option<&UITextSearchDocumentIdentifier>,); + + #[optional] + #[method(scrollRangeToVisible:inDocument:)] + pub unsafe fn scrollRangeToVisible_inDocument(&self, range: &UITextRange,document: Option<&UITextSearchDocumentIdentifier>,); + + #[optional] + #[method_id(@__retain_semantics Other selectedTextSearchDocument)] + pub unsafe fn selectedTextSearchDocument(&self, ) -> Option>; + + #[optional] + #[method(compareOrderFromDocument:toDocument:)] + pub unsafe fn compareOrderFromDocument_toDocument(&self, fromDocument: &UITextSearchDocumentIdentifier,toDocument: &UITextSearchDocumentIdentifier,) -> NSComparisonResult; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UITextView.rs b/crates/icrate-generated/src/UIKit/generated/UITextView.rs new file mode 100644 index 000000000..4004e5bff --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UITextView.rs @@ -0,0 +1,245 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_protocol!( + pub struct UITextViewDelegate; + + unsafe impl UITextViewDelegate { + #[optional] + #[method(textViewShouldBeginEditing:)] + pub unsafe fn textViewShouldBeginEditing(&self, textView: &UITextView,) -> bool; + + #[optional] + #[method(textViewShouldEndEditing:)] + pub unsafe fn textViewShouldEndEditing(&self, textView: &UITextView,) -> bool; + + #[optional] + #[method(textViewDidBeginEditing:)] + pub unsafe fn textViewDidBeginEditing(&self, textView: &UITextView,); + + #[optional] + #[method(textViewDidEndEditing:)] + pub unsafe fn textViewDidEndEditing(&self, textView: &UITextView,); + + #[optional] + #[method(textView:shouldChangeTextInRange:replacementText:)] + pub unsafe fn textView_shouldChangeTextInRange_replacementText(&self, textView: &UITextView,range: NSRange,text: &NSString,) -> bool; + + #[optional] + #[method(textViewDidChange:)] + pub unsafe fn textViewDidChange(&self, textView: &UITextView,); + + #[optional] + #[method(textViewDidChangeSelection:)] + pub unsafe fn textViewDidChangeSelection(&self, textView: &UITextView,); + + #[optional] + #[method(textView:shouldInteractWithURL:inRange:interaction:)] + pub unsafe fn textView_shouldInteractWithURL_inRange_interaction(&self, textView: &UITextView,URL: &NSURL,characterRange: NSRange,interaction: UITextItemInteraction,) -> bool; + + #[optional] + #[method(textView:shouldInteractWithTextAttachment:inRange:interaction:)] + pub unsafe fn textView_shouldInteractWithTextAttachment_inRange_interaction(&self, textView: &UITextView,textAttachment: &NSTextAttachment,characterRange: NSRange,interaction: UITextItemInteraction,) -> bool; + + #[optional] + #[method(textView:shouldInteractWithURL:inRange:)] + pub unsafe fn textView_shouldInteractWithURL_inRange(&self, textView: &UITextView,URL: &NSURL,characterRange: NSRange,) -> bool; + + #[optional] + #[method(textView:shouldInteractWithTextAttachment:inRange:)] + pub unsafe fn textView_shouldInteractWithTextAttachment_inRange(&self, textView: &UITextView,textAttachment: &NSTextAttachment,characterRange: NSRange,) -> bool; + + #[optional] + #[method_id(@__retain_semantics Other textView:editMenuForTextInRange:suggestedActions:)] + pub unsafe fn textView_editMenuForTextInRange_suggestedActions(&self, textView: &UITextView,range: NSRange,suggestedActions: &NSArray,) -> Option>; + + #[optional] + #[method(textView:willPresentEditMenuWithAnimator:)] + pub unsafe fn textView_willPresentEditMenuWithAnimator(&self, textView: &UITextView,animator: &UIEditMenuInteractionAnimating,); + + #[optional] + #[method(textView:willDismissEditMenuWithAnimator:)] + pub unsafe fn textView_willDismissEditMenuWithAnimator(&self, textView: &UITextView,animator: &UIEditMenuInteractionAnimating,); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UITextView; + + unsafe impl ClassType for UITextView { + type Super = UIScrollView; + } +); + +extern_methods!( + unsafe impl UITextView { + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&UITextViewDelegate>,); + + #[method_id(@__retain_semantics Other text)] + pub unsafe fn text(&self, ) -> Id; + + #[method(setText:)] + pub unsafe fn setText(&self, text: Option<&NSString>,); + + #[method_id(@__retain_semantics Other font)] + pub unsafe fn font(&self, ) -> Option>; + + #[method(setFont:)] + pub unsafe fn setFont(&self, font: Option<&UIFont>,); + + #[method_id(@__retain_semantics Other textColor)] + pub unsafe fn textColor(&self, ) -> Option>; + + #[method(setTextColor:)] + pub unsafe fn setTextColor(&self, textColor: Option<&UIColor>,); + + #[method(textAlignment)] + pub unsafe fn textAlignment(&self, ) -> NSTextAlignment; + + #[method(setTextAlignment:)] + pub unsafe fn setTextAlignment(&self, textAlignment: NSTextAlignment,); + + #[method(selectedRange)] + pub unsafe fn selectedRange(&self, ) -> NSRange; + + #[method(setSelectedRange:)] + pub unsafe fn setSelectedRange(&self, selectedRange: NSRange,); + + #[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(dataDetectorTypes)] + pub unsafe fn dataDetectorTypes(&self, ) -> UIDataDetectorTypes; + + #[method(setDataDetectorTypes:)] + pub unsafe fn setDataDetectorTypes(&self, dataDetectorTypes: UIDataDetectorTypes,); + + #[method(allowsEditingTextAttributes)] + pub unsafe fn allowsEditingTextAttributes(&self, ) -> bool; + + #[method(setAllowsEditingTextAttributes:)] + pub unsafe fn setAllowsEditingTextAttributes(&self, allowsEditingTextAttributes: bool,); + + #[method_id(@__retain_semantics Other attributedText)] + pub unsafe fn attributedText(&self, ) -> Id; + + #[method(setAttributedText:)] + pub unsafe fn setAttributedText(&self, attributedText: Option<&NSAttributedString>,); + + #[method_id(@__retain_semantics Other typingAttributes)] + pub unsafe fn typingAttributes(&self, ) -> Id, Shared>; + + #[method(setTypingAttributes:)] + pub unsafe fn setTypingAttributes(&self, typingAttributes: &NSDictionary,); + + #[method(scrollRangeToVisible:)] + pub unsafe fn scrollRangeToVisible(&self, range: NSRange,); + + #[method_id(@__retain_semantics Other inputView)] + pub unsafe fn inputView(&self, ) -> Option>; + + #[method(setInputView:)] + pub unsafe fn setInputView(&self, inputView: Option<&UIView>,); + + #[method_id(@__retain_semantics Other inputAccessoryView)] + pub unsafe fn inputAccessoryView(&self, ) -> Option>; + + #[method(setInputAccessoryView:)] + pub unsafe fn setInputAccessoryView(&self, inputAccessoryView: Option<&UIView>,); + + #[method(clearsOnInsertion)] + pub unsafe fn clearsOnInsertion(&self, ) -> bool; + + #[method(setClearsOnInsertion:)] + pub unsafe fn setClearsOnInsertion(&self, clearsOnInsertion: bool,); + + #[method_id(@__retain_semantics Init initWithFrame:textContainer:)] + pub unsafe fn initWithFrame_textContainer(this: Option>, frame: CGRect,textContainer: Option<&NSTextContainer>,) -> Id; + + #[method_id(@__retain_semantics Other textViewUsingTextLayoutManager:)] + pub unsafe fn textViewUsingTextLayoutManager(usingTextLayoutManager: bool,) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method_id(@__retain_semantics Other textContainer)] + pub unsafe fn textContainer(&self, ) -> Id; + + #[method(textContainerInset)] + pub unsafe fn textContainerInset(&self, ) -> UIEdgeInsets; + + #[method(setTextContainerInset:)] + pub unsafe fn setTextContainerInset(&self, textContainerInset: UIEdgeInsets,); + + #[method_id(@__retain_semantics Other textLayoutManager)] + pub unsafe fn textLayoutManager(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other layoutManager)] + pub unsafe fn layoutManager(&self, ) -> Id; + + #[method_id(@__retain_semantics Other textStorage)] + pub unsafe fn textStorage(&self, ) -> Id; + + #[method_id(@__retain_semantics Other linkTextAttributes)] + pub unsafe fn linkTextAttributes(&self, ) -> Id, Shared>; + + #[method(setLinkTextAttributes:)] + pub unsafe fn setLinkTextAttributes(&self, linkTextAttributes: Option<&NSDictionary>,); + + #[method(usesStandardTextScaling)] + pub unsafe fn usesStandardTextScaling(&self, ) -> bool; + + #[method(setUsesStandardTextScaling:)] + pub unsafe fn setUsesStandardTextScaling(&self, usesStandardTextScaling: bool,); + + #[method_id(@__retain_semantics Other findInteraction)] + pub unsafe fn findInteraction(&self, ) -> Option>; + + #[method(isFindInteractionEnabled)] + pub unsafe fn isFindInteractionEnabled(&self, ) -> bool; + + #[method(setFindInteractionEnabled:)] + pub unsafe fn setFindInteractionEnabled(&self, findInteractionEnabled: bool,); + + } +); + +extern_methods!( + unsafe impl UITextView { + } +); + +extern_methods!( + /// UIInteractionStateRestorable + unsafe impl UITextView { + #[method_id(@__retain_semantics Other interactionState)] + pub unsafe fn interactionState(&self, ) -> Id; + + #[method(setInteractionState:)] + pub unsafe fn setInteractionState(&self, interactionState: &Object,); + + } +); + +extern_static!(UITextViewTextDidBeginEditingNotification: &'static NSNotificationName); + +extern_static!(UITextViewTextDidChangeNotification: &'static NSNotificationName); + +extern_static!(UITextViewTextDidEndEditingNotification: &'static NSNotificationName); + diff --git a/crates/icrate-generated/src/UIKit/generated/UITimingCurveProvider.rs b/crates/icrate-generated/src/UIKit/generated/UITimingCurveProvider.rs new file mode 100644 index 000000000..f976fe0c6 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UITimingCurveProvider.rs @@ -0,0 +1,30 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UITimingCurveType { + UITimingCurveTypeBuiltin = 0, + UITimingCurveTypeCubic = 1, + UITimingCurveTypeSpring = 2, + UITimingCurveTypeComposed = 3, + } +); + +extern_protocol!( + pub struct UITimingCurveProvider; + + unsafe impl UITimingCurveProvider { + #[method(timingCurveType)] + pub unsafe fn timingCurveType(&self, ) -> UITimingCurveType; + + #[method_id(@__retain_semantics Other cubicTimingParameters)] + pub unsafe fn cubicTimingParameters(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other springTimingParameters)] + pub unsafe fn springTimingParameters(&self, ) -> Option>; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UITimingParameters.rs b/crates/icrate-generated/src/UIKit/generated/UITimingParameters.rs new file mode 100644 index 000000000..a1d736492 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UITimingParameters.rs @@ -0,0 +1,71 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UICubicTimingParameters; + + unsafe impl ClassType for UICubicTimingParameters { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UICubicTimingParameters { + #[method(animationCurve)] + pub unsafe fn animationCurve(&self, ) -> UIViewAnimationCurve; + + #[method(controlPoint1)] + pub unsafe fn controlPoint1(&self, ) -> CGPoint; + + #[method(controlPoint2)] + pub unsafe fn controlPoint2(&self, ) -> CGPoint; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method_id(@__retain_semantics Init initWithAnimationCurve:)] + pub unsafe fn initWithAnimationCurve(this: Option>, curve: UIViewAnimationCurve,) -> Id; + + #[method_id(@__retain_semantics Init initWithControlPoint1:controlPoint2:)] + pub unsafe fn initWithControlPoint1_controlPoint2(this: Option>, point1: CGPoint,point2: CGPoint,) -> Id; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UISpringTimingParameters; + + unsafe impl ClassType for UISpringTimingParameters { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UISpringTimingParameters { + #[method(initialVelocity)] + pub unsafe fn initialVelocity(&self, ) -> CGVector; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method_id(@__retain_semantics Init initWithDampingRatio:initialVelocity:)] + pub unsafe fn initWithDampingRatio_initialVelocity(this: Option>, ratio: CGFloat,velocity: CGVector,) -> Id; + + #[method_id(@__retain_semantics Init initWithMass:stiffness:damping:initialVelocity:)] + pub unsafe fn initWithMass_stiffness_damping_initialVelocity(this: Option>, mass: CGFloat,stiffness: CGFloat,damping: CGFloat,velocity: CGVector,) -> Id; + + #[method_id(@__retain_semantics Init initWithDampingRatio:)] + pub unsafe fn initWithDampingRatio(this: Option>, ratio: CGFloat,) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIToolTipInteraction.rs b/crates/icrate-generated/src/UIKit/generated/UIToolTipInteraction.rs new file mode 100644 index 000000000..3a14add48 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIToolTipInteraction.rs @@ -0,0 +1,85 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIToolTipInteraction; + + unsafe impl ClassType for UIToolTipInteraction { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIToolTipInteraction { + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&UIToolTipInteractionDelegate>,); + + #[method(isEnabled)] + pub unsafe fn isEnabled(&self, ) -> bool; + + #[method(setEnabled:)] + pub unsafe fn setEnabled(&self, enabled: bool,); + + #[method_id(@__retain_semantics Other defaultToolTip)] + pub unsafe fn defaultToolTip(&self, ) -> Option>; + + #[method(setDefaultToolTip:)] + pub unsafe fn setDefaultToolTip(&self, defaultToolTip: Option<&NSString>,); + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics Init initWithDefaultToolTip:)] + pub unsafe fn initWithDefaultToolTip(this: Option>, defaultToolTip: &NSString,) -> Id; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIToolTipConfiguration; + + unsafe impl ClassType for UIToolTipConfiguration { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIToolTipConfiguration { + #[method_id(@__retain_semantics Other toolTip)] + pub unsafe fn toolTip(&self, ) -> Id; + + #[method(sourceRect)] + pub unsafe fn sourceRect(&self, ) -> CGRect; + + #[method_id(@__retain_semantics Other configurationWithToolTip:)] + pub unsafe fn configurationWithToolTip(toolTip: &NSString,) -> Id; + + #[method_id(@__retain_semantics Other configurationWithToolTip:inRect:)] + pub unsafe fn configurationWithToolTip_inRect(toolTip: &NSString,sourceRect: CGRect,) -> 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; + + } +); + +extern_protocol!( + pub struct UIToolTipInteractionDelegate; + + unsafe impl UIToolTipInteractionDelegate { + #[optional] + #[method_id(@__retain_semantics Other toolTipInteraction:configurationAtPoint:)] + pub unsafe fn toolTipInteraction_configurationAtPoint(&self, interaction: &UIToolTipInteraction,point: CGPoint,) -> Option>; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIToolbar.rs b/crates/icrate-generated/src/UIKit/generated/UIToolbar.rs new file mode 100644 index 000000000..fbd938c7e --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIToolbar.rs @@ -0,0 +1,100 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIToolbar; + + unsafe impl ClassType for UIToolbar { + type Super = UIView; + } +); + +extern_methods!( + unsafe impl UIToolbar { + #[method(barStyle)] + pub unsafe fn barStyle(&self, ) -> UIBarStyle; + + #[method(setBarStyle:)] + pub unsafe fn setBarStyle(&self, barStyle: UIBarStyle,); + + #[method_id(@__retain_semantics Other items)] + pub unsafe fn items(&self, ) -> Option, Shared>>; + + #[method(setItems:)] + pub unsafe fn setItems(&self, items: Option<&NSArray>,); + + #[method(isTranslucent)] + pub unsafe fn isTranslucent(&self, ) -> bool; + + #[method(setTranslucent:)] + pub unsafe fn setTranslucent(&self, translucent: bool,); + + #[method(setItems:animated:)] + pub unsafe fn setItems_animated(&self, items: Option<&NSArray>,animated: bool,); + + #[method_id(@__retain_semantics Other tintColor)] + pub unsafe fn tintColor(&self, ) -> Option>; + + #[method(setTintColor:)] + pub unsafe fn setTintColor(&self, tintColor: Option<&UIColor>,); + + #[method_id(@__retain_semantics Other barTintColor)] + pub unsafe fn barTintColor(&self, ) -> Option>; + + #[method(setBarTintColor:)] + pub unsafe fn setBarTintColor(&self, barTintColor: Option<&UIColor>,); + + #[method(setBackgroundImage:forToolbarPosition:barMetrics:)] + pub unsafe fn setBackgroundImage_forToolbarPosition_barMetrics(&self, backgroundImage: Option<&UIImage>,topOrBottom: UIBarPosition,barMetrics: UIBarMetrics,); + + #[method_id(@__retain_semantics Other backgroundImageForToolbarPosition:barMetrics:)] + pub unsafe fn backgroundImageForToolbarPosition_barMetrics(&self, topOrBottom: UIBarPosition,barMetrics: UIBarMetrics,) -> Option>; + + #[method(setShadowImage:forToolbarPosition:)] + pub unsafe fn setShadowImage_forToolbarPosition(&self, shadowImage: Option<&UIImage>,topOrBottom: UIBarPosition,); + + #[method_id(@__retain_semantics Other shadowImageForToolbarPosition:)] + pub unsafe fn shadowImageForToolbarPosition(&self, topOrBottom: UIBarPosition,) -> Option>; + + #[method_id(@__retain_semantics Other standardAppearance)] + pub unsafe fn standardAppearance(&self, ) -> Id; + + #[method(setStandardAppearance:)] + pub unsafe fn setStandardAppearance(&self, standardAppearance: &UIToolbarAppearance,); + + #[method_id(@__retain_semantics Other compactAppearance)] + pub unsafe fn compactAppearance(&self, ) -> Option>; + + #[method(setCompactAppearance:)] + pub unsafe fn setCompactAppearance(&self, compactAppearance: Option<&UIToolbarAppearance>,); + + #[method_id(@__retain_semantics Other scrollEdgeAppearance)] + pub unsafe fn scrollEdgeAppearance(&self, ) -> Option>; + + #[method(setScrollEdgeAppearance:)] + pub unsafe fn setScrollEdgeAppearance(&self, scrollEdgeAppearance: Option<&UIToolbarAppearance>,); + + #[method_id(@__retain_semantics Other compactScrollEdgeAppearance)] + pub unsafe fn compactScrollEdgeAppearance(&self, ) -> Option>; + + #[method(setCompactScrollEdgeAppearance:)] + pub unsafe fn setCompactScrollEdgeAppearance(&self, compactScrollEdgeAppearance: Option<&UIToolbarAppearance>,); + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&UIToolbarDelegate>,); + + } +); + +extern_protocol!( + pub struct UIToolbarDelegate; + + unsafe impl UIToolbarDelegate { + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIToolbarAppearance.rs b/crates/icrate-generated/src/UIKit/generated/UIToolbarAppearance.rs new file mode 100644 index 000000000..47d50b1b7 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIToolbarAppearance.rs @@ -0,0 +1,30 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIToolbarAppearance; + + unsafe impl ClassType for UIToolbarAppearance { + type Super = UIBarAppearance; + } +); + +extern_methods!( + unsafe impl UIToolbarAppearance { + #[method_id(@__retain_semantics Other buttonAppearance)] + pub unsafe fn buttonAppearance(&self, ) -> Id; + + #[method(setButtonAppearance:)] + pub unsafe fn setButtonAppearance(&self, buttonAppearance: &UIBarButtonItemAppearance,); + + #[method_id(@__retain_semantics Other doneButtonAppearance)] + pub unsafe fn doneButtonAppearance(&self, ) -> Id; + + #[method(setDoneButtonAppearance:)] + pub unsafe fn setDoneButtonAppearance(&self, doneButtonAppearance: &UIBarButtonItemAppearance,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UITouch.rs b/crates/icrate-generated/src/UIKit/generated/UITouch.rs new file mode 100644 index 000000000..6bc55a5c1 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UITouch.rs @@ -0,0 +1,125 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UITouchPhase { + UITouchPhaseBegan = 0, + UITouchPhaseMoved = 1, + UITouchPhaseStationary = 2, + UITouchPhaseEnded = 3, + UITouchPhaseCancelled = 4, + UITouchPhaseRegionEntered = 5, + UITouchPhaseRegionMoved = 6, + UITouchPhaseRegionExited = 7, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIForceTouchCapability { + UIForceTouchCapabilityUnknown = 0, + UIForceTouchCapabilityUnavailable = 1, + UIForceTouchCapabilityAvailable = 2, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UITouchType { + UITouchTypeDirect = 0, + UITouchTypeIndirect = 1, + UITouchTypePencil = 2, + UITouchTypeStylus = UITouchTypePencil, + UITouchTypeIndirectPointer = 3, + } +); + +ns_options!( + #[underlying(NSInteger)] + pub enum UITouchProperties { + UITouchPropertyForce = 1<<0, + UITouchPropertyAzimuth = 1<<1, + UITouchPropertyAltitude = 1<<2, + UITouchPropertyLocation = 1<<3, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UITouch; + + unsafe impl ClassType for UITouch { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UITouch { + #[method(timestamp)] + pub unsafe fn timestamp(&self, ) -> NSTimeInterval; + + #[method(phase)] + pub unsafe fn phase(&self, ) -> UITouchPhase; + + #[method(tapCount)] + pub unsafe fn tapCount(&self, ) -> NSUInteger; + + #[method(type)] + pub unsafe fn type_(&self, ) -> UITouchType; + + #[method(majorRadius)] + pub unsafe fn majorRadius(&self, ) -> CGFloat; + + #[method(majorRadiusTolerance)] + pub unsafe fn majorRadiusTolerance(&self, ) -> CGFloat; + + #[method_id(@__retain_semantics Other window)] + pub unsafe fn window(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other view)] + pub unsafe fn view(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other gestureRecognizers)] + pub unsafe fn gestureRecognizers(&self, ) -> Option, Shared>>; + + #[method(locationInView:)] + pub unsafe fn locationInView(&self, view: Option<&UIView>,) -> CGPoint; + + #[method(previousLocationInView:)] + pub unsafe fn previousLocationInView(&self, view: Option<&UIView>,) -> CGPoint; + + #[method(preciseLocationInView:)] + pub unsafe fn preciseLocationInView(&self, view: Option<&UIView>,) -> CGPoint; + + #[method(precisePreviousLocationInView:)] + pub unsafe fn precisePreviousLocationInView(&self, view: Option<&UIView>,) -> CGPoint; + + #[method(force)] + pub unsafe fn force(&self, ) -> CGFloat; + + #[method(maximumPossibleForce)] + pub unsafe fn maximumPossibleForce(&self, ) -> CGFloat; + + #[method(azimuthAngleInView:)] + pub unsafe fn azimuthAngleInView(&self, view: Option<&UIView>,) -> CGFloat; + + #[method(azimuthUnitVectorInView:)] + pub unsafe fn azimuthUnitVectorInView(&self, view: Option<&UIView>,) -> CGVector; + + #[method(altitudeAngle)] + pub unsafe fn altitudeAngle(&self, ) -> CGFloat; + + #[method_id(@__retain_semantics Other estimationUpdateIndex)] + pub unsafe fn estimationUpdateIndex(&self, ) -> Option>; + + #[method(estimatedProperties)] + pub unsafe fn estimatedProperties(&self, ) -> UITouchProperties; + + #[method(estimatedPropertiesExpectingUpdates)] + pub unsafe fn estimatedPropertiesExpectingUpdates(&self, ) -> UITouchProperties; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UITrackingLayoutGuide.rs b/crates/icrate-generated/src/UIKit/generated/UITrackingLayoutGuide.rs new file mode 100644 index 000000000..39f112671 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UITrackingLayoutGuide.rs @@ -0,0 +1,33 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UITrackingLayoutGuide; + + unsafe impl ClassType for UITrackingLayoutGuide { + type Super = UILayoutGuide; + } +); + +extern_methods!( + unsafe impl UITrackingLayoutGuide { + #[method(setConstraints:activeWhenNearEdge:)] + pub unsafe fn setConstraints_activeWhenNearEdge(&self, trackingConstraints: &NSArray,edge: NSDirectionalRectEdge,); + + #[method_id(@__retain_semantics Other constraintsActiveWhenNearEdge:)] + pub unsafe fn constraintsActiveWhenNearEdge(&self, edge: NSDirectionalRectEdge,) -> Id, Shared>; + + #[method(setConstraints:activeWhenAwayFromEdge:)] + pub unsafe fn setConstraints_activeWhenAwayFromEdge(&self, trackingConstraints: &NSArray,edge: NSDirectionalRectEdge,); + + #[method_id(@__retain_semantics Other constraintsActiveWhenAwayFromEdge:)] + pub unsafe fn constraintsActiveWhenAwayFromEdge(&self, edge: NSDirectionalRectEdge,) -> Id, Shared>; + + #[method(removeAllTrackedConstraints)] + pub unsafe fn removeAllTrackedConstraints(&self, ); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UITraitCollection.rs b/crates/icrate-generated/src/UIKit/generated/UITraitCollection.rs new file mode 100644 index 000000000..6030a046f --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UITraitCollection.rs @@ -0,0 +1,160 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UITraitCollection; + + unsafe impl ClassType for UITraitCollection { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UITraitCollection { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method(containsTraitsInCollection:)] + pub unsafe fn containsTraitsInCollection(&self, trait_: Option<&UITraitCollection>,) -> bool; + + #[method_id(@__retain_semantics Other traitCollectionWithTraitsFromCollections:)] + pub unsafe fn traitCollectionWithTraitsFromCollections(traitCollections: &NSArray,) -> Id; + + #[method_id(@__retain_semantics Other traitCollectionWithUserInterfaceIdiom:)] + pub unsafe fn traitCollectionWithUserInterfaceIdiom(idiom: UIUserInterfaceIdiom,) -> Id; + + #[method(userInterfaceIdiom)] + pub unsafe fn userInterfaceIdiom(&self, ) -> UIUserInterfaceIdiom; + + #[method_id(@__retain_semantics Other traitCollectionWithUserInterfaceStyle:)] + pub unsafe fn traitCollectionWithUserInterfaceStyle(userInterfaceStyle: UIUserInterfaceStyle,) -> Id; + + #[method(userInterfaceStyle)] + pub unsafe fn userInterfaceStyle(&self, ) -> UIUserInterfaceStyle; + + #[method_id(@__retain_semantics Other traitCollectionWithLayoutDirection:)] + pub unsafe fn traitCollectionWithLayoutDirection(layoutDirection: UITraitEnvironmentLayoutDirection,) -> Id; + + #[method(layoutDirection)] + pub unsafe fn layoutDirection(&self, ) -> UITraitEnvironmentLayoutDirection; + + #[method_id(@__retain_semantics Other traitCollectionWithDisplayScale:)] + pub unsafe fn traitCollectionWithDisplayScale(scale: CGFloat,) -> Id; + + #[method(displayScale)] + pub unsafe fn displayScale(&self, ) -> CGFloat; + + #[method_id(@__retain_semantics Other traitCollectionWithHorizontalSizeClass:)] + pub unsafe fn traitCollectionWithHorizontalSizeClass(horizontalSizeClass: UIUserInterfaceSizeClass,) -> Id; + + #[method(horizontalSizeClass)] + pub unsafe fn horizontalSizeClass(&self, ) -> UIUserInterfaceSizeClass; + + #[method_id(@__retain_semantics Other traitCollectionWithVerticalSizeClass:)] + pub unsafe fn traitCollectionWithVerticalSizeClass(verticalSizeClass: UIUserInterfaceSizeClass,) -> Id; + + #[method(verticalSizeClass)] + pub unsafe fn verticalSizeClass(&self, ) -> UIUserInterfaceSizeClass; + + #[method_id(@__retain_semantics Other traitCollectionWithForceTouchCapability:)] + pub unsafe fn traitCollectionWithForceTouchCapability(capability: UIForceTouchCapability,) -> Id; + + #[method(forceTouchCapability)] + pub unsafe fn forceTouchCapability(&self, ) -> UIForceTouchCapability; + + #[method_id(@__retain_semantics Other traitCollectionWithPreferredContentSizeCategory:)] + pub unsafe fn traitCollectionWithPreferredContentSizeCategory(preferredContentSizeCategory: &UIContentSizeCategory,) -> Id; + + #[method_id(@__retain_semantics Other preferredContentSizeCategory)] + pub unsafe fn preferredContentSizeCategory(&self, ) -> Id; + + #[method_id(@__retain_semantics Other traitCollectionWithDisplayGamut:)] + pub unsafe fn traitCollectionWithDisplayGamut(displayGamut: UIDisplayGamut,) -> Id; + + #[method(displayGamut)] + pub unsafe fn displayGamut(&self, ) -> UIDisplayGamut; + + #[method_id(@__retain_semantics Other traitCollectionWithAccessibilityContrast:)] + pub unsafe fn traitCollectionWithAccessibilityContrast(accessibilityContrast: UIAccessibilityContrast,) -> Id; + + #[method(accessibilityContrast)] + pub unsafe fn accessibilityContrast(&self, ) -> UIAccessibilityContrast; + + #[method_id(@__retain_semantics Other traitCollectionWithUserInterfaceLevel:)] + pub unsafe fn traitCollectionWithUserInterfaceLevel(userInterfaceLevel: UIUserInterfaceLevel,) -> Id; + + #[method(userInterfaceLevel)] + pub unsafe fn userInterfaceLevel(&self, ) -> UIUserInterfaceLevel; + + #[method_id(@__retain_semantics Other traitCollectionWithLegibilityWeight:)] + pub unsafe fn traitCollectionWithLegibilityWeight(legibilityWeight: UILegibilityWeight,) -> Id; + + #[method(legibilityWeight)] + pub unsafe fn legibilityWeight(&self, ) -> UILegibilityWeight; + + #[method_id(@__retain_semantics Other traitCollectionWithActiveAppearance:)] + pub unsafe fn traitCollectionWithActiveAppearance(userInterfaceActiveAppearance: UIUserInterfaceActiveAppearance,) -> Id; + + #[method(activeAppearance)] + pub unsafe fn activeAppearance(&self, ) -> UIUserInterfaceActiveAppearance; + + #[method_id(@__retain_semantics Other traitCollectionWithToolbarItemPresentationSize:)] + pub unsafe fn traitCollectionWithToolbarItemPresentationSize(toolbarItemPresentationSize: UINSToolbarItemPresentationSize,) -> Id; + + #[method(toolbarItemPresentationSize)] + pub unsafe fn toolbarItemPresentationSize(&self, ) -> UINSToolbarItemPresentationSize; + + } +); + +extern_protocol!( + pub struct UITraitEnvironment; + + unsafe impl UITraitEnvironment { + #[method_id(@__retain_semantics Other traitCollection)] + pub unsafe fn traitCollection(&self, ) -> Id; + + #[method(traitCollectionDidChange:)] + pub unsafe fn traitCollectionDidChange(&self, previousTraitCollection: Option<&UITraitCollection>,); + + } +); + +extern_methods!( + /// CurrentTraitCollection + unsafe impl UITraitCollection { + #[method_id(@__retain_semantics Other currentTraitCollection)] + pub unsafe fn currentTraitCollection() -> Id; + + #[method(setCurrentTraitCollection:)] + pub unsafe fn setCurrentTraitCollection(currentTraitCollection: &UITraitCollection,); + + #[method(performAsCurrentTraitCollection:)] + pub unsafe fn performAsCurrentTraitCollection(&self, actions: &Block<(), ()>,); + + } +); + +extern_methods!( + /// DynamicAppearance + unsafe impl UITraitCollection { + #[method(hasDifferentColorAppearanceComparedToTraitCollection:)] + pub unsafe fn hasDifferentColorAppearanceComparedToTraitCollection(&self, traitCollection: Option<&UITraitCollection>,) -> bool; + + } +); + +extern_methods!( + /// ImageConfiguration + unsafe impl UITraitCollection { + #[method_id(@__retain_semantics Other imageConfiguration)] + pub unsafe fn imageConfiguration(&self, ) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIUserActivity.rs b/crates/icrate-generated/src/UIKit/generated/UIUserActivity.rs new file mode 100644 index 000000000..d92ba9b64 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIUserActivity.rs @@ -0,0 +1,14 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_protocol!( + pub struct UIUserActivityRestoring; + + unsafe impl UIUserActivityRestoring { + #[method(restoreUserActivityState:)] + pub unsafe fn restoreUserActivityState(&self, userActivity: &NSUserActivity,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIUserNotificationSettings.rs b/crates/icrate-generated/src/UIKit/generated/UIUserNotificationSettings.rs new file mode 100644 index 000000000..ba7758de6 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIUserNotificationSettings.rs @@ -0,0 +1,211 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_options!( + #[underlying(NSUInteger)] + pub enum UIUserNotificationType { + UIUserNotificationTypeNone = 0, + UIUserNotificationTypeBadge = 1<<0, + UIUserNotificationTypeSound = 1<<1, + UIUserNotificationTypeAlert = 1<<2, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum UIUserNotificationActionBehavior { + UIUserNotificationActionBehaviorDefault = 0, + UIUserNotificationActionBehaviorTextInput = 1, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum UIUserNotificationActivationMode { + UIUserNotificationActivationModeForeground = 0, + UIUserNotificationActivationModeBackground = 1, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum UIUserNotificationActionContext { + UIUserNotificationActionContextDefault = 0, + UIUserNotificationActionContextMinimal = 1, + } +); + +extern_static!(UIUserNotificationTextInputActionButtonTitleKey: &'static NSString); + +extern_static!(UIUserNotificationActionResponseTypedTextKey: &'static NSString); + +extern_class!( + #[derive(Debug)] + pub struct UIUserNotificationSettings; + + unsafe impl ClassType for UIUserNotificationSettings { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIUserNotificationSettings { + #[method_id(@__retain_semantics Other settingsForTypes:categories:)] + pub unsafe fn settingsForTypes_categories(types: UIUserNotificationType,categories: Option<&NSSet>,) -> Id; + + #[method(types)] + pub unsafe fn types(&self, ) -> UIUserNotificationType; + + #[method_id(@__retain_semantics Other categories)] + pub unsafe fn categories(&self, ) -> Option, Shared>>; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIUserNotificationCategory; + + unsafe impl ClassType for UIUserNotificationCategory { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIUserNotificationCategory { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method_id(@__retain_semantics Other identifier)] + pub unsafe fn identifier(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other actionsForContext:)] + pub unsafe fn actionsForContext(&self, context: UIUserNotificationActionContext,) -> Option, Shared>>; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIMutableUserNotificationCategory; + + unsafe impl ClassType for UIMutableUserNotificationCategory { + type Super = UIUserNotificationCategory; + } +); + +extern_methods!( + unsafe impl UIMutableUserNotificationCategory { + #[method_id(@__retain_semantics Other identifier)] + pub unsafe fn identifier(&self, ) -> Option>; + + #[method(setIdentifier:)] + pub unsafe fn setIdentifier(&self, identifier: Option<&NSString>,); + + #[method(setActions:forContext:)] + pub unsafe fn setActions_forContext(&self, actions: Option<&NSArray>,context: UIUserNotificationActionContext,); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIUserNotificationAction; + + unsafe impl ClassType for UIUserNotificationAction { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIUserNotificationAction { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method_id(@__retain_semantics Other identifier)] + pub unsafe fn identifier(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other title)] + pub unsafe fn title(&self, ) -> Option>; + + #[method(behavior)] + pub unsafe fn behavior(&self, ) -> UIUserNotificationActionBehavior; + + #[method_id(@__retain_semantics Other parameters)] + pub unsafe fn parameters(&self, ) -> Id; + + #[method(activationMode)] + pub unsafe fn activationMode(&self, ) -> UIUserNotificationActivationMode; + + #[method(isAuthenticationRequired)] + pub unsafe fn isAuthenticationRequired(&self, ) -> bool; + + #[method(isDestructive)] + pub unsafe fn isDestructive(&self, ) -> bool; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIMutableUserNotificationAction; + + unsafe impl ClassType for UIMutableUserNotificationAction { + type Super = UIUserNotificationAction; + } +); + +extern_methods!( + unsafe impl UIMutableUserNotificationAction { + #[method_id(@__retain_semantics Other identifier)] + pub unsafe fn identifier(&self, ) -> Option>; + + #[method(setIdentifier:)] + pub unsafe fn setIdentifier(&self, identifier: Option<&NSString>,); + + #[method_id(@__retain_semantics Other title)] + pub unsafe fn title(&self, ) -> Option>; + + #[method(setTitle:)] + pub unsafe fn setTitle(&self, title: Option<&NSString>,); + + #[method(behavior)] + pub unsafe fn behavior(&self, ) -> UIUserNotificationActionBehavior; + + #[method(setBehavior:)] + pub unsafe fn setBehavior(&self, behavior: UIUserNotificationActionBehavior,); + + #[method_id(@__retain_semantics Other parameters)] + pub unsafe fn parameters(&self, ) -> Id; + + #[method(setParameters:)] + pub unsafe fn setParameters(&self, parameters: &NSDictionary,); + + #[method(activationMode)] + pub unsafe fn activationMode(&self, ) -> UIUserNotificationActivationMode; + + #[method(setActivationMode:)] + pub unsafe fn setActivationMode(&self, activationMode: UIUserNotificationActivationMode,); + + #[method(isAuthenticationRequired)] + pub unsafe fn isAuthenticationRequired(&self, ) -> bool; + + #[method(setAuthenticationRequired:)] + pub unsafe fn setAuthenticationRequired(&self, authenticationRequired: bool,); + + #[method(isDestructive)] + pub unsafe fn isDestructive(&self, ) -> bool; + + #[method(setDestructive:)] + pub unsafe fn setDestructive(&self, destructive: bool,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIVibrancyEffect.rs b/crates/icrate-generated/src/UIKit/generated/UIVibrancyEffect.rs new file mode 100644 index 000000000..c9fc562cc --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIVibrancyEffect.rs @@ -0,0 +1,44 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIVibrancyEffect; + + unsafe impl ClassType for UIVibrancyEffect { + type Super = UIVisualEffect; + } +); + +extern_methods!( + unsafe impl UIVibrancyEffect { + #[method_id(@__retain_semantics Other effectForBlurEffect:)] + pub unsafe fn effectForBlurEffect(blurEffect: &UIBlurEffect,) -> Id; + + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIVibrancyEffectStyle { + UIVibrancyEffectStyleLabel = 0, + UIVibrancyEffectStyleSecondaryLabel = 1, + UIVibrancyEffectStyleTertiaryLabel = 2, + UIVibrancyEffectStyleQuaternaryLabel = 3, + UIVibrancyEffectStyleFill = 4, + UIVibrancyEffectStyleSecondaryFill = 5, + UIVibrancyEffectStyleTertiaryFill = 6, + UIVibrancyEffectStyleSeparator = 7, + } +); + +extern_methods!( + /// AdditionalStyles + unsafe impl UIVibrancyEffect { + #[method_id(@__retain_semantics Other effectForBlurEffect:style:)] + pub unsafe fn effectForBlurEffect_style(blurEffect: &UIBlurEffect,style: UIVibrancyEffectStyle,) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIVideoEditorController.rs b/crates/icrate-generated/src/UIKit/generated/UIVideoEditorController.rs new file mode 100644 index 000000000..65dd34b88 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIVideoEditorController.rs @@ -0,0 +1,64 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIVideoEditorController; + + unsafe impl ClassType for UIVideoEditorController { + type Super = UINavigationController; + } +); + +extern_methods!( + unsafe impl UIVideoEditorController { + #[method(canEditVideoAtPath:)] + pub unsafe fn canEditVideoAtPath(videoPath: &NSString,) -> bool; + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&TodoProtocols>,); + + #[method_id(@__retain_semantics Other videoPath)] + pub unsafe fn videoPath(&self, ) -> Id; + + #[method(setVideoPath:)] + pub unsafe fn setVideoPath(&self, videoPath: &NSString,); + + #[method(videoMaximumDuration)] + pub unsafe fn videoMaximumDuration(&self, ) -> NSTimeInterval; + + #[method(setVideoMaximumDuration:)] + pub unsafe fn setVideoMaximumDuration(&self, videoMaximumDuration: NSTimeInterval,); + + #[method(videoQuality)] + pub unsafe fn videoQuality(&self, ) -> UIImagePickerControllerQualityType; + + #[method(setVideoQuality:)] + pub unsafe fn setVideoQuality(&self, videoQuality: UIImagePickerControllerQualityType,); + + } +); + +extern_protocol!( + pub struct UIVideoEditorControllerDelegate; + + unsafe impl UIVideoEditorControllerDelegate { + #[optional] + #[method(videoEditorController:didSaveEditedVideoToPath:)] + pub unsafe fn videoEditorController_didSaveEditedVideoToPath(&self, editor: &UIVideoEditorController,editedVideoPath: &NSString,); + + #[optional] + #[method(videoEditorController:didFailWithError:)] + pub unsafe fn videoEditorController_didFailWithError(&self, editor: &UIVideoEditorController,error: &NSError,); + + #[optional] + #[method(videoEditorControllerDidCancel:)] + pub unsafe fn videoEditorControllerDidCancel(&self, editor: &UIVideoEditorController,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIView.rs b/crates/icrate-generated/src/UIKit/generated/UIView.rs new file mode 100644 index 000000000..9f3d689f3 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIView.rs @@ -0,0 +1,945 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIViewAnimationCurve { + UIViewAnimationCurveEaseInOut = 0, + UIViewAnimationCurveEaseIn = 1, + UIViewAnimationCurveEaseOut = 2, + UIViewAnimationCurveLinear = 3, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIViewContentMode { + UIViewContentModeScaleToFill = 0, + UIViewContentModeScaleAspectFit = 1, + UIViewContentModeScaleAspectFill = 2, + UIViewContentModeRedraw = 3, + UIViewContentModeCenter = 4, + UIViewContentModeTop = 5, + UIViewContentModeBottom = 6, + UIViewContentModeLeft = 7, + UIViewContentModeRight = 8, + UIViewContentModeTopLeft = 9, + UIViewContentModeTopRight = 10, + UIViewContentModeBottomLeft = 11, + UIViewContentModeBottomRight = 12, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIViewAnimationTransition { + UIViewAnimationTransitionNone = 0, + UIViewAnimationTransitionFlipFromLeft = 1, + UIViewAnimationTransitionFlipFromRight = 2, + UIViewAnimationTransitionCurlUp = 3, + UIViewAnimationTransitionCurlDown = 4, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum UIViewAutoresizing { + UIViewAutoresizingNone = 0, + UIViewAutoresizingFlexibleLeftMargin = 1<<0, + UIViewAutoresizingFlexibleWidth = 1<<1, + UIViewAutoresizingFlexibleRightMargin = 1<<2, + UIViewAutoresizingFlexibleTopMargin = 1<<3, + UIViewAutoresizingFlexibleHeight = 1<<4, + UIViewAutoresizingFlexibleBottomMargin = 1<<5, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum UIViewAnimationOptions { + UIViewAnimationOptionLayoutSubviews = 1<<0, + UIViewAnimationOptionAllowUserInteraction = 1<<1, + UIViewAnimationOptionBeginFromCurrentState = 1<<2, + UIViewAnimationOptionRepeat = 1<<3, + UIViewAnimationOptionAutoreverse = 1<<4, + UIViewAnimationOptionOverrideInheritedDuration = 1<<5, + UIViewAnimationOptionOverrideInheritedCurve = 1<<6, + UIViewAnimationOptionAllowAnimatedContent = 1<<7, + UIViewAnimationOptionShowHideTransitionViews = 1<<8, + UIViewAnimationOptionOverrideInheritedOptions = 1<<9, + UIViewAnimationOptionCurveEaseInOut = 0<<16, + UIViewAnimationOptionCurveEaseIn = 1<<16, + UIViewAnimationOptionCurveEaseOut = 2<<16, + UIViewAnimationOptionCurveLinear = 3<<16, + UIViewAnimationOptionTransitionNone = 0<<20, + UIViewAnimationOptionTransitionFlipFromLeft = 1<<20, + UIViewAnimationOptionTransitionFlipFromRight = 2<<20, + UIViewAnimationOptionTransitionCurlUp = 3<<20, + UIViewAnimationOptionTransitionCurlDown = 4<<20, + UIViewAnimationOptionTransitionCrossDissolve = 5<<20, + UIViewAnimationOptionTransitionFlipFromTop = 6<<20, + UIViewAnimationOptionTransitionFlipFromBottom = 7<<20, + UIViewAnimationOptionPreferredFramesPerSecondDefault = 0<<24, + UIViewAnimationOptionPreferredFramesPerSecond60 = 3<<24, + UIViewAnimationOptionPreferredFramesPerSecond30 = 7<<24, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum UIViewKeyframeAnimationOptions { + UIViewKeyframeAnimationOptionLayoutSubviews = UIViewAnimationOptionLayoutSubviews, + UIViewKeyframeAnimationOptionAllowUserInteraction = UIViewAnimationOptionAllowUserInteraction, + UIViewKeyframeAnimationOptionBeginFromCurrentState = UIViewAnimationOptionBeginFromCurrentState, + UIViewKeyframeAnimationOptionRepeat = UIViewAnimationOptionRepeat, + UIViewKeyframeAnimationOptionAutoreverse = UIViewAnimationOptionAutoreverse, + UIViewKeyframeAnimationOptionOverrideInheritedDuration = UIViewAnimationOptionOverrideInheritedDuration, + UIViewKeyframeAnimationOptionOverrideInheritedOptions = UIViewAnimationOptionOverrideInheritedOptions, + UIViewKeyframeAnimationOptionCalculationModeLinear = 0<<10, + UIViewKeyframeAnimationOptionCalculationModeDiscrete = 1<<10, + UIViewKeyframeAnimationOptionCalculationModePaced = 2<<10, + UIViewKeyframeAnimationOptionCalculationModeCubic = 3<<10, + UIViewKeyframeAnimationOptionCalculationModeCubicPaced = 4<<10, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum UISystemAnimation { + UISystemAnimationDelete = 0, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIViewTintAdjustmentMode { + UIViewTintAdjustmentModeAutomatic = 0, + UIViewTintAdjustmentModeNormal = 1, + UIViewTintAdjustmentModeDimmed = 2, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UISemanticContentAttribute { + UISemanticContentAttributeUnspecified = 0, + UISemanticContentAttributePlayback = 1, + UISemanticContentAttributeSpatial = 2, + UISemanticContentAttributeForceLeftToRight = 3, + UISemanticContentAttributeForceRightToLeft = 4, + } +); + +extern_protocol!( + pub struct UICoordinateSpace; + + unsafe impl UICoordinateSpace { + #[method(convertPoint:toCoordinateSpace:)] + pub unsafe fn convertPoint_toCoordinateSpace(&self, point: CGPoint,coordinateSpace: &UICoordinateSpace,) -> CGPoint; + + #[method(convertPoint:fromCoordinateSpace:)] + pub unsafe fn convertPoint_fromCoordinateSpace(&self, point: CGPoint,coordinateSpace: &UICoordinateSpace,) -> CGPoint; + + #[method(convertRect:toCoordinateSpace:)] + pub unsafe fn convertRect_toCoordinateSpace(&self, rect: CGRect,coordinateSpace: &UICoordinateSpace,) -> CGRect; + + #[method(convertRect:fromCoordinateSpace:)] + pub unsafe fn convertRect_fromCoordinateSpace(&self, rect: CGRect,coordinateSpace: &UICoordinateSpace,) -> CGRect; + + #[method(bounds)] + pub unsafe fn bounds(&self, ) -> CGRect; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIView; + + unsafe impl ClassType for UIView { + type Super = UIResponder; + } +); + +extern_methods!( + unsafe impl UIView { + #[method(layerClass)] + pub unsafe fn layerClass() -> &'static Class; + + #[method_id(@__retain_semantics Init initWithFrame:)] + pub unsafe fn initWithFrame(this: Option>, frame: CGRect,) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method(isUserInteractionEnabled)] + pub unsafe fn isUserInteractionEnabled(&self, ) -> bool; + + #[method(setUserInteractionEnabled:)] + pub unsafe fn setUserInteractionEnabled(&self, userInteractionEnabled: bool,); + + #[method(tag)] + pub unsafe fn tag(&self, ) -> NSInteger; + + #[method(setTag:)] + pub unsafe fn setTag(&self, tag: NSInteger,); + + #[method_id(@__retain_semantics Other layer)] + pub unsafe fn layer(&self, ) -> Id; + + #[method(canBecomeFocused)] + pub unsafe fn canBecomeFocused(&self, ) -> bool; + + #[method(isFocused)] + pub unsafe fn isFocused(&self, ) -> bool; + + #[method_id(@__retain_semantics Other focusGroupIdentifier)] + pub unsafe fn focusGroupIdentifier(&self, ) -> Option>; + + #[method(setFocusGroupIdentifier:)] + pub unsafe fn setFocusGroupIdentifier(&self, focusGroupIdentifier: Option<&NSString>,); + + #[method(focusGroupPriority)] + pub unsafe fn focusGroupPriority(&self, ) -> UIFocusGroupPriority; + + #[method(setFocusGroupPriority:)] + pub unsafe fn setFocusGroupPriority(&self, focusGroupPriority: UIFocusGroupPriority,); + + #[method_id(@__retain_semantics Other focusEffect)] + pub unsafe fn focusEffect(&self, ) -> Option>; + + #[method(setFocusEffect:)] + pub unsafe fn setFocusEffect(&self, focusEffect: Option<&UIFocusEffect>,); + + #[method(semanticContentAttribute)] + pub unsafe fn semanticContentAttribute(&self, ) -> UISemanticContentAttribute; + + #[method(setSemanticContentAttribute:)] + pub unsafe fn setSemanticContentAttribute(&self, semanticContentAttribute: UISemanticContentAttribute,); + + #[method(userInterfaceLayoutDirectionForSemanticContentAttribute:)] + pub unsafe fn userInterfaceLayoutDirectionForSemanticContentAttribute(attribute: UISemanticContentAttribute,) -> UIUserInterfaceLayoutDirection; + + #[method(userInterfaceLayoutDirectionForSemanticContentAttribute:relativeToLayoutDirection:)] + pub unsafe fn userInterfaceLayoutDirectionForSemanticContentAttribute_relativeToLayoutDirection(semanticContentAttribute: UISemanticContentAttribute,layoutDirection: UIUserInterfaceLayoutDirection,) -> UIUserInterfaceLayoutDirection; + + #[method(effectiveUserInterfaceLayoutDirection)] + pub unsafe fn effectiveUserInterfaceLayoutDirection(&self, ) -> UIUserInterfaceLayoutDirection; + + } +); + +extern_methods!( + /// UIViewGeometry + unsafe impl UIView { + #[method(frame)] + pub unsafe fn frame(&self, ) -> CGRect; + + #[method(setFrame:)] + pub unsafe fn setFrame(&self, frame: CGRect,); + + #[method(bounds)] + pub unsafe fn bounds(&self, ) -> CGRect; + + #[method(setBounds:)] + pub unsafe fn setBounds(&self, bounds: CGRect,); + + #[method(center)] + pub unsafe fn center(&self, ) -> CGPoint; + + #[method(setCenter:)] + pub unsafe fn setCenter(&self, center: CGPoint,); + + #[method(transform)] + pub unsafe fn transform(&self, ) -> CGAffineTransform; + + #[method(setTransform:)] + pub unsafe fn setTransform(&self, transform: CGAffineTransform,); + + #[method(transform3D)] + pub unsafe fn transform3D(&self, ) -> CATransform3D; + + #[method(setTransform3D:)] + pub unsafe fn setTransform3D(&self, transform3D: CATransform3D,); + + #[method(contentScaleFactor)] + pub unsafe fn contentScaleFactor(&self, ) -> CGFloat; + + #[method(setContentScaleFactor:)] + pub unsafe fn setContentScaleFactor(&self, contentScaleFactor: CGFloat,); + + #[method(anchorPoint)] + pub unsafe fn anchorPoint(&self, ) -> CGPoint; + + #[method(setAnchorPoint:)] + pub unsafe fn setAnchorPoint(&self, anchorPoint: CGPoint,); + + #[method(isMultipleTouchEnabled)] + pub unsafe fn isMultipleTouchEnabled(&self, ) -> bool; + + #[method(setMultipleTouchEnabled:)] + pub unsafe fn setMultipleTouchEnabled(&self, multipleTouchEnabled: bool,); + + #[method(isExclusiveTouch)] + pub unsafe fn isExclusiveTouch(&self, ) -> bool; + + #[method(setExclusiveTouch:)] + pub unsafe fn setExclusiveTouch(&self, exclusiveTouch: bool,); + + #[method_id(@__retain_semantics Other hitTest:withEvent:)] + pub unsafe fn hitTest_withEvent(&self, point: CGPoint,event: Option<&UIEvent>,) -> Option>; + + #[method(pointInside:withEvent:)] + pub unsafe fn pointInside_withEvent(&self, point: CGPoint,event: Option<&UIEvent>,) -> bool; + + #[method(convertPoint:toView:)] + pub unsafe fn convertPoint_toView(&self, point: CGPoint,view: Option<&UIView>,) -> CGPoint; + + #[method(convertPoint:fromView:)] + pub unsafe fn convertPoint_fromView(&self, point: CGPoint,view: Option<&UIView>,) -> CGPoint; + + #[method(convertRect:toView:)] + pub unsafe fn convertRect_toView(&self, rect: CGRect,view: Option<&UIView>,) -> CGRect; + + #[method(convertRect:fromView:)] + pub unsafe fn convertRect_fromView(&self, rect: CGRect,view: Option<&UIView>,) -> CGRect; + + #[method(autoresizesSubviews)] + pub unsafe fn autoresizesSubviews(&self, ) -> bool; + + #[method(setAutoresizesSubviews:)] + pub unsafe fn setAutoresizesSubviews(&self, autoresizesSubviews: bool,); + + #[method(autoresizingMask)] + pub unsafe fn autoresizingMask(&self, ) -> UIViewAutoresizing; + + #[method(setAutoresizingMask:)] + pub unsafe fn setAutoresizingMask(&self, autoresizingMask: UIViewAutoresizing,); + + #[method(sizeThatFits:)] + pub unsafe fn sizeThatFits(&self, size: CGSize,) -> CGSize; + + #[method(sizeToFit)] + pub unsafe fn sizeToFit(&self, ); + + } +); + +extern_methods!( + /// UIViewHierarchy + unsafe impl UIView { + #[method_id(@__retain_semantics Other superview)] + pub unsafe fn superview(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other subviews)] + pub unsafe fn subviews(&self, ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other window)] + pub unsafe fn window(&self, ) -> Option>; + + #[method(removeFromSuperview)] + pub unsafe fn removeFromSuperview(&self, ); + + #[method(insertSubview:atIndex:)] + pub unsafe fn insertSubview_atIndex(&self, view: &UIView,index: NSInteger,); + + #[method(exchangeSubviewAtIndex:withSubviewAtIndex:)] + pub unsafe fn exchangeSubviewAtIndex_withSubviewAtIndex(&self, index1: NSInteger,index2: NSInteger,); + + #[method(addSubview:)] + pub unsafe fn addSubview(&self, view: &UIView,); + + #[method(insertSubview:belowSubview:)] + pub unsafe fn insertSubview_belowSubview(&self, view: &UIView,siblingSubview: &UIView,); + + #[method(insertSubview:aboveSubview:)] + pub unsafe fn insertSubview_aboveSubview(&self, view: &UIView,siblingSubview: &UIView,); + + #[method(bringSubviewToFront:)] + pub unsafe fn bringSubviewToFront(&self, view: &UIView,); + + #[method(sendSubviewToBack:)] + pub unsafe fn sendSubviewToBack(&self, view: &UIView,); + + #[method(didAddSubview:)] + pub unsafe fn didAddSubview(&self, subview: &UIView,); + + #[method(willRemoveSubview:)] + pub unsafe fn willRemoveSubview(&self, subview: &UIView,); + + #[method(willMoveToSuperview:)] + pub unsafe fn willMoveToSuperview(&self, newSuperview: Option<&UIView>,); + + #[method(didMoveToSuperview)] + pub unsafe fn didMoveToSuperview(&self, ); + + #[method(willMoveToWindow:)] + pub unsafe fn willMoveToWindow(&self, newWindow: Option<&UIWindow>,); + + #[method(didMoveToWindow)] + pub unsafe fn didMoveToWindow(&self, ); + + #[method(isDescendantOfView:)] + pub unsafe fn isDescendantOfView(&self, view: &UIView,) -> bool; + + #[method_id(@__retain_semantics Other viewWithTag:)] + pub unsafe fn viewWithTag(&self, tag: NSInteger,) -> Option>; + + #[method(setNeedsLayout)] + pub unsafe fn setNeedsLayout(&self, ); + + #[method(layoutIfNeeded)] + pub unsafe fn layoutIfNeeded(&self, ); + + #[method(layoutSubviews)] + pub unsafe fn layoutSubviews(&self, ); + + #[method(layoutMargins)] + pub unsafe fn layoutMargins(&self, ) -> UIEdgeInsets; + + #[method(setLayoutMargins:)] + pub unsafe fn setLayoutMargins(&self, layoutMargins: UIEdgeInsets,); + + #[method(directionalLayoutMargins)] + pub unsafe fn directionalLayoutMargins(&self, ) -> NSDirectionalEdgeInsets; + + #[method(setDirectionalLayoutMargins:)] + pub unsafe fn setDirectionalLayoutMargins(&self, directionalLayoutMargins: NSDirectionalEdgeInsets,); + + #[method(preservesSuperviewLayoutMargins)] + pub unsafe fn preservesSuperviewLayoutMargins(&self, ) -> bool; + + #[method(setPreservesSuperviewLayoutMargins:)] + pub unsafe fn setPreservesSuperviewLayoutMargins(&self, preservesSuperviewLayoutMargins: bool,); + + #[method(insetsLayoutMarginsFromSafeArea)] + pub unsafe fn insetsLayoutMarginsFromSafeArea(&self, ) -> bool; + + #[method(setInsetsLayoutMarginsFromSafeArea:)] + pub unsafe fn setInsetsLayoutMarginsFromSafeArea(&self, insetsLayoutMarginsFromSafeArea: bool,); + + #[method(layoutMarginsDidChange)] + pub unsafe fn layoutMarginsDidChange(&self, ); + + #[method(safeAreaInsets)] + pub unsafe fn safeAreaInsets(&self, ) -> UIEdgeInsets; + + #[method(safeAreaInsetsDidChange)] + pub unsafe fn safeAreaInsetsDidChange(&self, ); + + #[method_id(@__retain_semantics Other layoutMarginsGuide)] + pub unsafe fn layoutMarginsGuide(&self, ) -> Id; + + #[method_id(@__retain_semantics Other readableContentGuide)] + pub unsafe fn readableContentGuide(&self, ) -> Id; + + #[method_id(@__retain_semantics Other safeAreaLayoutGuide)] + pub unsafe fn safeAreaLayoutGuide(&self, ) -> Id; + + #[method_id(@__retain_semantics Other keyboardLayoutGuide)] + pub unsafe fn keyboardLayoutGuide(&self, ) -> Id; + + } +); + +extern_methods!( + /// UIViewRendering + unsafe impl UIView { + #[method(drawRect:)] + pub unsafe fn drawRect(&self, rect: CGRect,); + + #[method(setNeedsDisplay)] + pub unsafe fn setNeedsDisplay(&self, ); + + #[method(setNeedsDisplayInRect:)] + pub unsafe fn setNeedsDisplayInRect(&self, rect: CGRect,); + + #[method(clipsToBounds)] + pub unsafe fn clipsToBounds(&self, ) -> bool; + + #[method(setClipsToBounds:)] + pub unsafe fn setClipsToBounds(&self, clipsToBounds: bool,); + + #[method_id(@__retain_semantics Other backgroundColor)] + pub unsafe fn backgroundColor(&self, ) -> Option>; + + #[method(setBackgroundColor:)] + pub unsafe fn setBackgroundColor(&self, backgroundColor: Option<&UIColor>,); + + #[method(alpha)] + pub unsafe fn alpha(&self, ) -> CGFloat; + + #[method(setAlpha:)] + pub unsafe fn setAlpha(&self, alpha: CGFloat,); + + #[method(isOpaque)] + pub unsafe fn isOpaque(&self, ) -> bool; + + #[method(setOpaque:)] + pub unsafe fn setOpaque(&self, opaque: bool,); + + #[method(clearsContextBeforeDrawing)] + pub unsafe fn clearsContextBeforeDrawing(&self, ) -> bool; + + #[method(setClearsContextBeforeDrawing:)] + pub unsafe fn setClearsContextBeforeDrawing(&self, clearsContextBeforeDrawing: bool,); + + #[method(isHidden)] + pub unsafe fn isHidden(&self, ) -> bool; + + #[method(setHidden:)] + pub unsafe fn setHidden(&self, hidden: bool,); + + #[method(contentMode)] + pub unsafe fn contentMode(&self, ) -> UIViewContentMode; + + #[method(setContentMode:)] + pub unsafe fn setContentMode(&self, contentMode: UIViewContentMode,); + + #[method(contentStretch)] + pub unsafe fn contentStretch(&self, ) -> CGRect; + + #[method(setContentStretch:)] + pub unsafe fn setContentStretch(&self, contentStretch: CGRect,); + + #[method_id(@__retain_semantics Other maskView)] + pub unsafe fn maskView(&self, ) -> Option>; + + #[method(setMaskView:)] + pub unsafe fn setMaskView(&self, maskView: Option<&UIView>,); + + #[method_id(@__retain_semantics Other tintColor)] + pub unsafe fn tintColor(&self, ) -> Option>; + + #[method(setTintColor:)] + pub unsafe fn setTintColor(&self, tintColor: Option<&UIColor>,); + + #[method(tintAdjustmentMode)] + pub unsafe fn tintAdjustmentMode(&self, ) -> UIViewTintAdjustmentMode; + + #[method(setTintAdjustmentMode:)] + pub unsafe fn setTintAdjustmentMode(&self, tintAdjustmentMode: UIViewTintAdjustmentMode,); + + #[method(tintColorDidChange)] + pub unsafe fn tintColorDidChange(&self, ); + + } +); + +extern_methods!( + /// UIViewAnimation + unsafe impl UIView { + #[method(setAnimationsEnabled:)] + pub unsafe fn setAnimationsEnabled(enabled: bool,); + + #[method(areAnimationsEnabled)] + pub unsafe fn areAnimationsEnabled() -> bool; + + #[method(performWithoutAnimation:)] + pub unsafe fn performWithoutAnimation(actionsWithoutAnimation: &Block<(), ()>,); + + #[method(inheritedAnimationDuration)] + pub unsafe fn inheritedAnimationDuration() -> NSTimeInterval; + + } +); + +extern_methods!( + /// UIViewAnimationWithBlocks + unsafe impl UIView { + #[method(animateWithDuration:delay:options:animations:completion:)] + pub unsafe fn animateWithDuration_delay_options_animations_completion(duration: NSTimeInterval,delay: NSTimeInterval,options: UIViewAnimationOptions,animations: &Block<(), ()>,completion: Option<&Block<(Bool, ), ()>>,); + + #[method(animateWithDuration:animations:completion:)] + pub unsafe fn animateWithDuration_animations_completion(duration: NSTimeInterval,animations: &Block<(), ()>,completion: Option<&Block<(Bool, ), ()>>,); + + #[method(animateWithDuration:animations:)] + pub unsafe fn animateWithDuration_animations(duration: NSTimeInterval,animations: &Block<(), ()>,); + + #[method(animateWithDuration:delay:usingSpringWithDamping:initialSpringVelocity:options:animations:completion:)] + pub unsafe fn animateWithDuration_delay_usingSpringWithDamping_initialSpringVelocity_options_animations_completion(duration: NSTimeInterval,delay: NSTimeInterval,dampingRatio: CGFloat,velocity: CGFloat,options: UIViewAnimationOptions,animations: &Block<(), ()>,completion: Option<&Block<(Bool, ), ()>>,); + + #[method(transitionWithView:duration:options:animations:completion:)] + pub unsafe fn transitionWithView_duration_options_animations_completion(view: &UIView,duration: NSTimeInterval,options: UIViewAnimationOptions,animations: Option<&Block<(), ()>>,completion: Option<&Block<(Bool, ), ()>>,); + + #[method(transitionFromView:toView:duration:options:completion:)] + pub unsafe fn transitionFromView_toView_duration_options_completion(fromView: &UIView,toView: &UIView,duration: NSTimeInterval,options: UIViewAnimationOptions,completion: Option<&Block<(Bool, ), ()>>,); + + #[method(performSystemAnimation:onViews:options:animations:completion:)] + pub unsafe fn performSystemAnimation_onViews_options_animations_completion(animation: UISystemAnimation,views: &NSArray,options: UIViewAnimationOptions,parallelAnimations: Option<&Block<(), ()>>,completion: Option<&Block<(Bool, ), ()>>,); + + #[method(modifyAnimationsWithRepeatCount:autoreverses:animations:)] + pub unsafe fn modifyAnimationsWithRepeatCount_autoreverses_animations(count: CGFloat,autoreverses: bool,animations: &Block<(), ()>,); + + } +); + +extern_methods!( + /// UIViewKeyframeAnimations + unsafe impl UIView { + #[method(animateKeyframesWithDuration:delay:options:animations:completion:)] + pub unsafe fn animateKeyframesWithDuration_delay_options_animations_completion(duration: NSTimeInterval,delay: NSTimeInterval,options: UIViewKeyframeAnimationOptions,animations: &Block<(), ()>,completion: Option<&Block<(Bool, ), ()>>,); + + #[method(addKeyframeWithRelativeStartTime:relativeDuration:animations:)] + pub unsafe fn addKeyframeWithRelativeStartTime_relativeDuration_animations(frameStartTime: c_double,frameDuration: c_double,animations: &Block<(), ()>,); + + } +); + +extern_methods!( + /// UIViewGestureRecognizers + unsafe impl UIView { + #[method_id(@__retain_semantics Other gestureRecognizers)] + pub unsafe fn gestureRecognizers(&self, ) -> Option, Shared>>; + + #[method(setGestureRecognizers:)] + pub unsafe fn setGestureRecognizers(&self, gestureRecognizers: Option<&NSArray>,); + + #[method(addGestureRecognizer:)] + pub unsafe fn addGestureRecognizer(&self, gestureRecognizer: &UIGestureRecognizer,); + + #[method(removeGestureRecognizer:)] + pub unsafe fn removeGestureRecognizer(&self, gestureRecognizer: &UIGestureRecognizer,); + + #[method(gestureRecognizerShouldBegin:)] + pub unsafe fn gestureRecognizerShouldBegin(&self, gestureRecognizer: &UIGestureRecognizer,) -> bool; + + } +); + +extern_methods!( + /// UIViewMotionEffects + unsafe impl UIView { + #[method(addMotionEffect:)] + pub unsafe fn addMotionEffect(&self, effect: &UIMotionEffect,); + + #[method(removeMotionEffect:)] + pub unsafe fn removeMotionEffect(&self, effect: &UIMotionEffect,); + + #[method_id(@__retain_semantics Other motionEffects)] + pub unsafe fn motionEffects(&self, ) -> Id, Shared>; + + #[method(setMotionEffects:)] + pub unsafe fn setMotionEffects(&self, motionEffects: &NSArray,); + + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UILayoutConstraintAxis { + UILayoutConstraintAxisHorizontal = 0, + UILayoutConstraintAxisVertical = 1, + } +); + +extern_methods!( + /// UIConstraintBasedLayoutInstallingConstraints + unsafe impl UIView { + #[method_id(@__retain_semantics Other 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!( + /// UIConstraintBasedLayoutCoreMethods + unsafe impl UIView { + #[method(updateConstraintsIfNeeded)] + pub unsafe fn updateConstraintsIfNeeded(&self, ); + + #[method(updateConstraints)] + pub unsafe fn updateConstraints(&self, ); + + #[method(needsUpdateConstraints)] + pub unsafe fn needsUpdateConstraints(&self, ) -> bool; + + #[method(setNeedsUpdateConstraints)] + pub unsafe fn setNeedsUpdateConstraints(&self, ); + + } +); + +extern_methods!( + /// UIConstraintBasedCompatibility + unsafe impl UIView { + #[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_static!(UIViewNoIntrinsicMetric: CGFloat); + +extern_methods!( + /// UIConstraintBasedLayoutLayering + unsafe impl UIView { + #[method(alignmentRectForFrame:)] + pub unsafe fn alignmentRectForFrame(&self, frame: CGRect,) -> CGRect; + + #[method(frameForAlignmentRect:)] + pub unsafe fn frameForAlignmentRect(&self, alignmentRect: CGRect,) -> CGRect; + + #[method(alignmentRectInsets)] + pub unsafe fn alignmentRectInsets(&self, ) -> UIEdgeInsets; + + #[method_id(@__retain_semantics Other viewForBaselineLayout)] + pub unsafe fn viewForBaselineLayout(&self, ) -> Id; + + #[method_id(@__retain_semantics Other viewForFirstBaselineLayout)] + pub unsafe fn viewForFirstBaselineLayout(&self, ) -> Id; + + #[method_id(@__retain_semantics Other viewForLastBaselineLayout)] + pub unsafe fn viewForLastBaselineLayout(&self, ) -> Id; + + #[method(intrinsicContentSize)] + pub unsafe fn intrinsicContentSize(&self, ) -> CGSize; + + #[method(invalidateIntrinsicContentSize)] + pub unsafe fn invalidateIntrinsicContentSize(&self, ); + + #[method(contentHuggingPriorityForAxis:)] + pub unsafe fn contentHuggingPriorityForAxis(&self, axis: UILayoutConstraintAxis,) -> UILayoutPriority; + + #[method(setContentHuggingPriority:forAxis:)] + pub unsafe fn setContentHuggingPriority_forAxis(&self, priority: UILayoutPriority,axis: UILayoutConstraintAxis,); + + #[method(contentCompressionResistancePriorityForAxis:)] + pub unsafe fn contentCompressionResistancePriorityForAxis(&self, axis: UILayoutConstraintAxis,) -> UILayoutPriority; + + #[method(setContentCompressionResistancePriority:forAxis:)] + pub unsafe fn setContentCompressionResistancePriority_forAxis(&self, priority: UILayoutPriority,axis: UILayoutConstraintAxis,); + + } +); + +extern_static!(UILayoutFittingCompressedSize: CGSize); + +extern_static!(UILayoutFittingExpandedSize: CGSize); + +extern_methods!( + /// UIConstraintBasedLayoutFittingSize + unsafe impl UIView { + #[method(systemLayoutSizeFittingSize:)] + pub unsafe fn systemLayoutSizeFittingSize(&self, targetSize: CGSize,) -> CGSize; + + #[method(systemLayoutSizeFittingSize:withHorizontalFittingPriority:verticalFittingPriority:)] + pub unsafe fn systemLayoutSizeFittingSize_withHorizontalFittingPriority_verticalFittingPriority(&self, targetSize: CGSize,horizontalFittingPriority: UILayoutPriority,verticalFittingPriority: UILayoutPriority,) -> CGSize; + + } +); + +extern_methods!( + /// UILayoutGuideSupport + unsafe impl UIView { + #[method_id(@__retain_semantics Other layoutGuides)] + pub unsafe fn layoutGuides(&self, ) -> Id, Shared>; + + #[method(addLayoutGuide:)] + pub unsafe fn addLayoutGuide(&self, layoutGuide: &UILayoutGuide,); + + #[method(removeLayoutGuide:)] + pub unsafe fn removeLayoutGuide(&self, layoutGuide: &UILayoutGuide,); + + } +); + +extern_methods!( + /// UIViewLayoutConstraintCreation + unsafe impl UIView { + #[method_id(@__retain_semantics Other leadingAnchor)] + pub unsafe fn leadingAnchor(&self, ) -> Id; + + #[method_id(@__retain_semantics Other trailingAnchor)] + pub unsafe fn trailingAnchor(&self, ) -> Id; + + #[method_id(@__retain_semantics Other leftAnchor)] + pub unsafe fn leftAnchor(&self, ) -> Id; + + #[method_id(@__retain_semantics Other rightAnchor)] + pub unsafe fn rightAnchor(&self, ) -> Id; + + #[method_id(@__retain_semantics Other topAnchor)] + pub unsafe fn topAnchor(&self, ) -> Id; + + #[method_id(@__retain_semantics Other bottomAnchor)] + pub unsafe fn bottomAnchor(&self, ) -> Id; + + #[method_id(@__retain_semantics Other widthAnchor)] + pub unsafe fn widthAnchor(&self, ) -> Id; + + #[method_id(@__retain_semantics Other heightAnchor)] + pub unsafe fn heightAnchor(&self, ) -> Id; + + #[method_id(@__retain_semantics Other centerXAnchor)] + pub unsafe fn centerXAnchor(&self, ) -> Id; + + #[method_id(@__retain_semantics Other centerYAnchor)] + pub unsafe fn centerYAnchor(&self, ) -> Id; + + #[method_id(@__retain_semantics Other firstBaselineAnchor)] + pub unsafe fn firstBaselineAnchor(&self, ) -> Id; + + #[method_id(@__retain_semantics Other lastBaselineAnchor)] + pub unsafe fn lastBaselineAnchor(&self, ) -> Id; + + } +); + +extern_methods!( + /// UIConstraintBasedLayoutDebugging + unsafe impl UIView { + #[method_id(@__retain_semantics Other constraintsAffectingLayoutForAxis:)] + pub unsafe fn constraintsAffectingLayoutForAxis(&self, axis: UILayoutConstraintAxis,) -> Id, Shared>; + + #[method(hasAmbiguousLayout)] + pub unsafe fn hasAmbiguousLayout(&self, ) -> bool; + + #[method(exerciseAmbiguityInLayout)] + pub unsafe fn exerciseAmbiguityInLayout(&self, ); + + } +); + +extern_methods!( + /// UIConstraintBasedLayoutDebugging + unsafe impl UILayoutGuide { + #[method_id(@__retain_semantics Other constraintsAffectingLayoutForAxis:)] + pub unsafe fn constraintsAffectingLayoutForAxis(&self, axis: UILayoutConstraintAxis,) -> Id, Shared>; + + #[method(hasAmbiguousLayout)] + pub unsafe fn hasAmbiguousLayout(&self, ) -> bool; + + } +); + +extern_methods!( + /// UIStateRestoration + unsafe impl UIView { + #[method_id(@__retain_semantics Other restorationIdentifier)] + pub unsafe fn restorationIdentifier(&self, ) -> Option>; + + #[method(setRestorationIdentifier:)] + pub unsafe fn setRestorationIdentifier(&self, restorationIdentifier: Option<&NSString>,); + + #[method(encodeRestorableStateWithCoder:)] + pub unsafe fn encodeRestorableStateWithCoder(&self, coder: &NSCoder,); + + #[method(decodeRestorableStateWithCoder:)] + pub unsafe fn decodeRestorableStateWithCoder(&self, coder: &NSCoder,); + + } +); + +extern_methods!( + /// UISnapshotting + unsafe impl UIView { + #[method_id(@__retain_semantics Other snapshotViewAfterScreenUpdates:)] + pub unsafe fn snapshotViewAfterScreenUpdates(&self, afterUpdates: bool,) -> Option>; + + #[method_id(@__retain_semantics Other resizableSnapshotViewFromRect:afterScreenUpdates:withCapInsets:)] + pub unsafe fn resizableSnapshotViewFromRect_afterScreenUpdates_withCapInsets(&self, rect: CGRect,afterUpdates: bool,capInsets: UIEdgeInsets,) -> Option>; + + #[method(drawViewHierarchyInRect:afterScreenUpdates:)] + pub unsafe fn drawViewHierarchyInRect_afterScreenUpdates(&self, rect: CGRect,afterUpdates: bool,) -> bool; + + } +); + +extern_methods!( + /// DeprecatedAnimations + unsafe impl UIView { + #[method(beginAnimations:context:)] + pub unsafe fn beginAnimations_context(animationID: Option<&NSString>,context: *mut c_void,); + + #[method(commitAnimations)] + pub unsafe fn commitAnimations(); + + #[method(setAnimationDelegate:)] + pub unsafe fn setAnimationDelegate(delegate: Option<&Object>,); + + #[method(setAnimationWillStartSelector:)] + pub unsafe fn setAnimationWillStartSelector(selector: OptionSel,); + + #[method(setAnimationDidStopSelector:)] + pub unsafe fn setAnimationDidStopSelector(selector: OptionSel,); + + #[method(setAnimationDuration:)] + pub unsafe fn setAnimationDuration(duration: NSTimeInterval,); + + #[method(setAnimationDelay:)] + pub unsafe fn setAnimationDelay(delay: NSTimeInterval,); + + #[method(setAnimationStartDate:)] + pub unsafe fn setAnimationStartDate(startDate: &NSDate,); + + #[method(setAnimationCurve:)] + pub unsafe fn setAnimationCurve(curve: UIViewAnimationCurve,); + + #[method(setAnimationRepeatCount:)] + pub unsafe fn setAnimationRepeatCount(repeatCount: c_float,); + + #[method(setAnimationRepeatAutoreverses:)] + pub unsafe fn setAnimationRepeatAutoreverses(repeatAutoreverses: bool,); + + #[method(setAnimationBeginsFromCurrentState:)] + pub unsafe fn setAnimationBeginsFromCurrentState(fromCurrentState: bool,); + + #[method(setAnimationTransition:forView:cache:)] + pub unsafe fn setAnimationTransition_forView_cache(transition: UIViewAnimationTransition,view: &UIView,cache: bool,); + + } +); + +extern_methods!( + /// UserInterfaceStyle + unsafe impl UIView { + #[method(overrideUserInterfaceStyle)] + pub unsafe fn overrideUserInterfaceStyle(&self, ) -> UIUserInterfaceStyle; + + #[method(setOverrideUserInterfaceStyle:)] + pub unsafe fn setOverrideUserInterfaceStyle(&self, overrideUserInterfaceStyle: UIUserInterfaceStyle,); + + } +); + +extern_methods!( + /// UIContentSizeCategoryLimit + unsafe impl UIView { + #[method_id(@__retain_semantics Other minimumContentSizeCategory)] + pub unsafe fn minimumContentSizeCategory(&self, ) -> Option>; + + #[method(setMinimumContentSizeCategory:)] + pub unsafe fn setMinimumContentSizeCategory(&self, minimumContentSizeCategory: Option<&UIContentSizeCategory>,); + + #[method_id(@__retain_semantics Other maximumContentSizeCategory)] + pub unsafe fn maximumContentSizeCategory(&self, ) -> Option>; + + #[method(setMaximumContentSizeCategory:)] + pub unsafe fn setMaximumContentSizeCategory(&self, maximumContentSizeCategory: Option<&UIContentSizeCategory>,); + + #[method_id(@__retain_semantics Other appliedContentSizeCategoryLimitsDescription)] + pub unsafe fn appliedContentSizeCategoryLimitsDescription(&self, ) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIViewAnimating.rs b/crates/icrate-generated/src/UIKit/generated/UIViewAnimating.rs new file mode 100644 index 000000000..d299af334 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIViewAnimating.rs @@ -0,0 +1,85 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIViewAnimatingState { + UIViewAnimatingStateInactive = 0, + UIViewAnimatingStateActive = 1, + UIViewAnimatingStateStopped = 2, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIViewAnimatingPosition { + UIViewAnimatingPositionEnd = 0, + UIViewAnimatingPositionStart = 1, + UIViewAnimatingPositionCurrent = 2, + } +); + +extern_protocol!( + pub struct UIViewAnimating; + + unsafe impl UIViewAnimating { + #[method(state)] + pub unsafe fn state(&self, ) -> UIViewAnimatingState; + + #[method(isRunning)] + pub unsafe fn isRunning(&self, ) -> bool; + + #[method(isReversed)] + pub unsafe fn isReversed(&self, ) -> bool; + + #[method(setReversed:)] + pub unsafe fn setReversed(&self, reversed: bool,); + + #[method(fractionComplete)] + pub unsafe fn fractionComplete(&self, ) -> CGFloat; + + #[method(setFractionComplete:)] + pub unsafe fn setFractionComplete(&self, fractionComplete: CGFloat,); + + #[method(startAnimation)] + pub unsafe fn startAnimation(&self, ); + + #[method(startAnimationAfterDelay:)] + pub unsafe fn startAnimationAfterDelay(&self, delay: NSTimeInterval,); + + #[method(pauseAnimation)] + pub unsafe fn pauseAnimation(&self, ); + + #[method(stopAnimation:)] + pub unsafe fn stopAnimation(&self, withoutFinishing: bool,); + + #[method(finishAnimationAtPosition:)] + pub unsafe fn finishAnimationAtPosition(&self, finalPosition: UIViewAnimatingPosition,); + + } +); + +extern_protocol!( + pub struct UIViewImplicitlyAnimating; + + unsafe impl UIViewImplicitlyAnimating { + #[optional] + #[method(addAnimations:delayFactor:)] + pub unsafe fn addAnimations_delayFactor(&self, animation: &Block<(), ()>,delayFactor: CGFloat,); + + #[optional] + #[method(addAnimations:)] + pub unsafe fn addAnimations(&self, animation: &Block<(), ()>,); + + #[optional] + #[method(addCompletion:)] + pub unsafe fn addCompletion(&self, completion: &Block<(UIViewAnimatingPosition, ), ()>,); + + #[optional] + #[method(continueAnimationWithTimingParameters:durationFactor:)] + pub unsafe fn continueAnimationWithTimingParameters_durationFactor(&self, parameters: Option<&UITimingCurveProvider>,durationFactor: CGFloat,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIViewConfigurationState.rs b/crates/icrate-generated/src/UIKit/generated/UIViewConfigurationState.rs new file mode 100644 index 000000000..e056859cc --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIViewConfigurationState.rs @@ -0,0 +1,66 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIViewConfigurationState; + + unsafe impl ClassType for UIViewConfigurationState { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIViewConfigurationState { + #[method_id(@__retain_semantics Init initWithTraitCollection:)] + pub unsafe fn initWithTraitCollection(this: Option>, traitCollection: &UITraitCollection,) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics New new)] + pub unsafe fn new() -> Id; + + #[method_id(@__retain_semantics Other traitCollection)] + pub unsafe fn traitCollection(&self, ) -> Id; + + #[method(setTraitCollection:)] + pub unsafe fn setTraitCollection(&self, traitCollection: &UITraitCollection,); + + #[method(isDisabled)] + pub unsafe fn isDisabled(&self, ) -> bool; + + #[method(setDisabled:)] + pub unsafe fn setDisabled(&self, disabled: bool,); + + #[method(isHighlighted)] + pub unsafe fn isHighlighted(&self, ) -> bool; + + #[method(setHighlighted:)] + pub unsafe fn setHighlighted(&self, highlighted: bool,); + + #[method(isSelected)] + pub unsafe fn isSelected(&self, ) -> bool; + + #[method(setSelected:)] + pub unsafe fn setSelected(&self, selected: bool,); + + #[method(isFocused)] + pub unsafe fn isFocused(&self, ) -> bool; + + #[method(setFocused:)] + pub unsafe fn setFocused(&self, focused: bool,); + + #[method(isPinned)] + pub unsafe fn isPinned(&self, ) -> bool; + + #[method(setPinned:)] + pub unsafe fn setPinned(&self, pinned: bool,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIViewController.rs b/crates/icrate-generated/src/UIKit/generated/UIViewController.rs new file mode 100644 index 000000000..9301c9330 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIViewController.rs @@ -0,0 +1,758 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIModalTransitionStyle { + UIModalTransitionStyleCoverVertical = 0, + UIModalTransitionStyleFlipHorizontal = 1, + UIModalTransitionStyleCrossDissolve = 2, + UIModalTransitionStylePartialCurl = 3, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIModalPresentationStyle { + UIModalPresentationFullScreen = 0, + UIModalPresentationPageSheet = 1, + UIModalPresentationFormSheet = 2, + UIModalPresentationCurrentContext = 3, + UIModalPresentationCustom = 4, + UIModalPresentationOverFullScreen = 5, + UIModalPresentationOverCurrentContext = 6, + UIModalPresentationPopover = 7, + UIModalPresentationBlurOverFullScreen = 8, + UIModalPresentationNone = -1, + UIModalPresentationAutomatic = -2, + } +); + +extern_protocol!( + pub struct UIContentContainer; + + unsafe impl UIContentContainer { + #[method(preferredContentSize)] + pub unsafe fn preferredContentSize(&self, ) -> CGSize; + + #[method(preferredContentSizeDidChangeForChildContentContainer:)] + pub unsafe fn preferredContentSizeDidChangeForChildContentContainer(&self, container: &UIContentContainer,); + + #[method(systemLayoutFittingSizeDidChangeForChildContentContainer:)] + pub unsafe fn systemLayoutFittingSizeDidChangeForChildContentContainer(&self, container: &UIContentContainer,); + + #[method(sizeForChildContentContainer:withParentContainerSize:)] + pub unsafe fn sizeForChildContentContainer_withParentContainerSize(&self, container: &UIContentContainer,parentSize: CGSize,) -> CGSize; + + #[method(viewWillTransitionToSize:withTransitionCoordinator:)] + pub unsafe fn viewWillTransitionToSize_withTransitionCoordinator(&self, size: CGSize,coordinator: &UIViewControllerTransitionCoordinator,); + + #[method(willTransitionToTraitCollection:withTransitionCoordinator:)] + pub unsafe fn willTransitionToTraitCollection_withTransitionCoordinator(&self, newCollection: &UITraitCollection,coordinator: &UIViewControllerTransitionCoordinator,); + + } +); + +extern_static!(UIViewControllerShowDetailTargetDidChangeNotification: &'static NSNotificationName); + +extern_class!( + #[derive(Debug)] + pub struct UIViewController; + + unsafe impl ClassType for UIViewController { + type Super = UIResponder; + } +); + +extern_methods!( + unsafe impl UIViewController { + #[method_id(@__retain_semantics Init initWithNibName:bundle:)] + pub unsafe fn initWithNibName_bundle(this: Option>, nibNameOrNil: Option<&NSString>,nibBundleOrNil: Option<&NSBundle>,) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + #[method_id(@__retain_semantics Other view)] + pub unsafe fn view(&self, ) -> Option>; + + #[method(setView:)] + pub unsafe fn setView(&self, view: Option<&UIView>,); + + #[method(loadView)] + pub unsafe fn loadView(&self, ); + + #[method(loadViewIfNeeded)] + pub unsafe fn loadViewIfNeeded(&self, ); + + #[method_id(@__retain_semantics Other viewIfLoaded)] + pub unsafe fn viewIfLoaded(&self, ) -> Option>; + + #[method(viewWillUnload)] + pub unsafe fn viewWillUnload(&self, ); + + #[method(viewDidUnload)] + pub unsafe fn viewDidUnload(&self, ); + + #[method(viewDidLoad)] + pub unsafe fn viewDidLoad(&self, ); + + #[method(isViewLoaded)] + pub unsafe fn isViewLoaded(&self, ) -> bool; + + #[method_id(@__retain_semantics Other nibName)] + pub unsafe fn nibName(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other nibBundle)] + pub unsafe fn nibBundle(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other storyboard)] + pub unsafe fn storyboard(&self, ) -> Option>; + + #[method(performSegueWithIdentifier:sender:)] + pub unsafe fn performSegueWithIdentifier_sender(&self, identifier: &NSString,sender: Option<&Object>,); + + #[method(shouldPerformSegueWithIdentifier:sender:)] + pub unsafe fn shouldPerformSegueWithIdentifier_sender(&self, identifier: &NSString,sender: Option<&Object>,) -> bool; + + #[method(prepareForSegue:sender:)] + pub unsafe fn prepareForSegue_sender(&self, segue: &UIStoryboardSegue,sender: Option<&Object>,); + + #[method(canPerformUnwindSegueAction:fromViewController:sender:)] + pub unsafe fn canPerformUnwindSegueAction_fromViewController_sender(&self, action: Sel,fromViewController: &UIViewController,sender: Option<&Object>,) -> bool; + + #[method(canPerformUnwindSegueAction:fromViewController:withSender:)] + pub unsafe fn canPerformUnwindSegueAction_fromViewController_withSender(&self, action: Sel,fromViewController: &UIViewController,sender: &Object,) -> bool; + + #[method_id(@__retain_semantics Other allowedChildViewControllersForUnwindingFromSource:)] + pub unsafe fn allowedChildViewControllersForUnwindingFromSource(&self, source: &UIStoryboardUnwindSegueSource,) -> Id, Shared>; + + #[method_id(@__retain_semantics Other childViewControllerContainingSegueSource:)] + pub unsafe fn childViewControllerContainingSegueSource(&self, source: &UIStoryboardUnwindSegueSource,) -> Option>; + + #[method_id(@__retain_semantics Other viewControllerForUnwindSegueAction:fromViewController:withSender:)] + pub unsafe fn viewControllerForUnwindSegueAction_fromViewController_withSender(&self, action: Sel,fromViewController: &UIViewController,sender: Option<&Object>,) -> Option>; + + #[method(unwindForSegue:towardsViewController:)] + pub unsafe fn unwindForSegue_towardsViewController(&self, unwindSegue: &UIStoryboardSegue,subsequentVC: &UIViewController,); + + #[method_id(@__retain_semantics Other segueForUnwindingToViewController:fromViewController:identifier:)] + pub unsafe fn segueForUnwindingToViewController_fromViewController_identifier(&self, toViewController: &UIViewController,fromViewController: &UIViewController,identifier: Option<&NSString>,) -> Option>; + + #[method(viewWillAppear:)] + pub unsafe fn viewWillAppear(&self, animated: bool,); + + #[method(viewDidAppear:)] + pub unsafe fn viewDidAppear(&self, animated: bool,); + + #[method(viewWillDisappear:)] + pub unsafe fn viewWillDisappear(&self, animated: bool,); + + #[method(viewDidDisappear:)] + pub unsafe fn viewDidDisappear(&self, animated: bool,); + + #[method(viewWillLayoutSubviews)] + pub unsafe fn viewWillLayoutSubviews(&self, ); + + #[method(viewDidLayoutSubviews)] + pub unsafe fn viewDidLayoutSubviews(&self, ); + + #[method_id(@__retain_semantics Other title)] + pub unsafe fn title(&self, ) -> Option>; + + #[method(setTitle:)] + pub unsafe fn setTitle(&self, title: Option<&NSString>,); + + #[method(didReceiveMemoryWarning)] + pub unsafe fn didReceiveMemoryWarning(&self, ); + + #[method_id(@__retain_semantics Other parentViewController)] + pub unsafe fn parentViewController(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other modalViewController)] + pub unsafe fn modalViewController(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other presentedViewController)] + pub unsafe fn presentedViewController(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other presentingViewController)] + pub unsafe fn presentingViewController(&self, ) -> Option>; + + #[method(definesPresentationContext)] + pub unsafe fn definesPresentationContext(&self, ) -> bool; + + #[method(setDefinesPresentationContext:)] + pub unsafe fn setDefinesPresentationContext(&self, definesPresentationContext: bool,); + + #[method(providesPresentationContextTransitionStyle)] + pub unsafe fn providesPresentationContextTransitionStyle(&self, ) -> bool; + + #[method(setProvidesPresentationContextTransitionStyle:)] + pub unsafe fn setProvidesPresentationContextTransitionStyle(&self, providesPresentationContextTransitionStyle: bool,); + + #[method(restoresFocusAfterTransition)] + pub unsafe fn restoresFocusAfterTransition(&self, ) -> bool; + + #[method(setRestoresFocusAfterTransition:)] + pub unsafe fn setRestoresFocusAfterTransition(&self, restoresFocusAfterTransition: bool,); + + #[method_id(@__retain_semantics Other focusGroupIdentifier)] + pub unsafe fn focusGroupIdentifier(&self, ) -> Option>; + + #[method(setFocusGroupIdentifier:)] + pub unsafe fn setFocusGroupIdentifier(&self, focusGroupIdentifier: Option<&NSString>,); + + #[method_id(@__retain_semantics Other interactionActivityTrackingBaseName)] + pub unsafe fn interactionActivityTrackingBaseName(&self, ) -> Option>; + + #[method(setInteractionActivityTrackingBaseName:)] + pub unsafe fn setInteractionActivityTrackingBaseName(&self, interactionActivityTrackingBaseName: Option<&NSString>,); + + #[method(isBeingPresented)] + pub unsafe fn isBeingPresented(&self, ) -> bool; + + #[method(isBeingDismissed)] + pub unsafe fn isBeingDismissed(&self, ) -> bool; + + #[method(isMovingToParentViewController)] + pub unsafe fn isMovingToParentViewController(&self, ) -> bool; + + #[method(isMovingFromParentViewController)] + pub unsafe fn isMovingFromParentViewController(&self, ) -> bool; + + #[method(presentViewController:animated:completion:)] + pub unsafe fn presentViewController_animated_completion(&self, viewControllerToPresent: &UIViewController,flag: bool,completion: Option<&Block<(), ()>>,); + + #[method(dismissViewControllerAnimated:completion:)] + pub unsafe fn dismissViewControllerAnimated_completion(&self, flag: bool,completion: Option<&Block<(), ()>>,); + + #[method(presentModalViewController:animated:)] + pub unsafe fn presentModalViewController_animated(&self, modalViewController: &UIViewController,animated: bool,); + + #[method(dismissModalViewControllerAnimated:)] + pub unsafe fn dismissModalViewControllerAnimated(&self, animated: bool,); + + #[method(modalTransitionStyle)] + pub unsafe fn modalTransitionStyle(&self, ) -> UIModalTransitionStyle; + + #[method(setModalTransitionStyle:)] + pub unsafe fn setModalTransitionStyle(&self, modalTransitionStyle: UIModalTransitionStyle,); + + #[method(modalPresentationStyle)] + pub unsafe fn modalPresentationStyle(&self, ) -> UIModalPresentationStyle; + + #[method(setModalPresentationStyle:)] + pub unsafe fn setModalPresentationStyle(&self, modalPresentationStyle: UIModalPresentationStyle,); + + #[method(modalPresentationCapturesStatusBarAppearance)] + pub unsafe fn modalPresentationCapturesStatusBarAppearance(&self, ) -> bool; + + #[method(setModalPresentationCapturesStatusBarAppearance:)] + pub unsafe fn setModalPresentationCapturesStatusBarAppearance(&self, modalPresentationCapturesStatusBarAppearance: bool,); + + #[method(disablesAutomaticKeyboardDismissal)] + pub unsafe fn disablesAutomaticKeyboardDismissal(&self, ) -> bool; + + #[method(wantsFullScreenLayout)] + pub unsafe fn wantsFullScreenLayout(&self, ) -> bool; + + #[method(setWantsFullScreenLayout:)] + pub unsafe fn setWantsFullScreenLayout(&self, wantsFullScreenLayout: bool,); + + #[method(edgesForExtendedLayout)] + pub unsafe fn edgesForExtendedLayout(&self, ) -> UIRectEdge; + + #[method(setEdgesForExtendedLayout:)] + pub unsafe fn setEdgesForExtendedLayout(&self, edgesForExtendedLayout: UIRectEdge,); + + #[method(extendedLayoutIncludesOpaqueBars)] + pub unsafe fn extendedLayoutIncludesOpaqueBars(&self, ) -> bool; + + #[method(setExtendedLayoutIncludesOpaqueBars:)] + pub unsafe fn setExtendedLayoutIncludesOpaqueBars(&self, extendedLayoutIncludesOpaqueBars: bool,); + + #[method(automaticallyAdjustsScrollViewInsets)] + pub unsafe fn automaticallyAdjustsScrollViewInsets(&self, ) -> bool; + + #[method(setAutomaticallyAdjustsScrollViewInsets:)] + pub unsafe fn setAutomaticallyAdjustsScrollViewInsets(&self, automaticallyAdjustsScrollViewInsets: bool,); + + #[method(setContentScrollView:forEdge:)] + pub unsafe fn setContentScrollView_forEdge(&self, scrollView: Option<&UIScrollView>,edge: NSDirectionalRectEdge,); + + #[method_id(@__retain_semantics Other contentScrollViewForEdge:)] + pub unsafe fn contentScrollViewForEdge(&self, edge: NSDirectionalRectEdge,) -> Option>; + + #[method(preferredContentSize)] + pub unsafe fn preferredContentSize(&self, ) -> CGSize; + + #[method(setPreferredContentSize:)] + pub unsafe fn setPreferredContentSize(&self, preferredContentSize: CGSize,); + + #[method(preferredStatusBarStyle)] + pub unsafe fn preferredStatusBarStyle(&self, ) -> UIStatusBarStyle; + + #[method(prefersStatusBarHidden)] + pub unsafe fn prefersStatusBarHidden(&self, ) -> bool; + + #[method(preferredStatusBarUpdateAnimation)] + pub unsafe fn preferredStatusBarUpdateAnimation(&self, ) -> UIStatusBarAnimation; + + #[method(setNeedsStatusBarAppearanceUpdate)] + pub unsafe fn setNeedsStatusBarAppearanceUpdate(&self, ); + + #[method_id(@__retain_semantics Other targetViewControllerForAction:sender:)] + pub unsafe fn targetViewControllerForAction_sender(&self, action: Sel,sender: Option<&Object>,) -> Option>; + + #[method(showViewController:sender:)] + pub unsafe fn showViewController_sender(&self, vc: &UIViewController,sender: Option<&Object>,); + + #[method(showDetailViewController:sender:)] + pub unsafe fn showDetailViewController_sender(&self, vc: &UIViewController,sender: Option<&Object>,); + + #[method(preferredUserInterfaceStyle)] + pub unsafe fn preferredUserInterfaceStyle(&self, ) -> UIUserInterfaceStyle; + + #[method(setNeedsUserInterfaceAppearanceUpdate)] + pub unsafe fn setNeedsUserInterfaceAppearanceUpdate(&self, ); + + #[method(overrideUserInterfaceStyle)] + pub unsafe fn overrideUserInterfaceStyle(&self, ) -> UIUserInterfaceStyle; + + #[method(setOverrideUserInterfaceStyle:)] + pub unsafe fn setOverrideUserInterfaceStyle(&self, overrideUserInterfaceStyle: UIUserInterfaceStyle,); + + } +); + +extern_methods!( + /// UIViewControllerRotation + unsafe impl UIViewController { + #[method(attemptRotationToDeviceOrientation)] + pub unsafe fn attemptRotationToDeviceOrientation(); + + #[method(shouldAutorotateToInterfaceOrientation:)] + pub unsafe fn shouldAutorotateToInterfaceOrientation(&self, toInterfaceOrientation: UIInterfaceOrientation,) -> bool; + + #[method(shouldAutorotate)] + pub unsafe fn shouldAutorotate(&self, ) -> bool; + + #[method(supportedInterfaceOrientations)] + pub unsafe fn supportedInterfaceOrientations(&self, ) -> UIInterfaceOrientationMask; + + #[method(preferredInterfaceOrientationForPresentation)] + pub unsafe fn preferredInterfaceOrientationForPresentation(&self, ) -> UIInterfaceOrientation; + + #[method(setNeedsUpdateOfSupportedInterfaceOrientations)] + pub unsafe fn setNeedsUpdateOfSupportedInterfaceOrientations(&self, ); + + #[method_id(@__retain_semantics Other rotatingHeaderView)] + pub unsafe fn rotatingHeaderView(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other rotatingFooterView)] + pub unsafe fn rotatingFooterView(&self, ) -> Option>; + + #[method(interfaceOrientation)] + pub unsafe fn interfaceOrientation(&self, ) -> UIInterfaceOrientation; + + #[method(willRotateToInterfaceOrientation:duration:)] + pub unsafe fn willRotateToInterfaceOrientation_duration(&self, toInterfaceOrientation: UIInterfaceOrientation,duration: NSTimeInterval,); + + #[method(didRotateFromInterfaceOrientation:)] + pub unsafe fn didRotateFromInterfaceOrientation(&self, fromInterfaceOrientation: UIInterfaceOrientation,); + + #[method(willAnimateRotationToInterfaceOrientation:duration:)] + pub unsafe fn willAnimateRotationToInterfaceOrientation_duration(&self, toInterfaceOrientation: UIInterfaceOrientation,duration: NSTimeInterval,); + + #[method(willAnimateFirstHalfOfRotationToInterfaceOrientation:duration:)] + pub unsafe fn willAnimateFirstHalfOfRotationToInterfaceOrientation_duration(&self, toInterfaceOrientation: UIInterfaceOrientation,duration: NSTimeInterval,); + + #[method(didAnimateFirstHalfOfRotationToInterfaceOrientation:)] + pub unsafe fn didAnimateFirstHalfOfRotationToInterfaceOrientation(&self, toInterfaceOrientation: UIInterfaceOrientation,); + + #[method(willAnimateSecondHalfOfRotationFromInterfaceOrientation:duration:)] + pub unsafe fn willAnimateSecondHalfOfRotationFromInterfaceOrientation_duration(&self, fromInterfaceOrientation: UIInterfaceOrientation,duration: NSTimeInterval,); + + } +); + +extern_methods!( + /// UIViewControllerEditing + unsafe impl UIViewController { + #[method(isEditing)] + pub unsafe fn isEditing(&self, ) -> bool; + + #[method(setEditing:)] + pub unsafe fn setEditing(&self, editing: bool,); + + #[method(setEditing:animated:)] + pub unsafe fn setEditing_animated(&self, editing: bool,animated: bool,); + + #[method_id(@__retain_semantics Other editButtonItem)] + pub unsafe fn editButtonItem(&self, ) -> Id; + + } +); + +extern_methods!( + /// UISearchDisplayControllerSupport + unsafe impl UIViewController { + #[method_id(@__retain_semantics Other searchDisplayController)] + pub unsafe fn searchDisplayController(&self, ) -> Option>; + + } +); + +extern_static!(UIViewControllerHierarchyInconsistencyException: &'static NSExceptionName); + +extern_methods!( + /// UIContainerViewControllerProtectedMethods + unsafe impl UIViewController { + #[method_id(@__retain_semantics Other childViewControllers)] + pub unsafe fn childViewControllers(&self, ) -> Id, Shared>; + + #[method(addChildViewController:)] + pub unsafe fn addChildViewController(&self, childController: &UIViewController,); + + #[method(removeFromParentViewController)] + pub unsafe fn removeFromParentViewController(&self, ); + + #[method(transitionFromViewController:toViewController:duration:options:animations:completion:)] + pub unsafe fn transitionFromViewController_toViewController_duration_options_animations_completion(&self, fromViewController: &UIViewController,toViewController: &UIViewController,duration: NSTimeInterval,options: UIViewAnimationOptions,animations: Option<&Block<(), ()>>,completion: Option<&Block<(Bool, ), ()>>,); + + #[method(beginAppearanceTransition:animated:)] + pub unsafe fn beginAppearanceTransition_animated(&self, isAppearing: bool,animated: bool,); + + #[method(endAppearanceTransition)] + pub unsafe fn endAppearanceTransition(&self, ); + + #[method_id(@__retain_semantics Other childViewControllerForStatusBarStyle)] + pub unsafe fn childViewControllerForStatusBarStyle(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other childViewControllerForStatusBarHidden)] + pub unsafe fn childViewControllerForStatusBarHidden(&self, ) -> Option>; + + #[method(setOverrideTraitCollection:forChildViewController:)] + pub unsafe fn setOverrideTraitCollection_forChildViewController(&self, collection: Option<&UITraitCollection>,childViewController: &UIViewController,); + + #[method_id(@__retain_semantics Other overrideTraitCollectionForChildViewController:)] + pub unsafe fn overrideTraitCollectionForChildViewController(&self, childViewController: &UIViewController,) -> Option>; + + #[method_id(@__retain_semantics Other childViewControllerForUserInterfaceStyle)] + pub unsafe fn childViewControllerForUserInterfaceStyle(&self, ) -> Option>; + + } +); + +extern_methods!( + /// UIContainerViewControllerCallbacks + unsafe impl UIViewController { + #[method(automaticallyForwardAppearanceAndRotationMethodsToChildViewControllers)] + pub unsafe fn automaticallyForwardAppearanceAndRotationMethodsToChildViewControllers(&self, ) -> bool; + + #[method(shouldAutomaticallyForwardRotationMethods)] + pub unsafe fn shouldAutomaticallyForwardRotationMethods(&self, ) -> bool; + + #[method(shouldAutomaticallyForwardAppearanceMethods)] + pub unsafe fn shouldAutomaticallyForwardAppearanceMethods(&self, ) -> bool; + + #[method(willMoveToParentViewController:)] + pub unsafe fn willMoveToParentViewController(&self, parent: Option<&UIViewController>,); + + #[method(didMoveToParentViewController:)] + pub unsafe fn didMoveToParentViewController(&self, parent: Option<&UIViewController>,); + + } +); + +extern_methods!( + /// UIStateRestoration + unsafe impl UIViewController { + #[method_id(@__retain_semantics Other restorationIdentifier)] + pub unsafe fn restorationIdentifier(&self, ) -> Option>; + + #[method(setRestorationIdentifier:)] + pub unsafe fn setRestorationIdentifier(&self, restorationIdentifier: Option<&NSString>,); + + #[method_id(@__retain_semantics Other restorationClass)] + pub unsafe fn restorationClass(&self, ) -> Option>; + + #[method(setRestorationClass:)] + pub unsafe fn setRestorationClass(&self, restorationClass: Option<&TodoProtocols>,); + + #[method(encodeRestorableStateWithCoder:)] + pub unsafe fn encodeRestorableStateWithCoder(&self, coder: &NSCoder,); + + #[method(decodeRestorableStateWithCoder:)] + pub unsafe fn decodeRestorableStateWithCoder(&self, coder: &NSCoder,); + + #[method(applicationFinishedRestoringState)] + pub unsafe fn applicationFinishedRestoringState(&self, ); + + } +); + +extern_methods!( + /// UIConstraintBasedLayoutCoreMethods + unsafe impl UIViewController { + #[method(updateViewConstraints)] + pub unsafe fn updateViewConstraints(&self, ); + + } +); + +extern_methods!( + /// UIViewControllerTransitioning + unsafe impl UIViewController { + #[method_id(@__retain_semantics Other transitioningDelegate)] + pub unsafe fn transitioningDelegate(&self, ) -> Option>; + + #[method(setTransitioningDelegate:)] + pub unsafe fn setTransitioningDelegate(&self, transitioningDelegate: Option<&UIViewControllerTransitioningDelegate>,); + + } +); + +extern_methods!( + /// UILayoutSupport + unsafe impl UIViewController { + #[method_id(@__retain_semantics Other topLayoutGuide)] + pub unsafe fn topLayoutGuide(&self, ) -> Id; + + #[method_id(@__retain_semantics Other bottomLayoutGuide)] + pub unsafe fn bottomLayoutGuide(&self, ) -> Id; + + #[method(additionalSafeAreaInsets)] + pub unsafe fn additionalSafeAreaInsets(&self, ) -> UIEdgeInsets; + + #[method(setAdditionalSafeAreaInsets:)] + pub unsafe fn setAdditionalSafeAreaInsets(&self, additionalSafeAreaInsets: UIEdgeInsets,); + + #[method(systemMinimumLayoutMargins)] + pub unsafe fn systemMinimumLayoutMargins(&self, ) -> NSDirectionalEdgeInsets; + + #[method(viewRespectsSystemMinimumLayoutMargins)] + pub unsafe fn viewRespectsSystemMinimumLayoutMargins(&self, ) -> bool; + + #[method(setViewRespectsSystemMinimumLayoutMargins:)] + pub unsafe fn setViewRespectsSystemMinimumLayoutMargins(&self, viewRespectsSystemMinimumLayoutMargins: bool,); + + #[method(viewLayoutMarginsDidChange)] + pub unsafe fn viewLayoutMarginsDidChange(&self, ); + + #[method(viewSafeAreaInsetsDidChange)] + pub unsafe fn viewSafeAreaInsetsDidChange(&self, ); + + } +); + +extern_methods!( + /// UIKeyCommand + unsafe impl UIViewController { + #[method(addKeyCommand:)] + pub unsafe fn addKeyCommand(&self, keyCommand: &UIKeyCommand,); + + #[method(removeKeyCommand:)] + pub unsafe fn removeKeyCommand(&self, keyCommand: &UIKeyCommand,); + + } +); + +extern_methods!( + /// UIPerformsActions + unsafe impl UIViewController { + #[method(performsActionsWhilePresentingModally)] + pub unsafe fn performsActionsWhilePresentingModally(&self, ) -> bool; + + } +); + +extern_methods!( + /// NSExtensionAdditions + unsafe impl UIViewController { + #[method_id(@__retain_semantics Other extensionContext)] + pub unsafe fn extensionContext(&self, ) -> Option>; + + } +); + +extern_methods!( + /// UIPresentationController + unsafe impl UIViewController { + #[method_id(@__retain_semantics Other presentationController)] + pub unsafe fn presentationController(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other sheetPresentationController)] + pub unsafe fn sheetPresentationController(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other popoverPresentationController)] + pub unsafe fn popoverPresentationController(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other activePresentationController)] + pub unsafe fn activePresentationController(&self, ) -> Option>; + + #[method(isModalInPresentation)] + pub unsafe fn isModalInPresentation(&self, ) -> bool; + + #[method(setModalInPresentation:)] + pub unsafe fn setModalInPresentation(&self, modalInPresentation: bool,); + + } +); + +extern_protocol!( + pub struct UIViewControllerPreviewing; + + unsafe impl UIViewControllerPreviewing { + #[method_id(@__retain_semantics Other previewingGestureRecognizerForFailureRelationship)] + pub unsafe fn previewingGestureRecognizerForFailureRelationship(&self, ) -> Id; + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Id; + + #[method_id(@__retain_semantics Other sourceView)] + pub unsafe fn sourceView(&self, ) -> Id; + + #[method(sourceRect)] + pub unsafe fn sourceRect(&self, ) -> CGRect; + + #[method(setSourceRect:)] + pub unsafe fn setSourceRect(&self, sourceRect: CGRect,); + + } +); + +extern_protocol!( + pub struct UIViewControllerPreviewingDelegate; + + unsafe impl UIViewControllerPreviewingDelegate { + #[method_id(@__retain_semantics Other previewingContext:viewControllerForLocation:)] + pub unsafe fn previewingContext_viewControllerForLocation(&self, previewingContext: &UIViewControllerPreviewing,location: CGPoint,) -> Option>; + + #[method(previewingContext:commitViewController:)] + pub unsafe fn previewingContext_commitViewController(&self, previewingContext: &UIViewControllerPreviewing,viewControllerToCommit: &UIViewController,); + + } +); + +extern_methods!( + /// UIViewControllerPreviewingRegistration + unsafe impl UIViewController { + #[method_id(@__retain_semantics Other registerForPreviewingWithDelegate:sourceView:)] + pub unsafe fn registerForPreviewingWithDelegate_sourceView(&self, delegate: &UIViewControllerPreviewingDelegate,sourceView: &UIView,) -> Id; + + #[method(unregisterForPreviewingWithContext:)] + pub unsafe fn unregisterForPreviewingWithContext(&self, previewing: &UIViewControllerPreviewing,); + + } +); + +extern_methods!( + /// UIScreenEdgesDeferringSystemGestures + unsafe impl UIViewController { + #[method_id(@__retain_semantics Other childViewControllerForScreenEdgesDeferringSystemGestures)] + pub unsafe fn childViewControllerForScreenEdgesDeferringSystemGestures(&self, ) -> Option>; + + #[method(preferredScreenEdgesDeferringSystemGestures)] + pub unsafe fn preferredScreenEdgesDeferringSystemGestures(&self, ) -> UIRectEdge; + + #[method(setNeedsUpdateOfScreenEdgesDeferringSystemGestures)] + pub unsafe fn setNeedsUpdateOfScreenEdgesDeferringSystemGestures(&self, ); + + } +); + +extern_methods!( + /// UIHomeIndicatorAutoHidden + unsafe impl UIViewController { + #[method_id(@__retain_semantics Other childViewControllerForHomeIndicatorAutoHidden)] + pub unsafe fn childViewControllerForHomeIndicatorAutoHidden(&self, ) -> Option>; + + #[method(prefersHomeIndicatorAutoHidden)] + pub unsafe fn prefersHomeIndicatorAutoHidden(&self, ) -> bool; + + #[method(setNeedsUpdateOfHomeIndicatorAutoHidden)] + pub unsafe fn setNeedsUpdateOfHomeIndicatorAutoHidden(&self, ); + + } +); + +extern_methods!( + /// UIPointerLockSupport + unsafe impl UIViewController { + #[method_id(@__retain_semantics Other childViewControllerForPointerLock)] + pub unsafe fn childViewControllerForPointerLock(&self, ) -> Option>; + + #[method(prefersPointerLocked)] + pub unsafe fn prefersPointerLocked(&self, ) -> bool; + + #[method(setNeedsUpdateOfPrefersPointerLocked)] + pub unsafe fn setNeedsUpdateOfPrefersPointerLocked(&self, ); + + } +); + +extern_methods!( + unsafe impl UIViewController { + #[method_id(@__retain_semantics Other previewActionItems)] + pub unsafe fn previewActionItems(&self, ) -> Id, Shared>; + + } +); + +extern_protocol!( + pub struct UIPreviewActionItem; + + unsafe impl UIPreviewActionItem { + #[method_id(@__retain_semantics Other title)] + pub unsafe fn title(&self, ) -> Id; + + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIPreviewActionStyle { + UIPreviewActionStyleDefault = 0, + UIPreviewActionStyleSelected = 1, + UIPreviewActionStyleDestructive = 2, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIPreviewAction; + + unsafe impl ClassType for UIPreviewAction { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIPreviewAction { + #[method(handler)] + pub unsafe fn handler(&self, ) -> NonNull, NonNull, ), ()>>; + + #[method_id(@__retain_semantics Other actionWithTitle:style:handler:)] + pub unsafe fn actionWithTitle_style_handler(title: &NSString,style: UIPreviewActionStyle,handler: &Block<(NonNull, NonNull, ), ()>,) -> Id; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIPreviewActionGroup; + + unsafe impl ClassType for UIPreviewActionGroup { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIPreviewActionGroup { + #[method_id(@__retain_semantics Other actionGroupWithTitle:style:actions:)] + pub unsafe fn actionGroupWithTitle_style_actions(title: &NSString,style: UIPreviewActionStyle,actions: &NSArray,) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIViewControllerTransitionCoordinator.rs b/crates/icrate-generated/src/UIKit/generated/UIViewControllerTransitionCoordinator.rs new file mode 100644 index 000000000..df6fe1999 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIViewControllerTransitionCoordinator.rs @@ -0,0 +1,85 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +pub type UITransitionContextViewControllerKey = NSString; + +pub type UITransitionContextViewKey = NSString; + +extern_protocol!( + pub struct UIViewControllerTransitionCoordinatorContext; + + unsafe impl UIViewControllerTransitionCoordinatorContext { + #[method(isAnimated)] + pub unsafe fn isAnimated(&self, ) -> bool; + + #[method(presentationStyle)] + pub unsafe fn presentationStyle(&self, ) -> UIModalPresentationStyle; + + #[method(initiallyInteractive)] + pub unsafe fn initiallyInteractive(&self, ) -> bool; + + #[method(isInterruptible)] + pub unsafe fn isInterruptible(&self, ) -> bool; + + #[method(isInteractive)] + pub unsafe fn isInteractive(&self, ) -> bool; + + #[method(isCancelled)] + pub unsafe fn isCancelled(&self, ) -> bool; + + #[method(transitionDuration)] + pub unsafe fn transitionDuration(&self, ) -> NSTimeInterval; + + #[method(percentComplete)] + pub unsafe fn percentComplete(&self, ) -> CGFloat; + + #[method(completionVelocity)] + pub unsafe fn completionVelocity(&self, ) -> CGFloat; + + #[method(completionCurve)] + pub unsafe fn completionCurve(&self, ) -> UIViewAnimationCurve; + + #[method_id(@__retain_semantics Other viewControllerForKey:)] + pub unsafe fn viewControllerForKey(&self, key: &UITransitionContextViewControllerKey,) -> Option>; + + #[method_id(@__retain_semantics Other viewForKey:)] + pub unsafe fn viewForKey(&self, key: &UITransitionContextViewKey,) -> Option>; + + #[method_id(@__retain_semantics Other containerView)] + pub unsafe fn containerView(&self, ) -> Id; + + #[method(targetTransform)] + pub unsafe fn targetTransform(&self, ) -> CGAffineTransform; + + } +); + +extern_protocol!( + pub struct UIViewControllerTransitionCoordinator; + + unsafe impl UIViewControllerTransitionCoordinator { + #[method(animateAlongsideTransition:completion:)] + pub unsafe fn animateAlongsideTransition_completion(&self, animation: Option<&Block<(NonNull, ), ()>>,completion: Option<&Block<(NonNull, ), ()>>,) -> bool; + + #[method(animateAlongsideTransitionInView:animation:completion:)] + pub unsafe fn animateAlongsideTransitionInView_animation_completion(&self, view: Option<&UIView>,animation: Option<&Block<(NonNull, ), ()>>,completion: Option<&Block<(NonNull, ), ()>>,) -> bool; + + #[method(notifyWhenInteractionEndsUsingBlock:)] + pub unsafe fn notifyWhenInteractionEndsUsingBlock(&self, handler: &Block<(NonNull, ), ()>,); + + #[method(notifyWhenInteractionChangesUsingBlock:)] + pub unsafe fn notifyWhenInteractionChangesUsingBlock(&self, handler: &Block<(NonNull, ), ()>,); + + } +); + +extern_methods!( + /// UIViewControllerTransitionCoordinator + unsafe impl UIViewController { + #[method_id(@__retain_semantics Other transitionCoordinator)] + pub unsafe fn transitionCoordinator(&self, ) -> Option>; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIViewControllerTransitioning.rs b/crates/icrate-generated/src/UIKit/generated/UIViewControllerTransitioning.rs new file mode 100644 index 000000000..84aee7d5f --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIViewControllerTransitioning.rs @@ -0,0 +1,190 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_static!(UITransitionContextFromViewControllerKey: &'static UITransitionContextViewControllerKey); + +extern_static!(UITransitionContextToViewControllerKey: &'static UITransitionContextViewControllerKey); + +extern_static!(UITransitionContextFromViewKey: &'static UITransitionContextViewKey); + +extern_static!(UITransitionContextToViewKey: &'static UITransitionContextViewKey); + +extern_protocol!( + pub struct UIViewControllerContextTransitioning; + + unsafe impl UIViewControllerContextTransitioning { + #[method_id(@__retain_semantics Other containerView)] + pub unsafe fn containerView(&self, ) -> Id; + + #[method(isAnimated)] + pub unsafe fn isAnimated(&self, ) -> bool; + + #[method(isInteractive)] + pub unsafe fn isInteractive(&self, ) -> bool; + + #[method(transitionWasCancelled)] + pub unsafe fn transitionWasCancelled(&self, ) -> bool; + + #[method(presentationStyle)] + pub unsafe fn presentationStyle(&self, ) -> UIModalPresentationStyle; + + #[method(updateInteractiveTransition:)] + pub unsafe fn updateInteractiveTransition(&self, percentComplete: CGFloat,); + + #[method(finishInteractiveTransition)] + pub unsafe fn finishInteractiveTransition(&self, ); + + #[method(cancelInteractiveTransition)] + pub unsafe fn cancelInteractiveTransition(&self, ); + + #[method(pauseInteractiveTransition)] + pub unsafe fn pauseInteractiveTransition(&self, ); + + #[method(completeTransition:)] + pub unsafe fn completeTransition(&self, didComplete: bool,); + + #[method_id(@__retain_semantics Other viewControllerForKey:)] + pub unsafe fn viewControllerForKey(&self, key: &UITransitionContextViewControllerKey,) -> Option>; + + #[method_id(@__retain_semantics Other viewForKey:)] + pub unsafe fn viewForKey(&self, key: &UITransitionContextViewKey,) -> Option>; + + #[method(targetTransform)] + pub unsafe fn targetTransform(&self, ) -> CGAffineTransform; + + #[method(initialFrameForViewController:)] + pub unsafe fn initialFrameForViewController(&self, vc: &UIViewController,) -> CGRect; + + #[method(finalFrameForViewController:)] + pub unsafe fn finalFrameForViewController(&self, vc: &UIViewController,) -> CGRect; + + } +); + +extern_protocol!( + pub struct UIViewControllerAnimatedTransitioning; + + unsafe impl UIViewControllerAnimatedTransitioning { + #[method(transitionDuration:)] + pub unsafe fn transitionDuration(&self, transitionContext: Option<&UIViewControllerContextTransitioning>,) -> NSTimeInterval; + + #[method(animateTransition:)] + pub unsafe fn animateTransition(&self, transitionContext: &UIViewControllerContextTransitioning,); + + #[optional] + #[method_id(@__retain_semantics Other interruptibleAnimatorForTransition:)] + pub unsafe fn interruptibleAnimatorForTransition(&self, transitionContext: &UIViewControllerContextTransitioning,) -> Id; + + #[optional] + #[method(animationEnded:)] + pub unsafe fn animationEnded(&self, transitionCompleted: bool,); + + } +); + +extern_protocol!( + pub struct UIViewControllerInteractiveTransitioning; + + unsafe impl UIViewControllerInteractiveTransitioning { + #[method(startInteractiveTransition:)] + pub unsafe fn startInteractiveTransition(&self, transitionContext: &UIViewControllerContextTransitioning,); + + #[optional] + #[method(completionSpeed)] + pub unsafe fn completionSpeed(&self, ) -> CGFloat; + + #[optional] + #[method(completionCurve)] + pub unsafe fn completionCurve(&self, ) -> UIViewAnimationCurve; + + #[optional] + #[method(wantsInteractiveStart)] + pub unsafe fn wantsInteractiveStart(&self, ) -> bool; + + } +); + +extern_protocol!( + pub struct UIViewControllerTransitioningDelegate; + + unsafe impl UIViewControllerTransitioningDelegate { + #[optional] + #[method_id(@__retain_semantics Other animationControllerForPresentedController:presentingController:sourceController:)] + pub unsafe fn animationControllerForPresentedController_presentingController_sourceController(&self, presented: &UIViewController,presenting: &UIViewController,source: &UIViewController,) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other animationControllerForDismissedController:)] + pub unsafe fn animationControllerForDismissedController(&self, dismissed: &UIViewController,) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other interactionControllerForPresentation:)] + pub unsafe fn interactionControllerForPresentation(&self, animator: &UIViewControllerAnimatedTransitioning,) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other interactionControllerForDismissal:)] + pub unsafe fn interactionControllerForDismissal(&self, animator: &UIViewControllerAnimatedTransitioning,) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other presentationControllerForPresentedViewController:presentingViewController:sourceViewController:)] + pub unsafe fn presentationControllerForPresentedViewController_presentingViewController_sourceViewController(&self, presented: &UIViewController,presenting: Option<&UIViewController>,source: &UIViewController,) -> Option>; + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIPercentDrivenInteractiveTransition; + + unsafe impl ClassType for UIPercentDrivenInteractiveTransition { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIPercentDrivenInteractiveTransition { + #[method(duration)] + pub unsafe fn duration(&self, ) -> CGFloat; + + #[method(percentComplete)] + pub unsafe fn percentComplete(&self, ) -> CGFloat; + + #[method(completionSpeed)] + pub unsafe fn completionSpeed(&self, ) -> CGFloat; + + #[method(setCompletionSpeed:)] + pub unsafe fn setCompletionSpeed(&self, completionSpeed: CGFloat,); + + #[method(completionCurve)] + pub unsafe fn completionCurve(&self, ) -> UIViewAnimationCurve; + + #[method(setCompletionCurve:)] + pub unsafe fn setCompletionCurve(&self, completionCurve: UIViewAnimationCurve,); + + #[method_id(@__retain_semantics Other timingCurve)] + pub unsafe fn timingCurve(&self, ) -> Option>; + + #[method(setTimingCurve:)] + pub unsafe fn setTimingCurve(&self, timingCurve: Option<&UITimingCurveProvider>,); + + #[method(wantsInteractiveStart)] + pub unsafe fn wantsInteractiveStart(&self, ) -> bool; + + #[method(setWantsInteractiveStart:)] + pub unsafe fn setWantsInteractiveStart(&self, wantsInteractiveStart: bool,); + + #[method(pauseInteractiveTransition)] + pub unsafe fn pauseInteractiveTransition(&self, ); + + #[method(updateInteractiveTransition:)] + pub unsafe fn updateInteractiveTransition(&self, percentComplete: CGFloat,); + + #[method(cancelInteractiveTransition)] + pub unsafe fn cancelInteractiveTransition(&self, ); + + #[method(finishInteractiveTransition)] + pub unsafe fn finishInteractiveTransition(&self, ); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIViewPropertyAnimator.rs b/crates/icrate-generated/src/UIKit/generated/UIViewPropertyAnimator.rs new file mode 100644 index 000000000..1bcd304da --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIViewPropertyAnimator.rs @@ -0,0 +1,84 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIViewPropertyAnimator; + + unsafe impl ClassType for UIViewPropertyAnimator { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIViewPropertyAnimator { + #[method_id(@__retain_semantics Other timingParameters)] + pub unsafe fn timingParameters(&self, ) -> Option>; + + #[method(duration)] + pub unsafe fn duration(&self, ) -> NSTimeInterval; + + #[method(delay)] + pub unsafe fn delay(&self, ) -> NSTimeInterval; + + #[method(isUserInteractionEnabled)] + pub unsafe fn isUserInteractionEnabled(&self, ) -> bool; + + #[method(setUserInteractionEnabled:)] + pub unsafe fn setUserInteractionEnabled(&self, userInteractionEnabled: bool,); + + #[method(isManualHitTestingEnabled)] + pub unsafe fn isManualHitTestingEnabled(&self, ) -> bool; + + #[method(setManualHitTestingEnabled:)] + pub unsafe fn setManualHitTestingEnabled(&self, manualHitTestingEnabled: bool,); + + #[method(isInterruptible)] + pub unsafe fn isInterruptible(&self, ) -> bool; + + #[method(setInterruptible:)] + pub unsafe fn setInterruptible(&self, interruptible: bool,); + + #[method(scrubsLinearly)] + pub unsafe fn scrubsLinearly(&self, ) -> bool; + + #[method(setScrubsLinearly:)] + pub unsafe fn setScrubsLinearly(&self, scrubsLinearly: bool,); + + #[method(pausesOnCompletion)] + pub unsafe fn pausesOnCompletion(&self, ) -> bool; + + #[method(setPausesOnCompletion:)] + pub unsafe fn setPausesOnCompletion(&self, pausesOnCompletion: bool,); + + #[method_id(@__retain_semantics Init initWithDuration:timingParameters:)] + pub unsafe fn initWithDuration_timingParameters(this: Option>, duration: NSTimeInterval,parameters: &UITimingCurveProvider,) -> Id; + + #[method_id(@__retain_semantics Init initWithDuration:curve:animations:)] + pub unsafe fn initWithDuration_curve_animations(this: Option>, duration: NSTimeInterval,curve: UIViewAnimationCurve,animations: Option<&Block<(), ()>>,) -> Id; + + #[method_id(@__retain_semantics Init initWithDuration:controlPoint1:controlPoint2:animations:)] + pub unsafe fn initWithDuration_controlPoint1_controlPoint2_animations(this: Option>, duration: NSTimeInterval,point1: CGPoint,point2: CGPoint,animations: Option<&Block<(), ()>>,) -> Id; + + #[method_id(@__retain_semantics Init initWithDuration:dampingRatio:animations:)] + pub unsafe fn initWithDuration_dampingRatio_animations(this: Option>, duration: NSTimeInterval,ratio: CGFloat,animations: Option<&Block<(), ()>>,) -> Id; + + #[method_id(@__retain_semantics Other runningPropertyAnimatorWithDuration:delay:options:animations:completion:)] + pub unsafe fn runningPropertyAnimatorWithDuration_delay_options_animations_completion(duration: NSTimeInterval,delay: NSTimeInterval,options: UIViewAnimationOptions,animations: &Block<(), ()>,completion: Option<&Block<(UIViewAnimatingPosition, ), ()>>,) -> Id; + + #[method(addAnimations:delayFactor:)] + pub unsafe fn addAnimations_delayFactor(&self, animation: &Block<(), ()>,delayFactor: CGFloat,); + + #[method(addAnimations:)] + pub unsafe fn addAnimations(&self, animation: &Block<(), ()>,); + + #[method(addCompletion:)] + pub unsafe fn addCompletion(&self, completion: &Block<(UIViewAnimatingPosition, ), ()>,); + + #[method(continueAnimationWithTimingParameters:durationFactor:)] + pub unsafe fn continueAnimationWithTimingParameters_durationFactor(&self, parameters: Option<&UITimingCurveProvider>,durationFactor: CGFloat,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIVisualEffect.rs b/crates/icrate-generated/src/UIKit/generated/UIVisualEffect.rs new file mode 100644 index 000000000..b710413da --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIVisualEffect.rs @@ -0,0 +1,18 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIVisualEffect; + + unsafe impl ClassType for UIVisualEffect { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIVisualEffect { + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIVisualEffectView.rs b/crates/icrate-generated/src/UIKit/generated/UIVisualEffectView.rs new file mode 100644 index 000000000..965a24039 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIVisualEffectView.rs @@ -0,0 +1,33 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIVisualEffectView; + + unsafe impl ClassType for UIVisualEffectView { + type Super = UIView; + } +); + +extern_methods!( + unsafe impl UIVisualEffectView { + #[method_id(@__retain_semantics Other contentView)] + pub unsafe fn contentView(&self, ) -> Id; + + #[method_id(@__retain_semantics Other effect)] + pub unsafe fn effect(&self, ) -> Option>; + + #[method(setEffect:)] + pub unsafe fn setEffect(&self, effect: Option<&UIVisualEffect>,); + + #[method_id(@__retain_semantics Init initWithEffect:)] + pub unsafe fn initWithEffect(this: Option>, effect: Option<&UIVisualEffect>,) -> Id; + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder,) -> Option>; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIWebView.rs b/crates/icrate-generated/src/UIKit/generated/UIWebView.rs new file mode 100644 index 000000000..4eb62b201 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIWebView.rs @@ -0,0 +1,204 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIWebViewNavigationType { + UIWebViewNavigationTypeLinkClicked = 0, + UIWebViewNavigationTypeFormSubmitted = 1, + UIWebViewNavigationTypeBackForward = 2, + UIWebViewNavigationTypeReload = 3, + UIWebViewNavigationTypeFormResubmitted = 4, + UIWebViewNavigationTypeOther = 5, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIWebPaginationMode { + UIWebPaginationModeUnpaginated = 0, + UIWebPaginationModeLeftToRight = 1, + UIWebPaginationModeTopToBottom = 2, + UIWebPaginationModeBottomToTop = 3, + UIWebPaginationModeRightToLeft = 4, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIWebPaginationBreakingMode { + UIWebPaginationBreakingModePage = 0, + UIWebPaginationBreakingModeColumn = 1, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIWebView; + + unsafe impl ClassType for UIWebView { + type Super = UIView; + } +); + +extern_methods!( + unsafe impl UIWebView { + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self, ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&UIWebViewDelegate>,); + + #[method_id(@__retain_semantics Other scrollView)] + pub unsafe fn scrollView(&self, ) -> Id; + + #[method(loadRequest:)] + pub unsafe fn loadRequest(&self, request: &NSURLRequest,); + + #[method(loadHTMLString:baseURL:)] + pub unsafe fn loadHTMLString_baseURL(&self, string: &NSString,baseURL: Option<&NSURL>,); + + #[method(loadData:MIMEType:textEncodingName:baseURL:)] + pub unsafe fn loadData_MIMEType_textEncodingName_baseURL(&self, data: &NSData,MIMEType: &NSString,textEncodingName: &NSString,baseURL: &NSURL,); + + #[method_id(@__retain_semantics Other request)] + pub unsafe fn request(&self, ) -> Option>; + + #[method(reload)] + pub unsafe fn reload(&self, ); + + #[method(stopLoading)] + pub unsafe fn stopLoading(&self, ); + + #[method(goBack)] + pub unsafe fn goBack(&self, ); + + #[method(goForward)] + pub unsafe fn goForward(&self, ); + + #[method(canGoBack)] + pub unsafe fn canGoBack(&self, ) -> bool; + + #[method(canGoForward)] + pub unsafe fn canGoForward(&self, ) -> bool; + + #[method(isLoading)] + pub unsafe fn isLoading(&self, ) -> bool; + + #[method_id(@__retain_semantics Other stringByEvaluatingJavaScriptFromString:)] + pub unsafe fn stringByEvaluatingJavaScriptFromString(&self, script: &NSString,) -> Option>; + + #[method(scalesPageToFit)] + pub unsafe fn scalesPageToFit(&self, ) -> bool; + + #[method(setScalesPageToFit:)] + pub unsafe fn setScalesPageToFit(&self, scalesPageToFit: bool,); + + #[method(detectsPhoneNumbers)] + pub unsafe fn detectsPhoneNumbers(&self, ) -> bool; + + #[method(setDetectsPhoneNumbers:)] + pub unsafe fn setDetectsPhoneNumbers(&self, detectsPhoneNumbers: bool,); + + #[method(dataDetectorTypes)] + pub unsafe fn dataDetectorTypes(&self, ) -> UIDataDetectorTypes; + + #[method(setDataDetectorTypes:)] + pub unsafe fn setDataDetectorTypes(&self, dataDetectorTypes: UIDataDetectorTypes,); + + #[method(allowsInlineMediaPlayback)] + pub unsafe fn allowsInlineMediaPlayback(&self, ) -> bool; + + #[method(setAllowsInlineMediaPlayback:)] + pub unsafe fn setAllowsInlineMediaPlayback(&self, allowsInlineMediaPlayback: bool,); + + #[method(mediaPlaybackRequiresUserAction)] + pub unsafe fn mediaPlaybackRequiresUserAction(&self, ) -> bool; + + #[method(setMediaPlaybackRequiresUserAction:)] + pub unsafe fn setMediaPlaybackRequiresUserAction(&self, mediaPlaybackRequiresUserAction: bool,); + + #[method(mediaPlaybackAllowsAirPlay)] + pub unsafe fn mediaPlaybackAllowsAirPlay(&self, ) -> bool; + + #[method(setMediaPlaybackAllowsAirPlay:)] + pub unsafe fn setMediaPlaybackAllowsAirPlay(&self, mediaPlaybackAllowsAirPlay: bool,); + + #[method(suppressesIncrementalRendering)] + pub unsafe fn suppressesIncrementalRendering(&self, ) -> bool; + + #[method(setSuppressesIncrementalRendering:)] + pub unsafe fn setSuppressesIncrementalRendering(&self, suppressesIncrementalRendering: bool,); + + #[method(keyboardDisplayRequiresUserAction)] + pub unsafe fn keyboardDisplayRequiresUserAction(&self, ) -> bool; + + #[method(setKeyboardDisplayRequiresUserAction:)] + pub unsafe fn setKeyboardDisplayRequiresUserAction(&self, keyboardDisplayRequiresUserAction: bool,); + + #[method(paginationMode)] + pub unsafe fn paginationMode(&self, ) -> UIWebPaginationMode; + + #[method(setPaginationMode:)] + pub unsafe fn setPaginationMode(&self, paginationMode: UIWebPaginationMode,); + + #[method(paginationBreakingMode)] + pub unsafe fn paginationBreakingMode(&self, ) -> UIWebPaginationBreakingMode; + + #[method(setPaginationBreakingMode:)] + pub unsafe fn setPaginationBreakingMode(&self, paginationBreakingMode: UIWebPaginationBreakingMode,); + + #[method(pageLength)] + pub unsafe fn pageLength(&self, ) -> CGFloat; + + #[method(setPageLength:)] + pub unsafe fn setPageLength(&self, pageLength: CGFloat,); + + #[method(gapBetweenPages)] + pub unsafe fn gapBetweenPages(&self, ) -> CGFloat; + + #[method(setGapBetweenPages:)] + pub unsafe fn setGapBetweenPages(&self, gapBetweenPages: CGFloat,); + + #[method(pageCount)] + pub unsafe fn pageCount(&self, ) -> NSUInteger; + + #[method(allowsPictureInPictureMediaPlayback)] + pub unsafe fn allowsPictureInPictureMediaPlayback(&self, ) -> bool; + + #[method(setAllowsPictureInPictureMediaPlayback:)] + pub unsafe fn setAllowsPictureInPictureMediaPlayback(&self, allowsPictureInPictureMediaPlayback: bool,); + + #[method(allowsLinkPreview)] + pub unsafe fn allowsLinkPreview(&self, ) -> bool; + + #[method(setAllowsLinkPreview:)] + pub unsafe fn setAllowsLinkPreview(&self, allowsLinkPreview: bool,); + + } +); + +extern_protocol!( + pub struct UIWebViewDelegate; + + unsafe impl UIWebViewDelegate { + #[optional] + #[method(webView:shouldStartLoadWithRequest:navigationType:)] + pub unsafe fn webView_shouldStartLoadWithRequest_navigationType(&self, webView: &UIWebView,request: &NSURLRequest,navigationType: UIWebViewNavigationType,) -> bool; + + #[optional] + #[method(webViewDidStartLoad:)] + pub unsafe fn webViewDidStartLoad(&self, webView: &UIWebView,); + + #[optional] + #[method(webViewDidFinishLoad:)] + pub unsafe fn webViewDidFinishLoad(&self, webView: &UIWebView,); + + #[optional] + #[method(webView:didFailLoadWithError:)] + pub unsafe fn webView_didFailLoadWithError(&self, webView: &UIWebView,error: &NSError,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIWindow.rs b/crates/icrate-generated/src/UIKit/generated/UIWindow.rs new file mode 100644 index 000000000..6b6ef7c9f --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIWindow.rs @@ -0,0 +1,150 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +pub type UIWindowLevel = CGFloat; + +extern_class!( + #[derive(Debug)] + pub struct UIWindow; + + unsafe impl ClassType for UIWindow { + type Super = UIView; + } +); + +extern_methods!( + unsafe impl UIWindow { + #[method_id(@__retain_semantics Init initWithWindowScene:)] + pub unsafe fn initWithWindowScene(this: Option>, windowScene: &UIWindowScene,) -> Id; + + #[method_id(@__retain_semantics Other windowScene)] + pub unsafe fn windowScene(&self, ) -> Option>; + + #[method(setWindowScene:)] + pub unsafe fn setWindowScene(&self, windowScene: Option<&UIWindowScene>,); + + #[method(canResizeToFitContent)] + pub unsafe fn canResizeToFitContent(&self, ) -> bool; + + #[method(setCanResizeToFitContent:)] + pub unsafe fn setCanResizeToFitContent(&self, canResizeToFitContent: bool,); + + #[method_id(@__retain_semantics Other screen)] + pub unsafe fn screen(&self, ) -> Id; + + #[method(setScreen:)] + pub unsafe fn setScreen(&self, screen: &UIScreen,); + + #[method(windowLevel)] + pub unsafe fn windowLevel(&self, ) -> UIWindowLevel; + + #[method(setWindowLevel:)] + pub unsafe fn setWindowLevel(&self, windowLevel: UIWindowLevel,); + + #[method(isKeyWindow)] + pub unsafe fn isKeyWindow(&self, ) -> bool; + + #[method(canBecomeKeyWindow)] + pub unsafe fn canBecomeKeyWindow(&self, ) -> bool; + + #[method(becomeKeyWindow)] + pub unsafe fn becomeKeyWindow(&self, ); + + #[method(resignKeyWindow)] + pub unsafe fn resignKeyWindow(&self, ); + + #[method(makeKeyWindow)] + pub unsafe fn makeKeyWindow(&self, ); + + #[method(makeKeyAndVisible)] + pub unsafe fn makeKeyAndVisible(&self, ); + + #[method_id(@__retain_semantics Other rootViewController)] + pub unsafe fn rootViewController(&self, ) -> Option>; + + #[method(setRootViewController:)] + pub unsafe fn setRootViewController(&self, rootViewController: Option<&UIViewController>,); + + #[method(sendEvent:)] + pub unsafe fn sendEvent(&self, event: &UIEvent,); + + #[method(convertPoint:toWindow:)] + pub unsafe fn convertPoint_toWindow(&self, point: CGPoint,window: Option<&UIWindow>,) -> CGPoint; + + #[method(convertPoint:fromWindow:)] + pub unsafe fn convertPoint_fromWindow(&self, point: CGPoint,window: Option<&UIWindow>,) -> CGPoint; + + #[method(convertRect:toWindow:)] + pub unsafe fn convertRect_toWindow(&self, rect: CGRect,window: Option<&UIWindow>,) -> CGRect; + + #[method(convertRect:fromWindow:)] + pub unsafe fn convertRect_fromWindow(&self, rect: CGRect,window: Option<&UIWindow>,) -> CGRect; + + } +); + +extern_protocol!( + pub struct UILayoutGuideAspectFitting; + + unsafe impl UILayoutGuideAspectFitting { + #[method(aspectRatio)] + pub unsafe fn aspectRatio(&self, ) -> CGFloat; + + #[method(setAspectRatio:)] + pub unsafe fn setAspectRatio(&self, aspectRatio: CGFloat,); + + } +); + +extern_methods!( + /// UIWindowLayout + unsafe impl UIWindow { + #[method_id(@__retain_semantics Other safeAreaAspectFitLayoutGuide)] + pub unsafe fn safeAreaAspectFitLayoutGuide(&self, ) -> Id; + + } +); + +extern_static!(UIWindowLevelNormal: UIWindowLevel); + +extern_static!(UIWindowLevelAlert: UIWindowLevel); + +extern_static!(UIWindowLevelStatusBar: UIWindowLevel); + +extern_static!(UIWindowDidBecomeVisibleNotification: &'static NSNotificationName); + +extern_static!(UIWindowDidBecomeHiddenNotification: &'static NSNotificationName); + +extern_static!(UIWindowDidBecomeKeyNotification: &'static NSNotificationName); + +extern_static!(UIWindowDidResignKeyNotification: &'static NSNotificationName); + +extern_static!(UIKeyboardWillShowNotification: &'static NSNotificationName); + +extern_static!(UIKeyboardDidShowNotification: &'static NSNotificationName); + +extern_static!(UIKeyboardWillHideNotification: &'static NSNotificationName); + +extern_static!(UIKeyboardDidHideNotification: &'static NSNotificationName); + +extern_static!(UIKeyboardFrameBeginUserInfoKey: &'static NSString); + +extern_static!(UIKeyboardFrameEndUserInfoKey: &'static NSString); + +extern_static!(UIKeyboardAnimationDurationUserInfoKey: &'static NSString); + +extern_static!(UIKeyboardAnimationCurveUserInfoKey: &'static NSString); + +extern_static!(UIKeyboardIsLocalUserInfoKey: &'static NSString); + +extern_static!(UIKeyboardWillChangeFrameNotification: &'static NSNotificationName); + +extern_static!(UIKeyboardDidChangeFrameNotification: &'static NSNotificationName); + +extern_static!(UIKeyboardCenterBeginUserInfoKey: &'static NSString); + +extern_static!(UIKeyboardCenterEndUserInfoKey: &'static NSString); + +extern_static!(UIKeyboardBoundsUserInfoKey: &'static NSString); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIWindowScene.rs b/crates/icrate-generated/src/UIKit/generated/UIWindowScene.rs new file mode 100644 index 000000000..82037d113 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIWindowScene.rs @@ -0,0 +1,157 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIWindowScene; + + unsafe impl ClassType for UIWindowScene { + type Super = UIScene; + } +); + +extern_methods!( + unsafe impl UIWindowScene { + #[method_id(@__retain_semantics Other screen)] + pub unsafe fn screen(&self, ) -> Id; + + #[method(interfaceOrientation)] + pub unsafe fn interfaceOrientation(&self, ) -> UIInterfaceOrientation; + + #[method_id(@__retain_semantics Other coordinateSpace)] + pub unsafe fn coordinateSpace(&self, ) -> Id; + + #[method_id(@__retain_semantics Other traitCollection)] + pub unsafe fn traitCollection(&self, ) -> Id; + + #[method(requestGeometryUpdateWithPreferences:errorHandler:)] + pub unsafe fn requestGeometryUpdateWithPreferences_errorHandler(&self, geometryPreferences: &UIWindowSceneGeometryPreferences,errorHandler: Option<&Block<(NonNull, ), ()>>,); + + #[method_id(@__retain_semantics Other effectiveGeometry)] + pub unsafe fn effectiveGeometry(&self, ) -> Id; + + #[method_id(@__retain_semantics Other sizeRestrictions)] + pub unsafe fn sizeRestrictions(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other windows)] + pub unsafe fn windows(&self, ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other keyWindow)] + pub unsafe fn keyWindow(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other activityItemsConfigurationSource)] + pub unsafe fn activityItemsConfigurationSource(&self, ) -> Option>; + + #[method(setActivityItemsConfigurationSource:)] + pub unsafe fn setActivityItemsConfigurationSource(&self, activityItemsConfigurationSource: Option<&UIActivityItemsConfigurationProviding>,); + + #[method_id(@__retain_semantics Other windowingBehaviors)] + pub unsafe fn windowingBehaviors(&self, ) -> Option>; + + #[method(isFullScreen)] + pub unsafe fn isFullScreen(&self, ) -> bool; + + } +); + +extern_protocol!( + pub struct UIWindowSceneDelegate; + + unsafe impl UIWindowSceneDelegate { + #[optional] + #[method_id(@__retain_semantics Other window)] + pub unsafe fn window(&self, ) -> Option>; + + #[optional] + #[method(setWindow:)] + pub unsafe fn setWindow(&self, window: Option<&UIWindow>,); + + #[optional] + #[method(windowScene:didUpdateCoordinateSpace:interfaceOrientation:traitCollection:)] + pub unsafe fn windowScene_didUpdateCoordinateSpace_interfaceOrientation_traitCollection(&self, windowScene: &UIWindowScene,previousCoordinateSpace: &UICoordinateSpace,previousInterfaceOrientation: UIInterfaceOrientation,previousTraitCollection: &UITraitCollection,); + + #[optional] + #[method(windowScene:performActionForShortcutItem:completionHandler:)] + pub unsafe fn windowScene_performActionForShortcutItem_completionHandler(&self, windowScene: &UIWindowScene,shortcutItem: &UIApplicationShortcutItem,completionHandler: &Block<(Bool, ), ()>,); + + #[optional] + #[method(windowScene:userDidAcceptCloudKitShareWithMetadata:)] + pub unsafe fn windowScene_userDidAcceptCloudKitShareWithMetadata(&self, windowScene: &UIWindowScene,cloudKitShareMetadata: &CKShareMetadata,); + + } +); + +extern_static!(UIWindowSceneSessionRoleApplication: &'static UISceneSessionRole); + +extern_static!(UIWindowSceneSessionRoleExternalDisplayNonInteractive: &'static UISceneSessionRole); + +extern_static!(UIWindowSceneSessionRoleExternalDisplay: &'static UISceneSessionRole); + +ns_enum!( + #[underlying(NSInteger)] + pub enum UIWindowSceneDismissalAnimation { + UIWindowSceneDismissalAnimationStandard = 1, + UIWindowSceneDismissalAnimationCommit = 2, + UIWindowSceneDismissalAnimationDecline = 3, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIWindowSceneDestructionRequestOptions; + + unsafe impl ClassType for UIWindowSceneDestructionRequestOptions { + type Super = UISceneDestructionRequestOptions; + } +); + +extern_methods!( + unsafe impl UIWindowSceneDestructionRequestOptions { + #[method(windowDismissalAnimation)] + pub unsafe fn windowDismissalAnimation(&self, ) -> UIWindowSceneDismissalAnimation; + + #[method(setWindowDismissalAnimation:)] + pub unsafe fn setWindowDismissalAnimation(&self, windowDismissalAnimation: UIWindowSceneDismissalAnimation,); + + } +); + +extern_class!( + #[derive(Debug)] + pub struct UISceneSizeRestrictions; + + unsafe impl ClassType for UISceneSizeRestrictions { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UISceneSizeRestrictions { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics New new)] + pub unsafe fn new() -> Id; + + #[method(minimumSize)] + pub unsafe fn minimumSize(&self, ) -> CGSize; + + #[method(setMinimumSize:)] + pub unsafe fn setMinimumSize(&self, minimumSize: CGSize,); + + #[method(maximumSize)] + pub unsafe fn maximumSize(&self, ) -> CGSize; + + #[method(setMaximumSize:)] + pub unsafe fn setMaximumSize(&self, maximumSize: CGSize,); + + #[method(allowsFullScreen)] + pub unsafe fn allowsFullScreen(&self, ) -> bool; + + #[method(setAllowsFullScreen:)] + pub unsafe fn setAllowsFullScreen(&self, allowsFullScreen: bool,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIWindowSceneActivationAction.rs b/crates/icrate-generated/src/UIKit/generated/UIWindowSceneActivationAction.rs new file mode 100644 index 000000000..a951817b6 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIWindowSceneActivationAction.rs @@ -0,0 +1,35 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +pub type UIWindowSceneActivationActionConfigurationProvider = *mut Block<(NonNull, ), *mut UIWindowSceneActivationConfiguration>; + +extern_class!( + #[derive(Debug)] + pub struct UIWindowSceneActivationAction; + + unsafe impl ClassType for UIWindowSceneActivationAction { + type Super = UIAction; + } +); + +extern_methods!( + unsafe impl UIWindowSceneActivationAction { + #[method_id(@__retain_semantics Other title)] + pub unsafe fn title(&self, ) -> Id; + + #[method(setTitle:)] + pub unsafe fn setTitle(&self, title: Option<&NSString>,); + + #[method_id(@__retain_semantics Other actionWithIdentifier:alternateAction:configurationProvider:)] + pub unsafe fn actionWithIdentifier_alternateAction_configurationProvider(identifier: Option<&UIActionIdentifier>,alternateAction: Option<&UIAction>,configurationProvider: UIWindowSceneActivationActionConfigurationProvider,) -> Id; + + #[method_id(@__retain_semantics Other actionWithHandler:)] + pub unsafe fn actionWithHandler(handler: UIActionHandler,) -> Id; + + #[method_id(@__retain_semantics Other actionWithTitle:image:identifier:handler:)] + pub unsafe fn actionWithTitle_image_identifier_handler(title: &NSString,image: Option<&UIImage>,identifier: Option<&UIActionIdentifier>,handler: UIActionHandler,) -> Id; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIWindowSceneActivationConfiguration.rs b/crates/icrate-generated/src/UIKit/generated/UIWindowSceneActivationConfiguration.rs new file mode 100644 index 000000000..1b7f336a7 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIWindowSceneActivationConfiguration.rs @@ -0,0 +1,42 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIWindowSceneActivationConfiguration; + + unsafe impl ClassType for UIWindowSceneActivationConfiguration { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIWindowSceneActivationConfiguration { + #[method_id(@__retain_semantics Other userActivity)] + pub unsafe fn userActivity(&self, ) -> Id; + + #[method_id(@__retain_semantics Other options)] + pub unsafe fn options(&self, ) -> Option>; + + #[method(setOptions:)] + pub unsafe fn setOptions(&self, options: Option<&UIWindowSceneActivationRequestOptions>,); + + #[method_id(@__retain_semantics Other preview)] + pub unsafe fn preview(&self, ) -> Option>; + + #[method(setPreview:)] + pub unsafe fn setPreview(&self, preview: Option<&UITargetedPreview>,); + + #[method_id(@__retain_semantics Init initWithUserActivity:)] + pub unsafe fn initWithUserActivity(this: Option>, userActivity: &NSUserActivity,) -> 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-generated/src/UIKit/generated/UIWindowSceneActivationInteraction.rs b/crates/icrate-generated/src/UIKit/generated/UIWindowSceneActivationInteraction.rs new file mode 100644 index 000000000..068f45efe --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIWindowSceneActivationInteraction.rs @@ -0,0 +1,29 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +pub type UIWindowSceneActivationInteractionConfigurationProvider = *mut Block<(NonNull, CGPoint, ), *mut UIWindowSceneActivationConfiguration>; + +extern_class!( + #[derive(Debug)] + pub struct UIWindowSceneActivationInteraction; + + unsafe impl ClassType for UIWindowSceneActivationInteraction { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIWindowSceneActivationInteraction { + #[method_id(@__retain_semantics Init initWithConfigurationProvider:errorHandler:)] + pub unsafe fn initWithConfigurationProvider_errorHandler(this: Option>, configurationProvider: UIWindowSceneActivationInteractionConfigurationProvider,errorHandler: &Block<(NonNull, ), ()>,) -> 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-generated/src/UIKit/generated/UIWindowSceneActivationRequestOptions.rs b/crates/icrate-generated/src/UIKit/generated/UIWindowSceneActivationRequestOptions.rs new file mode 100644 index 000000000..d87ac5904 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIWindowSceneActivationRequestOptions.rs @@ -0,0 +1,33 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +ns_enum!( + #[underlying(NSUInteger)] + pub enum UIWindowScenePresentationStyle { + UIWindowScenePresentationStyleAutomatic = 0, + UIWindowScenePresentationStyleStandard = 1, + UIWindowScenePresentationStyleProminent = 2, + } +); + +extern_class!( + #[derive(Debug)] + pub struct UIWindowSceneActivationRequestOptions; + + unsafe impl ClassType for UIWindowSceneActivationRequestOptions { + type Super = UISceneActivationRequestOptions; + } +); + +extern_methods!( + unsafe impl UIWindowSceneActivationRequestOptions { + #[method(preferredPresentationStyle)] + pub unsafe fn preferredPresentationStyle(&self, ) -> UIWindowScenePresentationStyle; + + #[method(setPreferredPresentationStyle:)] + pub unsafe fn setPreferredPresentationStyle(&self, preferredPresentationStyle: UIWindowScenePresentationStyle,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIWindowSceneGeometry.rs b/crates/icrate-generated/src/UIKit/generated/UIWindowSceneGeometry.rs new file mode 100644 index 000000000..7f70d3a6e --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIWindowSceneGeometry.rs @@ -0,0 +1,30 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIWindowSceneGeometry; + + unsafe impl ClassType for UIWindowSceneGeometry { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIWindowSceneGeometry { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics New new)] + pub unsafe fn new() -> Id; + + #[method(systemFrame)] + pub unsafe fn systemFrame(&self, ) -> CGRect; + + #[method(interfaceOrientation)] + pub unsafe fn interfaceOrientation(&self, ) -> UIInterfaceOrientation; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIWindowSceneGeometryPreferences.rs b/crates/icrate-generated/src/UIKit/generated/UIWindowSceneGeometryPreferences.rs new file mode 100644 index 000000000..498c68ffa --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIWindowSceneGeometryPreferences.rs @@ -0,0 +1,24 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIWindowSceneGeometryPreferences; + + unsafe impl ClassType for UIWindowSceneGeometryPreferences { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl UIWindowSceneGeometryPreferences { + #[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-generated/src/UIKit/generated/UIWindowSceneGeometryPreferencesIOS.rs b/crates/icrate-generated/src/UIKit/generated/UIWindowSceneGeometryPreferencesIOS.rs new file mode 100644 index 000000000..d6761683a --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIWindowSceneGeometryPreferencesIOS.rs @@ -0,0 +1,30 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIWindowSceneGeometryPreferencesIOS; + + unsafe impl ClassType for UIWindowSceneGeometryPreferencesIOS { + type Super = UIWindowSceneGeometryPreferences; + } +); + +extern_methods!( + unsafe impl UIWindowSceneGeometryPreferencesIOS { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics Init initWithInterfaceOrientations:)] + pub unsafe fn initWithInterfaceOrientations(this: Option>, interfaceOrientations: UIInterfaceOrientationMask,) -> Id; + + #[method(interfaceOrientations)] + pub unsafe fn interfaceOrientations(&self, ) -> UIInterfaceOrientationMask; + + #[method(setInterfaceOrientations:)] + pub unsafe fn setInterfaceOrientations(&self, interfaceOrientations: UIInterfaceOrientationMask,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UIWindowSceneGeometryPreferencesMac.rs b/crates/icrate-generated/src/UIKit/generated/UIWindowSceneGeometryPreferencesMac.rs new file mode 100644 index 000000000..4c8a0876f --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UIWindowSceneGeometryPreferencesMac.rs @@ -0,0 +1,30 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_class!( + #[derive(Debug)] + pub struct UIWindowSceneGeometryPreferencesMac; + + unsafe impl ClassType for UIWindowSceneGeometryPreferencesMac { + type Super = UIWindowSceneGeometryPreferences; + } +); + +extern_methods!( + unsafe impl UIWindowSceneGeometryPreferencesMac { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>, ) -> Id; + + #[method_id(@__retain_semantics Init initWithSystemFrame:)] + pub unsafe fn initWithSystemFrame(this: Option>, systemFrame: CGRect,) -> Id; + + #[method(systemFrame)] + pub unsafe fn systemFrame(&self, ) -> CGRect; + + #[method(setSystemFrame:)] + pub unsafe fn setSystemFrame(&self, systemFrame: CGRect,); + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/UNNotificationResponse+UIKitAdditions.rs b/crates/icrate-generated/src/UIKit/generated/UNNotificationResponse+UIKitAdditions.rs new file mode 100644 index 000000000..4fc3ce27c --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/UNNotificationResponse+UIKitAdditions.rs @@ -0,0 +1,13 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; + +extern_methods!( + /// UIKitAdditions + unsafe impl UNNotificationResponse { + #[method_id(@__retain_semantics Other targetScene)] + pub unsafe fn targetScene(&self, ) -> Option>; + + } +); + diff --git a/crates/icrate-generated/src/UIKit/generated/mod.rs b/crates/icrate-generated/src/UIKit/generated/mod.rs new file mode 100644 index 000000000..241de8a15 --- /dev/null +++ b/crates/icrate-generated/src/UIKit/generated/mod.rs @@ -0,0 +1,1026 @@ +#[path = "DocumentManager.rs"] +mod __DocumentManager; +#[path = "NSAttributedString.rs"] +mod __NSAttributedString; +#[path = "NSDataAsset.rs"] +mod __NSDataAsset; +#[path = "NSDiffableDataSourceSectionSnapshot.rs"] +mod __NSDiffableDataSourceSectionSnapshot; +#[path = "NSFileProviderExtension.rs"] +mod __NSFileProviderExtension; +#[path = "NSIndexPath+UIKitAdditions.rs"] +mod __NSIndexPath+UIKitAdditions; +#[path = "NSItemProvider+UIKitAdditions.rs"] +mod __NSItemProvider+UIKitAdditions; +#[path = "NSLayoutAnchor.rs"] +mod __NSLayoutAnchor; +#[path = "NSLayoutConstraint.rs"] +mod __NSLayoutConstraint; +#[path = "NSLayoutManager.rs"] +mod __NSLayoutManager; +#[path = "NSParagraphStyle.rs"] +mod __NSParagraphStyle; +#[path = "NSShadow.rs"] +mod __NSShadow; +#[path = "NSStringDrawing.rs"] +mod __NSStringDrawing; +#[path = "NSText.rs"] +mod __NSText; +#[path = "NSTextAttachment.rs"] +mod __NSTextAttachment; +#[path = "NSTextContainer.rs"] +mod __NSTextContainer; +#[path = "NSTextContentManager.rs"] +mod __NSTextContentManager; +#[path = "NSTextElement.rs"] +mod __NSTextElement; +#[path = "NSTextLayoutFragment.rs"] +mod __NSTextLayoutFragment; +#[path = "NSTextLayoutManager.rs"] +mod __NSTextLayoutManager; +#[path = "NSTextLineFragment.rs"] +mod __NSTextLineFragment; +#[path = "NSTextList.rs"] +mod __NSTextList; +#[path = "NSTextListElement.rs"] +mod __NSTextListElement; +#[path = "NSTextRange.rs"] +mod __NSTextRange; +#[path = "NSTextSelection.rs"] +mod __NSTextSelection; +#[path = "NSTextSelectionNavigation.rs"] +mod __NSTextSelectionNavigation; +#[path = "NSTextStorage.rs"] +mod __NSTextStorage; +#[path = "NSTextViewportLayoutController.rs"] +mod __NSTextViewportLayoutController; +#[path = "NSToolbar+UIKitAdditions.rs"] +mod __NSToolbar+UIKitAdditions; +#[path = "NSTouchBar+UIKitAdditions.rs"] +mod __NSTouchBar+UIKitAdditions; +#[path = "NSUserActivity+NSItemProvider.rs"] +mod __NSUserActivity+NSItemProvider; +#[path = "PrintKitUI.rs"] +mod __PrintKitUI; +#[path = "ShareSheet.rs"] +mod __ShareSheet; +#[path = "UIAccelerometer.rs"] +mod __UIAccelerometer; +#[path = "UIAccessibility.rs"] +mod __UIAccessibility; +#[path = "UIAccessibilityAdditions.rs"] +mod __UIAccessibilityAdditions; +#[path = "UIAccessibilityConstants.rs"] +mod __UIAccessibilityConstants; +#[path = "UIAccessibilityContainer.rs"] +mod __UIAccessibilityContainer; +#[path = "UIAccessibilityContentSizeCategoryImageAdjusting.rs"] +mod __UIAccessibilityContentSizeCategoryImageAdjusting; +#[path = "UIAccessibilityCustomAction.rs"] +mod __UIAccessibilityCustomAction; +#[path = "UIAccessibilityCustomRotor.rs"] +mod __UIAccessibilityCustomRotor; +#[path = "UIAccessibilityElement.rs"] +mod __UIAccessibilityElement; +#[path = "UIAccessibilityIdentification.rs"] +mod __UIAccessibilityIdentification; +#[path = "UIAccessibilityLocationDescriptor.rs"] +mod __UIAccessibilityLocationDescriptor; +#[path = "UIAccessibilityZoom.rs"] +mod __UIAccessibilityZoom; +#[path = "UIAction.rs"] +mod __UIAction; +#[path = "UIActionSheet.rs"] +mod __UIActionSheet; +#[path = "UIActivity.rs"] +mod __UIActivity; +#[path = "UIActivityIndicatorView.rs"] +mod __UIActivityIndicatorView; +#[path = "UIActivityItemProvider.rs"] +mod __UIActivityItemProvider; +#[path = "UIActivityItemsConfiguration.rs"] +mod __UIActivityItemsConfiguration; +#[path = "UIActivityItemsConfigurationReading.rs"] +mod __UIActivityItemsConfigurationReading; +#[path = "UIActivityViewController.rs"] +mod __UIActivityViewController; +#[path = "UIAlert.rs"] +mod __UIAlert; +#[path = "UIAlertController.rs"] +mod __UIAlertController; +#[path = "UIAlertView.rs"] +mod __UIAlertView; +#[path = "UIAppearance.rs"] +mod __UIAppearance; +#[path = "UIApplication.rs"] +mod __UIApplication; +#[path = "UIApplicationShortcutItem.rs"] +mod __UIApplicationShortcutItem; +#[path = "UIAttachmentBehavior.rs"] +mod __UIAttachmentBehavior; +#[path = "UIBackgroundConfiguration.rs"] +mod __UIBackgroundConfiguration; +#[path = "UIBandSelectionInteraction.rs"] +mod __UIBandSelectionInteraction; +#[path = "UIBarAppearance.rs"] +mod __UIBarAppearance; +#[path = "UIBarButtonItem.rs"] +mod __UIBarButtonItem; +#[path = "UIBarButtonItemAppearance.rs"] +mod __UIBarButtonItemAppearance; +#[path = "UIBarButtonItemGroup.rs"] +mod __UIBarButtonItemGroup; +#[path = "UIBarCommon.rs"] +mod __UIBarCommon; +#[path = "UIBarItem.rs"] +mod __UIBarItem; +#[path = "UIBehavioralStyle.rs"] +mod __UIBehavioralStyle; +#[path = "UIBezierPath.rs"] +mod __UIBezierPath; +#[path = "UIBlurEffect.rs"] +mod __UIBlurEffect; +#[path = "UIButton.rs"] +mod __UIButton; +#[path = "UIButtonConfiguration.rs"] +mod __UIButtonConfiguration; +#[path = "UICalendarSelection.rs"] +mod __UICalendarSelection; +#[path = "UICalendarSelectionMultiDate.rs"] +mod __UICalendarSelectionMultiDate; +#[path = "UICalendarSelectionSingleDate.rs"] +mod __UICalendarSelectionSingleDate; +#[path = "UICalendarView.rs"] +mod __UICalendarView; +#[path = "UICalendarViewDecoration.rs"] +mod __UICalendarViewDecoration; +#[path = "UICellAccessory.rs"] +mod __UICellAccessory; +#[path = "UICellConfigurationState.rs"] +mod __UICellConfigurationState; +#[path = "UICloudSharingController.rs"] +mod __UICloudSharingController; +#[path = "UICollectionLayoutList.rs"] +mod __UICollectionLayoutList; +#[path = "UICollectionView.rs"] +mod __UICollectionView; +#[path = "UICollectionViewCell.rs"] +mod __UICollectionViewCell; +#[path = "UICollectionViewCompositionalLayout.rs"] +mod __UICollectionViewCompositionalLayout; +#[path = "UICollectionViewController.rs"] +mod __UICollectionViewController; +#[path = "UICollectionViewFlowLayout.rs"] +mod __UICollectionViewFlowLayout; +#[path = "UICollectionViewItemRegistration.rs"] +mod __UICollectionViewItemRegistration; +#[path = "UICollectionViewLayout.rs"] +mod __UICollectionViewLayout; +#[path = "UICollectionViewListCell.rs"] +mod __UICollectionViewListCell; +#[path = "UICollectionViewTransitionLayout.rs"] +mod __UICollectionViewTransitionLayout; +#[path = "UICollectionViewUpdateItem.rs"] +mod __UICollectionViewUpdateItem; +#[path = "UICollisionBehavior.rs"] +mod __UICollisionBehavior; +#[path = "UIColor.rs"] +mod __UIColor; +#[path = "UIColorPickerViewController.rs"] +mod __UIColorPickerViewController; +#[path = "UIColorWell.rs"] +mod __UIColorWell; +#[path = "UICommand.rs"] +mod __UICommand; +#[path = "UIConfigurationColorTransformer.rs"] +mod __UIConfigurationColorTransformer; +#[path = "UIConfigurationState.rs"] +mod __UIConfigurationState; +#[path = "UIContentConfiguration.rs"] +mod __UIContentConfiguration; +#[path = "UIContentSizeCategory.rs"] +mod __UIContentSizeCategory; +#[path = "UIContentSizeCategoryAdjusting.rs"] +mod __UIContentSizeCategoryAdjusting; +#[path = "UIContextMenuConfiguration.rs"] +mod __UIContextMenuConfiguration; +#[path = "UIContextMenuInteraction.rs"] +mod __UIContextMenuInteraction; +#[path = "UIContextualAction.rs"] +mod __UIContextualAction; +#[path = "UIControl.rs"] +mod __UIControl; +#[path = "UIDataDetectors.rs"] +mod __UIDataDetectors; +#[path = "UIDataSourceTranslating.rs"] +mod __UIDataSourceTranslating; +#[path = "UIDatePicker.rs"] +mod __UIDatePicker; +#[path = "UIDeferredMenuElement.rs"] +mod __UIDeferredMenuElement; +#[path = "UIDevice.rs"] +mod __UIDevice; +#[path = "UIDiffableDataSource.rs"] +mod __UIDiffableDataSource; +#[path = "UIDocument.rs"] +mod __UIDocument; +#[path = "UIDocumentBrowserAction.rs"] +mod __UIDocumentBrowserAction; +#[path = "UIDocumentBrowserViewController.rs"] +mod __UIDocumentBrowserViewController; +#[path = "UIDocumentInteractionController.rs"] +mod __UIDocumentInteractionController; +#[path = "UIDocumentMenuViewController.rs"] +mod __UIDocumentMenuViewController; +#[path = "UIDocumentPickerExtensionViewController.rs"] +mod __UIDocumentPickerExtensionViewController; +#[path = "UIDocumentPickerViewController.rs"] +mod __UIDocumentPickerViewController; +#[path = "UIDocumentProperties.rs"] +mod __UIDocumentProperties; +#[path = "UIDragInteraction.rs"] +mod __UIDragInteraction; +#[path = "UIDragItem.rs"] +mod __UIDragItem; +#[path = "UIDragPreview.rs"] +mod __UIDragPreview; +#[path = "UIDragPreviewParameters.rs"] +mod __UIDragPreviewParameters; +#[path = "UIDragSession.rs"] +mod __UIDragSession; +#[path = "UIDropInteraction.rs"] +mod __UIDropInteraction; +#[path = "UIDynamicAnimator.rs"] +mod __UIDynamicAnimator; +#[path = "UIDynamicBehavior.rs"] +mod __UIDynamicBehavior; +#[path = "UIDynamicItemBehavior.rs"] +mod __UIDynamicItemBehavior; +#[path = "UIEditMenuInteraction.rs"] +mod __UIEditMenuInteraction; +#[path = "UIEvent.rs"] +mod __UIEvent; +#[path = "UIEventAttribution.rs"] +mod __UIEventAttribution; +#[path = "UIEventAttributionView.rs"] +mod __UIEventAttributionView; +#[path = "UIFeedbackGenerator.rs"] +mod __UIFeedbackGenerator; +#[path = "UIFieldBehavior.rs"] +mod __UIFieldBehavior; +#[path = "UIFindInteraction.rs"] +mod __UIFindInteraction; +#[path = "UIFindSession.rs"] +mod __UIFindSession; +#[path = "UIFocus.rs"] +mod __UIFocus; +#[path = "UIFocusAnimationCoordinator.rs"] +mod __UIFocusAnimationCoordinator; +#[path = "UIFocusDebugger.rs"] +mod __UIFocusDebugger; +#[path = "UIFocusEffect.rs"] +mod __UIFocusEffect; +#[path = "UIFocusGuide.rs"] +mod __UIFocusGuide; +#[path = "UIFocusMovementHint.rs"] +mod __UIFocusMovementHint; +#[path = "UIFocusSystem.rs"] +mod __UIFocusSystem; +#[path = "UIFont.rs"] +mod __UIFont; +#[path = "UIFontDescriptor.rs"] +mod __UIFontDescriptor; +#[path = "UIFontMetrics.rs"] +mod __UIFontMetrics; +#[path = "UIFontPickerViewController.rs"] +mod __UIFontPickerViewController; +#[path = "UIFontPickerViewControllerConfiguration.rs"] +mod __UIFontPickerViewControllerConfiguration; +#[path = "UIFoundation.rs"] +mod __UIFoundation; +#[path = "UIGeometry.rs"] +mod __UIGeometry; +#[path = "UIGestureRecognizer.rs"] +mod __UIGestureRecognizer; +#[path = "UIGestureRecognizerSubclass.rs"] +mod __UIGestureRecognizerSubclass; +#[path = "UIGraphics.rs"] +mod __UIGraphics; +#[path = "UIGraphicsImageRenderer.rs"] +mod __UIGraphicsImageRenderer; +#[path = "UIGraphicsPDFRenderer.rs"] +mod __UIGraphicsPDFRenderer; +#[path = "UIGraphicsRenderer.rs"] +mod __UIGraphicsRenderer; +#[path = "UIGraphicsRendererSubclass.rs"] +mod __UIGraphicsRendererSubclass; +#[path = "UIGravityBehavior.rs"] +mod __UIGravityBehavior; +#[path = "UIGuidedAccess.rs"] +mod __UIGuidedAccess; +#[path = "UIGuidedAccessRestrictions.rs"] +mod __UIGuidedAccessRestrictions; +#[path = "UIHoverGestureRecognizer.rs"] +mod __UIHoverGestureRecognizer; +#[path = "UIImage.rs"] +mod __UIImage; +#[path = "UIImageAsset.rs"] +mod __UIImageAsset; +#[path = "UIImageConfiguration.rs"] +mod __UIImageConfiguration; +#[path = "UIImagePickerController.rs"] +mod __UIImagePickerController; +#[path = "UIImageSymbolConfiguration.rs"] +mod __UIImageSymbolConfiguration; +#[path = "UIImageView.rs"] +mod __UIImageView; +#[path = "UIImpactFeedbackGenerator.rs"] +mod __UIImpactFeedbackGenerator; +#[path = "UIIndirectScribbleInteraction.rs"] +mod __UIIndirectScribbleInteraction; +#[path = "UIInputView.rs"] +mod __UIInputView; +#[path = "UIInputViewController.rs"] +mod __UIInputViewController; +#[path = "UIInteraction.rs"] +mod __UIInteraction; +#[path = "UIInterface.rs"] +mod __UIInterface; +#[path = "UIKey.rs"] +mod __UIKey; +#[path = "UIKeyCommand.rs"] +mod __UIKeyCommand; +#[path = "UIKeyConstants.rs"] +mod __UIKeyConstants; +#[path = "UIKeyboardLayoutGuide.rs"] +mod __UIKeyboardLayoutGuide; +#[path = "UIKitCore.rs"] +mod __UIKitCore; +#[path = "UIKitDefines.rs"] +mod __UIKitDefines; +#[path = "UILabel.rs"] +mod __UILabel; +#[path = "UILargeContentViewer.rs"] +mod __UILargeContentViewer; +#[path = "UILayoutGuide.rs"] +mod __UILayoutGuide; +#[path = "UILexicon.rs"] +mod __UILexicon; +#[path = "UIListContentConfiguration.rs"] +mod __UIListContentConfiguration; +#[path = "UIListContentImageProperties.rs"] +mod __UIListContentImageProperties; +#[path = "UIListContentTextProperties.rs"] +mod __UIListContentTextProperties; +#[path = "UIListSeparatorConfiguration.rs"] +mod __UIListSeparatorConfiguration; +#[path = "UILocalNotification.rs"] +mod __UILocalNotification; +#[path = "UILocalizedIndexedCollation.rs"] +mod __UILocalizedIndexedCollation; +#[path = "UILongPressGestureRecognizer.rs"] +mod __UILongPressGestureRecognizer; +#[path = "UIManagedDocument.rs"] +mod __UIManagedDocument; +#[path = "UIMenu.rs"] +mod __UIMenu; +#[path = "UIMenuBuilder.rs"] +mod __UIMenuBuilder; +#[path = "UIMenuController.rs"] +mod __UIMenuController; +#[path = "UIMenuElement.rs"] +mod __UIMenuElement; +#[path = "UIMenuLeaf.rs"] +mod __UIMenuLeaf; +#[path = "UIMenuSystem.rs"] +mod __UIMenuSystem; +#[path = "UIMotionEffect.rs"] +mod __UIMotionEffect; +#[path = "UINavigationBar.rs"] +mod __UINavigationBar; +#[path = "UINavigationBarAppearance.rs"] +mod __UINavigationBarAppearance; +#[path = "UINavigationController.rs"] +mod __UINavigationController; +#[path = "UINavigationItem.rs"] +mod __UINavigationItem; +#[path = "UINib.rs"] +mod __UINib; +#[path = "UINibDeclarations.rs"] +mod __UINibDeclarations; +#[path = "UINibLoading.rs"] +mod __UINibLoading; +#[path = "UINotificationFeedbackGenerator.rs"] +mod __UINotificationFeedbackGenerator; +#[path = "UIOpenURLContext.rs"] +mod __UIOpenURLContext; +#[path = "UIPageControl.rs"] +mod __UIPageControl; +#[path = "UIPageViewController.rs"] +mod __UIPageViewController; +#[path = "UIPanGestureRecognizer.rs"] +mod __UIPanGestureRecognizer; +#[path = "UIPasteConfiguration.rs"] +mod __UIPasteConfiguration; +#[path = "UIPasteConfigurationSupporting.rs"] +mod __UIPasteConfigurationSupporting; +#[path = "UIPasteControl.rs"] +mod __UIPasteControl; +#[path = "UIPasteboard.rs"] +mod __UIPasteboard; +#[path = "UIPencilInteraction.rs"] +mod __UIPencilInteraction; +#[path = "UIPickerView.rs"] +mod __UIPickerView; +#[path = "UIPinchGestureRecognizer.rs"] +mod __UIPinchGestureRecognizer; +#[path = "UIPointerAccessory.rs"] +mod __UIPointerAccessory; +#[path = "UIPointerInteraction.rs"] +mod __UIPointerInteraction; +#[path = "UIPointerLockState.rs"] +mod __UIPointerLockState; +#[path = "UIPointerRegion.rs"] +mod __UIPointerRegion; +#[path = "UIPointerStyle.rs"] +mod __UIPointerStyle; +#[path = "UIPopoverBackgroundView.rs"] +mod __UIPopoverBackgroundView; +#[path = "UIPopoverController.rs"] +mod __UIPopoverController; +#[path = "UIPopoverPresentationController.rs"] +mod __UIPopoverPresentationController; +#[path = "UIPopoverPresentationControllerSourceItem.rs"] +mod __UIPopoverPresentationControllerSourceItem; +#[path = "UIPopoverSupport.rs"] +mod __UIPopoverSupport; +#[path = "UIPresentationController.rs"] +mod __UIPresentationController; +#[path = "UIPress.rs"] +mod __UIPress; +#[path = "UIPressesEvent.rs"] +mod __UIPressesEvent; +#[path = "UIPreviewInteraction.rs"] +mod __UIPreviewInteraction; +#[path = "UIPreviewParameters.rs"] +mod __UIPreviewParameters; +#[path = "UIPrintError.rs"] +mod __UIPrintError; +#[path = "UIPrintFormatter.rs"] +mod __UIPrintFormatter; +#[path = "UIPrintInfo.rs"] +mod __UIPrintInfo; +#[path = "UIPrintInteractionController.rs"] +mod __UIPrintInteractionController; +#[path = "UIPrintPageRenderer.rs"] +mod __UIPrintPageRenderer; +#[path = "UIPrintPaper.rs"] +mod __UIPrintPaper; +#[path = "UIPrintServiceExtension.rs"] +mod __UIPrintServiceExtension; +#[path = "UIPrinter.rs"] +mod __UIPrinter; +#[path = "UIPrinterPickerController.rs"] +mod __UIPrinterPickerController; +#[path = "UIProgressView.rs"] +mod __UIProgressView; +#[path = "UIPushBehavior.rs"] +mod __UIPushBehavior; +#[path = "UIReferenceLibraryViewController.rs"] +mod __UIReferenceLibraryViewController; +#[path = "UIRefreshControl.rs"] +mod __UIRefreshControl; +#[path = "UIRegion.rs"] +mod __UIRegion; +#[path = "UIResponder.rs"] +mod __UIResponder; +#[path = "UIResponder+UIActivityItemsConfiguration.rs"] +mod __UIResponder+UIActivityItemsConfiguration; +#[path = "UIRotationGestureRecognizer.rs"] +mod __UIRotationGestureRecognizer; +#[path = "UIScene.rs"] +mod __UIScene; +#[path = "UISceneActivationConditions.rs"] +mod __UISceneActivationConditions; +#[path = "UISceneDefinitions.rs"] +mod __UISceneDefinitions; +#[path = "UISceneEnhancedStateRestoration.rs"] +mod __UISceneEnhancedStateRestoration; +#[path = "UISceneOptions.rs"] +mod __UISceneOptions; +#[path = "UISceneSession.rs"] +mod __UISceneSession; +#[path = "UISceneWindowingBehaviors.rs"] +mod __UISceneWindowingBehaviors; +#[path = "UIScreen.rs"] +mod __UIScreen; +#[path = "UIScreenEdgePanGestureRecognizer.rs"] +mod __UIScreenEdgePanGestureRecognizer; +#[path = "UIScreenMode.rs"] +mod __UIScreenMode; +#[path = "UIScreenshotService.rs"] +mod __UIScreenshotService; +#[path = "UIScribbleInteraction.rs"] +mod __UIScribbleInteraction; +#[path = "UIScrollView.rs"] +mod __UIScrollView; +#[path = "UISearchBar.rs"] +mod __UISearchBar; +#[path = "UISearchContainerViewController.rs"] +mod __UISearchContainerViewController; +#[path = "UISearchController.rs"] +mod __UISearchController; +#[path = "UISearchDisplayController.rs"] +mod __UISearchDisplayController; +#[path = "UISearchSuggestion.rs"] +mod __UISearchSuggestion; +#[path = "UISearchTextField.rs"] +mod __UISearchTextField; +#[path = "UISegmentedControl.rs"] +mod __UISegmentedControl; +#[path = "UISelectionFeedbackGenerator.rs"] +mod __UISelectionFeedbackGenerator; +#[path = "UISheetPresentationController.rs"] +mod __UISheetPresentationController; +#[path = "UISlider.rs"] +mod __UISlider; +#[path = "UISnapBehavior.rs"] +mod __UISnapBehavior; +#[path = "UISplitViewController.rs"] +mod __UISplitViewController; +#[path = "UISpringLoadedInteraction.rs"] +mod __UISpringLoadedInteraction; +#[path = "UISpringLoadedInteractionSupporting.rs"] +mod __UISpringLoadedInteractionSupporting; +#[path = "UIStackView.rs"] +mod __UIStackView; +#[path = "UIStateRestoration.rs"] +mod __UIStateRestoration; +#[path = "UIStatusBarManager.rs"] +mod __UIStatusBarManager; +#[path = "UIStepper.rs"] +mod __UIStepper; +#[path = "UIStoryboard.rs"] +mod __UIStoryboard; +#[path = "UIStoryboardPopoverSegue.rs"] +mod __UIStoryboardPopoverSegue; +#[path = "UIStoryboardSegue.rs"] +mod __UIStoryboardSegue; +#[path = "UIStringDrawing.rs"] +mod __UIStringDrawing; +#[path = "UISwipeActionsConfiguration.rs"] +mod __UISwipeActionsConfiguration; +#[path = "UISwipeGestureRecognizer.rs"] +mod __UISwipeGestureRecognizer; +#[path = "UISwitch.rs"] +mod __UISwitch; +#[path = "UITabBar.rs"] +mod __UITabBar; +#[path = "UITabBarAppearance.rs"] +mod __UITabBarAppearance; +#[path = "UITabBarController.rs"] +mod __UITabBarController; +#[path = "UITabBarItem.rs"] +mod __UITabBarItem; +#[path = "UITableView.rs"] +mod __UITableView; +#[path = "UITableViewCell.rs"] +mod __UITableViewCell; +#[path = "UITableViewController.rs"] +mod __UITableViewController; +#[path = "UITableViewHeaderFooterView.rs"] +mod __UITableViewHeaderFooterView; +#[path = "UITapGestureRecognizer.rs"] +mod __UITapGestureRecognizer; +#[path = "UITargetedDragPreview.rs"] +mod __UITargetedDragPreview; +#[path = "UITargetedPreview.rs"] +mod __UITargetedPreview; +#[path = "UITextChecker.rs"] +mod __UITextChecker; +#[path = "UITextDragPreviewRenderer.rs"] +mod __UITextDragPreviewRenderer; +#[path = "UITextDragURLPreviews.rs"] +mod __UITextDragURLPreviews; +#[path = "UITextDragging.rs"] +mod __UITextDragging; +#[path = "UITextDropProposal.rs"] +mod __UITextDropProposal; +#[path = "UITextDropping.rs"] +mod __UITextDropping; +#[path = "UITextField.rs"] +mod __UITextField; +#[path = "UITextFormattingCoordinator.rs"] +mod __UITextFormattingCoordinator; +#[path = "UITextInput.rs"] +mod __UITextInput; +#[path = "UITextInputTraits.rs"] +mod __UITextInputTraits; +#[path = "UITextInteraction.rs"] +mod __UITextInteraction; +#[path = "UITextItemInteraction.rs"] +mod __UITextItemInteraction; +#[path = "UITextPasteConfigurationSupporting.rs"] +mod __UITextPasteConfigurationSupporting; +#[path = "UITextPasteDelegate.rs"] +mod __UITextPasteDelegate; +#[path = "UITextSearching.rs"] +mod __UITextSearching; +#[path = "UITextView.rs"] +mod __UITextView; +#[path = "UITimingCurveProvider.rs"] +mod __UITimingCurveProvider; +#[path = "UITimingParameters.rs"] +mod __UITimingParameters; +#[path = "UIToolTipInteraction.rs"] +mod __UIToolTipInteraction; +#[path = "UIToolbar.rs"] +mod __UIToolbar; +#[path = "UIToolbarAppearance.rs"] +mod __UIToolbarAppearance; +#[path = "UITouch.rs"] +mod __UITouch; +#[path = "UITrackingLayoutGuide.rs"] +mod __UITrackingLayoutGuide; +#[path = "UITraitCollection.rs"] +mod __UITraitCollection; +#[path = "UIUserActivity.rs"] +mod __UIUserActivity; +#[path = "UIUserNotificationSettings.rs"] +mod __UIUserNotificationSettings; +#[path = "UIVibrancyEffect.rs"] +mod __UIVibrancyEffect; +#[path = "UIVideoEditorController.rs"] +mod __UIVideoEditorController; +#[path = "UIView.rs"] +mod __UIView; +#[path = "UIViewAnimating.rs"] +mod __UIViewAnimating; +#[path = "UIViewConfigurationState.rs"] +mod __UIViewConfigurationState; +#[path = "UIViewController.rs"] +mod __UIViewController; +#[path = "UIViewControllerTransitionCoordinator.rs"] +mod __UIViewControllerTransitionCoordinator; +#[path = "UIViewControllerTransitioning.rs"] +mod __UIViewControllerTransitioning; +#[path = "UIViewPropertyAnimator.rs"] +mod __UIViewPropertyAnimator; +#[path = "UIVisualEffect.rs"] +mod __UIVisualEffect; +#[path = "UIVisualEffectView.rs"] +mod __UIVisualEffectView; +#[path = "UIWebView.rs"] +mod __UIWebView; +#[path = "UIWindow.rs"] +mod __UIWindow; +#[path = "UIWindowScene.rs"] +mod __UIWindowScene; +#[path = "UIWindowSceneActivationAction.rs"] +mod __UIWindowSceneActivationAction; +#[path = "UIWindowSceneActivationConfiguration.rs"] +mod __UIWindowSceneActivationConfiguration; +#[path = "UIWindowSceneActivationInteraction.rs"] +mod __UIWindowSceneActivationInteraction; +#[path = "UIWindowSceneActivationRequestOptions.rs"] +mod __UIWindowSceneActivationRequestOptions; +#[path = "UIWindowSceneGeometry.rs"] +mod __UIWindowSceneGeometry; +#[path = "UIWindowSceneGeometryPreferences.rs"] +mod __UIWindowSceneGeometryPreferences; +#[path = "UIWindowSceneGeometryPreferencesIOS.rs"] +mod __UIWindowSceneGeometryPreferencesIOS; +#[path = "UIWindowSceneGeometryPreferencesMac.rs"] +mod __UIWindowSceneGeometryPreferencesMac; +#[path = "UNNotificationResponse+UIKitAdditions.rs"] +mod __UNNotificationResponse+UIKitAdditions; + +pub use self::__NSAttributedString::{NSDocumentTypeDocumentOption,NSUnderlinePatternDash,NSDefaultAttributesDocumentAttribute,NSTextWritingDirection,NSUnderlineStylePatternSolid,NSUnderlinePatternSolid,NSUnderlineStylePatternDot,NSObliquenessAttributeName,NSUnderlinePatternDashDot,NSDocumentTypeDocumentAttribute,NSSourceTextScalingDocumentOption,NSTextWritingDirectionOverride,NSTextScalingiOS,NSRTFDTextDocumentType,NSStrikethroughColorAttributeName,NSStrokeWidthAttributeName,NSExpansionAttributeName,NSShadowAttributeName,NSUnderlineStyleThick,NSTextEffectLetterpressStyle,NSTextLayoutSectionRange,NSViewSizeDocumentAttribute,NSTextScalingDocumentAttribute,NSUnderlineByWord,NSViewModeDocumentAttribute,NSTextWritingDirectionEmbedding,NSVerticalGlyphFormAttributeName,NSLigatureAttributeName,NSBaselineOffsetAttributeName,NSReadOnlyDocumentAttribute,NSTextLayoutSectionsAttribute,NSTextScalingStandard,NSKernAttributeName,NSWritingDirectionOverride,NSForegroundColorAttributeName,NSUnderlineStyleDouble,NSUnderlineColorAttributeName,NSAttributedStringDocumentAttributeKey,NSTextEffectAttributeName,NSTextLayoutSectionOrientation,NSCocoaVersionDocumentAttribute,NSStrokeColorAttributeName,NSUnderlineStyle,NSTextEffectStyle,NSPaperMarginDocumentAttribute,NSUnderlineStylePatternDashDot,NSTrackingAttributeName,NSViewZoomDocumentAttribute,NSTextLayoutSectionKey,NSSourceTextScalingDocumentAttribute,NSUnderlineStyleAttributeName,NSHyphenationFactorDocumentAttribute,NSHTMLTextDocumentType,NSBackgroundColorAttributeName,NSBackgroundColorDocumentAttribute,NSUnderlineStyleByWord,NSUnderlineStylePatternDash,NSAttributedStringDocumentReadingOptionKey,NSUnderlineStyleNone,NSTextScalingType,NSTargetTextScalingDocumentOption,NSPaperSizeDocumentAttribute,NSDefaultAttributesDocumentOption,NSAttachmentAttributeName,NSFontAttributeName,NSLinkAttributeName,NSDefaultTabIntervalDocumentAttribute,NSUnderlineStylePatternDashDotDot,NSWritingDirectionFormatType,NSRTFTextDocumentType,NSUnderlinePatternDashDotDot,NSParagraphStyleAttributeName,NSWritingDirectionAttributeName,NSPlainTextDocumentType,NSCharacterEncodingDocumentOption,NSUnderlineStyleSingle,NSUnderlinePatternDot,NSCharacterEncodingDocumentAttribute,NSStrikethroughStyleAttributeName,NSAttributedStringDocumentType,NSWritingDirectionEmbedding}; +pub use self::__NSDataAsset::{NSDataAsset,NSDataAssetName}; +pub use self::__NSDiffableDataSourceSectionSnapshot::{NSDiffableDataSourceSectionSnapshot}; +pub use self::__NSItemProvider+UIKitAdditions::{UIItemProviderPresentationSizeProviding,UIPreferredPresentationStyle,UIPreferredPresentationStyleAttachment,UIPreferredPresentationStyleUnspecified,UIPreferredPresentationStyleInline}; +pub use self::__NSLayoutAnchor::{NSLayoutYAxisAnchor,NSLayoutAnchor,NSLayoutXAxisAnchor,NSLayoutDimension}; +pub use self::__NSLayoutConstraint::{NSLayoutFormatAlignAllBottom,NSLayoutAttributeHeight,NSLayoutAttributeLeadingMargin,NSLayoutAttributeTopMargin,NSLayoutFormatAlignAllLastBaseline,NSLayoutFormatAlignAllRight,NSLayoutFormatSpacingBaselineToBaseline,NSLayoutFormatAlignAllBaseline,NSLayoutAttributeTop,UILayoutPriorityDefaultLow,NSLayoutAttributeBottomMargin,NSLayoutFormatAlignAllTop,NSLayoutFormatAlignAllTrailing,NSLayoutAttributeTrailingMargin,NSLayoutAttributeCenterX,NSLayoutFormatAlignAllCenterX,NSLayoutAttributeLeading,NSLayoutAttributeCenterXWithinMargins,NSLayoutRelationLessThanOrEqual,UILayoutPriorityDragThatCannotResizeScene,NSLayoutFormatAlignAllLeading,NSLayoutAttributeTrailing,NSLayoutAttributeCenterY,NSLayoutFormatAlignAllFirstBaseline,NSLayoutAttributeNotAnAttribute,UILayoutPrioritySceneSizeStayPut,NSLayoutAttributeBottom,UILayoutPriorityDefaultHigh,NSLayoutAttributeWidth,NSLayoutRelationEqual,NSLayoutFormatDirectionRightToLeft,NSLayoutRelationGreaterThanOrEqual,NSLayoutAttributeRight,NSLayoutAttributeBaseline,NSLayoutFormatDirectionMask,NSLayoutFormatAlignmentMask,UILayoutPriorityFittingSizeLevel,NSLayoutConstraint,UILayoutSupport,NSLayoutRelation,NSLayoutFormatAlignAllLeft,NSLayoutFormatAlignAllCenterY,NSLayoutFormatDirectionLeftToRight,NSLayoutAttribute,NSLayoutFormatSpacingEdgeToEdge,UILayoutPriority,NSLayoutAttributeLeftMargin,NSLayoutFormatSpacingMask,NSLayoutAttributeLastBaseline,NSLayoutAttributeCenterYWithinMargins,NSLayoutAttributeFirstBaseline,NSLayoutAttributeLeft,NSLayoutFormatOptions,UILayoutPriorityRequired,UILayoutPriorityDragThatCanResizeScene,NSLayoutAttributeRightMargin,NSLayoutFormatDirectionLeadingToTrailing}; +pub use self::__NSLayoutManager::{NSControlCharacterHorizontalTabAction,NSGlyphPropertyControlCharacter,NSControlCharacterActionWhitespace,NSGlyphProperty,NSControlCharacterActionParagraphBreak,NSLayoutManager,NSLayoutManagerDelegate,NSControlCharacterParagraphBreakAction,NSTextLayoutOrientationHorizontal,NSControlCharacterAction,NSGlyphPropertyElastic,NSGlyphPropertyNonBaseCharacter,NSControlCharacterActionHorizontalTab,NSControlCharacterActionLineBreak,NSControlCharacterActionContainerBreak,NSControlCharacterContainerBreakAction,NSControlCharacterLineBreakAction,NSControlCharacterZeroAdvancementAction,NSTextLayoutOrientationVertical,NSTextLayoutOrientation,NSGlyphPropertyNull,NSTextLayoutOrientationProvider,NSControlCharacterWhitespaceAction,NSControlCharacterActionZeroAdvancement}; +pub use self::__NSParagraphStyle::{NSParagraphStyle,NSTextTab,NSLineBreakByCharWrapping,NSTextTabOptionKey,NSTabColumnTerminatorsAttributeName,NSLineBreakByTruncatingMiddle,NSLineBreakByWordWrapping,NSLineBreakMode,NSLineBreakByClipping,NSLineBreakByTruncatingTail,NSLineBreakStrategy,NSLineBreakByTruncatingHead,NSLineBreakStrategyNone,NSLineBreakStrategyHangulWordPriority,NSLineBreakStrategyStandard,NSMutableParagraphStyle,NSLineBreakStrategyPushOut}; +pub use self::__NSShadow::{NSShadow}; +pub use self::__NSStringDrawing::{NSStringDrawingUsesFontLeading,NSStringDrawingOptions,NSStringDrawingUsesDeviceMetrics,NSStringDrawingTruncatesLastVisibleLine,NSStringDrawingContext,NSStringDrawingUsesLineFragmentOrigin}; +pub use self::__NSText::{NSTextAlignmentJustified,NSWritingDirectionRightToLeft,NSTextAlignmentFromCTTextAlignment,NSWritingDirection,NSTextAlignmentCenter,NSTextAlignmentRight,NSTextAlignment,NSWritingDirectionNatural,NSTextAlignmentToCTTextAlignment,NSTextAlignmentLeft,NSWritingDirectionLeftToRight,NSTextAlignmentNatural}; +pub use self::__NSTextAttachment::{NSTextAttachmentContainer,NSTextAttachment,NSAttachmentCharacter,NSTextAttachmentLayout,NSTextAttachmentViewProvider}; +pub use self::__NSTextContainer::{NSTextContainer}; +pub use self::__NSTextContentManager::{NSTextContentStorageDelegate,NSTextContentStorageUnsupportedAttributeAddedNotification,NSTextContentManagerDelegate,NSTextContentManager,NSTextContentManagerEnumerationOptionsReverse,NSTextContentManagerEnumerationOptionsNone,NSTextElementProvider,NSTextContentManagerEnumerationOptions,NSTextContentStorage}; +pub use self::__NSTextElement::{NSTextElement,NSTextParagraph}; +pub use self::__NSTextLayoutFragment::{NSTextLayoutFragmentStateEstimatedUsageBounds,NSTextLayoutFragmentEnumerationOptionsEstimatesSize,NSTextLayoutFragmentEnumerationOptionsEnsuresLayout,NSTextLayoutFragmentEnumerationOptionsReverse,NSTextLayoutFragmentState,NSTextLayoutFragmentStateCalculatedUsageBounds,NSTextLayoutFragment,NSTextLayoutFragmentStateNone,NSTextLayoutFragmentEnumerationOptionsNone,NSTextLayoutFragmentStateLayoutAvailable,NSTextLayoutFragmentEnumerationOptionsEnsuresExtraLineFragment,NSTextLayoutFragmentEnumerationOptions}; +pub use self::__NSTextLayoutManager::{NSTextLayoutManagerSegmentTypeStandard,NSTextLayoutManagerSegmentOptionsRangeNotRequired,NSTextLayoutManagerSegmentOptions,NSTextLayoutManagerSegmentType,NSTextLayoutManagerSegmentTypeSelection,NSTextLayoutManagerSegmentOptionsNone,NSTextLayoutManagerSegmentTypeHighlight,NSTextLayoutManagerSegmentOptionsHeadSegmentExtended,NSTextLayoutManagerSegmentOptionsTailSegmentExtended,NSTextLayoutManagerDelegate,NSTextLayoutManagerSegmentOptionsUpstreamAffinity,NSTextLayoutManager,NSTextLayoutManagerSegmentOptionsMiddleFragmentsExcluded}; +pub use self::__NSTextLineFragment::{NSTextLineFragment}; +pub use self::__NSTextList::{NSTextListMarkerSquare,NSTextListMarkerLowercaseRoman,NSTextListMarkerDiamond,NSTextListMarkerDecimal,NSTextListMarkerDisc,NSTextListMarkerLowercaseHexadecimal,NSTextListOptions,NSTextListMarkerUppercaseLatin,NSTextListPrependEnclosingMarker,NSTextListMarkerCheck,NSTextListMarkerLowercaseLatin,NSTextListMarkerUppercaseRoman,NSTextListMarkerHyphen,NSTextListMarkerLowercaseAlpha,NSTextList,NSTextListMarkerCircle,NSTextListMarkerUppercaseAlpha,NSTextListMarkerUppercaseHexadecimal,NSTextListMarkerFormat,NSTextListMarkerBox,NSTextListMarkerOctal}; +pub use self::__NSTextListElement::{NSTextListElement}; +pub use self::__NSTextRange::{NSTextRange,NSTextLocation}; +pub use self::__NSTextSelection::{NSTextSelection,NSTextSelectionGranularityLine,NSTextSelectionAffinity,NSTextSelectionGranularityParagraph,NSTextSelectionGranularitySentence,NSTextSelectionGranularity,NSTextSelectionAffinityUpstream,NSTextSelectionAffinityDownstream,NSTextSelectionGranularityCharacter,NSTextSelectionGranularityWord}; +pub use self::__NSTextSelectionNavigation::{NSTextSelectionNavigationDirectionBackward,NSTextSelectionNavigationDestinationSentence,NSTextSelectionNavigationModifierExtend,NSTextSelectionNavigationModifierVisual,NSTextSelectionNavigationWritingDirection,NSTextSelectionNavigationLayoutOrientation,NSTextSelectionNavigationLayoutOrientationHorizontal,NSTextSelectionNavigationDestinationLine,NSTextSelectionDataSource,NSTextSelectionNavigationDirectionLeft,NSTextSelectionNavigationModifier,NSTextSelectionNavigationModifierMultiple,NSTextSelectionNavigationWritingDirectionLeftToRight,NSTextSelectionNavigationDestinationContainer,NSTextSelectionNavigation,NSTextSelectionNavigationDestinationCharacter,NSTextSelectionNavigationDestination,NSTextSelectionNavigationDirectionForward,NSTextSelectionNavigationDirectionUp,NSTextSelectionNavigationDirectionDown,NSTextSelectionNavigationDirection,NSTextSelectionNavigationDestinationParagraph,NSTextSelectionNavigationDestinationWord,NSTextSelectionNavigationDestinationDocument,NSTextSelectionNavigationWritingDirectionRightToLeft,NSTextSelectionNavigationDirectionRight,NSTextSelectionNavigationLayoutOrientationVertical}; +pub use self::__NSTextStorage::{NSTextStorageEditedCharacters,NSTextStorageDidProcessEditingNotification,NSTextStorageEditActions,NSTextStorageDelegate,NSTextStorageEditedAttributes,NSTextStorageObserving,NSTextStorage,NSTextStorageWillProcessEditingNotification}; +pub use self::__NSTextViewportLayoutController::{NSTextViewportLayoutControllerDelegate,NSTextViewportLayoutController}; +pub use self::__UIAccelerometer::{UIAccelerometer,UIAccelerationValue,UIAcceleration,UIAccelerometerDelegate}; +pub use self::__UIAccessibility::{UIAccessibilityPostNotification,UIAccessibilityShouldDifferentiateWithoutColor,UIAccessibilityHearingDeviceEarRight,UIAccessibilityIsGuidedAccessEnabled,UIAccessibilityIsBoldTextEnabled,UIAccessibilityIsGrayscaleEnabled,UIAccessibilityScrollDirectionUp,UIAccessibilityIsReduceTransparencyEnabled,UIAccessibilityVoiceOverStatusChanged,UIAccessibilityHearingDevicePairedEarDidChangeNotification,UIAccessibilityIsInvertColorsEnabled,UIAccessibilityHearingDeviceEarNone,UIAccessibilityVoiceOverStatusDidChangeNotification,UIAccessibilityScrollDirectionNext,UIAccessibilityGuidedAccessStatusDidChangeNotification,UIAccessibilitySwitchControlStatusDidChangeNotification,UIAccessibilityVideoAutoplayStatusDidChangeNotification,UIAccessibilityIsSpeakSelectionEnabled,UIAccessibilityIsVoiceOverRunning,UIAccessibilityButtonShapesEnabledStatusDidChangeNotification,UIAccessibilityReadingContent,UIAccessibilityGrayscaleStatusDidChangeNotification,UIAccessibilityRequestGuidedAccessSession,UIAccessibilityReduceTransparencyStatusDidChangeNotification,UIAccessibilityFocusedElement,UIAccessibilityIsClosedCaptioningEnabled,UIAccessibilityIsSwitchControlRunning,UIAccessibilityHearingDeviceEarLeft,UIAccessibilityIsSpeakScreenEnabled,UIAccessibilityHearingDeviceEar,UIAccessibilityScrollDirectionRight,UIAccessibilityScrollDirectionLeft,UIAccessibilityButtonShapesEnabled,UIAccessibilityShouldDifferentiateWithoutColorDidChangeNotification,UIAccessibilityScrollDirection,UIAccessibilitySpeakScreenStatusDidChangeNotification,UIAccessibilityAssistiveTouchStatusDidChangeNotification,UIAccessibilityScrollDirectionPrevious,UIAccessibilityIsVideoAutoplayEnabled,UIAccessibilityOnOffSwitchLabelsDidChangeNotification,UIAccessibilityIsShakeToUndoEnabled,UIAccessibilityConvertPathToScreenCoordinates,UIAccessibilityBoldTextStatusDidChangeNotification,UIAccessibilityHearingDeviceEarBoth,UIAccessibilityIsAssistiveTouchRunning,UIAccessibilityConvertFrameToScreenCoordinates,UIAccessibilityDarkerSystemColorsEnabled,UIAccessibilityDarkerSystemColorsStatusDidChangeNotification,UIAccessibilityMonoAudioStatusDidChangeNotification,UIAccessibilityClosedCaptioningStatusDidChangeNotification,UIAccessibilityPrefersCrossFadeTransitions,UIAccessibilityIsOnOffSwitchLabelsEnabled,UIAccessibilityShakeToUndoDidChangeNotification,UIAccessibilitySpeakSelectionStatusDidChangeNotification,UIAccessibilityScrollDirectionDown,UIAccessibilityIsMonoAudioEnabled,UIAccessibilityHearingDevicePairedEar,UIAccessibilityInvertColorsStatusDidChangeNotification,UIAccessibilityIsReduceMotionEnabled,UIAccessibilityReduceMotionStatusDidChangeNotification,UIAccessibilityPrefersCrossFadeTransitionsStatusDidChangeNotification}; +pub use self::__UIAccessibilityAdditions::{UIScrollViewAccessibilityDelegate,UIPickerViewAccessibilityDelegate}; +pub use self::__UIAccessibilityConstants::{UIAccessibilityAnnouncementDidFinishNotification,UIAccessibilityNotificationSwitchControlIdentifier,UIAccessibilityContainerTypeDataTable,UIAccessibilityTraitCausesPageTurn,UIAccessibilityTextualContextMessaging,UIAccessibilityTraitImage,UIAccessibilityTraitLink,UIAccessibilityPageScrolledNotification,UIAccessibilityTraitSummaryElement,UIAccessibilityTraits,UIAccessibilityTraitAllowsDirectInteraction,UIAccessibilityContainerTypeList,UIAccessibilityAnnouncementKeyStringValue,UIAccessibilityNotificationVoiceOverIdentifier,UIAccessibilityTextAttributeContext,UIAccessibilityAssistiveTechnologyKey,UIAccessibilityUnfocusedElementKey,UIAccessibilitySpeechAttributeLanguage,UIAccessibilityTextAttributeCustom,UIAccessibilityNotifications,UIAccessibilityResumeAssistiveTechnologyNotification,UIAccessibilitySpeechAttributeIPANotation,UIAccessibilityTraitNone,UIAccessibilityNavigationStyleSeparate,UIAccessibilityPauseAssistiveTechnologyNotification,UIAccessibilityTextualContext,UIAccessibilityContainerTypeSemanticGroup,UIAccessibilityTraitUpdatesFrequently,UIAccessibilityTextualContextWordProcessing,UIAccessibilityTraitSelected,UIAccessibilityAssistiveTechnologyIdentifier,UIAccessibilityNavigationStyleAutomatic,UIAccessibilityContainerTypeLandmark,UIAccessibilityTextAttributeHeadingLevel,UIAccessibilityNavigationStyle,UIAccessibilityTraitTabBar,UIAccessibilityContainerTypeNone,UIAccessibilityTextualContextConsole,UIAccessibilityFocusedElementKey,UIAccessibilityTraitNotEnabled,UIAccessibilityScreenChangedNotification,UIAccessibilityTraitStaticText,UIAccessibilityAnnouncementKeyWasSuccessful,UIAccessibilitySpeechAttributePunctuation,UIAccessibilityTraitStartsMediaSession,UIAccessibilityLayoutChangedNotification,UIAccessibilityAnnouncementNotification,UIAccessibilitySpeechAttributeQueueAnnouncement,UIAccessibilitySpeechAttributeSpellOut,UIAccessibilityContainerType,UIAccessibilityNavigationStyleCombined,UIAccessibilityTraitSearchField,UIAccessibilityTraitButton,UIAccessibilityTextualContextNarrative,UIAccessibilityTextualContextFileSystem,UIAccessibilityTextualContextSourceCode,UIAccessibilityElementFocusedNotification,UIAccessibilitySpeechAttributePitch,UIAccessibilityTraitPlaysSound,UIAccessibilityTraitKeyboardKey,UIAccessibilityTraitAdjustable,UIAccessibilityTraitHeader,UIAccessibilityTextualContextSpreadsheet}; +pub use self::__UIAccessibilityContainer::{UIAccessibilityContainerDataTable,UIAccessibilityContainerDataTableCell}; +pub use self::__UIAccessibilityContentSizeCategoryImageAdjusting::{UIAccessibilityContentSizeCategoryImageAdjusting}; +pub use self::__UIAccessibilityCustomAction::{UIAccessibilityCustomAction,UIAccessibilityCustomActionHandler}; +pub use self::__UIAccessibilityCustomRotor::{UIAccessibilityCustomSystemRotorTypeNone,UIAccessibilityCustomRotorDirection,UIAccessibilityCustomSystemRotorTypeMisspelledWord,UIAccessibilityCustomRotorSearch,UIAccessibilityCustomRotorDirectionNext,UIAccessibilityCustomSystemRotorTypeHeadingLevel5,UIAccessibilityCustomSystemRotorTypeHeadingLevel6,UIAccessibilityCustomSystemRotorTypeItalicText,UIAccessibilityCustomRotorSearchPredicate,UIAccessibilityCustomSystemRotorTypeVisitedLink,UIAccessibilityCustomSystemRotorType,UIAccessibilityCustomSystemRotorTypeHeadingLevel2,UIAccessibilityCustomSystemRotorTypeImage,UIAccessibilityCustomSystemRotorTypeLandmark,UIAccessibilityCustomRotorDirectionPrevious,UIAccessibilityCustomSystemRotorTypeHeadingLevel4,UIAccessibilityCustomSystemRotorTypeTextField,UIAccessibilityCustomRotor,UIAccessibilityCustomSystemRotorTypeHeadingLevel1,UIAccessibilityCustomSystemRotorTypeBoldText,UIAccessibilityCustomSystemRotorTypeUnderlineText,UIAccessibilityCustomSystemRotorTypeTable,UIAccessibilityCustomSystemRotorTypeList,UIAccessibilityCustomSystemRotorTypeHeadingLevel3,UIAccessibilityCustomRotorItemResult,UIAccessibilityCustomSystemRotorTypeLink,UIAccessibilityCustomSystemRotorTypeHeading}; +pub use self::__UIAccessibilityElement::{UIAccessibilityElement}; +pub use self::__UIAccessibilityIdentification::{UIAccessibilityIdentification}; +pub use self::__UIAccessibilityLocationDescriptor::{UIAccessibilityLocationDescriptor}; +pub use self::__UIAccessibilityZoom::{UIAccessibilityRegisterGestureConflictWithZoom,UIAccessibilityZoomFocusChanged,UIAccessibilityZoomTypeInsertionPoint,UIAccessibilityZoomType}; +pub use self::__UIAction::{UIActionPasteAndGo,UIActionIdentifier,UIActionPasteAndSearch,UIActionPaste,UIActionHandler,UIActionPasteAndMatchStyle,UIAction}; +pub use self::__UIActionSheet::{UIActionSheetDelegate,UIActionSheetStyleBlackOpaque,UIActionSheet,UIActionSheetStyle,UIActionSheetStyleAutomatic,UIActionSheetStyleDefault,UIActionSheetStyleBlackTranslucent}; +pub use self::__UIActivity::{UIActivityTypeAirDrop,UIActivityTypePostToWeibo,UIActivityTypePrint,UIActivityCategoryAction,UIActivityTypeAddToReadingList,UIActivityTypePostToVimeo,UIActivityTypePostToTwitter,UIActivityTypeAssignToContact,UIActivityTypeOpenInIBooks,UIActivityTypeMarkupAsPDF,UIActivity,UIActivityTypeCollaborationCopyLink,UIActivityTypeSharePlay,UIActivityCategory,UIActivityTypePostToTencentWeibo,UIActivityTypeCollaborationInviteWithLink,UIActivityTypeSaveToCameraRoll,UIActivityTypeMail,UIActivityCategoryShare,UIActivityType,UIActivityTypePostToFacebook,UIActivityTypeMessage,UIActivityTypeCopyToPasteboard,UIActivityTypePostToFlickr}; +pub use self::__UIActivityIndicatorView::{UIActivityIndicatorViewStyleMedium,UIActivityIndicatorViewStyleLarge,UIActivityIndicatorViewStyle,UIActivityIndicatorViewStyleWhiteLarge,UIActivityIndicatorViewStyleWhite,UIActivityIndicatorViewStyleGray,UIActivityIndicatorView}; +pub use self::__UIActivityItemProvider::{UIActivityItemSource,UIActivityItemProvider}; +pub use self::__UIActivityItemsConfiguration::{UIActivityItemsConfiguration}; +pub use self::__UIActivityItemsConfigurationReading::{UIActivityItemsConfigurationMetadataKeyLinkPresentationMetadata,UIActivityItemsConfigurationMetadataKeyMessageBody,UIActivityItemsConfigurationPreviewIntent,UIActivityItemsConfigurationPreviewIntentThumbnail,UIActivityItemsConfigurationInteractionShare,UIActivityItemsConfigurationMetadataKeyTitle,UIActivityItemsConfigurationReading,UIActivityItemsConfigurationPreviewIntentFullSize,UIActivityItemsConfigurationProviding,UIActivityItemsConfigurationMetadataKey,UIActivityItemsConfigurationInteraction}; +pub use self::__UIActivityViewController::{UIActivityViewController,UIActivityViewControllerCompletionWithItemsHandler,UIActivityViewControllerCompletionHandler}; +pub use self::__UIAlertController::{UIAlertActionStyle,UIAlertActionStyleDestructive,UIAlertController,UIAlertActionStyleDefault,UIAlertControllerSeverityDefault,UIAlertActionStyleCancel,UIAlertControllerSeverity,UIAlertAction,UIAlertControllerSeverityCritical,UIAlertControllerStyle,UIAlertControllerStyleActionSheet,UIAlertControllerStyleAlert}; +pub use self::__UIAlertView::{UIAlertViewStyleDefault,UIAlertViewStyle,UIAlertViewStyleSecureTextInput,UIAlertViewStylePlainTextInput,UIAlertViewStyleLoginAndPasswordInput,UIAlertView,UIAlertViewDelegate}; +pub use self::__UIAppearance::{UIAppearance,UIAppearanceContainer}; +pub use self::__UIApplication::{UIApplicationStateBackground,UIApplicationDidChangeStatusBarOrientationNotification,UIStatusBarAnimationFade,UIInterfaceOrientationMaskLandscape,UIBackgroundRefreshStatusAvailable,UIStatusBarAnimationSlide,UIInterfaceOrientationMask,UIApplicationInvalidInterfaceOrientationException,UIRemoteNotificationTypeNone,UIRemoteNotificationTypeBadge,UIBackgroundRefreshStatusDenied,UIRemoteNotificationTypeSound,UIApplicationDidBecomeActiveNotification,UIApplicationOpenExternalURLOptionsEventAttributionKey,UIInterfaceOrientationMaskAll,UIStatusBarStyleDarkContent,UIInterfaceOrientationPortrait,UIApplicationLaunchOptionsAnnotationKey,UIStatusBarAnimationNone,UIApplicationStatusBarOrientationUserInfoKey,UIInterfaceOrientationMaskAllButUpsideDown,UIStatusBarStyleBlackTranslucent,UIMinimumKeepAliveTimeout,UIApplicationWillChangeStatusBarOrientationNotification,UIApplicationWillChangeStatusBarFrameNotification,UIApplicationOpenURLOptionsAnnotationKey,UIApplicationKeyboardExtensionPointIdentifier,UIApplicationStatusBarFrameUserInfoKey,UIApplicationDidFinishLaunchingNotification,UIApplicationUserDidTakeScreenshotNotification,UIApplicationDidReceiveMemoryWarningNotification,UIApplicationLaunchOptionsCloudKitShareMetadataKey,UIApplicationStateActive,UIInterfaceOrientationMaskPortrait,UIApplicationLaunchOptionsURLKey,UIApplicationBackgroundFetchIntervalMinimum,UIRemoteNotificationTypeAlert,UIRemoteNotificationTypeNewsstandContentAvailability,UITrackingRunLoopMode,UIApplicationBackgroundRefreshStatusDidChangeNotification,UIApplicationStateInactive,UIApplicationExtensionPointIdentifier,UIBackgroundFetchResultFailed,UIApplicationProtectedDataWillBecomeUnavailable,UIInterfaceOrientationMaskLandscapeLeft,UIStatusBarStyleDefault,UIApplicationMain,UIInterfaceOrientationLandscapeLeft,UIInterfaceOrientationPortraitUpsideDown,UIBackgroundFetchResultNewData,UIApplicationLaunchOptionsBluetoothCentralsKey,UIApplicationOpenNotificationSettingsURLString,UIBackgroundTaskIdentifier,UIApplicationWillEnterForegroundNotification,UIApplicationOpenURLOptionsEventAttributionKey,UIBackgroundFetchResultNoData,UIApplicationLaunchOptionsSourceApplicationKey,UIApplicationLaunchOptionsLocationKey,UIApplicationOpenURLOptionsKey,UIApplicationLaunchOptionsBluetoothPeripheralsKey,UIApplicationOpenExternalURLOptionsKey,UIApplicationLaunchOptionsShortcutItemKey,UIApplication,UIStatusBarStyleLightContent,UIApplicationState,UIApplicationLaunchOptionsLocalNotificationKey,UIApplicationDidEnterBackgroundNotification,UIApplicationLaunchOptionsNewsstandDownloadsKey,UIStatusBarAnimation,UIApplicationProtectedDataDidBecomeAvailable,UIApplicationLaunchOptionsUserActivityTypeKey,UIInterfaceOrientationLandscapeRight,UIInterfaceOrientationMaskPortraitUpsideDown,UIBackgroundTaskInvalid,UIInterfaceOrientationUnknown,UIStatusBarStyleBlackOpaque,UIBackgroundFetchResult,UIBackgroundRefreshStatus,UIBackgroundRefreshStatusRestricted,UIStatusBarStyle,UIApplicationLaunchOptionsKey,UIApplicationLaunchOptionsRemoteNotificationKey,UIInterfaceOrientation,UIApplicationLaunchOptionsEventAttributionKey,UIApplicationSignificantTimeChangeNotification,UIApplicationDidChangeStatusBarFrameNotification,UIApplicationLaunchOptionsUserActivityDictionaryKey,UIApplicationOpenURLOptionsSourceApplicationKey,UIApplicationOpenURLOptionsOpenInPlaceKey,UIInterfaceOrientationMaskLandscapeRight,UIApplicationWillResignActiveNotification,UIRemoteNotificationType,UIApplicationBackgroundFetchIntervalNever,UIApplicationWillTerminateNotification,UIApplicationOpenSettingsURLString,UIApplicationDelegate,UIApplicationOpenURLOptionUniversalLinksOnly}; +pub use self::__UIApplicationShortcutItem::{UIApplicationShortcutIconTypeConfirmation,UIApplicationShortcutIconTypeAdd,UIApplicationShortcutIconTypeShuffle,UIApplicationShortcutIconTypeBookmark,UIApplicationShortcutIconType,UIApplicationShortcutIconTypeAlarm,UIApplicationShortcutIconTypeCompose,UIApplicationShortcutIconTypeAudio,UIApplicationShortcutIcon,UIApplicationShortcutIconTypeTask,UIApplicationShortcutIconTypeProhibit,UIApplicationShortcutIconTypeCloud,UIMutableApplicationShortcutItem,UIApplicationShortcutIconTypeDate,UIApplicationShortcutIconTypeFavorite,UIApplicationShortcutIconTypeSearch,UIApplicationShortcutIconTypeMail,UIApplicationShortcutIconTypePlay,UIApplicationShortcutIconTypeLocation,UIApplicationShortcutIconTypeCaptureVideo,UIApplicationShortcutIconTypeTaskCompleted,UIApplicationShortcutIconTypeContact,UIApplicationShortcutIconTypeLove,UIApplicationShortcutIconTypeTime,UIApplicationShortcutItem,UIApplicationShortcutIconTypeHome,UIApplicationShortcutIconTypeInvitation,UIApplicationShortcutIconTypeMessage,UIApplicationShortcutIconTypeCapturePhoto,UIApplicationShortcutIconTypePause,UIApplicationShortcutIconTypeUpdate,UIApplicationShortcutIconTypeShare,UIApplicationShortcutIconTypeMarkLocation}; +pub use self::__UIAttachmentBehavior::{UIAttachmentBehaviorType,UIFloatRangeIsInfinite,UIAttachmentBehaviorTypeAnchor,UIFloatRangeZero,UIFloatRange,UIAttachmentBehaviorTypeItems,UIAttachmentBehavior,UIFloatRangeInfinite}; +pub use self::__UIBackgroundConfiguration::{UIBackgroundConfiguration}; +pub use self::__UIBandSelectionInteraction::{UIBandSelectionInteractionState,UIBandSelectionInteractionStateBegan,UIBandSelectionInteractionStateEnded,UIBandSelectionInteractionStatePossible,UIBandSelectionInteraction,UIBandSelectionInteractionStateSelecting}; +pub use self::__UIBarAppearance::{UIBarAppearance}; +pub use self::__UIBarButtonItem::{UIBarButtonItemStyle,UIBarButtonSystemItemPlay,UIBarButtonSystemItemPageCurl,UIBarButtonItem,UIBarButtonSystemItemReply,UIBarButtonSystemItemRewind,UIBarButtonSystemItemFastForward,UIBarButtonSystemItemRefresh,UIBarButtonSystemItemRedo,UIBarButtonItemStyleBordered,UIBarButtonSystemItemPause,UIBarButtonSystemItemFixedSpace,UIBarButtonSystemItemClose,UIBarButtonSystemItemCamera,UIBarButtonSystemItemOrganize,UIBarButtonSystemItemFlexibleSpace,UIBarButtonSystemItemUndo,UIBarButtonSystemItemCancel,UIBarButtonItemStylePlain,UIBarButtonSystemItemDone,UIBarButtonSystemItem,UIBarButtonSystemItemTrash,UIBarButtonSystemItemSave,UIBarButtonSystemItemAdd,UIBarButtonSystemItemBookmarks,UIBarButtonSystemItemAction,UIBarButtonSystemItemSearch,UIBarButtonSystemItemCompose,UIBarButtonItemStyleDone,UIBarButtonSystemItemStop,UIBarButtonSystemItemEdit}; +pub use self::__UIBarButtonItemAppearance::{UIBarButtonItemAppearance,UIBarButtonItemStateAppearance}; +pub use self::__UIBarButtonItemGroup::{UIBarButtonItemGroup}; +pub use self::__UIBarCommon::{UIBarMetricsDefault,UIBarMetricsDefaultPrompt,UIBarPositionBottom,UIBarPositioning,UIBarPositionTop,UIBarMetricsCompactPrompt,UIBarMetricsLandscapePhone,UIBarMetricsLandscapePhonePrompt,UIBarPositioningDelegate,UIBarMetricsCompact,UIBarMetrics,UIBarPositionAny,UIBarPositionTopAttached,UIBarPosition}; +pub use self::__UIBarItem::{UIBarItem}; +pub use self::__UIBehavioralStyle::{UIBehavioralStyleMac,UIBehavioralStyleAutomatic,UIBehavioralStyle,UIBehavioralStylePad}; +pub use self::__UIBezierPath::{UIBezierPath}; +pub use self::__UIBlurEffect::{UIBlurEffectStyleSystemUltraThinMaterialLight,UIBlurEffectStyleSystemMaterialLight,UIBlurEffectStyleSystemThickMaterialLight,UIBlurEffectStyleDark,UIBlurEffectStyleSystemThickMaterialDark,UIBlurEffectStyleSystemThinMaterialLight,UIBlurEffectStyle,UIBlurEffectStyleSystemChromeMaterial,UIBlurEffectStyleSystemChromeMaterialLight,UIBlurEffectStyleSystemThinMaterial,UIBlurEffectStyleExtraDark,UIBlurEffectStyleProminent,UIBlurEffectStyleSystemMaterialDark,UIBlurEffectStyleLight,UIBlurEffectStyleExtraLight,UIBlurEffectStyleSystemMaterial,UIBlurEffectStyleSystemThickMaterial,UIBlurEffectStyleSystemUltraThinMaterialDark,UIBlurEffectStyleSystemThinMaterialDark,UIBlurEffectStyleSystemChromeMaterialDark,UIBlurEffectStyleRegular,UIBlurEffectStyleSystemUltraThinMaterial,UIBlurEffect}; +pub use self::__UIButton::{UIButtonPointerStyleProvider,UIButtonRoleNormal,UIButtonTypeDetailDisclosure,UIButtonTypeClose,UIButtonTypeInfoLight,UIButtonTypeCustom,UIButtonConfigurationUpdateHandler,UIButtonTypeSystem,UIButtonType,UIButtonTypeContactAdd,UIButtonTypeInfoDark,UIButtonTypePlain,UIButtonRole,UIButtonRoleCancel,UIButtonRoleDestructive,UIButtonTypeRoundedRect,UIButton,UIButtonRolePrimary}; +pub use self::__UIButtonConfiguration::{UIButtonConfigurationSizeMedium,UIButtonConfigurationCornerStyleDynamic,UIButtonConfigurationCornerStyleCapsule,UIButtonConfigurationIndicator,UIButtonConfigurationSizeMini,UIButtonConfigurationSizeSmall,UIButtonConfigurationCornerStyleSmall,UIButtonConfigurationSize,UIButtonConfigurationSizeLarge,UIButtonConfigurationTitleAlignment,UIButtonConfigurationTitleAlignmentTrailing,UIButtonConfigurationCornerStyle,UIButtonConfigurationCornerStyleFixed,UIButtonConfigurationMacIdiomStyleBorderless,UIButtonConfigurationMacIdiomStyleBorderlessTinted,UIConfigurationTextAttributesTransformer,UIButtonConfigurationMacIdiomStyleBordered,UIButtonConfigurationIndicatorAutomatic,UIButtonConfigurationTitleAlignmentCenter,UIButtonConfigurationMacIdiomStyle,UIButtonConfigurationIndicatorNone,UIButtonConfigurationTitleAlignmentAutomatic,UIButtonConfigurationTitleAlignmentLeading,UIButtonConfigurationCornerStyleLarge,UIButtonConfigurationMacIdiomStyleAutomatic,UIButtonConfigurationIndicatorPopup,UIButtonConfigurationCornerStyleMedium,UIButtonConfiguration}; +pub use self::__UICalendarSelection::{UICalendarSelection}; +pub use self::__UICalendarSelectionMultiDate::{UICalendarSelectionMultiDate,UICalendarSelectionMultiDateDelegate}; +pub use self::__UICalendarSelectionSingleDate::{UICalendarSelectionSingleDateDelegate,UICalendarSelectionSingleDate}; +pub use self::__UICalendarView::{UICalendarView,UICalendarViewDelegate}; +pub use self::__UICalendarViewDecoration::{UICalendarViewDecorationSize,UICalendarViewDecorationSizeLarge,UICalendarViewDecoration,UICalendarViewDecorationSizeSmall,UICalendarViewDecorationSizeMedium}; +pub use self::__UICellAccessory::{UICellAccessoryPopUpMenu,UICellAccessory,UICellAccessoryOutlineDisclosureStyle,UICellAccessoryReorder,UICellAccessoryLabel,UICellAccessoryOutlineDisclosureStyleAutomatic,UICellAccessoryPlacement,UICellAccessoryDisplayedWhenNotEditing,UICellAccessoryDisclosureIndicator,UICellAccessoryPlacementTrailing,UICellAccessoryOutlineDisclosure,UICellAccessoryInsert,UICellAccessoryPositionBeforeAccessoryOfClass,UICellAccessoryCustomView,UICellAccessoryDisplayedAlways,UICellAccessoryPlacementLeading,UICellAccessoryPosition,UICellAccessoryDetail,UICellAccessoryPositionAfterAccessoryOfClass,UICellAccessoryStandardDimension,UICellAccessoryCheckmark,UICellAccessoryDisplayedState,UICellAccessoryDelete,UICellAccessoryDisplayedWhenEditing,UICellAccessoryOutlineDisclosureStyleHeader,UICellAccessoryMultiselect,UICellAccessoryOutlineDisclosureStyleCell}; +pub use self::__UICellConfigurationState::{UICellConfigurationDragStateDragging,UICellConfigurationDropStateNotTargeted,UICellConfigurationDropStateTargeted,UICellConfigurationState,UICellConfigurationDragStateNone,UICellConfigurationDragStateLifting,UICellConfigurationDropStateNone,UICellConfigurationDropState,UICellConfigurationDragState}; +pub use self::__UICloudSharingController::{UICloudSharingPermissionAllowPublic,UICloudSharingPermissionOptions,UICloudSharingPermissionAllowReadWrite,UICloudSharingPermissionAllowPrivate,UICloudSharingControllerDelegate,UICloudSharingPermissionStandard,UICloudSharingPermissionAllowReadOnly,UICloudSharingController}; +pub use self::__UICollectionLayoutList::{UICollectionLayoutListConfiguration,UICollectionLayoutListAppearanceSidebarPlain,UICollectionLayoutListHeaderMode,UICollectionLayoutListHeaderModeFirstItemInSection,UICollectionLayoutListFooterModeNone,UICollectionLayoutListItemSeparatorHandler,UICollectionLayoutListHeaderModeSupplementary,UICollectionLayoutListFooterModeSupplementary,UICollectionLayoutListSwipeActionsConfigurationProvider,UICollectionLayoutListAppearancePlain,UICollectionLayoutListAppearanceGrouped,UICollectionLayoutListAppearanceSidebar,UICollectionLayoutListAppearanceInsetGrouped,UICollectionLayoutListHeaderModeNone,UICollectionLayoutListFooterMode,UICollectionLayoutListAppearance}; +pub use self::__UICollectionView::{UICollectionViewScrollPositionTop,UICollectionViewDataSourcePrefetching,UICollectionViewDropIntent,UICollectionViewScrollPositionBottom,UICollectionViewDropCoordinator,UICollectionViewDataSource,UICollectionViewReorderingCadenceSlow,UICollectionViewScrollPositionRight,UICollectionViewDelegate,UICollectionView,UICollectionViewSelfSizingInvalidation,UICollectionViewLayoutInteractiveTransitionCompletion,UICollectionViewFocusUpdateContext,UICollectionViewDropItem,UICollectionViewReorderingCadenceFast,UICollectionViewScrollPositionNone,UICollectionViewScrollPositionLeft,UICollectionViewScrollPosition,UICollectionViewReorderingCadenceImmediate,UICollectionViewPlaceholder,UICollectionViewDragDelegate,UICollectionViewSelfSizingInvalidationDisabled,UICollectionViewSelfSizingInvalidationEnabled,UICollectionViewDropIntentInsertIntoDestinationIndexPath,UICollectionViewScrollPositionCenteredVertically,UICollectionViewDropDelegate,UICollectionViewScrollPositionCenteredHorizontally,UICollectionViewSelfSizingInvalidationEnabledIncludingConstraints,UICollectionViewDropPlaceholder,UICollectionViewDropIntentInsertAtDestinationIndexPath,UICollectionViewDropProposal,UICollectionViewReorderingCadence,UICollectionViewDropIntentUnspecified,UICollectionViewDropPlaceholderContext}; +pub use self::__UICollectionViewCell::{UICollectionViewCellDragStateLifting,UICollectionViewCellDragStateNone,UICollectionViewCellDragState,UICollectionViewCellDragStateDragging,UICollectionViewCellConfigurationUpdateHandler,UICollectionViewCell,UICollectionReusableView}; +pub use self::__UICollectionViewCompositionalLayout::{UIContentInsetsReferenceNone,UIContentInsetsReferenceLayoutMargins,NSCollectionLayoutGroupCustomItemProvider,UICollectionLayoutSectionOrthogonalScrollingBehaviorContinuousGroupLeadingBoundary,NSCollectionLayoutBoundarySupplementaryItem,NSCollectionLayoutVisibleItem,UICollectionLayoutSectionOrthogonalScrollingBehavior,NSCollectionLayoutSection,NSCollectionLayoutSize,NSCollectionLayoutEnvironment,UICollectionViewCompositionalLayout,NSCollectionLayoutSpacing,NSCollectionLayoutSupplementaryItem,NSCollectionLayoutDimension,UICollectionViewCompositionalLayoutSectionProvider,NSCollectionLayoutDecorationItem,UICollectionLayoutSectionOrthogonalScrollingBehaviorGroupPaging,UICollectionLayoutSectionOrthogonalScrollingBehaviorNone,UICollectionLayoutSectionOrthogonalScrollingBehaviorPaging,NSCollectionLayoutItem,NSCollectionLayoutGroupCustomItem,UIContentInsetsReference,UIContentInsetsReferenceSafeArea,UICollectionViewCompositionalLayoutConfiguration,NSCollectionLayoutContainer,UIContentInsetsReferenceAutomatic,NSCollectionLayoutGroup,NSCollectionLayoutAnchor,UIContentInsetsReferenceReadableContent,UICollectionLayoutSectionOrthogonalScrollingBehaviorGroupPagingCentered,NSCollectionLayoutEdgeSpacing,NSCollectionLayoutSectionVisibleItemsInvalidationHandler,UICollectionLayoutSectionOrthogonalScrollingBehaviorContinuous}; +pub use self::__UICollectionViewController::{UICollectionViewController}; +pub use self::__UICollectionViewFlowLayout::{UICollectionViewFlowLayoutAutomaticSize,UICollectionViewFlowLayoutSectionInsetFromLayoutMargins,UICollectionViewFlowLayoutInvalidationContext,UICollectionViewFlowLayoutSectionInsetFromContentInset,UICollectionViewFlowLayoutSectionInsetFromSafeArea,UICollectionViewDelegateFlowLayout,UICollectionViewFlowLayout,UICollectionViewFlowLayoutSectionInsetReference}; +pub use self::__UICollectionViewItemRegistration::{UICollectionViewCellRegistration,UICollectionViewSupplementaryRegistration,UICollectionViewCellRegistrationConfigurationHandler,UICollectionViewSupplementaryRegistrationConfigurationHandler}; +pub use self::__UICollectionViewLayout::{UICollectionViewScrollDirectionVertical,UICollectionElementKindSectionHeader,UICollectionViewScrollDirectionHorizontal,UICollectionViewLayoutInvalidationContext,UICollectionElementCategorySupplementaryView,UICollectionElementCategoryCell,UICollectionElementKindSectionFooter,UICollectionElementCategory,UICollectionViewLayout,UICollectionViewLayoutAutomaticDimension,UICollectionViewScrollDirection,UICollectionViewLayoutAttributes,UICollectionElementCategoryDecorationView}; +pub use self::__UICollectionViewListCell::{UICollectionViewListCell}; +pub use self::__UICollectionViewTransitionLayout::{UICollectionViewTransitionLayout}; +pub use self::__UICollectionViewUpdateItem::{UICollectionUpdateActionReload,UICollectionUpdateActionDelete,UICollectionViewUpdateItem,UICollectionUpdateActionMove,UICollectionUpdateActionInsert,UICollectionUpdateActionNone,UICollectionUpdateAction}; +pub use self::__UICollisionBehavior::{UICollisionBehaviorMode,UICollisionBehavior,UICollisionBehaviorModeBoundaries,UICollisionBehaviorDelegate,UICollisionBehaviorModeEverything,UICollisionBehaviorModeItems}; +pub use self::__UIColor::{UIColor}; +pub use self::__UIColorPickerViewController::{UIColorPickerViewControllerDelegate,UIColorPickerViewController}; +pub use self::__UIColorWell::{UIColorWell}; +pub use self::__UICommand::{UIKeyModifierAlphaShift,UICommandAlternate,UICommand,UIKeyModifierControl,UIKeyModifierAlternate,UIKeyModifierFlags,UIKeyModifierNumericPad,UIKeyModifierCommand,UICommandTagShare,UIKeyModifierShift}; +pub use self::__UIConfigurationColorTransformer::{UIConfigurationColorTransformerGrayscale,UIConfigurationColorTransformerPreferredTint,UIConfigurationColorTransformer,UIConfigurationColorTransformerMonochromeTint}; +pub use self::__UIConfigurationState::{UIConfigurationState,UIConfigurationStateCustomKey}; +pub use self::__UIContentConfiguration::{UIContentView,UIContentConfiguration}; +pub use self::__UIContentSizeCategory::{UIContentSizeCategoryLarge,UIContentSizeCategoryAccessibilityExtraExtraLarge,UIContentSizeCategoryAccessibilityMedium,UIContentSizeCategoryExtraExtraExtraLarge,UIContentSizeCategoryAccessibilityExtraLarge,UIContentSizeCategoryIsAccessibilityCategory,UIContentSizeCategoryExtraExtraLarge,UIContentSizeCategoryUnspecified,UIContentSizeCategoryMedium,UIContentSizeCategory,UIContentSizeCategoryAccessibilityExtraExtraExtraLarge,UIContentSizeCategoryDidChangeNotification,UIContentSizeCategoryNewValueKey,UIContentSizeCategoryExtraLarge,UIContentSizeCategoryCompareToCategory,UIContentSizeCategoryAccessibilityLarge,UIContentSizeCategorySmall,UIContentSizeCategoryExtraSmall}; +pub use self::__UIContentSizeCategoryAdjusting::{UIContentSizeCategoryAdjusting}; +pub use self::__UIContextMenuConfiguration::{UIContextMenuConfigurationElementOrderFixed,UIContextMenuContentPreviewProvider,UIContextMenuConfiguration,UIContextMenuConfigurationElementOrderAutomatic,UIContextMenuConfigurationElementOrder,UIContextMenuActionProvider,UIContextMenuConfigurationElementOrderPriority}; +pub use self::__UIContextMenuInteraction::{UIContextMenuInteractionCommitStylePop,UIContextMenuInteractionAppearanceUnknown,UIContextMenuInteractionCommitStyleDismiss,UIContextMenuInteractionCommitStyle,UIContextMenuInteractionAppearanceCompact,UIContextMenuInteractionCommitAnimating,UIContextMenuInteractionAppearanceRich,UIContextMenuInteractionAppearance,UIContextMenuInteractionDelegate,UIContextMenuInteractionAnimating,UIContextMenuInteraction}; +pub use self::__UIContextualAction::{UIContextualActionHandler,UIContextualActionStyleNormal,UIContextualActionStyle,UIContextualActionStyleDestructive,UIContextualAction}; +pub use self::__UIControl::{UIControlEventEditingDidBegin,UIControlContentVerticalAlignmentCenter,UIControlEventEditingDidEndOnExit,UIControlEventTouchDragEnter,UIControlContentVerticalAlignmentFill,UIControlContentHorizontalAlignmentTrailing,UIControlEventTouchDragOutside,UIControlContentHorizontalAlignment,UIControlEvents,UIControlStateHighlighted,UIControlStateFocused,UIControlEventAllEvents,UIControlStateReserved,UIControlEventAllTouchEvents,UIControlEventPrimaryActionTriggered,UIControlEventTouchUpOutside,UIControlEventSystemReserved,UIControlState,UIControlStateSelected,UIControlEventEditingChanged,UIControlContentHorizontalAlignmentLeft,UIControlEventTouchUpInside,UIControlEventApplicationReserved,UIControlContentHorizontalAlignmentLeading,UIControlStateDisabled,UIControlEventValueChanged,UIControlContentHorizontalAlignmentRight,UIControlStateNormal,UIControlEventTouchDragInside,UIControlEventMenuActionTriggered,UIControlEventTouchDownRepeat,UIControlContentVerticalAlignmentTop,UIControlStateApplication,UIControlEventTouchCancel,UIControlContentVerticalAlignment,UIControlEventTouchDragExit,UIControlEventTouchDown,UIControlEventAllEditingEvents,UIControl,UIControlEventEditingDidEnd,UIControlContentVerticalAlignmentBottom,UIControlContentHorizontalAlignmentCenter,UIControlContentHorizontalAlignmentFill}; +pub use self::__UIDataDetectors::{UIDataDetectorTypePhoneNumber,UIDataDetectorTypes,UIDataDetectorTypeLink,UIDataDetectorTypeShipmentTrackingNumber,UIDataDetectorTypeLookupSuggestion,UIDataDetectorTypeMoney,UIDataDetectorTypePhysicalValue,UIDataDetectorTypeCalendarEvent,UIDataDetectorTypeNone,UIDataDetectorTypeFlightNumber,UIDataDetectorTypeAddress,UIDataDetectorTypeAll}; +pub use self::__UIDataSourceTranslating::{UIDataSourceTranslating}; +pub use self::__UIDatePicker::{UIDatePickerStyleInline,UIDatePickerModeDate,UIDatePickerStyle,UIDatePickerMode,UIDatePickerModeDateAndTime,UIDatePickerStyleWheels,UIDatePicker,UIDatePickerModeTime,UIDatePickerStyleAutomatic,UIDatePickerStyleCompact,UIDatePickerModeCountDownTimer}; +pub use self::__UIDeferredMenuElement::{UIDeferredMenuElement}; +pub use self::__UIDevice::{UIDeviceOrientationDidChangeNotification,UIDeviceBatteryStateDidChangeNotification,UIDeviceBatteryStateFull,UIDeviceOrientation,UIDeviceOrientationPortrait,UIDeviceOrientationFaceDown,UIDeviceBatteryStateCharging,UIUserInterfaceIdiomUnspecified,UIUserInterfaceIdiomMac,UIDeviceProximityStateDidChangeNotification,UIDeviceBatteryStateUnknown,UIUserInterfaceIdiomPad,UIUserInterfaceIdiomTV,UIDeviceOrientationFaceUp,UIDeviceBatteryStateUnplugged,UIUserInterfaceIdiom,UIUserInterfaceIdiomPhone,UIInputViewAudioFeedback,UIDeviceOrientationUnknown,UIDevice,UIUserInterfaceIdiomCarPlay,UIDeviceBatteryLevelDidChangeNotification,UIDeviceOrientationPortraitUpsideDown,UIDeviceBatteryState,UIDeviceOrientationLandscapeLeft,UIDeviceOrientationLandscapeRight}; +pub use self::__UIDiffableDataSource::{UICollectionViewDiffableDataSource,UITableViewDiffableDataSource,UITableViewDiffableDataSourceCellProvider,UICollectionViewDiffableDataSourceCellProvider,UICollectionViewDiffableDataSourceSupplementaryViewProvider,UICollectionViewDiffableDataSourceReorderingHandlers,NSDiffableDataSourceTransaction,UICollectionViewDiffableDataSourceSectionSnapshotHandlers,NSDiffableDataSourceSectionTransaction,NSDiffableDataSourceSnapshot}; +pub use self::__UIDocument::{UIDocumentSaveForCreating,UIDocumentStateInConflict,UIDocumentChangeCleared,UIDocumentStateProgressAvailable,UIDocumentStateClosed,UIDocument,UIDocumentChangeRedone,UIDocumentStateNormal,UIDocumentChangeUndone,UIDocumentStateEditingDisabled,NSUserActivityDocumentURLKey,UIDocumentStateSavingError,UIDocumentStateChangedNotification,UIDocumentChangeKind,UIDocumentChangeDone,UIDocumentSaveOperation,UIDocumentSaveForOverwriting,UIDocumentState}; +pub use self::__UIDocumentBrowserAction::{UIDocumentBrowserActionAvailability,UIDocumentBrowserActionAvailabilityMenu,UIDocumentBrowserActionAvailabilityNavigationBar,UIDocumentBrowserAction}; +pub use self::__UIDocumentBrowserViewController::{UIDocumentBrowserUserInterfaceStyleWhite,UIDocumentBrowserViewControllerDelegate,UIDocumentBrowserImportModeCopy,UIDocumentBrowserImportMode,UIDocumentBrowserTransitionController,UIDocumentBrowserErrorDomain,UIDocumentBrowserImportModeNone,UIDocumentBrowserViewController,UIDocumentBrowserErrorCode,UIDocumentBrowserErrorGeneric,UIDocumentBrowserUserInterfaceStyle,UIDocumentBrowserUserInterfaceStyleLight,UIDocumentBrowserUserInterfaceStyleDark,UIDocumentBrowserErrorNoLocationAvailable,UIDocumentBrowserImportModeMove}; +pub use self::__UIDocumentInteractionController::{UIDocumentInteractionController,UIDocumentInteractionControllerDelegate}; +pub use self::__UIDocumentMenuViewController::{UIDocumentMenuOrderFirst,UIDocumentMenuOrder,UIDocumentMenuDelegate,UIDocumentMenuViewController,UIDocumentMenuOrderLast}; +pub use self::__UIDocumentPickerExtensionViewController::{UIDocumentPickerExtensionViewController}; +pub use self::__UIDocumentPickerViewController::{UIDocumentPickerDelegate,UIDocumentPickerMode,UIDocumentPickerModeImport,UIDocumentPickerViewController,UIDocumentPickerModeOpen,UIDocumentPickerModeMoveToService,UIDocumentPickerModeExportToService}; +pub use self::__UIDocumentProperties::{UIDocumentProperties}; +pub use self::__UIDragInteraction::{UIDragAnimating,UIDragInteraction,UIDragInteractionDelegate}; +pub use self::__UIDragItem::{UIDragItem}; +pub use self::__UIDragPreview::{UIDragPreview}; +pub use self::__UIDragPreviewParameters::{UIDragPreviewParameters}; +pub use self::__UIDragSession::{UIDropSessionProgressIndicatorStyle,UIDragSession,UIDragDropSession,UIDropSessionProgressIndicatorStyleNone,UIDropSessionProgressIndicatorStyleDefault,UIDropSession}; +pub use self::__UIDropInteraction::{UIDropProposal,UIDropInteractionDelegate,UIDropOperationMove,UIDropOperationForbidden,UIDropOperationCopy,UIDropOperation,UIDropOperationCancel,UIDropInteraction}; +pub use self::__UIDynamicAnimator::{UIDynamicAnimatorDelegate,UIDynamicAnimator}; +pub use self::__UIDynamicBehavior::{UIDynamicBehavior,UIDynamicItemCollisionBoundsTypeEllipse,UIDynamicItemCollisionBoundsTypePath,UIDynamicItemGroup,UIDynamicItemCollisionBoundsType,UIDynamicItem,UIDynamicItemCollisionBoundsTypeRectangle}; +pub use self::__UIDynamicItemBehavior::{UIDynamicItemBehavior}; +pub use self::__UIEditMenuInteraction::{UIEditMenuInteraction,UIEditMenuArrowDirection,UIEditMenuInteractionAnimating,UIEditMenuArrowDirectionRight,UIEditMenuArrowDirectionUp,UIEditMenuArrowDirectionAutomatic,UIEditMenuConfiguration,UIEditMenuInteractionDelegate,UIEditMenuArrowDirectionLeft,UIEditMenuArrowDirectionDown}; +pub use self::__UIEvent::{UIEventSubtypeRemoteControlStop,UIEventSubtypeRemoteControlBeginSeekingBackward,UIEventType,UIEventTypeRemoteControl,UIEventSubtypeRemoteControlEndSeekingBackward,UIEventButtonMask,UIEventSubtypeNone,UIEventTypeMotion,UIEventButtonMaskForButtonNumber,UIEventSubtypeRemoteControlTogglePlayPause,UIEventButtonMaskSecondary,UIEventSubtype,UIEventTypeTouches,UIEventSubtypeMotionShake,UIEventTypePresses,UIEventSubtypeRemoteControlPlay,UIEventButtonMaskPrimary,UIEventSubtypeRemoteControlPreviousTrack,UIEventSubtypeRemoteControlPause,UIEvent,UIEventTypeHover,UIEventSubtypeRemoteControlEndSeekingForward,UIEventTypeScroll,UIEventTypeTransform,UIEventSubtypeRemoteControlBeginSeekingForward,UIEventSubtypeRemoteControlNextTrack}; +pub use self::__UIEventAttribution::{UIEventAttribution}; +pub use self::__UIEventAttributionView::{UIEventAttributionView}; +pub use self::__UIFeedbackGenerator::{UIFeedbackGenerator}; +pub use self::__UIFieldBehavior::{UIFieldBehavior}; +pub use self::__UIFindInteraction::{UIFindInteractionDelegate,UIFindInteraction}; +pub use self::__UIFindSession::{UITextSearchMatchMethodContains,UITextSearchMatchMethodStartsWith,UIFindSession,UITextSearchMatchMethod,UIFindSessionSearchResultDisplayStyleCurrentAndTotal,UITextSearchMatchMethodFullWord,UITextSearchOptions,UITextSearchingFindSession,UIFindSessionSearchResultDisplayStyle,UIFindSessionSearchResultDisplayStyleNone,UIFindSessionSearchResultDisplayStyleTotal}; +pub use self::__UIFocus::{UIFocusEnvironment,UIFocusUpdateContextKey,UIFocusSoundIdentifierNone,UIFocusItem,UIFocusHeadingLeft,UIFocusHeadingNone,UIFocusDidUpdateNotification,UIFocusMovementDidFailNotification,UIFocusHeading,UIFocusUpdateAnimationCoordinatorKey,UIFocusSoundIdentifierDefault,UIFocusGroupPriorityPreviouslyFocused,UIFocusSoundIdentifier,UIFocusHeadingUp,UIFocusHeadingDown,UIFocusHeadingFirst,UIFocusGroupPriorityPrioritized,UIFocusHeadingNext,UIFocusHeadingRight,UIFocusHeadingLast,UIFocusGroupPriorityIgnored,UIFocusItemContainer,UIFocusHeadingPrevious,UIFocusGroupPriority,UIFocusItemScrollableContainer,UIFocusUpdateContext}; +pub use self::__UIFocusAnimationCoordinator::{UIFocusAnimationContext,UIFocusAnimationCoordinator}; +pub use self::__UIFocusDebugger::{UIFocusDebugger,UIFocusDebuggerOutput}; +pub use self::__UIFocusEffect::{UIFocusHaloEffectPositionInside,UIFocusHaloEffectPositionOutside,UIFocusHaloEffect,UIFocusHaloEffectPosition,UIFocusHaloEffectPositionAutomatic,UIFocusEffect}; +pub use self::__UIFocusGuide::{UIFocusGuide}; +pub use self::__UIFocusMovementHint::{UIFocusMovementHint}; +pub use self::__UIFocusSystem::{UIFocusSystem}; +pub use self::__UIFont::{UIFont}; +pub use self::__UIFontDescriptor::{UIFontFeatureTypeIdentifierKey,UIFontDescriptorTraitUIOptimized,UIFontTextStyleCaption2,UIFontTextStyleLargeTitle,UIFontDescriptorSystemDesignDefault,UIFontDescriptorTraitLooseLeading,UIFontDescriptorSystemDesignMonospaced,UIFontWeightTrait,UIFontWeightLight,UIFontWidthCondensed,UIFontTextStyleSubheadline,UIFontWidthTrait,UIFontDescriptorTraitKey,UIFontWeightRegular,UIFontDescriptorTraitMonoSpace,UIFontDescriptorClassClarendonSerifs,UIFontDescriptorClassOrnamentals,UIFontDescriptorClassSansSerif,UIFontDescriptorFixedAdvanceAttribute,UIFontDescriptorClassScripts,UIFontSymbolicTrait,UIFontDescriptorTraitItalic,UIFontDescriptorClassTransitionalSerifs,UIFontWeight,UIFontDescriptorClassSlabSerifs,UIFontDescriptorSymbolicTraits,UIFontDescriptorFaceAttribute,UIFontWidth,UIFontDescriptorClassUnknown,UIFontDescriptorNameAttribute,UIFontDescriptorAttributeName,UIFontDescriptorTraitCondensed,UIFontDescriptorCharacterSetAttribute,UIFontDescriptorFeatureSettingsAttribute,UIFontDescriptorClassModernSerifs,UIFontDescriptorTraitExpanded,UIFontDescriptorTraitsAttribute,UIFontDescriptorClassOldStyleSerifs,UIFontDescriptorFamilyAttribute,UIFontDescriptorMatrixAttribute,UIFontWeightBold,UIFontWeightBlack,UIFontWidthStandard,UIFontDescriptorSystemDesign,UIFontTextStyle,UIFontDescriptorSizeAttribute,UIFontDescriptorTraitBold,UIFontDescriptorSystemDesignRounded,UIFontDescriptorCascadeListAttribute,UIFontWeightSemibold,UIFontTextStyleTitle3,UIFontTextStyleFootnote,UIFontDescriptorTraitVertical,UIFontDescriptorSystemDesignSerif,UIFontTextStyleCaption1,UIFontTextStyleBody,UIFontTextStyleTitle1,UIFontDescriptorClassSymbolic,UIFontDescriptorTextStyleAttribute,UIFontTextStyleCallout,UIFontDescriptorFeatureKey,UIFontDescriptorClass,UIFontWidthExpanded,UIFontDescriptorClassFreeformSerifs,UIFontTextStyleTitle2,UIFontDescriptorClassMask,UIFontTextStyleHeadline,UIFontSlantTrait,UIFontWeightMedium,UIFontDescriptor,UIFontDescriptorVisibleNameAttribute,UIFontWeightHeavy,UIFontWidthCompressed,UIFontWeightUltraLight,UIFontDescriptorTraitTightLeading,UIFontWeightThin,UIFontFeatureSelectorIdentifierKey}; +pub use self::__UIFontMetrics::{UIFontMetrics}; +pub use self::__UIFontPickerViewController::{UIFontPickerViewControllerDelegate,UIFontPickerViewController}; +pub use self::__UIFontPickerViewControllerConfiguration::{UIFontPickerViewControllerConfiguration}; +pub use self::__UIGeometry::{NSStringFromCGVector,NSDirectionalRectEdgeTrailing,NSDirectionalRectEdgeAll,UIDirectionalRectEdgeTrailing,NSDirectionalRectEdge,UIRectEdgeTop,NSRectAlignmentNone,UIRectEdgeRight,NSStringFromCGPoint,UIRectEdgeAll,NSRectAlignmentLeading,UIEdgeInsetsFromString,NSStringFromCGAffineTransform,NSStringFromDirectionalEdgeInsets,NSRectAlignmentBottomTrailing,CGRectFromString,NSStringFromUIOffset,UIAxisBoth,NSRectAlignment,UIOffset,UIAxisHorizontal,UIDirectionalRectEdge,UIAxis,UIDirectionalRectEdgeNone,NSRectAlignmentTrailing,UIEdgeInsetsZero,UIDirectionalRectEdgeLeading,UIOffsetFromString,UIRectCornerBottomRight,UIDirectionalRectEdgeAll,CGPointFromString,NSRectAlignmentBottomLeading,UIAxisVertical,NSStringFromUIEdgeInsets,NSDirectionalEdgeInsets,NSRectAlignmentBottom,UIEdgeInsets,NSStringFromCGSize,UIRectEdge,UIOffsetZero,CGAffineTransformFromString,UIDirectionalRectEdgeBottom,NSDirectionalRectEdgeLeading,NSDirectionalRectEdgeTop,UIRectEdgeLeft,CGSizeFromString,UIRectCorner,UIRectCornerTopLeft,NSRectAlignmentTopTrailing,UIAxisNeither,NSDirectionalRectEdgeNone,UIRectCornerTopRight,UIRectCornerBottomLeft,NSRectAlignmentTopLeading,NSRectAlignmentTop,NSStringFromCGRect,CGVectorFromString,UIRectCornerAllCorners,UIDirectionalRectEdgeTop,UIRectEdgeNone,NSDirectionalRectEdgeBottom,UIRectEdgeBottom,NSDirectionalEdgeInsetsZero,NSDirectionalEdgeInsetsFromString}; +pub use self::__UIGestureRecognizer::{UIGestureRecognizerStateCancelled,UIGestureRecognizerStateRecognized,UIGestureRecognizer,UIGestureRecognizerDelegate,UIGestureRecognizerStateEnded,UIGestureRecognizerStateChanged,UIGestureRecognizerStatePossible,UIGestureRecognizerStateBegan,UIGestureRecognizerStateFailed,UIGestureRecognizerState}; +pub use self::__UIGraphics::{UIRectFill,UIGraphicsEndPDFContext,UIGraphicsBeginPDFContextToFile,UIGraphicsBeginImageContext,UIGraphicsGetCurrentContext,UIRectFrame,UIGraphicsBeginPDFPageWithInfo,UIGraphicsGetImageFromCurrentImageContext,UIGraphicsSetPDFContextURLForRect,UIRectClip,UIGraphicsPopContext,UIGraphicsBeginPDFContextToData,UIGraphicsSetPDFContextDestinationForRect,UIGraphicsAddPDFContextDestinationAtPoint,UIGraphicsBeginPDFPage,UIRectFillUsingBlendMode,UIGraphicsGetPDFContextBounds,UIGraphicsEndImageContext,UIGraphicsPushContext,UIGraphicsBeginImageContextWithOptions,UIRectFrameUsingBlendMode}; +pub use self::__UIGraphicsImageRenderer::{UIGraphicsImageRendererFormatRangeUnspecified,UIGraphicsImageRendererFormat,UIGraphicsImageRendererFormatRangeExtended,UIGraphicsImageRendererFormatRangeAutomatic,UIGraphicsImageRendererFormatRangeStandard,UIGraphicsImageDrawingActions,UIGraphicsImageRendererFormatRange,UIGraphicsImageRendererContext,UIGraphicsImageRenderer}; +pub use self::__UIGraphicsPDFRenderer::{UIGraphicsPDFRendererFormat,UIGraphicsPDFRendererContext,UIGraphicsPDFDrawingActions,UIGraphicsPDFRenderer}; +pub use self::__UIGraphicsRenderer::{UIGraphicsRendererContext,UIGraphicsRenderer,UIGraphicsRendererFormat}; +pub use self::__UIGraphicsRendererSubclass::{UIGraphicsDrawingActions}; +pub use self::__UIGravityBehavior::{UIGravityBehavior}; +pub use self::__UIGuidedAccess::{UIGuidedAccessErrorDomain,UIGuidedAccessAccessibilityFeature,UIGuidedAccessAccessibilityFeatureVoiceOver,UIGuidedAccessErrorFailed,UIGuidedAccessAccessibilityFeatureZoom,UIGuidedAccessAccessibilityFeatureAssistiveTouch,UIGuidedAccessConfigureAccessibilityFeatures,UIGuidedAccessAccessibilityFeatureGrayscaleDisplay,UIGuidedAccessRestrictionState,UIGuidedAccessRestrictionStateForIdentifier,UIGuidedAccessRestrictionStateAllow,UIGuidedAccessErrorPermissionDenied,UIGuidedAccessErrorCode,UIGuidedAccessRestrictionDelegate,UIGuidedAccessAccessibilityFeatureInvertColors,UIGuidedAccessRestrictionStateDeny}; +pub use self::__UIHoverGestureRecognizer::{UIHoverGestureRecognizer}; +pub use self::__UIImage::{UIImagePNGRepresentation,UIImageJPEGRepresentation,UIImageOrientationRight,UIImageOrientationRightMirrored,UIImageOrientationDown,UIImageResizingMode,UIImageRenderingModeAlwaysTemplate,UIImage,UIImageOrientation,UIImageOrientationDownMirrored,UIImageResizingModeTile,UIImageOrientationUpMirrored,UIImageOrientationLeftMirrored,UIImageResizingModeStretch,UIImageRenderingModeAutomatic,UIImageOrientationUp,UIImageRenderingMode,UIImageRenderingModeAlwaysOriginal,UIImageOrientationLeft}; +pub use self::__UIImageAsset::{UIImageAsset}; +pub use self::__UIImageConfiguration::{UIImageConfiguration}; +pub use self::__UIImagePickerController::{UIImagePickerControllerDelegate,UIImagePickerControllerCameraCaptureMode,UIImagePickerControllerQualityTypeIFrame960x540,UIImagePickerControllerCameraFlashMode,UIImagePickerControllerMediaURL,UIImagePickerControllerCameraCaptureModeVideo,UIImageWriteToSavedPhotosAlbum,UIImagePickerController,UIImagePickerControllerOriginalImage,UIImagePickerControllerSourceTypeCamera,UIImagePickerControllerQualityTypeMedium,UIImagePickerControllerQualityType640x480,UIImagePickerControllerImageURLExportPresetCompatible,UIImagePickerControllerQualityTypeHigh,UIImagePickerControllerImageURL,UIImagePickerControllerReferenceURL,UISaveVideoAtPathToSavedPhotosAlbum,UIImagePickerControllerPHAsset,UIImagePickerControllerSourceTypeSavedPhotosAlbum,UIImagePickerControllerQualityType,UIImagePickerControllerCameraCaptureModePhoto,UIImagePickerControllerCameraFlashModeAuto,UIImagePickerControllerSourceTypePhotoLibrary,UIImagePickerControllerCameraFlashModeOff,UIImagePickerControllerEditedImage,UIImagePickerControllerCameraDevice,UIImagePickerControllerQualityTypeLow,UIImagePickerControllerQualityTypeIFrame1280x720,UIImagePickerControllerMediaType,UIImagePickerControllerLivePhoto,UIImagePickerControllerSourceType,UIVideoAtPathIsCompatibleWithSavedPhotosAlbum,UIImagePickerControllerCameraFlashModeOn,UIImagePickerControllerCameraDeviceRear,UIImagePickerControllerCameraDeviceFront,UIImagePickerControllerImageURLExportPreset,UIImagePickerControllerImageURLExportPresetCurrent,UIImagePickerControllerMediaMetadata,UIImagePickerControllerCropRect,UIImagePickerControllerInfoKey}; +pub use self::__UIImageSymbolConfiguration::{UIImageSymbolWeightThin,UIFontWeightForImageSymbolWeight,UIImageSymbolWeightLight,UIImageSymbolWeightSemibold,UIImageSymbolWeightMedium,UIImageSymbolWeight,UIImageSymbolScaleMedium,UIImageSymbolWeightHeavy,UIImageSymbolWeightForFontWeight,UIImageSymbolWeightUnspecified,UIImageSymbolScaleLarge,UIImageSymbolScaleUnspecified,UIImageSymbolConfiguration,UIImageSymbolWeightRegular,UIImageSymbolScaleSmall,UIImageSymbolWeightBlack,UIImageSymbolScaleDefault,UIImageSymbolWeightBold,UIImageSymbolScale,UIImageSymbolWeightUltraLight}; +pub use self::__UIImageView::{UIImageView}; +pub use self::__UIImpactFeedbackGenerator::{UIImpactFeedbackStyleRigid,UIImpactFeedbackGenerator,UIImpactFeedbackStyleLight,UIImpactFeedbackStyle,UIImpactFeedbackStyleMedium,UIImpactFeedbackStyleSoft,UIImpactFeedbackStyleHeavy}; +pub use self::__UIIndirectScribbleInteraction::{UIScribbleElementIdentifier,UIIndirectScribbleInteractionDelegate,UIIndirectScribbleInteraction}; +pub use self::__UIInputView::{UIInputViewStyleDefault,UIInputViewStyleKeyboard,UIInputView,UIInputViewStyle}; +pub use self::__UIInputViewController::{UIInputViewController,UITextDocumentProxy}; +pub use self::__UIInteraction::{UIInteraction}; +pub use self::__UIInterface::{UIBarStyle,UIDisplayGamutUnspecified,UIUserInterfaceStyleDark,UIUserInterfaceLayoutDirection,UINSToolbarItemPresentationSizeLarge,UITraitEnvironmentLayoutDirectionRightToLeft,UIBarStyleBlackTranslucent,UIUserInterfaceSizeClass,UIUserInterfaceLevelUnspecified,UIUserInterfaceLayoutDirectionLeftToRight,UITraitEnvironmentLayoutDirection,UITraitEnvironmentLayoutDirectionLeftToRight,UITraitEnvironmentLayoutDirectionUnspecified,UIAccessibilityContrastUnspecified,UIAccessibilityContrastNormal,UIBarStyleBlack,UIUserInterfaceSizeClassCompact,UILegibilityWeightRegular,UIUserInterfaceSizeClassUnspecified,UIUserInterfaceStyleUnspecified,UIBarStyleDefault,UIAccessibilityContrastHigh,UIUserInterfaceLayoutDirectionRightToLeft,UIUserInterfaceLevelElevated,UIUserInterfaceActiveAppearanceInactive,UIUserInterfaceActiveAppearanceUnspecified,UIUserInterfaceActiveAppearanceActive,UINSToolbarItemPresentationSizeRegular,UINSToolbarItemPresentationSizeSmall,UIBarStyleBlackOpaque,UIUserInterfaceActiveAppearance,UIUserInterfaceLevel,UIAccessibilityContrast,UILegibilityWeight,UIUserInterfaceSizeClassRegular,UINSToolbarItemPresentationSize,UIDisplayGamutSRGB,UIUserInterfaceStyle,UILegibilityWeightBold,UINSToolbarItemPresentationSizeUnspecified,UIUserInterfaceLevelBase,UIDisplayGamutP3,UILegibilityWeightUnspecified,UIDisplayGamut,UIUserInterfaceStyleLight}; +pub use self::__UIKey::{UIKey}; +pub use self::__UIKeyCommand::{UIKeyCommand}; +pub use self::__UIKeyConstants::{UIKeyboardHIDUsageKeyboardInternational2,UIKeyboardHIDUsageKeyboardInternational9,UIKeyboardHIDUsageKeyboardAlternateErase,UIKeyboardHIDUsageKeyboardLeftControl,UIKeyboardHIDUsageKeyboardCopy,UIKeyboardHIDUsageKeyboard8,UIKeyboardHIDUsageKeypadNumLock,UIKeyboardHIDUsageKeyboard_Reserved,UIKeyboardHIDUsageKeyboardF,UIKeyboardHIDUsageKeyboardW,UIKeyboardHIDUsageKeyboardPageUp,UIKeyboardHIDUsageKeyboardVolumeUp,UIKeyboardHIDUsageKeypadPeriod,UIKeyboardHIDUsageKeypad1,UIKeyboardHIDUsageKeyboardHome,UIKeyboardHIDUsageKeyboardDownArrow,UIKeyboardHIDUsageKeyboardKatakana,UIKeyboardHIDUsageKeyboardG,UIKeyboardHIDUsageKeyboardF11,UIKeyboardHIDUsageKeyboardA,UIKeyboardHIDUsageKeyboardCloseBracket,UIKeyboardHIDUsageKeyboardF21,UIKeyboardHIDUsageKeyboardP,UIKeyboardHIDUsageKeypadEqualSignAS400,UIKeyboardHIDUsageKeyboardSeparator,UIKeyboardHIDUsageKeyboardD,UIKeyboardHIDUsageKeyboardLockingScrollLock,UIKeyboardHIDUsageKeyboardF23,UIKeyboardHIDUsageKeyboardZenkakuHankakuKanji,UIKeyboardHIDUsageKeyboard2,UIKeyboardHIDUsageKeyboardReturnOrEnter,UIKeyboardHIDUsageKeyboardEscape,UIKeyboardHIDUsageKeyboardLANG3,UIKeyboardHIDUsageKeyboardF6,UIKeyboardHIDUsageKeyboardKanaSwitch,UIKeyboardHIDUsage,UIKeyboardHIDUsageKeyboardN,UIKeyboardHIDUsageKeyboardSlash,UIKeyboardHIDUsageKeyboardF16,UIKeyboardHIDUsageKeyboardMenu,UIKeyboardHIDUsageKeyboardQ,UIKeyboardHIDUsageKeypad7,UIKeyboardHIDUsageKeyboardL,UIKeyboardHIDUsageKeypadEqualSign,UIKeyboardHIDUsageKeyboardF7,UIKeyboardHIDUsageKeyboardB,UIKeyboardHIDUsageKeyboardX,UIKeyboardHIDUsageKeyboardInsert,UIKeyboardHIDUsageKeypad3,UIKeyboardHIDUsageKeyboardF19,UIKeyboardHIDUsageKeyboardRightControl,UIKeyboardHIDUsageKeyboardEnd,UIKeyboardHIDUsageKeyboardErrorRollOver,UIKeyboardHIDUsageKeyboardLANG8,UIKeyboardHIDUsageKeyboardF20,UIKeyboardHIDUsageKeyboardGraveAccentAndTilde,UIKeyboardHIDUsageKeyboardLANG4,UIKeyboardHIDUsageKeyboardF1,UIKeyboardHIDUsageKeyboardF12,UIKeyboardHIDUsageKeyboardF8,UIKeyboardHIDUsageKeyboardU,UIKeyboardHIDUsageKeypadComma,UIKeyboardHIDUsageKeypadPlus,UIKeyboardHIDUsageKeyboardCancel,UIKeyboardHIDUsageKeyboard0,UIKeyboardHIDUsageKeyboardQuote,UIKeyboardHIDUsageKeypadEnter,UIKeyboardHIDUsageKeyboardF15,UIKeyboardHIDUsageKeyboardLANG2,UIKeyboardHIDUsageKeyboardInternational8,UIKeyboardHIDUsageKeyboard3,UIKeyboardHIDUsageKeyboardInternational3,UIKeyboardHIDUsageKeyboardR,UIKeyboardHIDUsageKeyboardLeftAlt,UIKeyboardHIDUsageKeyboardSelect,UIKeyboardHIDUsageKeyboardDeleteForward,UIKeyboardHIDUsageKeyboardF14,UIKeyboardHIDUsageKeyboardScrollLock,UIKeyboardHIDUsageKeyboardF2,UIKeyboardHIDUsageKeyboardVolumeDown,UIKeyboardHIDUsageKeyboardInternational7,UIKeyboardHIDUsageKeyboardHyphen,UIKeyboardHIDUsageKeypad5,UIKeyboardHIDUsageKeyboardMute,UIKeyboardHIDUsageKeyboardK,UIKeyboardHIDUsageKeyboardLockingNumLock,UIKeyboardHIDUsageKeyboard4,UIKeyboardHIDUsageKeyboardExSel,UIKeyboardHIDUsageKeyboardV,UIKeyboardHIDUsageKeyboardLeftArrow,UIKeyboardHIDUsageKeyboardBackslash,UIKeyboardHIDUsageKeyboardF9,UIKeyboardHIDUsageKeyboardLANG9,UIKeyboardHIDUsageKeyboardClear,UIKeyboardHIDUsageKeyboardHiragana,UIKeyboardHIDUsageKeyboardPageDown,UIKeyboardHIDUsageKeyboardLANG1,UIKeyboardHIDUsageKeyboardCut,UIKeyboardHIDUsageKeyboardApplication,UIKeyboardHIDUsageKeyboardLANG6,UIKeyboardHIDUsageKeyboardUpArrow,UIKeyboardHIDUsageKeypad8,UIKeyboardHIDUsageKeyboardF17,UIKeyboardHIDUsageKeyboardC,UIKeyboardHIDUsageKeyboardPause,UIKeyboardHIDUsageKeyboardHelp,UIKeyboardHIDUsageKeyboardF13,UIKeyboardHIDUsageKeyboardUndo,UIKeyboardHIDUsageKeyboardLeftGUI,UIKeyboardHIDUsageKeyboardRightArrow,UIKeyboardHIDUsageKeyboardRightShift,UIKeyboardHIDUsageKeyboardY,UIKeyboardHIDUsageKeyboardOpenBracket,UIKeyboardHIDUsageKeyboardNonUSBackslash,UIKeyboardHIDUsageKeyboardLANG7,UIKeyboardHIDUsageKeyboardAlphanumericSwitch,UIKeyboardHIDUsageKeyboardExecute,UIKeyboardHIDUsageKeyboardH,UIKeyboardHIDUsageKeyboardI,UIKeyboardHIDUsageKeyboardComma,UIKeyboardHIDUsageKeyboardS,UIKeyboardHIDUsageKeyboardF3,UIKeyboardHIDUsageKeyboard6,UIKeyboardHIDUsageKeyboardAgain,UIKeyboardHIDUsageKeyboardFind,UIKeyboardHIDUsageKeyboardPaste,UIKeyboardHIDUsageKeyboardLockingCapsLock,UIKeyboardHIDUsageKeyboardLANG5,UIKeyboardHIDUsageKeyboardHangul,UIKeyboardHIDUsageKeypad9,UIKeyboardHIDUsageKeyboardTab,UIKeyboardHIDUsageKeyboard5,UIKeyboardHIDUsageKeyboardM,UIKeyboardHIDUsageKeyboardF22,UIKeyboardHIDUsageKeyboardPower,UIKeyboardHIDUsageKeyboardRightGUI,UIKeyboardHIDUsageKeyboardJ,UIKeyboardHIDUsageKeyboardPOSTFail,UIKeyboardHIDUsageKeyboardOut,UIKeyboardHIDUsageKeyboardLeftShift,UIKeyboardHIDUsageKeyboardF4,UIKeyboardHIDUsageKeyboardEqualSign,UIKeyboardHIDUsageKeyboardStop,UIKeyboardHIDUsageKeyboardInternational5,UIKeyboardHIDUsageKeyboardPeriod,UIKeyboardHIDUsageKeyboardSysReqOrAttention,UIKeyboardHIDUsageKeyboardCrSelOrProps,UIKeyboardHIDUsageKeyboardErrorUndefined,UIKeyboardHIDUsageKeyboardSemicolon,UIKeyboardHIDUsageKeyboardF24,UIKeyboardHIDUsageKeyboardSpacebar,UIKeyboardHIDUsageKeyboardCapsLock,UIKeyboardHIDUsageKeyboardF5,UIKeyboardHIDUsageKeyboardInternational1,UIKeyboardHIDUsageKeypad2,UIKeyboardHIDUsageKeyboardF10,UIKeyboardHIDUsageKeypad6,UIKeyboardHIDUsageKeyboard1,UIKeyboardHIDUsageKeyboardPrior,UIKeyboardHIDUsageKeyboardReturn,UIKeyboardHIDUsageKeyboardRightAlt,UIKeyboardHIDUsageKeyboardPrintScreen,UIKeyboardHIDUsageKeypadHyphen,UIKeyboardHIDUsageKeyboard7,UIKeyboardHIDUsageKeyboardF18,UIKeyboardHIDUsageKeyboardInternational6,UIKeyboardHIDUsageKeyboardT,UIKeyboardHIDUsageKeyboardHanja,UIKeyboardHIDUsageKeypad0,UIKeyboardHIDUsageKeyboardO,UIKeyboardHIDUsageKeyboardOper,UIKeyboardHIDUsageKeyboardClearOrAgain,UIKeyboardHIDUsageKeypadAsterisk,UIKeyboardHIDUsageKeyboardInternational4,UIKeyboardHIDUsageKeypad4,UIKeyboardHIDUsageKeypadSlash,UIKeyboardHIDUsageKeyboard9,UIKeyboardHIDUsageKeyboardZ,UIKeyboardHIDUsageKeyboardE,UIKeyboardHIDUsageKeyboardDeleteOrBackspace,UIKeyboardHIDUsageKeyboardNonUSPound}; +pub use self::__UIKeyboardLayoutGuide::{UIKeyboardLayoutGuide}; +pub use self::__UILabel::{UILabel}; +pub use self::__UILargeContentViewer::{UILargeContentViewerInteractionEnabledStatusDidChangeNotification,UILargeContentViewerItem,UILargeContentViewerInteractionDelegate,UILargeContentViewerInteraction}; +pub use self::__UILayoutGuide::{UILayoutGuide}; +pub use self::__UILexicon::{UILexiconEntry,UILexicon}; +pub use self::__UIListContentConfiguration::{UIListContentView,UIListContentConfiguration}; +pub use self::__UIListContentImageProperties::{UIListContentImageStandardDimension,UIListContentImageProperties}; +pub use self::__UIListContentTextProperties::{UIListContentTextProperties,UIListContentTextTransform,UIListContentTextAlignmentNatural,UIListContentTextAlignmentJustified,UIListContentTextTransformCapitalized,UIListContentTextAlignment,UIListContentTextTransformNone,UIListContentTextTransformUppercase,UIListContentTextAlignmentCenter,UIListContentTextTransformLowercase}; +pub use self::__UIListSeparatorConfiguration::{UIListSeparatorConfiguration,UIListSeparatorVisibilityVisible,UIListSeparatorVisibility,UIListSeparatorVisibilityHidden,UIListSeparatorAutomaticInsets,UIListSeparatorVisibilityAutomatic}; +pub use self::__UILocalNotification::{UILocalNotification,UILocalNotificationDefaultSoundName}; +pub use self::__UILocalizedIndexedCollation::{UILocalizedIndexedCollation}; +pub use self::__UILongPressGestureRecognizer::{UILongPressGestureRecognizer}; +pub use self::__UIManagedDocument::{UIManagedDocument}; +pub use self::__UIMenu::{UIMenuSpelling,UIMenuElementSize,UIMenuAbout,UIMenuFormat,UIMenuBringAllToFront,UIMenuQuit,UIMenuEdit,UIMenuOptionsDestructive,UIMenuSpellingPanel,UIMenuSubstitutions,UIMenuLookup,UIMenuWritingDirection,UIMenuShare,UIMenuToolbar,UIMenuRoot,UIMenuOpenRecent,UIMenuLearn,UIMenuNewScene,UIMenuFile,UIMenuOptionsSingleSelection,UIMenuClose,UIMenuReplace,UIMenuTransformations,UIMenuFont,UIMenuAlignment,UIMenuPreferences,UIMenuView,UIMenuElementSizeMedium,UIMenuElementSizeSmall,UIMenuFind,UIMenuOptionsDisplayInline,UIMenu,UIMenuElementSizeLarge,UIMenuApplication,UIMenuSubstitutionsPanel,UIMenuSubstitutionOptions,UIMenuTextColor,UIMenuHide,UIMenuStandardEdit,UIMenuWindow,UIMenuHelp,UIMenuIdentifier,UIMenuTextStylePasteboard,UIMenuSpeech,UIMenuText,UIMenuServices,UIMenuDocument,UIMenuSidebar,UIMenuUndoRedo,UIMenuSpellingOptions,UIMenuTextStyle,UIMenuMinimizeAndZoom,UIMenuTextSize,UIMenuFullscreen,UIMenuPrint,UIMenuOptions}; +pub use self::__UIMenuBuilder::{UIMenuBuilder}; +pub use self::__UIMenuController::{UIMenuControllerArrowRight,UIMenuControllerArrowLeft,UIMenuControllerDidShowMenuNotification,UIMenuControllerDidHideMenuNotification,UIMenuControllerMenuFrameDidChangeNotification,UIMenuController,UIMenuControllerArrowDefault,UIMenuControllerArrowUp,UIMenuControllerArrowDirection,UIMenuControllerWillHideMenuNotification,UIMenuControllerArrowDown,UIMenuControllerWillShowMenuNotification,UIMenuItem}; +pub use self::__UIMenuElement::{UIMenuElementState,UIMenuElementStateMixed,UIMenuElement,UIMenuElementAttributesDestructive,UIMenuElementAttributesKeepsMenuPresented,UIMenuElementAttributesHidden,UIMenuElementStateOn,UIMenuElementStateOff,UIMenuElementAttributes,UIMenuElementAttributesDisabled}; +pub use self::__UIMenuLeaf::{UIMenuLeaf}; +pub use self::__UIMenuSystem::{UIMenuSystem}; +pub use self::__UIMotionEffect::{UIInterpolatingMotionEffectType,UIInterpolatingMotionEffectTypeTiltAlongVerticalAxis,UIInterpolatingMotionEffectTypeTiltAlongHorizontalAxis,UIMotionEffectGroup,UIInterpolatingMotionEffect,UIMotionEffect}; +pub use self::__UINavigationBar::{UINavigationBarDelegate,UINavigationBarNSToolbarSection,UINavigationBarNSToolbarSectionContent,UINavigationBarNSToolbarSectionSupplementary,UINavigationBarNSToolbarSectionSidebar,UINavigationBar,UINavigationBarNSToolbarSectionNone}; +pub use self::__UINavigationBarAppearance::{UINavigationBarAppearance}; +pub use self::__UINavigationController::{UINavigationControllerOperation,UINavigationControllerOperationPop,UINavigationController,UINavigationControllerHideShowBarDuration,UINavigationControllerOperationNone,UINavigationControllerDelegate,UINavigationControllerOperationPush}; +pub use self::__UINavigationItem::{UINavigationItemLargeTitleDisplayModeNever,UINavigationItemBackButtonDisplayModeMinimal,UINavigationItemSearchBarPlacement,UINavigationItemBackButtonDisplayMode,UINavigationItemStyleNavigator,UINavigationItemStyleEditor,UINavigationItemLargeTitleDisplayModeAutomatic,UINavigationItemStyleBrowser,UINavigationItem,UINavigationItemBackButtonDisplayModeGeneric,UINavigationItemLargeTitleDisplayMode,UINavigationItemBackButtonDisplayModeDefault,UINavigationItemSearchBarPlacementAutomatic,UINavigationItemStyle,UINavigationItemSearchBarPlacementStacked,UINavigationItemRenameDelegate,UINavigationItemLargeTitleDisplayModeAlways,UINavigationItemSearchBarPlacementInline}; +pub use self::__UINib::{UINib}; +pub use self::__UINibLoading::{UINibProxiedObjectsKey,UINibOptionsKey,UINibExternalObjects}; +pub use self::__UINotificationFeedbackGenerator::{UINotificationFeedbackGenerator,UINotificationFeedbackTypeSuccess,UINotificationFeedbackType,UINotificationFeedbackTypeError,UINotificationFeedbackTypeWarning}; +pub use self::__UIOpenURLContext::{UIOpenURLContext}; +pub use self::__UIPageControl::{UIPageControlDirection,UIPageControlInteractionStateContinuous,UIPageControlDirectionNatural,UIPageControlInteractionState,UIPageControlBackgroundStyleAutomatic,UIPageControl,UIPageControlDirectionLeftToRight,UIPageControlDirectionRightToLeft,UIPageControlBackgroundStyle,UIPageControlDirectionBottomToTop,UIPageControlDirectionTopToBottom,UIPageControlInteractionStateNone,UIPageControlInteractionStateDiscrete,UIPageControlBackgroundStyleProminent,UIPageControlBackgroundStyleMinimal}; +pub use self::__UIPageViewController::{UIPageViewControllerOptionInterPageSpacingKey,UIPageViewControllerOptionsKey,UIPageViewControllerSpineLocationMin,UIPageViewControllerSpineLocationMid,UIPageViewControllerNavigationDirection,UIPageViewControllerSpineLocationMax,UIPageViewControllerNavigationDirectionReverse,UIPageViewControllerTransitionStyle,UIPageViewControllerOptionSpineLocationKey,UIPageViewController,UIPageViewControllerNavigationOrientationVertical,UIPageViewControllerSpineLocation,UIPageViewControllerNavigationOrientation,UIPageViewControllerTransitionStyleScroll,UIPageViewControllerTransitionStylePageCurl,UIPageViewControllerSpineLocationNone,UIPageViewControllerNavigationDirectionForward,UIPageViewControllerNavigationOrientationHorizontal,UIPageViewControllerDelegate,UIPageViewControllerDataSource}; +pub use self::__UIPanGestureRecognizer::{UIScrollTypeContinuous,UIScrollTypeMask,UIScrollTypeMaskDiscrete,UIPanGestureRecognizer,UIScrollTypeDiscrete,UIScrollType,UIScrollTypeMaskContinuous,UIScrollTypeMaskAll}; +pub use self::__UIPasteConfiguration::{UIPasteConfiguration}; +pub use self::__UIPasteConfigurationSupporting::{UIPasteConfigurationSupporting}; +pub use self::__UIPasteControl::{UIPasteControl,UIPasteControlDisplayMode,UIPasteControlDisplayModeIconAndLabel,UIPasteControlDisplayModeIconOnly,UIPasteControlDisplayModeLabelOnly,UIPasteControlConfiguration}; +pub use self::__UIPasteboard::{UIPasteboardDetectionPatternProbableWebURL,UIPasteboardOptionLocalOnly,UIPasteboardChangedTypesRemovedKey,UIPasteboardRemovedNotification,UIPasteboardTypeListString,UIPasteboardName,UIPasteboardDetectionPatternShipmentTrackingNumber,UIPasteboardTypeListColor,UIPasteboardOptionExpirationDate,UIPasteboardTypeAutomatic,UIPasteboardDetectionPatternPostalAddress,UIPasteboardDetectionPatternNumber,UIPasteboardDetectionPatternMoneyAmount,UIPasteboardChangedNotification,UIPasteboardTypeListImage,UIPasteboardDetectionPatternLink,UIPasteboardNameGeneral,UIPasteboardDetectionPattern,UIPasteboardTypeListURL,UIPasteboardDetectionPatternProbableWebSearch,UIPasteboardDetectionPatternEmailAddress,UIPasteboardDetectionPatternPhoneNumber,UIPasteboardDetectionPatternCalendarEvent,UIPasteboard,UIPasteboardDetectionPatternFlightNumber,UIPasteboardOption,UIPasteboardNameFind,UIPasteboardChangedTypesAddedKey}; +pub use self::__UIPencilInteraction::{UIPencilPreferredActionShowColorPalette,UIPencilPreferredActionSwitchEraser,UIPencilInteractionDelegate,UIPencilPreferredAction,UIPencilPreferredActionShowInkAttributes,UIPencilInteraction,UIPencilPreferredActionSwitchPrevious,UIPencilPreferredActionIgnore}; +pub use self::__UIPickerView::{UIPickerView,UIPickerViewDataSource,UIPickerViewDelegate}; +pub use self::__UIPinchGestureRecognizer::{UIPinchGestureRecognizer}; +pub use self::__UIPointerAccessory::{UIPointerAccessoryPositionBottomLeft,UIPointerAccessoryPositionLeft,UIPointerAccessoryPositionTopLeft,UIPointerAccessoryPositionBottomRight,UIPointerAccessoryPositionRight,UIPointerAccessory,UIPointerAccessoryPositionBottom,UIPointerAccessoryPositionTop,UIPointerAccessoryPosition,UIPointerAccessoryPositionTopRight}; +pub use self::__UIPointerInteraction::{UIPointerInteractionAnimating,UIPointerInteraction,UIPointerInteractionDelegate,UIPointerRegionRequest}; +pub use self::__UIPointerLockState::{UIPointerLockStateSceneUserInfoKey,UIPointerLockStateDidChangeNotification,UIPointerLockState}; +pub use self::__UIPointerRegion::{UIPointerRegion}; +pub use self::__UIPointerStyle::{UIPointerHighlightEffect,UIPointerStyle,UIPointerEffectTintModeUnderlay,UIPointerEffectTintModeNone,UIPointerHoverEffect,UIPointerEffect,UIPointerEffectTintMode,UIPointerShape,UIPointerEffectTintModeOverlay,UIPointerLiftEffect}; +pub use self::__UIPopoverBackgroundView::{UIPopoverBackgroundViewMethods,UIPopoverBackgroundView}; +pub use self::__UIPopoverController::{UIPopoverControllerDelegate,UIPopoverController}; +pub use self::__UIPopoverPresentationController::{UIPopoverPresentationControllerDelegate,UIPopoverPresentationController}; +pub use self::__UIPopoverPresentationControllerSourceItem::{UIPopoverPresentationControllerSourceItem}; +pub use self::__UIPopoverSupport::{UIPopoverArrowDirectionLeft,UIPopoverArrowDirectionAny,UIPopoverArrowDirection,UIPopoverArrowDirectionUnknown,UIPopoverArrowDirectionUp,UIPopoverArrowDirectionRight,UIPopoverArrowDirectionDown}; +pub use self::__UIPresentationController::{UIAdaptivePresentationControllerDelegate,UIPresentationController}; +pub use self::__UIPress::{UIPressTypePageDown,UIPressTypeRightArrow,UIPressPhaseStationary,UIPressTypeDownArrow,UIPressTypeMenu,UIPressTypePageUp,UIPress,UIPressPhaseChanged,UIPressTypeUpArrow,UIPressPhaseBegan,UIPressPhaseEnded,UIPressPhase,UIPressPhaseCancelled,UIPressTypeLeftArrow,UIPressTypeSelect,UIPressType,UIPressTypePlayPause}; +pub use self::__UIPressesEvent::{UIPressesEvent}; +pub use self::__UIPreviewInteraction::{UIPreviewInteractionDelegate,UIPreviewInteraction}; +pub use self::__UIPreviewParameters::{UIPreviewParameters}; +pub use self::__UIPrintError::{UIPrintingNotAvailableError,UIPrintNoContentError,UIPrintUnknownImageFormatError,UIPrintErrorCode,UIPrintJobFailedError,UIPrintErrorDomain}; +pub use self::__UIPrintFormatter::{UISimpleTextPrintFormatter,UIPrintFormatter,UIMarkupTextPrintFormatter,UIViewPrintFormatter}; +pub use self::__UIPrintInfo::{UIPrintInfoOrientationLandscape,UIPrintInfoDuplexShortEdge,UIPrintInfoOutputPhoto,UIPrintInfo,UIPrintInfoOrientationPortrait,UIPrintInfoOutputPhotoGrayscale,UIPrintInfoOrientation,UIPrintInfoOutputType,UIPrintInfoDuplex,UIPrintInfoDuplexNone,UIPrintInfoOutputGrayscale,UIPrintInfoDuplexLongEdge,UIPrintInfoOutputGeneral}; +pub use self::__UIPrintInteractionController::{UIPrintInteractionCompletionHandler,UIPrinterCutterBehaviorPrinterDefault,UIPrinterCutterBehaviorCutAfterEachPage,UIPrinterCutterBehaviorCutAfterEachJob,UIPrinterCutterBehaviorCutAfterEachCopy,UIPrinterCutterBehavior,UIPrintInteractionController,UIPrintInteractionControllerDelegate,UIPrinterCutterBehaviorNoCut}; +pub use self::__UIPrintPageRenderer::{UIPrintRenderingQuality,UIPrintRenderingQualityBest,UIPrintRenderingQualityResponsive,UIPrintPageRenderer}; +pub use self::__UIPrintPaper::{UIPrintPaper}; +pub use self::__UIPrintServiceExtension::{UIPrinterDestination,UIPrintServiceExtension}; +pub use self::__UIPrinter::{UIPrinterJobTypeReceipt,UIPrinterJobTypePostcard,UIPrinterJobTypeUnknown,UIPrinterJobTypeLabel,UIPrinterJobTypes,UIPrinterJobTypeEnvelope,UIPrinterJobTypePhoto,UIPrinterJobTypeDocument,UIPrinterJobTypeRoll,UIPrinterJobTypeLargeFormat,UIPrinter}; +pub use self::__UIPrinterPickerController::{UIPrinterPickerControllerDelegate,UIPrinterPickerController,UIPrinterPickerCompletionHandler}; +pub use self::__UIProgressView::{UIProgressView,UIProgressViewStyle,UIProgressViewStyleDefault,UIProgressViewStyleBar}; +pub use self::__UIPushBehavior::{UIPushBehavior,UIPushBehaviorModeContinuous,UIPushBehaviorModeInstantaneous,UIPushBehaviorMode}; +pub use self::__UIReferenceLibraryViewController::{UIReferenceLibraryViewController}; +pub use self::__UIRefreshControl::{UIRefreshControl}; +pub use self::__UIRegion::{UIRegion}; +pub use self::__UIResponder::{UIKeyInputF10,UIKeyInputF8,UIEditingInteractionConfiguration,UIKeyInputHome,UIKeyInputF4,UIKeyInputDownArrow,UIKeyInputF3,UIKeyInputF9,UIKeyInputF11,UIKeyInputDelete,UIKeyInputRightArrow,UITextAttributesConversionHandler,UIEditingInteractionConfigurationDefault,UIKeyInputF7,UIKeyInputLeftArrow,UIResponderStandardEditActions,UIKeyInputPageUp,UIKeyInputF1,UIKeyInputF5,UIResponder,UIEditingInteractionConfigurationNone,UIKeyInputF2,UIKeyInputF12,UIKeyInputPageDown,UIKeyInputUpArrow,UIKeyInputEscape,UIKeyInputEnd,UIKeyInputF6}; +pub use self::__UIRotationGestureRecognizer::{UIRotationGestureRecognizer}; +pub use self::__UIScene::{UISceneWillDeactivateNotification,UISceneDidDisconnectNotification,UIScene,UISceneDidEnterBackgroundNotification,UISceneDidActivateNotification,UISceneDelegate,UISceneWillEnterForegroundNotification,UISceneWillConnectNotification}; +pub use self::__UISceneActivationConditions::{UISceneActivationConditions}; +pub use self::__UISceneDefinitions::{UISceneActivationStateUnattached,UISceneErrorCodeMultipleScenesNotSupported,UISceneErrorCodeRequestDenied,UISceneErrorCodeGeometryRequestDenied,UISceneActivationStateForegroundActive,UISceneErrorCodeGeometryRequestUnsupported,UISceneSessionRole,UISceneErrorCode,UISceneActivationStateForegroundInactive,UISceneErrorDomain,UISceneActivationStateBackground,UISceneActivationState}; +pub use self::__UISceneOptions::{UISceneDestructionRequestOptions,UISceneOpenURLOptions,UISceneCollectionJoinBehavior,UISceneCollectionJoinBehaviorAutomatic,UISceneCollectionJoinBehaviorPreferredWithoutActivating,UISceneActivationRequestOptions,UISceneOpenExternalURLOptions,UISceneCollectionJoinBehaviorDisallowed,UISceneConnectionOptions,UISceneCollectionJoinBehaviorPreferred}; +pub use self::__UISceneSession::{UISceneSession,UISceneConfiguration}; +pub use self::__UISceneWindowingBehaviors::{UISceneWindowingBehaviors}; +pub use self::__UIScreen::{UIScreenModeDidChangeNotification,UIScreenReferenceDisplayModeStatusEnabled,UIScreenCapturedDidChangeNotification,UIScreenOverscanCompensationInsetBounds,UIScreenBrightnessDidChangeNotification,UIScreenReferenceDisplayModeStatusNotSupported,UIScreenReferenceDisplayModeStatusLimited,UIScreenDidConnectNotification,UIScreenOverscanCompensation,UIScreenOverscanCompensationInsetApplicationFrame,UIScreenReferenceDisplayModeStatusNotEnabled,UIScreenReferenceDisplayModeStatusDidChangeNotification,UIScreenOverscanCompensationScale,UIScreenReferenceDisplayModeStatus,UIScreen,UIScreenOverscanCompensationNone,UIScreenDidDisconnectNotification}; +pub use self::__UIScreenEdgePanGestureRecognizer::{UIScreenEdgePanGestureRecognizer}; +pub use self::__UIScreenMode::{UIScreenMode}; +pub use self::__UIScreenshotService::{UIScreenshotServiceDelegate,UIScreenshotService}; +pub use self::__UIScribbleInteraction::{UIScribbleInteractionDelegate,UIScribbleInteraction}; +pub use self::__UIScrollView::{UIScrollViewKeyboardDismissModeOnDrag,UIScrollViewContentInsetAdjustmentAlways,UIScrollViewDecelerationRate,UIScrollViewKeyboardDismissModeInteractiveWithAccessory,UIScrollViewDelegate,UIScrollView,UIScrollViewKeyboardDismissModeInteractive,UIScrollViewIndicatorStyle,UIScrollViewContentInsetAdjustmentScrollableAxes,UIScrollViewDecelerationRateNormal,UIScrollViewContentInsetAdjustmentAutomatic,UIScrollViewIndicatorStyleBlack,UIScrollViewIndexDisplayModeAutomatic,UIScrollViewContentInsetAdjustmentNever,UIScrollViewKeyboardDismissModeNone,UIScrollViewKeyboardDismissModeOnDragWithAccessory,UIScrollViewIndicatorStyleWhite,UIScrollViewDecelerationRateFast,UIScrollViewContentInsetAdjustmentBehavior,UIScrollViewIndicatorStyleDefault,UIScrollViewIndexDisplayMode,UIScrollViewIndexDisplayModeAlwaysHidden,UIScrollViewKeyboardDismissMode}; +pub use self::__UISearchBar::{UISearchBarIconResultsList,UISearchBarStyle,UISearchBarStyleProminent,UISearchBar,UISearchBarDelegate,UISearchBarStyleMinimal,UISearchBarStyleDefault,UISearchBarIconClear,UISearchBarIconSearch,UISearchBarIcon,UISearchBarIconBookmark}; +pub use self::__UISearchContainerViewController::{UISearchContainerViewController}; +pub use self::__UISearchController::{UISearchResultsUpdating,UISearchControllerScopeBarActivationOnSearchActivation,UISearchControllerScopeBarActivation,UISearchControllerScopeBarActivationAutomatic,UISearchControllerScopeBarActivationManual,UISearchController,UISearchControllerDelegate,UISearchControllerScopeBarActivationOnTextEntry}; +pub use self::__UISearchDisplayController::{UISearchDisplayDelegate,UISearchDisplayController}; +pub use self::__UISearchSuggestion::{UISearchSuggestionItem,UISearchSuggestion}; +pub use self::__UISearchTextField::{UISearchToken,UISearchTextFieldPasteItem,UISearchTextField,UISearchTextFieldDelegate}; +pub use self::__UISegmentedControl::{UISegmentedControl,UISegmentedControlNoSegment,UISegmentedControlStyle,UISegmentedControlStyleBordered,UISegmentedControlSegmentCenter,UISegmentedControlStylePlain,UISegmentedControlStyleBezeled,UISegmentedControlSegment,UISegmentedControlStyleBar,UISegmentedControlSegmentAny,UISegmentedControlSegmentLeft,UISegmentedControlSegmentRight,UISegmentedControlSegmentAlone}; +pub use self::__UISelectionFeedbackGenerator::{UISelectionFeedbackGenerator}; +pub use self::__UISheetPresentationController::{UISheetPresentationControllerDetentIdentifierLarge,UISheetPresentationControllerDetentIdentifierMedium,UISheetPresentationControllerDelegate,UISheetPresentationControllerDetent,UISheetPresentationControllerAutomaticDimension,UISheetPresentationControllerDetentIdentifier,UISheetPresentationControllerDetentInactive,UISheetPresentationControllerDetentResolutionContext,UISheetPresentationController}; +pub use self::__UISlider::{UISlider}; +pub use self::__UISnapBehavior::{UISnapBehavior}; +pub use self::__UISplitViewController::{UISplitViewControllerDisplayModeButtonVisibilityNever,UISplitViewControllerSplitBehaviorTile,UISplitViewControllerColumnCompact,UISplitViewControllerBackgroundStyleSidebar,UISplitViewControllerDisplayModeTwoBesideSecondary,UISplitViewControllerStyleUnspecified,UISplitViewControllerSplitBehaviorDisplace,UISplitViewControllerDisplayModeButtonVisibilityAutomatic,UISplitViewControllerColumnPrimary,UISplitViewControllerDisplayModeOneBesideSecondary,UISplitViewControllerPrimaryEdgeLeading,UISplitViewControllerColumnSupplementary,UISplitViewControllerDelegate,UISplitViewControllerColumnSecondary,UISplitViewControllerDisplayModeAutomatic,UISplitViewControllerDisplayModePrimaryOverlay,UISplitViewControllerDisplayModeTwoOverSecondary,UISplitViewControllerDisplayMode,UISplitViewControllerDisplayModePrimaryHidden,UISplitViewControllerSplitBehaviorOverlay,UISplitViewControllerDisplayModeButtonVisibility,UISplitViewControllerDisplayModeButtonVisibilityAlways,UISplitViewControllerStyleDoubleColumn,UISplitViewControllerPrimaryEdge,UISplitViewControllerDisplayModeSecondaryOnly,UISplitViewControllerBackgroundStyle,UISplitViewControllerDisplayModeAllVisible,UISplitViewControllerBackgroundStyleNone,UISplitViewControllerPrimaryEdgeTrailing,UISplitViewControllerColumn,UISplitViewControllerStyle,UISplitViewControllerDisplayModeTwoDisplaceSecondary,UISplitViewControllerSplitBehavior,UISplitViewControllerAutomaticDimension,UISplitViewControllerSplitBehaviorAutomatic,UISplitViewController,UISplitViewControllerStyleTripleColumn,UISplitViewControllerDisplayModeOneOverSecondary}; +pub use self::__UISpringLoadedInteraction::{UISpringLoadedInteractionEffectState,UISpringLoadedInteractionEffectStateInactive,UISpringLoadedInteractionBehavior,UISpringLoadedInteractionEffectStatePossible,UISpringLoadedInteractionEffectStateActivated,UISpringLoadedInteractionContext,UISpringLoadedInteractionEffectStateActivating,UISpringLoadedInteraction,UISpringLoadedInteractionEffect}; +pub use self::__UISpringLoadedInteractionSupporting::{UISpringLoadedInteractionSupporting}; +pub use self::__UIStackView::{UIStackViewAlignmentFill,UIStackViewDistributionFill,UIStackViewAlignment,UIStackViewAlignmentTrailing,UIStackViewAlignmentBottom,UIStackViewDistributionEqualSpacing,UIStackViewDistribution,UIStackViewAlignmentTop,UIStackViewAlignmentCenter,UIStackViewDistributionFillEqually,UIStackView,UIStackViewDistributionEqualCentering,UIStackViewDistributionFillProportionally,UIStackViewAlignmentLastBaseline,UIStackViewAlignmentFirstBaseline,UIStackViewAlignmentLeading}; +pub use self::__UIStateRestoration::{UIApplicationStateRestorationBundleVersionKey,UIStateRestorationViewControllerStoryboardKey,UIDataSourceModelAssociation,UIApplicationStateRestorationTimestampKey,UIApplicationStateRestorationSystemVersionKey,UIApplicationStateRestorationUserInterfaceIdiomKey,UIStateRestoring,UIObjectRestoration,UIViewControllerRestoration}; +pub use self::__UIStatusBarManager::{UIStatusBarManager}; +pub use self::__UIStepper::{UIStepper}; +pub use self::__UIStoryboard::{UIStoryboard,UIStoryboardViewControllerCreator}; +pub use self::__UIStoryboardPopoverSegue::{UIStoryboardPopoverSegue}; +pub use self::__UIStoryboardSegue::{UIStoryboardUnwindSegueSource,UIStoryboardSegue}; +pub use self::__UIStringDrawing::{UITextAttributeTextColor,UILineBreakModeCharacterWrap,UITextAlignmentCenter,UIBaselineAdjustmentAlignCenters,UIBaselineAdjustmentNone,UITextAttributeTextShadowOffset,UILineBreakModeClip,UIBaselineAdjustmentAlignBaselines,UILineBreakModeWordWrap,UITextAlignmentLeft,UITextAttributeTextShadowColor,UIBaselineAdjustment,UILineBreakModeTailTruncation,UILineBreakModeMiddleTruncation,UILineBreakModeHeadTruncation,UITextAlignmentRight,UILineBreakMode,UITextAttributeFont,UITextAlignment}; +pub use self::__UISwipeActionsConfiguration::{UISwipeActionsConfiguration}; +pub use self::__UISwipeGestureRecognizer::{UISwipeGestureRecognizerDirectionUp,UISwipeGestureRecognizer,UISwipeGestureRecognizerDirectionDown,UISwipeGestureRecognizerDirectionRight,UISwipeGestureRecognizerDirection,UISwipeGestureRecognizerDirectionLeft}; +pub use self::__UISwitch::{UISwitchStyleAutomatic,UISwitchStyleCheckbox,UISwitch,UISwitchStyleSliding,UISwitchStyle}; +pub use self::__UITabBar::{UITabBarItemPositioningFill,UITabBarItemPositioning,UITabBar,UITabBarItemPositioningCentered,UITabBarDelegate,UITabBarItemPositioningAutomatic}; +pub use self::__UITabBarAppearance::{UITabBarItemStateAppearance,UITabBarItemAppearanceStyleStacked,UITabBarItemAppearanceStyleInline,UITabBarItemAppearanceStyleCompactInline,UITabBarItemAppearance,UITabBarAppearance,UITabBarItemAppearanceStyle}; +pub use self::__UITabBarController::{UITabBarControllerDelegate,UITabBarController}; +pub use self::__UITabBarItem::{UITabBarSystemItemBookmarks,UITabBarSystemItemSearch,UITabBarSystemItemMostViewed,UITabBarItem,UITabBarSystemItemFeatured,UITabBarSystemItemMore,UITabBarSystemItemFavorites,UITabBarSystemItem,UITabBarSystemItemMostRecent,UITabBarSystemItemDownloads,UITabBarSystemItemRecents,UITabBarSystemItemContacts,UITabBarSystemItemHistory,UITabBarSystemItemTopRated}; +pub use self::__UITableView::{UITableViewDropPlaceholderContext,UITableViewStylePlain,UITableViewScrollPositionTop,UITableViewRowAnimationBottom,UITableView,UITableViewRowActionStyleDefault,UITableViewRowActionStyleDestructive,UITableViewDropIntentInsertAtDestinationIndexPath,UITableViewSelfSizingInvalidationEnabled,UITableViewRowAnimationAutomatic,UITableViewRowAnimation,UITableViewSelfSizingInvalidationEnabledIncludingConstraints,UITableViewScrollPosition,UITableViewDropCoordinator,UITableViewRowAnimationMiddle,UITableViewSelfSizingInvalidation,UITableViewSeparatorInsetFromAutomaticInsets,UITableViewSeparatorInsetReference,UITableViewDropItem,UITableViewDropIntentAutomatic,UITableViewDragDelegate,UITableViewDropIntentInsertIntoDestinationIndexPath,UITableViewDataSourcePrefetching,UITableViewDropProposal,UITableViewDropPlaceholder,UITableViewRowAnimationLeft,UITableViewDelegate,UITableViewRowAnimationRight,UITableViewScrollPositionNone,UITableViewRowAnimationNone,UITableViewAutomaticDimension,UITableViewFocusUpdateContext,UITableViewDropIntent,UITableViewRowAction,UITableViewRowAnimationFade,UITableViewScrollPositionMiddle,UITableViewRowAnimationTop,UITableViewRowActionStyleNormal,UITableViewStyleGrouped,UITableViewStyleInsetGrouped,UITableViewStyle,UITableViewIndexSearch,UITableViewSelectionDidChangeNotification,UITableViewDropIntentUnspecified,UITableViewSeparatorInsetFromCellEdges,UITableViewScrollPositionBottom,UITableViewDropDelegate,UITableViewRowActionStyle,UITableViewSelfSizingInvalidationDisabled,UITableViewDataSource,UITableViewPlaceholder}; +pub use self::__UITableViewCell::{UITableViewCellEditingStyleInsert,UITableViewCellSeparatorStyleSingleLine,UITableViewCellStyleSubtitle,UITableViewCellStyleValue1,UITableViewCellSeparatorStyle,UITableViewCellSelectionStyle,UITableViewCellFocusStyleCustom,UITableViewCellEditingStyle,UITableViewCellAccessoryDetailButton,UITableViewCellStyleValue2,UITableViewCellSelectionStyleDefault,UITableViewCellSelectionStyleGray,UITableViewCellAccessoryType,UITableViewCellDragStateNone,UITableViewCellDragStateDragging,UITableViewCellEditingStyleNone,UITableViewCellAccessoryDisclosureIndicator,UITableViewCellSelectionStyleBlue,UITableViewCellDragStateLifting,UITableViewCellConfigurationUpdateHandler,UITableViewCellStateShowingDeleteConfirmationMask,UITableViewCell,UITableViewCellStateMask,UITableViewCellSelectionStyleNone,UITableViewCellAccessoryCheckmark,UITableViewCellStyle,UITableViewCellDragState,UITableViewCellFocusStyle,UITableViewCellFocusStyleDefault,UITableViewCellAccessoryNone,UITableViewCellStateDefaultMask,UITableViewCellSeparatorStyleNone,UITableViewCellSeparatorStyleSingleLineEtched,UITableViewCellAccessoryDetailDisclosureButton,UITableViewCellStyleDefault,UITableViewCellEditingStyleDelete,UITableViewCellStateShowingEditControlMask}; +pub use self::__UITableViewController::{UITableViewController}; +pub use self::__UITableViewHeaderFooterView::{UITableViewHeaderFooterView,UITableViewHeaderFooterViewConfigurationUpdateHandler}; +pub use self::__UITapGestureRecognizer::{UITapGestureRecognizer}; +pub use self::__UITargetedDragPreview::{UITargetedDragPreview,UIDragPreviewTarget}; +pub use self::__UITargetedPreview::{UIPreviewTarget,UITargetedPreview}; +pub use self::__UITextChecker::{UITextChecker}; +pub use self::__UITextDragPreviewRenderer::{UITextDragPreviewRenderer}; +pub use self::__UITextDragging::{UITextDraggable,UITextDragOptionStripTextColorFromPreviews,UITextDragDelegate,UITextDragRequest,UITextDragOptions,UITextDragOptionsNone}; +pub use self::__UITextDropProposal::{UITextDropPerformerView,UITextDropProgressModeCustom,UITextDropActionReplaceSelection,UITextDropActionReplaceAll,UITextDropAction,UITextDropPerformer,UITextDropActionInsert,UITextDropPerformerDelegate,UITextDropProposal,UITextDropProgressModeSystem,UITextDropProgressMode}; +pub use self::__UITextDropping::{UITextDropRequest,UITextDropDelegate,UITextDropEditabilityYes,UITextDroppable,UITextDropEditability,UITextDropEditabilityNo,UITextDropEditabilityTemporary}; +pub use self::__UITextField::{UITextFieldDidEndEditingReason,UITextFieldTextDidChangeNotification,UITextFieldViewModeUnlessEditing,UITextField,UITextFieldViewModeAlways,UITextBorderStyleNone,UITextFieldTextDidBeginEditingNotification,UITextFieldDidEndEditingReasonCancelled,UITextFieldDidEndEditingReasonKey,UITextBorderStyle,UITextBorderStyleRoundedRect,UITextFieldViewMode,UITextFieldViewModeNever,UITextFieldViewModeWhileEditing,UITextBorderStyleBezel,UITextBorderStyleLine,UITextFieldTextDidEndEditingNotification,UITextFieldDelegate,UITextFieldDidEndEditingReasonCommitted}; +pub use self::__UITextFormattingCoordinator::{UITextFormattingCoordinatorDelegate,UITextFormattingCoordinator}; +pub use self::__UITextInput::{UITextLayoutDirectionLeft,UITextInputStringTokenizer,UITextStorageDirection,UITextGranularityParagraph,UITextWritingDirection,UITextWritingDirectionNatural,UITextGranularitySentence,UIDictationPhrase,UIKeyInput,UITextGranularityCharacter,UITextLayoutDirectionDown,UITextPlaceholder,UITextAlternativeStyle,UITextAlternativeStyleNone,UITextInputTextBackgroundColorKey,UITextWritingDirectionLeftToRight,UITextInputTextColorKey,UITextRange,UITextInputAssistantItem,UITextWritingDirectionRightToLeft,UITextGranularityDocument,UITextLayoutDirectionRight,UITextInputTokenizer,UITextAlternativeStyleLowConfidence,UITextGranularityLine,UITextInputMode,UITextInputTextFontKey,UITextInput,UITextInputCurrentInputModeDidChangeNotification,UITextStorageDirectionForward,UITextStorageDirectionBackward,UITextLayoutDirectionUp,UITextPosition,UITextLayoutDirection,UITextGranularityWord,UITextSelectionRect,UITextInputDelegate,UITextDirection,UITextGranularity}; +pub use self::__UITextInputTraits::{UITextContentTypeJobTitle,UIKeyboardTypeDecimalPad,UITextContentTypeTelephoneNumber,UITextAutocorrectionTypeYes,UITextSmartQuotesTypeYes,UITextContentTypeEmailAddress,UITextContentTypeOrganizationName,UIKeyboardTypeASCIICapableNumberPad,UIReturnKeyJoin,UITextAutocapitalizationTypeSentences,UIReturnKeyContinue,UITextAutocorrectionTypeDefault,UITextContentTypeNameSuffix,UITextContentTypeGivenName,UITextAutocapitalizationType,UITextSmartQuotesTypeNo,UIReturnKeyYahoo,UIKeyboardTypeASCIICapable,UITextSmartDashesType,UITextInputTraits,UIReturnKeyType,UITextContentTypeSublocality,UITextContentTypeName,UITextContentTypeNamePrefix,UITextSpellCheckingTypeDefault,UIKeyboardTypeEmailAddress,UITextContentTypePassword,UIKeyboardTypeNamePhonePad,UIKeyboardAppearanceDefault,UIKeyboardTypeNumberPad,UIKeyboardAppearanceAlert,UIReturnKeySearch,UITextSmartQuotesTypeDefault,UIKeyboardTypeAlphabet,UIReturnKeySend,UITextAutocorrectionTypeNo,UIKeyboardTypeTwitter,UITextContentType,UITextSpellCheckingTypeNo,UIReturnKeyRoute,UIKeyboardTypeURL,UIReturnKeyNext,UITextAutocapitalizationTypeWords,UITextSmartDashesTypeYes,UITextAutocapitalizationTypeAllCharacters,UITextSmartQuotesType,UIKeyboardTypeDefault,UITextContentTypeFullStreetAddress,UIKeyboardAppearanceLight,UITextContentTypeLocation,UITextContentTypeFlightNumber,UITextContentTypeAddressState,UITextInputPasswordRules,UIKeyboardType,UIReturnKeyDefault,UIKeyboardAppearanceDark,UIKeyboardTypeNumbersAndPunctuation,UIReturnKeyGoogle,UITextContentTypeMiddleName,UIKeyboardAppearance,UIReturnKeyGo,UITextContentTypeAddressCity,UITextContentTypeNewPassword,UITextContentTypeFamilyName,UITextSmartDashesTypeNo,UITextSmartInsertDeleteTypeDefault,UIReturnKeyEmergencyCall,UITextContentTypeCountryName,UITextSmartInsertDeleteType,UITextContentTypeAddressCityAndState,UITextSpellCheckingType,UITextSmartInsertDeleteTypeYes,UIKeyboardTypeWebSearch,UITextContentTypePostalCode,UITextContentTypeURL,UITextContentTypeCreditCardNumber,UITextContentTypeOneTimeCode,UIKeyboardTypePhonePad,UITextContentTypeStreetAddressLine1,UITextSmartInsertDeleteTypeNo,UITextAutocorrectionType,UITextContentTypeShipmentTrackingNumber,UITextContentTypeUsername,UITextContentTypeDateTime,UIReturnKeyDone,UITextContentTypeNickname,UITextContentTypeStreetAddressLine2,UITextSmartDashesTypeDefault,UITextAutocapitalizationTypeNone,UITextSpellCheckingTypeYes}; +pub use self::__UITextInteraction::{UITextInteractionModeNonEditable,UITextInteractionDelegate,UITextInteraction,UITextInteractionModeEditable,UITextInteractionMode}; +pub use self::__UITextItemInteraction::{UITextItemInteraction,UITextItemInteractionInvokeDefaultAction,UITextItemInteractionPreview,UITextItemInteractionPresentActions}; +pub use self::__UITextPasteConfigurationSupporting::{UITextPasteConfigurationSupporting}; +pub use self::__UITextPasteDelegate::{UITextPasteDelegate,UITextPasteItem}; +pub use self::__UITextSearching::{UITextSearchFoundTextStyleNormal,UITextSearchFoundTextStyle,UITextSearchFoundTextStyleFound,UITextSearchDocumentIdentifier,UITextSearching,UITextSearchFoundTextStyleHighlighted,UITextSearchAggregator}; +pub use self::__UITextView::{UITextViewTextDidBeginEditingNotification,UITextViewTextDidEndEditingNotification,UITextViewTextDidChangeNotification,UITextView,UITextViewDelegate}; +pub use self::__UITimingCurveProvider::{UITimingCurveProvider,UITimingCurveType,UITimingCurveTypeSpring,UITimingCurveTypeCubic,UITimingCurveTypeBuiltin,UITimingCurveTypeComposed}; +pub use self::__UITimingParameters::{UISpringTimingParameters,UICubicTimingParameters}; +pub use self::__UIToolTipInteraction::{UIToolTipConfiguration,UIToolTipInteraction,UIToolTipInteractionDelegate}; +pub use self::__UIToolbar::{UIToolbar,UIToolbarDelegate}; +pub use self::__UIToolbarAppearance::{UIToolbarAppearance}; +pub use self::__UITouch::{UITouchType,UITouchPhase,UITouchTypeDirect,UITouchPhaseRegionExited,UITouchTypeStylus,UITouchPhaseRegionMoved,UITouchTypeIndirectPointer,UITouchProperties,UITouchTypePencil,UIForceTouchCapability,UITouch,UITouchPhaseEnded,UIForceTouchCapabilityUnknown,UIForceTouchCapabilityAvailable,UITouchPhaseMoved,UITouchPhaseStationary,UITouchTypeIndirect,UITouchPropertyForce,UITouchPhaseBegan,UITouchPropertyAzimuth,UITouchPropertyAltitude,UITouchPropertyLocation,UIForceTouchCapabilityUnavailable,UITouchPhaseRegionEntered,UITouchPhaseCancelled}; +pub use self::__UITrackingLayoutGuide::{UITrackingLayoutGuide}; +pub use self::__UITraitCollection::{UITraitEnvironment,UITraitCollection}; +pub use self::__UIUserActivity::{UIUserActivityRestoring}; +pub use self::__UIUserNotificationSettings::{UIUserNotificationCategory,UIUserNotificationActionBehaviorTextInput,UIUserNotificationTypeSound,UIUserNotificationActionBehavior,UIUserNotificationTypeNone,UIUserNotificationType,UIUserNotificationActionContextDefault,UIUserNotificationActionBehaviorDefault,UIUserNotificationSettings,UIMutableUserNotificationCategory,UIUserNotificationActivationMode,UIUserNotificationAction,UIUserNotificationTypeAlert,UIUserNotificationActivationModeBackground,UIUserNotificationActionContextMinimal,UIUserNotificationActionContext,UIUserNotificationTextInputActionButtonTitleKey,UIMutableUserNotificationAction,UIUserNotificationTypeBadge,UIUserNotificationActivationModeForeground,UIUserNotificationActionResponseTypedTextKey}; +pub use self::__UIVibrancyEffect::{UIVibrancyEffectStyleSecondaryFill,UIVibrancyEffectStyleLabel,UIVibrancyEffectStyleFill,UIVibrancyEffectStyleSecondaryLabel,UIVibrancyEffectStyle,UIVibrancyEffectStyleTertiaryLabel,UIVibrancyEffectStyleTertiaryFill,UIVibrancyEffectStyleQuaternaryLabel,UIVibrancyEffectStyleSeparator,UIVibrancyEffect}; +pub use self::__UIVideoEditorController::{UIVideoEditorControllerDelegate,UIVideoEditorController}; +pub use self::__UIView::{UIViewAnimationTransitionNone,UILayoutFittingCompressedSize,UIViewKeyframeAnimationOptionLayoutSubviews,UIViewTintAdjustmentMode,UIViewAnimationOptionTransitionFlipFromBottom,UIViewKeyframeAnimationOptionOverrideInheritedDuration,UILayoutConstraintAxisVertical,UIViewContentModeBottomRight,UIViewAutoresizingFlexibleWidth,UIViewTintAdjustmentModeDimmed,UIViewAnimationOptionTransitionCurlDown,UISystemAnimation,UIViewContentModeBottom,UIViewAnimationCurveLinear,UIViewContentModeTopRight,UIViewContentModeScaleToFill,UIViewAutoresizingFlexibleRightMargin,UIViewAnimationCurveEaseInOut,UISemanticContentAttributePlayback,UILayoutConstraintAxis,UISemanticContentAttributeForceLeftToRight,UIViewAnimationCurveEaseIn,UIViewAnimationOptionCurveLinear,UIViewAnimationOptionTransitionCrossDissolve,UIViewAnimationTransition,UIViewAutoresizingFlexibleHeight,UIViewTintAdjustmentModeNormal,UIViewKeyframeAnimationOptionOverrideInheritedOptions,UIViewKeyframeAnimationOptions,UIViewAnimationOptionCurveEaseInOut,UIViewAnimationOptionTransitionFlipFromRight,UIViewAutoresizingFlexibleBottomMargin,UISemanticContentAttribute,UIViewAnimationOptionBeginFromCurrentState,UIViewAnimationOptionTransitionFlipFromLeft,UISemanticContentAttributeUnspecified,UIViewAnimationOptionCurveEaseOut,UIViewAnimationOptionAllowUserInteraction,UIViewAnimationOptionOverrideInheritedDuration,UIView,UIViewAnimationOptionTransitionCurlUp,UIViewAnimationOptionTransitionNone,UIViewAnimationTransitionFlipFromLeft,UIViewAnimationCurveEaseOut,UIViewKeyframeAnimationOptionBeginFromCurrentState,UIViewContentModeScaleAspectFit,UIViewNoIntrinsicMetric,UIViewAnimationOptionOverrideInheritedOptions,UIViewAnimationOptionShowHideTransitionViews,UIViewAnimationOptionPreferredFramesPerSecond60,UIViewKeyframeAnimationOptionCalculationModePaced,UIViewKeyframeAnimationOptionCalculationModeCubic,UIViewAnimationOptionTransitionFlipFromTop,UIViewKeyframeAnimationOptionCalculationModeCubicPaced,UIViewAutoresizingNone,UIViewAnimationCurve,UIViewContentModeLeft,UIViewContentModeCenter,UIViewAnimationOptionAllowAnimatedContent,UIViewAnimationTransitionCurlDown,UIViewAnimationTransitionFlipFromRight,UIViewContentMode,UIViewAutoresizingFlexibleLeftMargin,UIViewAutoresizing,UIViewContentModeTop,UIViewAutoresizingFlexibleTopMargin,UIViewAnimationOptions,UIViewAnimationOptionOverrideInheritedCurve,UIViewContentModeScaleAspectFill,UIViewAnimationTransitionCurlUp,UIViewAnimationOptionLayoutSubviews,UIViewAnimationOptionPreferredFramesPerSecondDefault,UIViewKeyframeAnimationOptionAllowUserInteraction,UIViewAnimationOptionCurveEaseIn,UIViewKeyframeAnimationOptionRepeat,UIViewKeyframeAnimationOptionCalculationModeDiscrete,UISystemAnimationDelete,UIViewContentModeBottomLeft,UIViewKeyframeAnimationOptionCalculationModeLinear,UIViewContentModeRight,UIViewAnimationOptionPreferredFramesPerSecond30,UISemanticContentAttributeSpatial,UISemanticContentAttributeForceRightToLeft,UILayoutConstraintAxisHorizontal,UILayoutFittingExpandedSize,UIViewKeyframeAnimationOptionAutoreverse,UIViewTintAdjustmentModeAutomatic,UICoordinateSpace,UIViewAnimationOptionAutoreverse,UIViewAnimationOptionRepeat,UIViewContentModeRedraw,UIViewContentModeTopLeft}; +pub use self::__UIViewAnimating::{UIViewAnimatingStateActive,UIViewAnimatingStateStopped,UIViewAnimatingState,UIViewAnimating,UIViewImplicitlyAnimating,UIViewAnimatingPositionCurrent,UIViewAnimatingPositionEnd,UIViewAnimatingPosition,UIViewAnimatingPositionStart,UIViewAnimatingStateInactive}; +pub use self::__UIViewConfigurationState::{UIViewConfigurationState}; +pub use self::__UIViewController::{UIModalPresentationCustom,UIModalPresentationOverFullScreen,UIPreviewActionItem,UIModalPresentationPageSheet,UIPreviewAction,UIPreviewActionGroup,UIModalTransitionStyleCoverVertical,UIViewControllerHierarchyInconsistencyException,UIModalPresentationBlurOverFullScreen,UIModalPresentationStyle,UIModalPresentationNone,UIViewController,UIPreviewActionStyleSelected,UIModalPresentationAutomatic,UIPreviewActionStyleDestructive,UIContentContainer,UIModalTransitionStyleCrossDissolve,UIModalTransitionStylePartialCurl,UIModalPresentationCurrentContext,UIViewControllerPreviewingDelegate,UIViewControllerShowDetailTargetDidChangeNotification,UIModalPresentationFormSheet,UIPreviewActionStyleDefault,UIModalPresentationFullScreen,UIModalTransitionStyle,UIModalPresentationPopover,UIModalPresentationOverCurrentContext,UIViewControllerPreviewing,UIPreviewActionStyle,UIModalTransitionStyleFlipHorizontal}; +pub use self::__UIViewControllerTransitionCoordinator::{UIViewControllerTransitionCoordinator,UITransitionContextViewControllerKey,UITransitionContextViewKey,UIViewControllerTransitionCoordinatorContext}; +pub use self::__UIViewControllerTransitioning::{UIViewControllerTransitioningDelegate,UITransitionContextFromViewControllerKey,UITransitionContextToViewKey,UIViewControllerInteractiveTransitioning,UITransitionContextToViewControllerKey,UIPercentDrivenInteractiveTransition,UIViewControllerContextTransitioning,UITransitionContextFromViewKey,UIViewControllerAnimatedTransitioning}; +pub use self::__UIViewPropertyAnimator::{UIViewPropertyAnimator}; +pub use self::__UIVisualEffect::{UIVisualEffect}; +pub use self::__UIVisualEffectView::{UIVisualEffectView}; +pub use self::__UIWebView::{UIWebPaginationMode,UIWebPaginationModeLeftToRight,UIWebView,UIWebViewNavigationTypeFormSubmitted,UIWebViewNavigationTypeFormResubmitted,UIWebPaginationModeTopToBottom,UIWebPaginationModeBottomToTop,UIWebViewNavigationTypeLinkClicked,UIWebViewNavigationTypeReload,UIWebPaginationBreakingModePage,UIWebViewDelegate,UIWebPaginationBreakingMode,UIWebPaginationModeRightToLeft,UIWebViewNavigationTypeOther,UIWebViewNavigationType,UIWebPaginationBreakingModeColumn,UIWebViewNavigationTypeBackForward,UIWebPaginationModeUnpaginated}; +pub use self::__UIWindow::{UIWindowLevelNormal,UIKeyboardIsLocalUserInfoKey,UIKeyboardDidShowNotification,UIWindow,UILayoutGuideAspectFitting,UIWindowDidBecomeKeyNotification,UIWindowDidResignKeyNotification,UIKeyboardWillShowNotification,UIKeyboardFrameBeginUserInfoKey,UIKeyboardWillHideNotification,UIWindowLevelStatusBar,UIWindowLevel,UIKeyboardWillChangeFrameNotification,UIKeyboardDidHideNotification,UIKeyboardDidChangeFrameNotification,UIWindowDidBecomeVisibleNotification,UIKeyboardFrameEndUserInfoKey,UIWindowDidBecomeHiddenNotification,UIKeyboardCenterBeginUserInfoKey,UIKeyboardAnimationCurveUserInfoKey,UIKeyboardCenterEndUserInfoKey,UIKeyboardBoundsUserInfoKey,UIWindowLevelAlert,UIKeyboardAnimationDurationUserInfoKey}; +pub use self::__UIWindowScene::{UIWindowSceneDismissalAnimationCommit,UIWindowSceneDelegate,UIWindowSceneDismissalAnimation,UIWindowSceneDestructionRequestOptions,UIWindowSceneDismissalAnimationDecline,UIWindowSceneSessionRoleExternalDisplay,UIWindowScene,UIWindowSceneSessionRoleExternalDisplayNonInteractive,UISceneSizeRestrictions,UIWindowSceneSessionRoleApplication,UIWindowSceneDismissalAnimationStandard}; +pub use self::__UIWindowSceneActivationAction::{UIWindowSceneActivationActionConfigurationProvider,UIWindowSceneActivationAction}; +pub use self::__UIWindowSceneActivationConfiguration::{UIWindowSceneActivationConfiguration}; +pub use self::__UIWindowSceneActivationInteraction::{UIWindowSceneActivationInteraction,UIWindowSceneActivationInteractionConfigurationProvider}; +pub use self::__UIWindowSceneActivationRequestOptions::{UIWindowSceneActivationRequestOptions,UIWindowScenePresentationStyleAutomatic,UIWindowScenePresentationStyle,UIWindowScenePresentationStyleStandard,UIWindowScenePresentationStyleProminent}; +pub use self::__UIWindowSceneGeometry::{UIWindowSceneGeometry}; +pub use self::__UIWindowSceneGeometryPreferences::{UIWindowSceneGeometryPreferences}; +pub use self::__UIWindowSceneGeometryPreferencesIOS::{UIWindowSceneGeometryPreferencesIOS}; +pub use self::__UIWindowSceneGeometryPreferencesMac::{UIWindowSceneGeometryPreferencesMac}; diff --git a/crates/icrate-generated/src/UIKit/translation-config.toml b/crates/icrate-generated/src/UIKit/translation-config.toml new file mode 100644 index 000000000..e69de29bb diff --git a/crates/icrate-generated/src/lib.rs b/crates/icrate-generated/src/lib.rs new file mode 100644 index 000000000..cab69e8d4 --- /dev/null +++ b/crates/icrate-generated/src/lib.rs @@ -0,0 +1,292 @@ +#![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")] +#![recursion_limit = "512"] + +#[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 { + $($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); + } + }; +} + +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; + } + }; + // 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; + }; +} + +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; +#[cfg(feature = "AuthenticationServices")] +pub mod AuthenticationServices; +#[cfg(feature = "CoreData")] +pub mod CoreData; +#[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::{Allocated, Id, Shared}; + pub(crate) use objc2::runtime::{Bool, Class, Object, Sel}; + pub(crate) use objc2::{ + __inner_extern_class, extern_class, extern_methods, ClassType, Message, + }; + + // TODO + #[repr(C)] + pub struct OptionSel(*const objc2::ffi::objc_selector); + unsafe impl objc2::Encode for OptionSel { + const ENCODING: objc2::Encoding = objc2::Encoding::Sel; + } + + #[cfg(feature = "blocks")] + pub(crate) use block2::Block; + + // TODO + pub(crate) type Protocol = Object; + pub(crate) type TodoFunction = *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? +} diff --git a/crates/test-ui/Cargo.toml b/crates/test-ui/Cargo.toml index 1ce021232..2bc8fd42c 100644 --- a/crates/test-ui/Cargo.toml +++ b/crates/test-ui/Cargo.toml @@ -23,7 +23,7 @@ gnustep-2-1 = ["gnustep-2-0", "block2/gnustep-2-1", "objc2/gnustep-2-1"] run = ["trybuild"] [dependencies] -trybuild = { version = "1.0.63", optional = true } +trybuild = { version = "1.0.72", optional = true } block2 = { path = "../block2", default-features = false } objc2 = { path = "../objc2", default-features = false } diff --git a/crates/test-ui/src/lib.rs b/crates/test-ui/src/lib.rs new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/crates/test-ui/src/lib.rs @@ -0,0 +1 @@ +