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":"3e0c2ec2344ec7d2ab61dc00274e0656fd75f5c73c7c577a80331dea789c70b9","README.md":"8e36557eecdae30c1902766ae221e5b54b0f00d32fa5ea762aca913235f54bb4","src/generated/NSString_UserNotifications.rs":"ef0737d2b5b803a5e17e5d8d9c580b618d7111fef124e01c345ea2321a69a31e","src/generated/UNError.rs":"a8eba62cbe5e1d56eecbe120a38030e25620cb90eb80d5bd47f6c462eb717a2b","src/generated/UNNotification.rs":"4a4b0d89a857d70b642d3c9db5b2e3dbd6c3fd15c18bfc716b36186ad32b798d","src/generated/UNNotificationAction.rs":"25af2173ff18d747cc59d638853fbbd02292dc1b3fd125823c909294fd5d95b4","src/generated/UNNotificationActionIcon.rs":"318eb9c52fce18ed96a6e0ed8fece2696597299b36e48c4df181bfa9fdf67b87","src/generated/UNNotificationAttachment.rs":"4efc8db8d0fe4672129765aad066cef7df853fd949ccd816578cacfe91ff0b5d","src/generated/UNNotificationCategory.rs":"52e8f6494dfc5304c2c212d8ee3d3e163541373efeb18b1378b8966785da0be6","src/generated/UNNotificationContent.rs":"9ead8f8b59d9400e46768ec8fe9c556f11133033b2c9badd96e87729ae604b7b","src/generated/UNNotificationRequest.rs":"9e806db60f327c689fc4ceaf0fee72511c82e3262de950d08ffb085ae38909ff","src/generated/UNNotificationResponse.rs":"13bf8f5c779ad68e984c0508ce46ab13a848c864b46c310938cd407fd4741711","src/generated/UNNotificationServiceExtension.rs":"d4d4c38232105fdb37d5ad8ef50b1618c92ff2d489b2d9996fb25e5ccb1c01c2","src/generated/UNNotificationSettings.rs":"5dd4476ed133adffe61f9ce90c3cdbfb6bf678f6f17b8beaecfd7ed328f6aeaa","src/generated/UNNotificationSound.rs":"4355a36f129fd43aef6c53062b76ea037fa75d32350a721085216b710e9ffc4b","src/generated/UNNotificationTrigger.rs":"0508376f921d3c6388f58599aac3ffc7bad49a3df66cfb5bcd05a35264cb4591","src/generated/UNUserNotificationCenter.rs":"81a2b61e6ce63b0fa3789d46726291d2c3baa15cae85302ca0d4bb0060267a61","src/generated/mod.rs":"73a1932a85d90c18d125225555064ad1854e0a223ff25e2b39fa255a83df7629","src/lib.rs":"3c01d0757c2ab93aa2e24c793d587653b5262d421603292134194f28994c6418","translation-config.toml":"d1a376a829cefc2851fc6db4937df8cd2f9f7ffdce071b667a0160972104017c"},"package":"76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3"}

View File

