Vendor dependencies for 0.3.0 release

This commit is contained in:
2025-09-27 10:29:08 -05:00
parent 0c8d39d483
commit 82ab7f317b
26803 changed files with 16134934 additions and 0 deletions

View File

@@ -0,0 +1 @@
{"files":{"Cargo.toml":"33f0d8279e3c1c3b1bee67224277d43939ffd83b35e776b0bda5c715ed5cf9ab","README.md":"9190798d335c2001cb478285f67ca6332ea624060ce642e04fe7f8edcadac448","src/generated/LPError.rs":"f8af931a23159fd61d0b27ecedb92ad5964928152c0a1afb4d2463d78e82980b","src/generated/LPFoundation.rs":"c2c9ef4610ebc5c298bce3ce70d3e59d266465eefa07b8337f9e8d06315a7387","src/generated/LPLinkMetadata.rs":"31c27e2b81c7023fdedbceafc8fad186dee3a93b2d8aa5cf55e4926fbb949944","src/generated/LPLinkView.rs":"b4962dfe9f7e606a5c683fb5ce25bea5536606968163938b30b6afc856070a11","src/generated/LPMetadataProvider.rs":"76f94b72bb8be8eec27f0baf415ed56c6b66bcc644040594f14a41245f0375c3","src/generated/mod.rs":"89ab416a3cd924cdb484a18fa3d7f8f4222582a32e6e72ef528e50b60a52ecc9","src/lib.rs":"c578e5fad4700a1c47cbeb03b66dbf4f7a16e659151f638d70490b661330ca51","translation-config.toml":"087848fb3cca51425c6283bb0f5a84cd0c1c96331edd59cb62ecbeb58abc2745"},"package":"a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398"}

View File

@@ -0,0 +1,144 @@
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.
[package]
edition = "2021"
rust-version = "1.60"
name = "objc2-link-presentation"
version = "0.2.2"
build = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Bindings to the LinkPresentation framework"
readme = "README.md"
keywords = [
"cocoa",
"apple",
"framework",
"macos",
"ios",
]
categories = [
"api-bindings",
"development-tools::ffi",
"external-ffi-bindings",
"os::macos-apis",
]
license = "MIT"
repository = "https://github.com/madsmtm/objc2"
[package.metadata.docs.rs]
default-target = "aarch64-apple-darwin"
features = ["all"]
targets = [
"aarch64-apple-darwin",
"x86_64-apple-darwin",
"aarch64-apple-ios",
"aarch64-apple-tvos",
"aarch64-apple-ios-macabi",
]
[lib]
name = "objc2_link_presentation"
path = "src/lib.rs"
[dependencies.block2]
version = "0.5.1"
optional = true
default-features = false
[dependencies.objc2]
version = "0.5.2"
default-features = false
[dependencies.objc2-foundation]
version = "0.2.2"
default-features = false
[features]
LPError = [
"objc2-foundation/NSError",
"objc2-foundation/NSString",
]
LPFoundation = []
LPLinkMetadata = [
"objc2-foundation/NSItemProvider",
"objc2-foundation/NSObject",
"objc2-foundation/NSString",
"objc2-foundation/NSURL",
]
LPLinkView = [
"objc2-app-kit?/NSAccessibilityProtocols",
"objc2-app-kit?/NSAnimation",
"objc2-app-kit?/NSAppearance",
"objc2-app-kit?/NSDragging",
"objc2-app-kit?/NSResponder",
"objc2-app-kit?/NSUserInterfaceItemIdentification",
"objc2-app-kit?/NSView",
"objc2-foundation/NSCoder",
"objc2-foundation/NSGeometry",
"objc2-foundation/NSObject",
"objc2-foundation/NSURL",
]
LPMetadataProvider = [
"objc2-foundation/NSDate",
"objc2-foundation/NSError",
"objc2-foundation/NSURL",
"objc2-foundation/NSURLRequest",
]
all = [
"LPError",
"LPFoundation",
"LPLinkMetadata",
"LPLinkView",
"LPMetadataProvider",
"block2",
"objc2-app-kit",
]
alloc = [
"block2?/alloc",
"objc2/alloc",
"objc2-app-kit?/alloc",
"objc2-foundation/alloc",
]
block2 = [
"dep:block2",
"objc2-app-kit?/block2",
"objc2-foundation/block2",
]
default = ["std"]
objc2-app-kit = ["dep:objc2-app-kit"]
std = [
"alloc",
"block2?/std",
"objc2/std",
"objc2-app-kit?/std",
"objc2-foundation/std",
]
[target."cfg(target_os = \"macos\")".dependencies.objc2-app-kit]
version = "0.2.2"
optional = true
default-features = false
[lints.clippy]
cargo = "warn"
ptr_as_ptr = "warn"
[lints.rust]
elided_lifetimes_in_paths = "warn"
missing_copy_implementations = "warn"
missing_debug_implementations = "warn"
non_ascii_idents = "deny"
unreachable_pub = "warn"
unsafe_op_in_unsafe_fn = "deny"

View File

@@ -0,0 +1,14 @@
# `objc2-link-presentation`
[![Latest version](https://badgen.net/crates/v/objc2-link-presentation)](https://crates.io/crates/objc2-link-presentation)
[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt)
[![Documentation](https://docs.rs/objc2-link-presentation/badge.svg)](https://docs.rs/objc2-link-presentation/)
[![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 framework LinkPresentation.
This README is kept intentionally small to consolidate the documentation, see
[the Rust docs](https://docs.rs/objc2-link-presentation/) for more details on this crate.
This crate is part of the [`objc2` project](https://github.com/madsmtm/objc2),
see that for related crates.

View File

@@ -0,0 +1,30 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern "C" {
pub static LPErrorDomain: Option<&'static NSErrorDomain>;
}
// NS_ERROR_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct LPErrorCode(pub NSInteger);
impl LPErrorCode {
pub const LPErrorUnknown: Self = Self(1);
pub const LPErrorMetadataFetchFailed: Self = Self(2);
pub const LPErrorMetadataFetchCancelled: Self = Self(3);
pub const LPErrorMetadataFetchTimedOut: Self = Self(4);
pub const LPErrorMetadataFetchNotAllowed: Self = Self(5);
}
unsafe impl Encode for LPErrorCode {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for LPErrorCode {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

View File

@@ -0,0 +1,2 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT

View File

@@ -0,0 +1,81 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct LPLinkMetadata;
unsafe impl ClassType for LPLinkMetadata {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for LPLinkMetadata {}
unsafe impl NSCopying for LPLinkMetadata {}
unsafe impl NSObjectProtocol for LPLinkMetadata {}
unsafe impl NSSecureCoding for LPLinkMetadata {}
extern_methods!(
unsafe impl LPLinkMetadata {
#[method_id(@__retain_semantics Other originalURL)]
pub unsafe fn originalURL(&self) -> Option<Retained<NSURL>>;
#[method(setOriginalURL:)]
pub unsafe fn setOriginalURL(&self, original_url: Option<&NSURL>);
#[method_id(@__retain_semantics Other URL)]
pub unsafe fn URL(&self) -> Option<Retained<NSURL>>;
#[method(setURL:)]
pub unsafe fn setURL(&self, url: Option<&NSURL>);
#[method_id(@__retain_semantics Other title)]
pub unsafe fn title(&self) -> Option<Retained<NSString>>;
#[method(setTitle:)]
pub unsafe fn setTitle(&self, title: Option<&NSString>);
#[method_id(@__retain_semantics Other iconProvider)]
pub unsafe fn iconProvider(&self) -> Option<Retained<NSItemProvider>>;
#[method(setIconProvider:)]
pub unsafe fn setIconProvider(&self, icon_provider: Option<&NSItemProvider>);
#[method_id(@__retain_semantics Other imageProvider)]
pub unsafe fn imageProvider(&self) -> Option<Retained<NSItemProvider>>;
#[method(setImageProvider:)]
pub unsafe fn setImageProvider(&self, image_provider: Option<&NSItemProvider>);
#[method_id(@__retain_semantics Other videoProvider)]
pub unsafe fn videoProvider(&self) -> Option<Retained<NSItemProvider>>;
#[method(setVideoProvider:)]
pub unsafe fn setVideoProvider(&self, video_provider: Option<&NSItemProvider>);
#[method_id(@__retain_semantics Other remoteVideoURL)]
pub unsafe fn remoteVideoURL(&self) -> Option<Retained<NSURL>>;
#[method(setRemoteVideoURL:)]
pub unsafe fn setRemoteVideoURL(&self, remote_video_url: Option<&NSURL>);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl LPLinkMetadata {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,116 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
use objc2_app_kit::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
pub struct LPLinkView;
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
unsafe impl ClassType for LPLinkView {
#[inherits(NSResponder, NSObject)]
type Super = NSView;
type Mutability = MainThreadOnly;
}
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
unsafe impl NSAccessibility for LPLinkView {}
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
unsafe impl NSAccessibilityElementProtocol for LPLinkView {}
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
unsafe impl NSAnimatablePropertyContainer for LPLinkView {}
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
unsafe impl NSAppearanceCustomization for LPLinkView {}
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
unsafe impl NSCoding for LPLinkView {}
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
unsafe impl NSDraggingDestination for LPLinkView {}
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
unsafe impl NSObjectProtocol for LPLinkView {}
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
unsafe impl NSUserInterfaceItemIdentification for LPLinkView {}
extern_methods!(
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
unsafe impl LPLinkView {
#[method_id(@__retain_semantics Init initWithCoder:)]
pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Retained<Self>;
#[method(encodeWithCoder:)]
pub unsafe fn encodeWithCoder(&self, coder: &NSCoder);
#[method_id(@__retain_semantics Init initWithURL:)]
pub unsafe fn initWithURL(this: Allocated<Self>, url: &NSURL) -> Retained<Self>;
#[cfg(feature = "LPLinkMetadata")]
#[method_id(@__retain_semantics Init initWithMetadata:)]
pub unsafe fn initWithMetadata(
this: Allocated<Self>,
metadata: &LPLinkMetadata,
) -> Retained<Self>;
#[cfg(feature = "LPLinkMetadata")]
#[method_id(@__retain_semantics Other metadata)]
pub unsafe fn metadata(&self) -> Retained<LPLinkMetadata>;
#[cfg(feature = "LPLinkMetadata")]
#[method(setMetadata:)]
pub unsafe fn setMetadata(&self, metadata: &LPLinkMetadata);
}
);
extern_methods!(
/// Methods declared on superclass `NSView`
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
unsafe impl LPLinkView {
#[method_id(@__retain_semantics Init initWithFrame:)]
pub unsafe fn initWithFrame(this: Allocated<Self>, frame_rect: NSRect) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSResponder`
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
unsafe impl LPLinkView {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
unsafe impl LPLinkView {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
}
);

View File

@@ -0,0 +1,64 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct LPMetadataProvider;
unsafe impl ClassType for LPMetadataProvider {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSObjectProtocol for LPMetadataProvider {}
extern_methods!(
unsafe impl LPMetadataProvider {
#[cfg(all(feature = "LPLinkMetadata", feature = "block2"))]
#[method(startFetchingMetadataForURL:completionHandler:)]
pub unsafe fn startFetchingMetadataForURL_completionHandler(
&self,
url: &NSURL,
completion_handler: &block2::Block<dyn Fn(*mut LPLinkMetadata, *mut NSError)>,
);
#[cfg(all(feature = "LPLinkMetadata", feature = "block2"))]
#[method(startFetchingMetadataForRequest:completionHandler:)]
pub unsafe fn startFetchingMetadataForRequest_completionHandler(
&self,
request: &NSURLRequest,
completion_handler: &block2::Block<dyn Fn(*mut LPLinkMetadata, *mut NSError)>,
);
#[method(cancel)]
pub unsafe fn cancel(&self);
#[method(shouldFetchSubresources)]
pub unsafe fn shouldFetchSubresources(&self) -> bool;
#[method(setShouldFetchSubresources:)]
pub unsafe fn setShouldFetchSubresources(&self, should_fetch_subresources: bool);
#[method(timeout)]
pub unsafe fn timeout(&self) -> NSTimeInterval;
#[method(setTimeout:)]
pub unsafe fn setTimeout(&self, timeout: NSTimeInterval);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl LPMetadataProvider {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,45 @@
// This file has been automatically generated by `objc2`'s `header-translator`.
// DO NOT EDIT
#![allow(unused_imports)]
#![allow(deprecated)]
#![allow(non_snake_case)]
#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#![allow(missing_docs)]
#![allow(clippy::too_many_arguments)]
#![allow(clippy::type_complexity)]
#![allow(clippy::upper_case_acronyms)]
#![allow(clippy::identity_op)]
#![allow(clippy::missing_safety_doc)]
#[link(name = "LinkPresentation", kind = "framework")]
extern "C" {}
#[cfg(feature = "LPError")]
#[path = "LPError.rs"]
mod __LPError;
#[cfg(feature = "LPFoundation")]
#[path = "LPFoundation.rs"]
mod __LPFoundation;
#[cfg(feature = "LPLinkMetadata")]
#[path = "LPLinkMetadata.rs"]
mod __LPLinkMetadata;
#[cfg(feature = "LPLinkView")]
#[path = "LPLinkView.rs"]
mod __LPLinkView;
#[cfg(feature = "LPMetadataProvider")]
#[path = "LPMetadataProvider.rs"]
mod __LPMetadataProvider;
#[cfg(feature = "LPError")]
pub use self::__LPError::LPErrorCode;
#[cfg(feature = "LPError")]
pub use self::__LPError::LPErrorDomain;
#[cfg(feature = "LPLinkMetadata")]
pub use self::__LPLinkMetadata::LPLinkMetadata;
#[cfg(all(feature = "LPLinkView", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
pub use self::__LPLinkView::LPLinkView;
#[cfg(feature = "LPMetadataProvider")]
pub use self::__LPMetadataProvider::LPMetadataProvider;

View File

@@ -0,0 +1,20 @@
//! # Bindings to the `LinkPresentation` framework
//!
//! See [Apple's docs][apple-doc] and [the general docs on framework crates][framework-crates] for more information.
//!
//! [apple-doc]: https://developer.apple.com/documentation/linkpresentation/
//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html
#![no_std]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
// Update in Cargo.toml as well.
#![doc(html_root_url = "https://docs.rs/objc2-link-presentation/0.2.2")]
#[cfg(feature = "alloc")]
extern crate alloc;
#[cfg(feature = "std")]
extern crate std;
mod generated;
#[allow(unused_imports, unreachable_pub)]
pub use self::generated::*;

View File

@@ -0,0 +1,8 @@
framework = "LinkPresentation"
crate = "objc2-link-presentation"
required-dependencies = ["objc2-foundation"]
macos = "10.15"
maccatalyst = "13.0"
ios = "13.0"
tvos = "14.0"
visionos = "1.0"