@@ -0,0 +1,202 @@
# 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-user-notifications"
version = "0.2.2"
build = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Bindings to the UserNotifications 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-watchos",
"aarch64-apple-ios-macabi",
]
[lib]
name = "objc2_user_notifications"
path = "src/lib.rs"
[dependencies.bitflags]
version = "2.5.0"
optional = true
default-features = false
[dependencies.block2]
version = "0.5.1"
optional = true
default-features = false
[dependencies.objc2]
version = "0.5.2"
default-features = false
[dependencies.objc2-core-location]
version = "0.2.2"
optional = true
default-features = false
[dependencies.objc2-foundation]
version = "0.2.2"
default-features = false
[features]
NSString_UserNotifications = [
"objc2-foundation/NSArray",
"objc2-foundation/NSString",
]
UNError = ["objc2-foundation/NSString"]
UNNotification = [
"objc2-foundation/NSDate",
"objc2-foundation/NSObject",
]
UNNotificationAction = [
"bitflags",
"objc2-foundation/NSObject",
"objc2-foundation/NSString",
]
UNNotificationActionIcon = [
"objc2-foundation/NSObject",
"objc2-foundation/NSString",
]
UNNotificationAttachment = [
"objc2-foundation/NSDictionary",
"objc2-foundation/NSError",
"objc2-foundation/NSObject",
"objc2-foundation/NSString",
"objc2-foundation/NSURL",
]
UNNotificationCategory = [
"bitflags",
"objc2-foundation/NSArray",
"objc2-foundation/NSObject",
"objc2-foundation/NSString",
]
UNNotificationContent = [
"objc2-foundation/NSArray",
"objc2-foundation/NSDictionary",
"objc2-foundation/NSError",
"objc2-foundation/NSObject",
"objc2-foundation/NSString",
"objc2-foundation/NSValue",
]
UNNotificationRequest = [
"objc2-foundation/NSObject",
"objc2-foundation/NSString",
]
UNNotificationResponse = [
"objc2-foundation/NSObject",
"objc2-foundation/NSString",
]
UNNotificationServiceExtension = []
UNNotificationSettings = ["objc2-foundation/NSObject"]
UNNotificationSound = [
"objc2-foundation/NSObject",
"objc2-foundation/NSString",
]
UNNotificationTrigger = [
"objc2-core-location?/CLRegion",
"objc2-foundation/NSCalendar",
"objc2-foundation/NSDate",
"objc2-foundation/NSObject",
]
UNUserNotificationCenter = [
"bitflags",
"objc2-foundation/NSArray",
"objc2-foundation/NSError",
"objc2-foundation/NSSet",
"objc2-foundation/NSString",
]
all = [
"NSString_UserNotifications",
"UNError",
"UNNotification",
"UNNotificationAction",
"UNNotificationActionIcon",
"UNNotificationAttachment",
"UNNotificationCategory",
"UNNotificationContent",
"UNNotificationRequest",
"UNNotificationResponse",
"UNNotificationServiceExtension",
"UNNotificationSettings",
"UNNotificationSound",
"UNNotificationTrigger",
"UNUserNotificationCenter",
"bitflags",
"block2",
"objc2-core-location",
]
alloc = [
"block2?/alloc",
"objc2/alloc",
"objc2-core-location?/alloc",
"objc2-foundation/alloc",
]
bitflags = [
"dep:bitflags",
"objc2-foundation/bitflags",
]
block2 = [
"dep:block2",
"objc2-core-location?/block2",
"objc2-foundation/block2",
]
default = ["std"]
objc2-core-location = ["dep:objc2-core-location"]
std = [
"alloc",
"bitflags?/std",
"block2?/std",
"objc2/std",
"objc2-core-location?/std",
"objc2-foundation/std",
]
[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-user-notifications`
[![Latest version](https://badgen.net/crates/v/objc2-user-notifications)](https://crates.io/crates/objc2-user-notifications)
[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt)
[![Documentation](https://docs.rs/objc2-user-notifications/badge.svg)](https://docs.rs/objc2-user-notifications/)
[![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 UserNotifications.
This README is kept intentionally small to consolidate the documentation, see
[the Rust docs](https://docs.rs/objc2-user-notifications/) 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,20 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_category!(
/// Category "UNUserNotificationCenterSupport" on [`NSString`].
#[doc(alias = "UNUserNotificationCenterSupport")]
pub unsafe trait NSStringUNUserNotificationCenterSupport {
#[method_id(@__retain_semantics Other localizedUserNotificationStringForKey:arguments:)]
unsafe fn localizedUserNotificationStringForKey_arguments(
key: &NSString,
arguments: Option<&NSArray>,
) -> Retained<NSString>;
}
unsafe impl NSStringUNUserNotificationCenterSupport for NSString {}
);

View File

@@ -0,0 +1,49 @@
//! 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 UNErrorDomain: Option<&'static NSString>;
}
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UNErrorCode(pub NSInteger);
impl UNErrorCode {
#[doc(alias = "UNErrorCodeNotificationsNotAllowed")]
pub const NotificationsNotAllowed: Self = Self(1);
#[doc(alias = "UNErrorCodeAttachmentInvalidURL")]
pub const AttachmentInvalidURL: Self = Self(100);
#[doc(alias = "UNErrorCodeAttachmentUnrecognizedType")]
pub const AttachmentUnrecognizedType: Self = Self(101);
#[doc(alias = "UNErrorCodeAttachmentInvalidFileSize")]
pub const AttachmentInvalidFileSize: Self = Self(102);
#[doc(alias = "UNErrorCodeAttachmentNotInDataStore")]
pub const AttachmentNotInDataStore: Self = Self(103);
#[doc(alias = "UNErrorCodeAttachmentMoveIntoDataStoreFailed")]
pub const AttachmentMoveIntoDataStoreFailed: Self = Self(104);
#[doc(alias = "UNErrorCodeAttachmentCorrupt")]
pub const AttachmentCorrupt: Self = Self(105);
#[doc(alias = "UNErrorCodeNotificationInvalidNoDate")]
pub const NotificationInvalidNoDate: Self = Self(1400);
#[doc(alias = "UNErrorCodeNotificationInvalidNoContent")]
pub const NotificationInvalidNoContent: Self = Self(1401);
#[doc(alias = "UNErrorCodeContentProvidingObjectNotAllowed")]
pub const ContentProvidingObjectNotAllowed: Self = Self(1500);
#[doc(alias = "UNErrorCodeContentProvidingInvalid")]
pub const ContentProvidingInvalid: Self = Self(1501);
#[doc(alias = "UNErrorCodeBadgeInputInvalid")]
pub const BadgeInputInvalid: Self = Self(1600);
}
unsafe impl Encode for UNErrorCode {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for UNErrorCode {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

View File

@@ -0,0 +1,46 @@
//! 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 UNNotification;
unsafe impl ClassType for UNNotification {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for UNNotification {}
unsafe impl NSCopying for UNNotification {}
unsafe impl NSObjectProtocol for UNNotification {}
unsafe impl NSSecureCoding for UNNotification {}
extern_methods!(
unsafe impl UNNotification {
#[method_id(@__retain_semantics Other date)]
pub unsafe fn date(&self) -> Retained<NSDate>;
#[cfg(feature = "UNNotificationRequest")]
#[method_id(@__retain_semantics Other request)]
pub unsafe fn request(&self) -> Retained<UNNotificationRequest>;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl UNNotification {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,172 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
// NS_OPTIONS
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UNNotificationActionOptions(pub NSUInteger);
bitflags::bitflags! {
impl UNNotificationActionOptions: NSUInteger {
const UNNotificationActionOptionAuthenticationRequired = 1<<0;
const UNNotificationActionOptionDestructive = 1<<1;
const UNNotificationActionOptionForeground = 1<<2;
}
}
unsafe impl Encode for UNNotificationActionOptions {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for UNNotificationActionOptions {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub static UNNotificationActionOptionNone: UNNotificationActionOptions =
UNNotificationActionOptions(0);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct UNNotificationAction;
unsafe impl ClassType for UNNotificationAction {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for UNNotificationAction {}
unsafe impl NSCopying for UNNotificationAction {}
unsafe impl NSObjectProtocol for UNNotificationAction {}
unsafe impl NSSecureCoding for UNNotificationAction {}
extern_methods!(
unsafe impl UNNotificationAction {
#[method_id(@__retain_semantics Other identifier)]
pub unsafe fn identifier(&self) -> Retained<NSString>;
#[method_id(@__retain_semantics Other title)]
pub unsafe fn title(&self) -> Retained<NSString>;
#[method(options)]
pub unsafe fn options(&self) -> UNNotificationActionOptions;
#[cfg(feature = "UNNotificationActionIcon")]
#[method_id(@__retain_semantics Other icon)]
pub unsafe fn icon(&self) -> Option<Retained<UNNotificationActionIcon>>;
#[method_id(@__retain_semantics Other actionWithIdentifier:title:options:)]
pub unsafe fn actionWithIdentifier_title_options(
identifier: &NSString,
title: &NSString,
options: UNNotificationActionOptions,
) -> Retained<Self>;
#[cfg(feature = "UNNotificationActionIcon")]
#[method_id(@__retain_semantics Other actionWithIdentifier:title:options:icon:)]
pub unsafe fn actionWithIdentifier_title_options_icon(
identifier: &NSString,
title: &NSString,
options: UNNotificationActionOptions,
icon: Option<&UNNotificationActionIcon>,
) -> Retained<Self>;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl UNNotificationAction {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct UNTextInputNotificationAction;
unsafe impl ClassType for UNTextInputNotificationAction {
#[inherits(NSObject)]
type Super = UNNotificationAction;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for UNTextInputNotificationAction {}
unsafe impl NSCopying for UNTextInputNotificationAction {}
unsafe impl NSObjectProtocol for UNTextInputNotificationAction {}
unsafe impl NSSecureCoding for UNTextInputNotificationAction {}
extern_methods!(
unsafe impl UNTextInputNotificationAction {
#[method_id(@__retain_semantics Other actionWithIdentifier:title:options:textInputButtonTitle:textInputPlaceholder:)]
pub unsafe fn actionWithIdentifier_title_options_textInputButtonTitle_textInputPlaceholder(
identifier: &NSString,
title: &NSString,
options: UNNotificationActionOptions,
text_input_button_title: &NSString,
text_input_placeholder: &NSString,
) -> Retained<Self>;
#[cfg(feature = "UNNotificationActionIcon")]
#[method_id(@__retain_semantics Other actionWithIdentifier:title:options:icon:textInputButtonTitle:textInputPlaceholder:)]
pub unsafe fn actionWithIdentifier_title_options_icon_textInputButtonTitle_textInputPlaceholder(
identifier: &NSString,
title: &NSString,
options: UNNotificationActionOptions,
icon: Option<&UNNotificationActionIcon>,
text_input_button_title: &NSString,
text_input_placeholder: &NSString,
) -> Retained<Self>;
#[method_id(@__retain_semantics Other textInputButtonTitle)]
pub unsafe fn textInputButtonTitle(&self) -> Retained<NSString>;
#[method_id(@__retain_semantics Other textInputPlaceholder)]
pub unsafe fn textInputPlaceholder(&self) -> Retained<NSString>;
}
);
extern_methods!(
/// Methods declared on superclass `UNNotificationAction`
unsafe impl UNTextInputNotificationAction {
#[method_id(@__retain_semantics Other actionWithIdentifier:title:options:)]
pub unsafe fn actionWithIdentifier_title_options(
identifier: &NSString,
title: &NSString,
options: UNNotificationActionOptions,
) -> Retained<Self>;
#[cfg(feature = "UNNotificationActionIcon")]
#[method_id(@__retain_semantics Other actionWithIdentifier:title:options:icon:)]
pub unsafe fn actionWithIdentifier_title_options_icon(
identifier: &NSString,
title: &NSString,
options: UNNotificationActionOptions,
icon: Option<&UNNotificationActionIcon>,
) -> Retained<Self>;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl UNTextInputNotificationAction {
#[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
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct UNNotificationActionIcon;
unsafe impl ClassType for UNNotificationActionIcon {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for UNNotificationActionIcon {}
unsafe impl NSCopying for UNNotificationActionIcon {}
unsafe impl NSObjectProtocol for UNNotificationActionIcon {}
unsafe impl NSSecureCoding for UNNotificationActionIcon {}
extern_methods!(
unsafe impl UNNotificationActionIcon {
#[method_id(@__retain_semantics Other iconWithTemplateImageName:)]
pub unsafe fn iconWithTemplateImageName(template_image_name: &NSString) -> Retained<Self>;
#[method_id(@__retain_semantics Other iconWithSystemImageName:)]
pub unsafe fn iconWithSystemImageName(system_image_name: &NSString) -> Retained<Self>;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl UNNotificationActionIcon {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,71 @@
//! 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 UNNotificationAttachment;
unsafe impl ClassType for UNNotificationAttachment {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for UNNotificationAttachment {}
unsafe impl NSCopying for UNNotificationAttachment {}
unsafe impl NSObjectProtocol for UNNotificationAttachment {}
unsafe impl NSSecureCoding for UNNotificationAttachment {}
extern_methods!(
unsafe impl UNNotificationAttachment {
#[method_id(@__retain_semantics Other identifier)]
pub unsafe fn identifier(&self) -> Retained<NSString>;
#[method_id(@__retain_semantics Other URL)]
pub unsafe fn URL(&self) -> Retained<NSURL>;
#[method_id(@__retain_semantics Other type)]
pub unsafe fn r#type(&self) -> Retained<NSString>;
#[method_id(@__retain_semantics Other attachmentWithIdentifier:URL:options:error:_)]
pub unsafe fn attachmentWithIdentifier_URL_options_error(
identifier: &NSString,
url: &NSURL,
options: Option<&NSDictionary>,
) -> Result<Retained<Self>, Retained<NSError>>;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl UNNotificationAttachment {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);
extern "C" {
pub static UNNotificationAttachmentOptionsTypeHintKey: &'static NSString;
}
extern "C" {
pub static UNNotificationAttachmentOptionsThumbnailHiddenKey: &'static NSString;
}
extern "C" {
pub static UNNotificationAttachmentOptionsThumbnailClippingRectKey: &'static NSString;
}
extern "C" {
pub static UNNotificationAttachmentOptionsThumbnailTimeKey: &'static NSString;
}

View File

@@ -0,0 +1,114 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
// NS_OPTIONS
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UNNotificationCategoryOptions(pub NSUInteger);
bitflags::bitflags! {
impl UNNotificationCategoryOptions: NSUInteger {
const UNNotificationCategoryOptionCustomDismissAction = 1<<0;
const UNNotificationCategoryOptionAllowInCarPlay = 1<<1;
const UNNotificationCategoryOptionHiddenPreviewsShowTitle = 1<<2;
const UNNotificationCategoryOptionHiddenPreviewsShowSubtitle = 1<<3;
#[deprecated = "Announcement option is ignored"]
const UNNotificationCategoryOptionAllowAnnouncement = 1<<4;
}
}
unsafe impl Encode for UNNotificationCategoryOptions {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for UNNotificationCategoryOptions {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub static UNNotificationCategoryOptionNone: UNNotificationCategoryOptions =
UNNotificationCategoryOptions(0);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct UNNotificationCategory;
unsafe impl ClassType for UNNotificationCategory {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for UNNotificationCategory {}
unsafe impl NSCopying for UNNotificationCategory {}
unsafe impl NSObjectProtocol for UNNotificationCategory {}
unsafe impl NSSecureCoding for UNNotificationCategory {}
extern_methods!(
unsafe impl UNNotificationCategory {
#[method_id(@__retain_semantics Other identifier)]
pub unsafe fn identifier(&self) -> Retained<NSString>;
#[cfg(feature = "UNNotificationAction")]
#[method_id(@__retain_semantics Other actions)]
pub unsafe fn actions(&self) -> Retained<NSArray<UNNotificationAction>>;
#[method_id(@__retain_semantics Other intentIdentifiers)]
pub unsafe fn intentIdentifiers(&self) -> Retained<NSArray<NSString>>;
#[method(options)]
pub unsafe fn options(&self) -> UNNotificationCategoryOptions;
#[method_id(@__retain_semantics Other hiddenPreviewsBodyPlaceholder)]
pub unsafe fn hiddenPreviewsBodyPlaceholder(&self) -> Retained<NSString>;
#[method_id(@__retain_semantics Other categorySummaryFormat)]
pub unsafe fn categorySummaryFormat(&self) -> Retained<NSString>;
#[cfg(feature = "UNNotificationAction")]
#[method_id(@__retain_semantics Other categoryWithIdentifier:actions:intentIdentifiers:options:)]
pub unsafe fn categoryWithIdentifier_actions_intentIdentifiers_options(
identifier: &NSString,
actions: &NSArray<UNNotificationAction>,
intent_identifiers: &NSArray<NSString>,
options: UNNotificationCategoryOptions,
) -> Retained<Self>;
#[cfg(feature = "UNNotificationAction")]
#[method_id(@__retain_semantics Other categoryWithIdentifier:actions:intentIdentifiers:hiddenPreviewsBodyPlaceholder:options:)]
pub unsafe fn categoryWithIdentifier_actions_intentIdentifiers_hiddenPreviewsBodyPlaceholder_options(
identifier: &NSString,
actions: &NSArray<UNNotificationAction>,
intent_identifiers: &NSArray<NSString>,
hidden_previews_body_placeholder: &NSString,
options: UNNotificationCategoryOptions,
) -> Retained<Self>;
#[cfg(feature = "UNNotificationAction")]
#[method_id(@__retain_semantics Other categoryWithIdentifier:actions:intentIdentifiers:hiddenPreviewsBodyPlaceholder:categorySummaryFormat:options:)]
pub unsafe fn categoryWithIdentifier_actions_intentIdentifiers_hiddenPreviewsBodyPlaceholder_categorySummaryFormat_options(
identifier: &NSString,
actions: &NSArray<UNNotificationAction>,
intent_identifiers: &NSArray<NSString>,
hidden_previews_body_placeholder: Option<&NSString>,
category_summary_format: Option<&NSString>,
options: UNNotificationCategoryOptions,
) -> Retained<Self>;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl UNNotificationCategory {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,274 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_protocol!(
pub unsafe trait UNNotificationContentProviding: NSObjectProtocol {}
unsafe impl ProtocolType for dyn UNNotificationContentProviding {}
);
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UNNotificationInterruptionLevel(pub NSUInteger);
impl UNNotificationInterruptionLevel {
#[doc(alias = "UNNotificationInterruptionLevelPassive")]
pub const Passive: Self = Self(0);
#[doc(alias = "UNNotificationInterruptionLevelActive")]
pub const Active: Self = Self(1);
#[doc(alias = "UNNotificationInterruptionLevelTimeSensitive")]
pub const TimeSensitive: Self = Self(2);
#[doc(alias = "UNNotificationInterruptionLevelCritical")]
pub const Critical: Self = Self(3);
}
unsafe impl Encode for UNNotificationInterruptionLevel {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for UNNotificationInterruptionLevel {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct UNNotificationContent;
unsafe impl ClassType for UNNotificationContent {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for UNNotificationContent {}
unsafe impl NSCopying for UNNotificationContent {}
unsafe impl NSMutableCopying for UNNotificationContent {}
unsafe impl NSObjectProtocol for UNNotificationContent {}
unsafe impl NSSecureCoding for UNNotificationContent {}
extern_methods!(
unsafe impl UNNotificationContent {
#[cfg(feature = "UNNotificationAttachment")]
#[method_id(@__retain_semantics Other attachments)]
pub unsafe fn attachments(&self) -> Retained<NSArray<UNNotificationAttachment>>;
#[method_id(@__retain_semantics Other badge)]
pub unsafe fn badge(&self) -> Option<Retained<NSNumber>>;
#[method_id(@__retain_semantics Other body)]
pub unsafe fn body(&self) -> Retained<NSString>;
#[method_id(@__retain_semantics Other categoryIdentifier)]
pub unsafe fn categoryIdentifier(&self) -> Retained<NSString>;
#[method_id(@__retain_semantics Other launchImageName)]
pub unsafe fn launchImageName(&self) -> Retained<NSString>;
#[cfg(feature = "UNNotificationSound")]
#[method_id(@__retain_semantics Other sound)]
pub unsafe fn sound(&self) -> Option<Retained<UNNotificationSound>>;
#[method_id(@__retain_semantics Other subtitle)]
pub unsafe fn subtitle(&self) -> Retained<NSString>;
#[method_id(@__retain_semantics Other threadIdentifier)]
pub unsafe fn threadIdentifier(&self) -> Retained<NSString>;
#[method_id(@__retain_semantics Other title)]
pub unsafe fn title(&self) -> Retained<NSString>;
#[method_id(@__retain_semantics Other userInfo)]
pub unsafe fn userInfo(&self) -> Retained<NSDictionary>;
#[deprecated = "summaryArgument is ignored"]
#[method_id(@__retain_semantics Other summaryArgument)]
pub unsafe fn summaryArgument(&self) -> Retained<NSString>;
#[deprecated = "summaryArgumentCount is ignored"]
#[method(summaryArgumentCount)]
pub unsafe fn summaryArgumentCount(&self) -> NSUInteger;
#[method_id(@__retain_semantics Other targetContentIdentifier)]
pub unsafe fn targetContentIdentifier(&self) -> Option<Retained<NSString>>;
#[method(interruptionLevel)]
pub unsafe fn interruptionLevel(&self) -> UNNotificationInterruptionLevel;
#[method(relevanceScore)]
pub unsafe fn relevanceScore(&self) -> c_double;
#[method_id(@__retain_semantics Other filterCriteria)]
pub unsafe fn filterCriteria(&self) -> Option<Retained<NSString>>;
#[method_id(@__retain_semantics Other contentByUpdatingWithProvider:error:_)]
pub unsafe fn contentByUpdatingWithProvider_error(
&self,
provider: &ProtocolObject<dyn UNNotificationContentProviding>,
) -> Result<Retained<UNNotificationContent>, Retained<NSError>>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl UNNotificationContent {
#[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>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct UNMutableNotificationContent;
unsafe impl ClassType for UNMutableNotificationContent {
#[inherits(NSObject)]
type Super = UNNotificationContent;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for UNMutableNotificationContent {}
unsafe impl NSCopying for UNMutableNotificationContent {}
unsafe impl NSMutableCopying for UNMutableNotificationContent {}
unsafe impl NSObjectProtocol for UNMutableNotificationContent {}
unsafe impl NSSecureCoding for UNMutableNotificationContent {}
extern_methods!(
unsafe impl UNMutableNotificationContent {
#[cfg(feature = "UNNotificationAttachment")]
#[method_id(@__retain_semantics Other attachments)]
pub unsafe fn attachments(&self) -> Retained<NSArray<UNNotificationAttachment>>;
#[cfg(feature = "UNNotificationAttachment")]
#[method(setAttachments:)]
pub unsafe fn setAttachments(&self, attachments: &NSArray<UNNotificationAttachment>);
#[method_id(@__retain_semantics Other badge)]
pub unsafe fn badge(&self) -> Option<Retained<NSNumber>>;
#[method(setBadge:)]
pub unsafe fn setBadge(&self, badge: Option<&NSNumber>);
#[method_id(@__retain_semantics Other body)]
pub unsafe fn body(&self) -> Retained<NSString>;
#[method(setBody:)]
pub unsafe fn setBody(&self, body: &NSString);
#[method_id(@__retain_semantics Other categoryIdentifier)]
pub unsafe fn categoryIdentifier(&self) -> Retained<NSString>;
#[method(setCategoryIdentifier:)]
pub unsafe fn setCategoryIdentifier(&self, category_identifier: &NSString);
#[method_id(@__retain_semantics Other launchImageName)]
pub unsafe fn launchImageName(&self) -> Retained<NSString>;
#[method(setLaunchImageName:)]
pub unsafe fn setLaunchImageName(&self, launch_image_name: &NSString);
#[cfg(feature = "UNNotificationSound")]
#[method_id(@__retain_semantics Other sound)]
pub unsafe fn sound(&self) -> Option<Retained<UNNotificationSound>>;
#[cfg(feature = "UNNotificationSound")]
#[method(setSound:)]
pub unsafe fn setSound(&self, sound: Option<&UNNotificationSound>);
#[method_id(@__retain_semantics Other subtitle)]
pub unsafe fn subtitle(&self) -> Retained<NSString>;
#[method(setSubtitle:)]
pub unsafe fn setSubtitle(&self, subtitle: &NSString);
#[method_id(@__retain_semantics Other threadIdentifier)]
pub unsafe fn threadIdentifier(&self) -> Retained<NSString>;
#[method(setThreadIdentifier:)]
pub unsafe fn setThreadIdentifier(&self, thread_identifier: &NSString);
#[method_id(@__retain_semantics Other title)]
pub unsafe fn title(&self) -> Retained<NSString>;
#[method(setTitle:)]
pub unsafe fn setTitle(&self, title: &NSString);
#[method_id(@__retain_semantics Other userInfo)]
pub unsafe fn userInfo(&self) -> Retained<NSDictionary>;
#[method(setUserInfo:)]
pub unsafe fn setUserInfo(&self, user_info: &NSDictionary);
#[deprecated = "summaryArgument is ignored"]
#[method_id(@__retain_semantics Other summaryArgument)]
pub unsafe fn summaryArgument(&self) -> Retained<NSString>;
#[deprecated = "summaryArgument is ignored"]
#[method(setSummaryArgument:)]
pub unsafe fn setSummaryArgument(&self, summary_argument: &NSString);
#[deprecated = "summaryArgumentCount is ignored"]
#[method(summaryArgumentCount)]
pub unsafe fn summaryArgumentCount(&self) -> NSUInteger;
#[deprecated = "summaryArgumentCount is ignored"]
#[method(setSummaryArgumentCount:)]
pub unsafe fn setSummaryArgumentCount(&self, summary_argument_count: NSUInteger);
#[method_id(@__retain_semantics Other targetContentIdentifier)]
pub unsafe fn targetContentIdentifier(&self) -> Option<Retained<NSString>>;
#[method(setTargetContentIdentifier:)]
pub unsafe fn setTargetContentIdentifier(
&self,
target_content_identifier: Option<&NSString>,
);
#[method(interruptionLevel)]
pub unsafe fn interruptionLevel(&self) -> UNNotificationInterruptionLevel;
#[method(setInterruptionLevel:)]
pub unsafe fn setInterruptionLevel(
&self,
interruption_level: UNNotificationInterruptionLevel,
);
#[method(relevanceScore)]
pub unsafe fn relevanceScore(&self) -> c_double;
#[method(setRelevanceScore:)]
pub unsafe fn setRelevanceScore(&self, relevance_score: c_double);
#[method_id(@__retain_semantics Other filterCriteria)]
pub unsafe fn filterCriteria(&self) -> Option<Retained<NSString>>;
#[method(setFilterCriteria:)]
pub unsafe fn setFilterCriteria(&self, filter_criteria: Option<&NSString>);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl UNMutableNotificationContent {
#[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,58 @@
//! 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 UNNotificationRequest;
unsafe impl ClassType for UNNotificationRequest {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for UNNotificationRequest {}
unsafe impl NSCopying for UNNotificationRequest {}
unsafe impl NSObjectProtocol for UNNotificationRequest {}
unsafe impl NSSecureCoding for UNNotificationRequest {}
extern_methods!(
unsafe impl UNNotificationRequest {
#[method_id(@__retain_semantics Other identifier)]
pub unsafe fn identifier(&self) -> Retained<NSString>;
#[cfg(feature = "UNNotificationContent")]
#[method_id(@__retain_semantics Other content)]
pub unsafe fn content(&self) -> Retained<UNNotificationContent>;
#[cfg(feature = "UNNotificationTrigger")]
#[method_id(@__retain_semantics Other trigger)]
pub unsafe fn trigger(&self) -> Option<Retained<UNNotificationTrigger>>;
#[cfg(all(feature = "UNNotificationContent", feature = "UNNotificationTrigger"))]
#[method_id(@__retain_semantics Other requestWithIdentifier:content:trigger:)]
pub unsafe fn requestWithIdentifier_content_trigger(
identifier: &NSString,
content: &UNNotificationContent,
trigger: Option<&UNNotificationTrigger>,
) -> Retained<Self>;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl UNNotificationRequest {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,96 @@
//! 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 UNNotificationDefaultActionIdentifier: &'static NSString;
}
extern "C" {
pub static UNNotificationDismissActionIdentifier: &'static NSString;
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct UNNotificationResponse;
unsafe impl ClassType for UNNotificationResponse {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for UNNotificationResponse {}
unsafe impl NSCopying for UNNotificationResponse {}
unsafe impl NSObjectProtocol for UNNotificationResponse {}
unsafe impl NSSecureCoding for UNNotificationResponse {}
extern_methods!(
unsafe impl UNNotificationResponse {
#[cfg(feature = "UNNotification")]
#[method_id(@__retain_semantics Other notification)]
pub unsafe fn notification(&self) -> Retained<UNNotification>;
#[method_id(@__retain_semantics Other actionIdentifier)]
pub unsafe fn actionIdentifier(&self) -> Retained<NSString>;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl UNNotificationResponse {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct UNTextInputNotificationResponse;
unsafe impl ClassType for UNTextInputNotificationResponse {
#[inherits(NSObject)]
type Super = UNNotificationResponse;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for UNTextInputNotificationResponse {}
unsafe impl NSCopying for UNTextInputNotificationResponse {}
unsafe impl NSObjectProtocol for UNTextInputNotificationResponse {}
unsafe impl NSSecureCoding for UNTextInputNotificationResponse {}
extern_methods!(
unsafe impl UNTextInputNotificationResponse {
#[method_id(@__retain_semantics Other userText)]
pub unsafe fn userText(&self) -> Retained<NSString>;
}
);
extern_methods!(
/// Methods declared on superclass `UNNotificationResponse`
unsafe impl UNTextInputNotificationResponse {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl UNTextInputNotificationResponse {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,47 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct UNNotificationServiceExtension;
unsafe impl ClassType for UNNotificationServiceExtension {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSObjectProtocol for UNNotificationServiceExtension {}
extern_methods!(
unsafe impl UNNotificationServiceExtension {
#[cfg(all(
feature = "UNNotificationContent",
feature = "UNNotificationRequest",
feature = "block2"
))]
#[method(didReceiveNotificationRequest:withContentHandler:)]
pub unsafe fn didReceiveNotificationRequest_withContentHandler(
&self,
request: &UNNotificationRequest,
content_handler: &block2::Block<dyn Fn(NonNull<UNNotificationContent>)>,
);
#[method(serviceExtensionTimeWillExpire)]
pub unsafe fn serviceExtensionTimeWillExpire(&self);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl UNNotificationServiceExtension {
#[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,172 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UNAuthorizationStatus(pub NSInteger);
impl UNAuthorizationStatus {
#[doc(alias = "UNAuthorizationStatusNotDetermined")]
pub const NotDetermined: Self = Self(0);
#[doc(alias = "UNAuthorizationStatusDenied")]
pub const Denied: Self = Self(1);
#[doc(alias = "UNAuthorizationStatusAuthorized")]
pub const Authorized: Self = Self(2);
#[doc(alias = "UNAuthorizationStatusProvisional")]
pub const Provisional: Self = Self(3);
#[doc(alias = "UNAuthorizationStatusEphemeral")]
pub const Ephemeral: Self = Self(4);
}
unsafe impl Encode for UNAuthorizationStatus {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for UNAuthorizationStatus {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UNShowPreviewsSetting(pub NSInteger);
impl UNShowPreviewsSetting {
#[doc(alias = "UNShowPreviewsSettingAlways")]
pub const Always: Self = Self(0);
#[doc(alias = "UNShowPreviewsSettingWhenAuthenticated")]
pub const WhenAuthenticated: Self = Self(1);
#[doc(alias = "UNShowPreviewsSettingNever")]
pub const Never: Self = Self(2);
}
unsafe impl Encode for UNShowPreviewsSetting {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for UNShowPreviewsSetting {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UNNotificationSetting(pub NSInteger);
impl UNNotificationSetting {
#[doc(alias = "UNNotificationSettingNotSupported")]
pub const NotSupported: Self = Self(0);
#[doc(alias = "UNNotificationSettingDisabled")]
pub const Disabled: Self = Self(1);
#[doc(alias = "UNNotificationSettingEnabled")]
pub const Enabled: Self = Self(2);
}
unsafe impl Encode for UNNotificationSetting {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for UNNotificationSetting {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UNAlertStyle(pub NSInteger);
impl UNAlertStyle {
#[doc(alias = "UNAlertStyleNone")]
pub const None: Self = Self(0);
#[doc(alias = "UNAlertStyleBanner")]
pub const Banner: Self = Self(1);
#[doc(alias = "UNAlertStyleAlert")]
pub const Alert: Self = Self(2);
}
unsafe impl Encode for UNAlertStyle {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for UNAlertStyle {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct UNNotificationSettings;
unsafe impl ClassType for UNNotificationSettings {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for UNNotificationSettings {}
unsafe impl NSCopying for UNNotificationSettings {}
unsafe impl NSObjectProtocol for UNNotificationSettings {}
unsafe impl NSSecureCoding for UNNotificationSettings {}
extern_methods!(
unsafe impl UNNotificationSettings {
#[method(authorizationStatus)]
pub unsafe fn authorizationStatus(&self) -> UNAuthorizationStatus;
#[method(soundSetting)]
pub unsafe fn soundSetting(&self) -> UNNotificationSetting;
#[method(badgeSetting)]
pub unsafe fn badgeSetting(&self) -> UNNotificationSetting;
#[method(alertSetting)]
pub unsafe fn alertSetting(&self) -> UNNotificationSetting;
#[method(notificationCenterSetting)]
pub unsafe fn notificationCenterSetting(&self) -> UNNotificationSetting;
#[method(lockScreenSetting)]
pub unsafe fn lockScreenSetting(&self) -> UNNotificationSetting;
#[method(carPlaySetting)]
pub unsafe fn carPlaySetting(&self) -> UNNotificationSetting;
#[method(alertStyle)]
pub unsafe fn alertStyle(&self) -> UNAlertStyle;
#[method(showPreviewsSetting)]
pub unsafe fn showPreviewsSetting(&self) -> UNShowPreviewsSetting;
#[method(criticalAlertSetting)]
pub unsafe fn criticalAlertSetting(&self) -> UNNotificationSetting;
#[method(providesAppNotificationSettings)]
pub unsafe fn providesAppNotificationSettings(&self) -> bool;
#[method(announcementSetting)]
pub unsafe fn announcementSetting(&self) -> UNNotificationSetting;
#[method(timeSensitiveSetting)]
pub unsafe fn timeSensitiveSetting(&self) -> UNNotificationSetting;
#[method(scheduledDeliverySetting)]
pub unsafe fn scheduledDeliverySetting(&self) -> UNNotificationSetting;
#[method(directMessagesSetting)]
pub unsafe fn directMessagesSetting(&self) -> UNNotificationSetting;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl UNNotificationSettings {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,69 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
// NS_TYPED_EXTENSIBLE_ENUM
pub type UNNotificationSoundName = NSString;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct UNNotificationSound;
unsafe impl ClassType for UNNotificationSound {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for UNNotificationSound {}
unsafe impl NSCopying for UNNotificationSound {}
unsafe impl NSObjectProtocol for UNNotificationSound {}
unsafe impl NSSecureCoding for UNNotificationSound {}
extern_methods!(
unsafe impl UNNotificationSound {
#[method_id(@__retain_semantics Other defaultSound)]
pub unsafe fn defaultSound() -> Retained<UNNotificationSound>;
#[method_id(@__retain_semantics Other defaultRingtoneSound)]
pub unsafe fn defaultRingtoneSound() -> Retained<UNNotificationSound>;
#[method_id(@__retain_semantics Other defaultCriticalSound)]
pub unsafe fn defaultCriticalSound() -> Retained<UNNotificationSound>;
#[method_id(@__retain_semantics Other defaultCriticalSoundWithAudioVolume:)]
pub unsafe fn defaultCriticalSoundWithAudioVolume(volume: c_float) -> Retained<Self>;
#[method_id(@__retain_semantics Other soundNamed:)]
pub unsafe fn soundNamed(name: &UNNotificationSoundName) -> Retained<Self>;
#[method_id(@__retain_semantics Other ringtoneSoundNamed:)]
pub unsafe fn ringtoneSoundNamed(name: &UNNotificationSoundName) -> Retained<Self>;
#[method_id(@__retain_semantics Other criticalSoundNamed:)]
pub unsafe fn criticalSoundNamed(name: &UNNotificationSoundName) -> Retained<Self>;
#[method_id(@__retain_semantics Other criticalSoundNamed:withAudioVolume:)]
pub unsafe fn criticalSoundNamed_withAudioVolume(
name: &UNNotificationSoundName,
volume: c_float,
) -> Retained<Self>;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl UNNotificationSound {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,233 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-location")]
use objc2_core_location::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct UNNotificationTrigger;
unsafe impl ClassType for UNNotificationTrigger {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for UNNotificationTrigger {}
unsafe impl NSCopying for UNNotificationTrigger {}
unsafe impl NSObjectProtocol for UNNotificationTrigger {}
unsafe impl NSSecureCoding for UNNotificationTrigger {}
extern_methods!(
unsafe impl UNNotificationTrigger {
#[method(repeats)]
pub unsafe fn repeats(&self) -> bool;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl UNNotificationTrigger {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct UNPushNotificationTrigger;
unsafe impl ClassType for UNPushNotificationTrigger {
#[inherits(NSObject)]
type Super = UNNotificationTrigger;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for UNPushNotificationTrigger {}
unsafe impl NSCopying for UNPushNotificationTrigger {}
unsafe impl NSObjectProtocol for UNPushNotificationTrigger {}
unsafe impl NSSecureCoding for UNPushNotificationTrigger {}
extern_methods!(
unsafe impl UNPushNotificationTrigger {}
);
extern_methods!(
/// Methods declared on superclass `UNNotificationTrigger`
unsafe impl UNPushNotificationTrigger {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl UNPushNotificationTrigger {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct UNTimeIntervalNotificationTrigger;
unsafe impl ClassType for UNTimeIntervalNotificationTrigger {
#[inherits(NSObject)]
type Super = UNNotificationTrigger;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for UNTimeIntervalNotificationTrigger {}
unsafe impl NSCopying for UNTimeIntervalNotificationTrigger {}
unsafe impl NSObjectProtocol for UNTimeIntervalNotificationTrigger {}
unsafe impl NSSecureCoding for UNTimeIntervalNotificationTrigger {}
extern_methods!(
unsafe impl UNTimeIntervalNotificationTrigger {
#[method(timeInterval)]
pub unsafe fn timeInterval(&self) -> NSTimeInterval;
#[method_id(@__retain_semantics Other triggerWithTimeInterval:repeats:)]
pub unsafe fn triggerWithTimeInterval_repeats(
time_interval: NSTimeInterval,
repeats: bool,
) -> Retained<Self>;
#[method_id(@__retain_semantics Other nextTriggerDate)]
pub unsafe fn nextTriggerDate(&self) -> Option<Retained<NSDate>>;
}
);
extern_methods!(
/// Methods declared on superclass `UNNotificationTrigger`
unsafe impl UNTimeIntervalNotificationTrigger {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl UNTimeIntervalNotificationTrigger {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct UNCalendarNotificationTrigger;
unsafe impl ClassType for UNCalendarNotificationTrigger {
#[inherits(NSObject)]
type Super = UNNotificationTrigger;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for UNCalendarNotificationTrigger {}
unsafe impl NSCopying for UNCalendarNotificationTrigger {}
unsafe impl NSObjectProtocol for UNCalendarNotificationTrigger {}
unsafe impl NSSecureCoding for UNCalendarNotificationTrigger {}
extern_methods!(
unsafe impl UNCalendarNotificationTrigger {
#[method_id(@__retain_semantics Other dateComponents)]
pub unsafe fn dateComponents(&self) -> Retained<NSDateComponents>;
#[method_id(@__retain_semantics Other triggerWithDateMatchingComponents:repeats:)]
pub unsafe fn triggerWithDateMatchingComponents_repeats(
date_components: &NSDateComponents,
repeats: bool,
) -> Retained<Self>;
#[method_id(@__retain_semantics Other nextTriggerDate)]
pub unsafe fn nextTriggerDate(&self) -> Option<Retained<NSDate>>;
}
);
extern_methods!(
/// Methods declared on superclass `UNNotificationTrigger`
unsafe impl UNCalendarNotificationTrigger {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl UNCalendarNotificationTrigger {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct UNLocationNotificationTrigger;
unsafe impl ClassType for UNLocationNotificationTrigger {
#[inherits(NSObject)]
type Super = UNNotificationTrigger;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for UNLocationNotificationTrigger {}
unsafe impl NSCopying for UNLocationNotificationTrigger {}
unsafe impl NSObjectProtocol for UNLocationNotificationTrigger {}
unsafe impl NSSecureCoding for UNLocationNotificationTrigger {}
extern_methods!(
unsafe impl UNLocationNotificationTrigger {
#[cfg(feature = "objc2-core-location")]
#[method_id(@__retain_semantics Other region)]
pub unsafe fn region(&self) -> Retained<CLRegion>;
#[cfg(feature = "objc2-core-location")]
#[method_id(@__retain_semantics Other triggerWithRegion:repeats:)]
pub unsafe fn triggerWithRegion_repeats(region: &CLRegion, repeats: bool)
-> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `UNNotificationTrigger`
unsafe impl UNLocationNotificationTrigger {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl UNLocationNotificationTrigger {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);

View File

@@ -0,0 +1,215 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
// NS_OPTIONS
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UNAuthorizationOptions(pub NSUInteger);
bitflags::bitflags! {
impl UNAuthorizationOptions: NSUInteger {
const UNAuthorizationOptionBadge = 1<<0;
const UNAuthorizationOptionSound = 1<<1;
const UNAuthorizationOptionAlert = 1<<2;
const UNAuthorizationOptionCarPlay = 1<<3;
const UNAuthorizationOptionCriticalAlert = 1<<4;
const UNAuthorizationOptionProvidesAppNotificationSettings = 1<<5;
const UNAuthorizationOptionProvisional = 1<<6;
#[deprecated = "Announcement authorization is always included"]
const UNAuthorizationOptionAnnouncement = 1<<7;
#[deprecated = "Use time-sensitive entitlement"]
const UNAuthorizationOptionTimeSensitive = 1<<8;
}
}
unsafe impl Encode for UNAuthorizationOptions {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for UNAuthorizationOptions {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub static UNAuthorizationOptionNone: UNAuthorizationOptions = UNAuthorizationOptions(0);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct UNUserNotificationCenter;
unsafe impl ClassType for UNUserNotificationCenter {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSObjectProtocol for UNUserNotificationCenter {}
extern_methods!(
unsafe impl UNUserNotificationCenter {
#[method_id(@__retain_semantics Other delegate)]
pub unsafe fn delegate(
&self,
) -> Option<Retained<ProtocolObject<dyn UNUserNotificationCenterDelegate>>>;
#[method(setDelegate:)]
pub unsafe fn setDelegate(
&self,
delegate: Option<&ProtocolObject<dyn UNUserNotificationCenterDelegate>>,
);
#[method(supportsContentExtensions)]
pub unsafe fn supportsContentExtensions(&self) -> bool;
#[method_id(@__retain_semantics Other currentNotificationCenter)]
pub unsafe fn currentNotificationCenter() -> Retained<UNUserNotificationCenter>;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[cfg(feature = "block2")]
#[method(requestAuthorizationWithOptions:completionHandler:)]
pub unsafe fn requestAuthorizationWithOptions_completionHandler(
&self,
options: UNAuthorizationOptions,
completion_handler: &block2::Block<dyn Fn(Bool, *mut NSError)>,
);
#[cfg(feature = "UNNotificationCategory")]
#[method(setNotificationCategories:)]
pub unsafe fn setNotificationCategories(&self, categories: &NSSet<UNNotificationCategory>);
#[cfg(all(feature = "UNNotificationCategory", feature = "block2"))]
#[method(getNotificationCategoriesWithCompletionHandler:)]
pub unsafe fn getNotificationCategoriesWithCompletionHandler(
&self,
completion_handler: &block2::Block<dyn Fn(NonNull<NSSet<UNNotificationCategory>>)>,
);
#[cfg(all(feature = "UNNotificationSettings", feature = "block2"))]
#[method(getNotificationSettingsWithCompletionHandler:)]
pub unsafe fn getNotificationSettingsWithCompletionHandler(
&self,
completion_handler: &block2::Block<dyn Fn(NonNull<UNNotificationSettings>)>,
);
#[cfg(all(feature = "UNNotificationRequest", feature = "block2"))]
#[method(addNotificationRequest:withCompletionHandler:)]
pub unsafe fn addNotificationRequest_withCompletionHandler(
&self,
request: &UNNotificationRequest,
completion_handler: Option<&block2::Block<dyn Fn(*mut NSError)>>,
);
#[cfg(all(feature = "UNNotificationRequest", feature = "block2"))]
#[method(getPendingNotificationRequestsWithCompletionHandler:)]
pub unsafe fn getPendingNotificationRequestsWithCompletionHandler(
&self,
completion_handler: &block2::Block<dyn Fn(NonNull<NSArray<UNNotificationRequest>>)>,
);
#[method(removePendingNotificationRequestsWithIdentifiers:)]
pub unsafe fn removePendingNotificationRequestsWithIdentifiers(
&self,
identifiers: &NSArray<NSString>,
);
#[method(removeAllPendingNotificationRequests)]
pub unsafe fn removeAllPendingNotificationRequests(&self);
#[cfg(all(feature = "UNNotification", feature = "block2"))]
#[method(getDeliveredNotificationsWithCompletionHandler:)]
pub unsafe fn getDeliveredNotificationsWithCompletionHandler(
&self,
completion_handler: &block2::Block<dyn Fn(NonNull<NSArray<UNNotification>>)>,
);
#[method(removeDeliveredNotificationsWithIdentifiers:)]
pub unsafe fn removeDeliveredNotificationsWithIdentifiers(
&self,
identifiers: &NSArray<NSString>,
);
#[method(removeAllDeliveredNotifications)]
pub unsafe fn removeAllDeliveredNotifications(&self);
#[cfg(feature = "block2")]
#[method(setBadgeCount:withCompletionHandler:)]
pub unsafe fn setBadgeCount_withCompletionHandler(
&self,
new_badge_count: NSInteger,
completion_handler: Option<&block2::Block<dyn Fn(*mut NSError)>>,
);
}
);
extern_methods!(
/// Methods declared on superclass `NSObject`
unsafe impl UNUserNotificationCenter {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);
// NS_OPTIONS
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UNNotificationPresentationOptions(pub NSUInteger);
bitflags::bitflags! {
impl UNNotificationPresentationOptions: NSUInteger {
const UNNotificationPresentationOptionBadge = 1<<0;
const UNNotificationPresentationOptionSound = 1<<1;
#[deprecated]
const UNNotificationPresentationOptionAlert = 1<<2;
const UNNotificationPresentationOptionList = 1<<3;
const UNNotificationPresentationOptionBanner = 1<<4;
}
}
unsafe impl Encode for UNNotificationPresentationOptions {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for UNNotificationPresentationOptions {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub static UNNotificationPresentationOptionNone: UNNotificationPresentationOptions =
UNNotificationPresentationOptions(0);
extern_protocol!(
pub unsafe trait UNUserNotificationCenterDelegate: NSObjectProtocol {
#[cfg(all(feature = "UNNotification", feature = "block2"))]
#[optional]
#[method(userNotificationCenter:willPresentNotification:withCompletionHandler:)]
unsafe fn userNotificationCenter_willPresentNotification_withCompletionHandler(
&self,
center: &UNUserNotificationCenter,
notification: &UNNotification,
completion_handler: &block2::Block<dyn Fn(UNNotificationPresentationOptions)>,
);
#[cfg(all(feature = "UNNotificationResponse", feature = "block2"))]
#[optional]
#[method(userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:)]
unsafe fn userNotificationCenter_didReceiveNotificationResponse_withCompletionHandler(
&self,
center: &UNUserNotificationCenter,
response: &UNNotificationResponse,
completion_handler: &block2::Block<dyn Fn()>,
);
#[cfg(feature = "UNNotification")]
#[optional]
#[method(userNotificationCenter:openSettingsForNotification:)]
unsafe fn userNotificationCenter_openSettingsForNotification(
&self,
center: &UNUserNotificationCenter,
notification: Option<&UNNotification>,
);
}
unsafe impl ProtocolType for dyn UNUserNotificationCenterDelegate {}
);

View File

@@ -0,0 +1,154 @@
// 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 = "UserNotifications", kind = "framework")]
extern "C" {}
#[cfg(feature = "NSString_UserNotifications")]
#[path = "NSString_UserNotifications.rs"]
mod __NSString_UserNotifications;
#[cfg(feature = "UNError")]
#[path = "UNError.rs"]
mod __UNError;
#[cfg(feature = "UNNotification")]
#[path = "UNNotification.rs"]
mod __UNNotification;
#[cfg(feature = "UNNotificationAction")]
#[path = "UNNotificationAction.rs"]
mod __UNNotificationAction;
#[cfg(feature = "UNNotificationActionIcon")]
#[path = "UNNotificationActionIcon.rs"]
mod __UNNotificationActionIcon;
#[cfg(feature = "UNNotificationAttachment")]
#[path = "UNNotificationAttachment.rs"]
mod __UNNotificationAttachment;
#[cfg(feature = "UNNotificationCategory")]
#[path = "UNNotificationCategory.rs"]
mod __UNNotificationCategory;
#[cfg(feature = "UNNotificationContent")]
#[path = "UNNotificationContent.rs"]
mod __UNNotificationContent;
#[cfg(feature = "UNNotificationRequest")]
#[path = "UNNotificationRequest.rs"]
mod __UNNotificationRequest;
#[cfg(feature = "UNNotificationResponse")]
#[path = "UNNotificationResponse.rs"]
mod __UNNotificationResponse;
#[cfg(feature = "UNNotificationServiceExtension")]
#[path = "UNNotificationServiceExtension.rs"]
mod __UNNotificationServiceExtension;
#[cfg(feature = "UNNotificationSettings")]
#[path = "UNNotificationSettings.rs"]
mod __UNNotificationSettings;
#[cfg(feature = "UNNotificationSound")]
#[path = "UNNotificationSound.rs"]
mod __UNNotificationSound;
#[cfg(feature = "UNNotificationTrigger")]
#[path = "UNNotificationTrigger.rs"]
mod __UNNotificationTrigger;
#[cfg(feature = "UNUserNotificationCenter")]
#[path = "UNUserNotificationCenter.rs"]
mod __UNUserNotificationCenter;
#[cfg(feature = "NSString_UserNotifications")]
pub use self::__NSString_UserNotifications::NSStringUNUserNotificationCenterSupport;
#[cfg(feature = "UNError")]
pub use self::__UNError::UNErrorCode;
#[cfg(feature = "UNError")]
pub use self::__UNError::UNErrorDomain;
#[cfg(feature = "UNNotification")]
pub use self::__UNNotification::UNNotification;
#[cfg(feature = "UNNotificationAction")]
pub use self::__UNNotificationAction::UNNotificationAction;
#[cfg(feature = "UNNotificationAction")]
pub use self::__UNNotificationAction::UNNotificationActionOptionNone;
#[cfg(feature = "UNNotificationAction")]
pub use self::__UNNotificationAction::UNNotificationActionOptions;
#[cfg(feature = "UNNotificationAction")]
pub use self::__UNNotificationAction::UNTextInputNotificationAction;
#[cfg(feature = "UNNotificationActionIcon")]
pub use self::__UNNotificationActionIcon::UNNotificationActionIcon;
#[cfg(feature = "UNNotificationAttachment")]
pub use self::__UNNotificationAttachment::UNNotificationAttachment;
#[cfg(feature = "UNNotificationAttachment")]
pub use self::__UNNotificationAttachment::UNNotificationAttachmentOptionsThumbnailClippingRectKey;
#[cfg(feature = "UNNotificationAttachment")]
pub use self::__UNNotificationAttachment::UNNotificationAttachmentOptionsThumbnailHiddenKey;
#[cfg(feature = "UNNotificationAttachment")]
pub use self::__UNNotificationAttachment::UNNotificationAttachmentOptionsThumbnailTimeKey;
#[cfg(feature = "UNNotificationAttachment")]
pub use self::__UNNotificationAttachment::UNNotificationAttachmentOptionsTypeHintKey;
#[cfg(feature = "UNNotificationCategory")]
pub use self::__UNNotificationCategory::UNNotificationCategory;
#[cfg(feature = "UNNotificationCategory")]
pub use self::__UNNotificationCategory::UNNotificationCategoryOptionNone;
#[cfg(feature = "UNNotificationCategory")]
pub use self::__UNNotificationCategory::UNNotificationCategoryOptions;
#[cfg(feature = "UNNotificationContent")]
pub use self::__UNNotificationContent::UNMutableNotificationContent;
#[cfg(feature = "UNNotificationContent")]
pub use self::__UNNotificationContent::UNNotificationContent;
#[cfg(feature = "UNNotificationContent")]
pub use self::__UNNotificationContent::UNNotificationContentProviding;
#[cfg(feature = "UNNotificationContent")]
pub use self::__UNNotificationContent::UNNotificationInterruptionLevel;
#[cfg(feature = "UNNotificationRequest")]
pub use self::__UNNotificationRequest::UNNotificationRequest;
#[cfg(feature = "UNNotificationResponse")]
pub use self::__UNNotificationResponse::UNNotificationDefaultActionIdentifier;
#[cfg(feature = "UNNotificationResponse")]
pub use self::__UNNotificationResponse::UNNotificationDismissActionIdentifier;
#[cfg(feature = "UNNotificationResponse")]
pub use self::__UNNotificationResponse::UNNotificationResponse;
#[cfg(feature = "UNNotificationResponse")]
pub use self::__UNNotificationResponse::UNTextInputNotificationResponse;
#[cfg(feature = "UNNotificationServiceExtension")]
pub use self::__UNNotificationServiceExtension::UNNotificationServiceExtension;
#[cfg(feature = "UNNotificationSettings")]
pub use self::__UNNotificationSettings::UNAlertStyle;
#[cfg(feature = "UNNotificationSettings")]
pub use self::__UNNotificationSettings::UNAuthorizationStatus;
#[cfg(feature = "UNNotificationSettings")]
pub use self::__UNNotificationSettings::UNNotificationSetting;
#[cfg(feature = "UNNotificationSettings")]
pub use self::__UNNotificationSettings::UNNotificationSettings;
#[cfg(feature = "UNNotificationSettings")]
pub use self::__UNNotificationSettings::UNShowPreviewsSetting;
#[cfg(feature = "UNNotificationSound")]
pub use self::__UNNotificationSound::UNNotificationSound;
#[cfg(feature = "UNNotificationSound")]
pub use self::__UNNotificationSound::UNNotificationSoundName;
#[cfg(feature = "UNNotificationTrigger")]
pub use self::__UNNotificationTrigger::UNCalendarNotificationTrigger;
#[cfg(feature = "UNNotificationTrigger")]
pub use self::__UNNotificationTrigger::UNLocationNotificationTrigger;
#[cfg(feature = "UNNotificationTrigger")]
pub use self::__UNNotificationTrigger::UNNotificationTrigger;
#[cfg(feature = "UNNotificationTrigger")]
pub use self::__UNNotificationTrigger::UNPushNotificationTrigger;
#[cfg(feature = "UNNotificationTrigger")]
pub use self::__UNNotificationTrigger::UNTimeIntervalNotificationTrigger;
#[cfg(feature = "UNUserNotificationCenter")]
pub use self::__UNUserNotificationCenter::UNAuthorizationOptionNone;
#[cfg(feature = "UNUserNotificationCenter")]
pub use self::__UNUserNotificationCenter::UNAuthorizationOptions;
#[cfg(feature = "UNUserNotificationCenter")]
pub use self::__UNUserNotificationCenter::UNNotificationPresentationOptionNone;
#[cfg(feature = "UNUserNotificationCenter")]
pub use self::__UNUserNotificationCenter::UNNotificationPresentationOptions;
#[cfg(feature = "UNUserNotificationCenter")]
pub use self::__UNUserNotificationCenter::UNUserNotificationCenter;
#[cfg(feature = "UNUserNotificationCenter")]
pub use self::__UNUserNotificationCenter::UNUserNotificationCenterDelegate;

View File

@@ -0,0 +1,20 @@
//! # Bindings to the `UserNotifications` 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/usernotifications/
//! [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-user-notifications/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,9 @@
framework = "UserNotifications"
crate = "objc2-user-notifications"
required-dependencies = ["objc2-foundation"]
macos = "10.14"
maccatalyst = "13.0"
ios = "10.0"
tvos = "10.0"
watchos = "3.0"
visionos = "1.0"