Skip to content

Commit

Permalink
Add the CoreAudioTypes framework
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelsleight authored and madsmtm committed Dec 9, 2024
1 parent 5a6cc13 commit c89bf6f
Show file tree
Hide file tree
Showing 11 changed files with 126 additions and 12 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/ci.yml

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/header-translator/src/unexposed_attr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ impl UnexposedAttr {
| "__WATCHOS_UNAVAILABLE"
| "APPKIT_API_UNAVAILABLE_BEGIN_MACCATALYST"
| "AVKIT_INIT_UNAVAILABLE"
| "CA_CANONICAL_DEPRECATED"
| "CB_CM_API_AVAILABLE"
| "MP_INIT_UNAVAILABLE"
| "CF_AUTOMATED_REFCOUNT_UNAVAILABLE"
Expand Down
3 changes: 2 additions & 1 deletion crates/objc2/src/topics/about_generated/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
* Added `MTLResourceID::from_raw` and `MTLResourceID::as_raw` to allow
querying the underlying data.
* Added new framework crates:
- `ScreenSaver` / `objc2-screen-saver`.
- `CoreAudioTypes` / `objc2-core-audio-types`.
- `CoreFoundation` / `objc2-core-foundation`.
- `ScreenSaver` / `objc2-screen-saver`.

### Changed
* Allow using `MainThreadBound` without the `NSThread` feature flag.
Expand Down
1 change: 1 addition & 0 deletions crates/objc2/src/topics/about_generated/list_data.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
| `CloudKit` | [![`objc2-cloud-kit`](https://badgen.net/crates/v/objc2-cloud-kit)](https://crates.io/crates/objc2-cloud-kit) | [![docs.rs](https://docs.rs/objc2-cloud-kit/badge.svg)](https://docs.rs/objc2-cloud-kit/) |
| `Contacts` | [![`objc2-contacts`](https://badgen.net/crates/v/objc2-contacts)](https://crates.io/crates/objc2-contacts) | [![docs.rs](https://docs.rs/objc2-contacts/badge.svg)](https://docs.rs/objc2-contacts/) |
| `ContactsUI` | [![`objc2-contacts-ui`](https://badgen.net/crates/v/objc2-contacts-ui)](https://crates.io/crates/objc2-contacts-ui) | [![docs.rs](https://docs.rs/objc2-contacts-ui/badge.svg)](https://docs.rs/objc2-contacts-ui/) |
| `CoreAudioTypes` | [![`objc2-core-audio-types`](https://badgen.net/crates/v/objc2-core-audio-types)](https://crates.io/crates/objc2-core-audio-types) | [![docs.rs](https://docs.rs/objc2-core-audio-types/badge.svg)](https://docs.rs/objc2-core-audio-types/) |
| `CoreBluetooth` | [![`objc2-core-bluetooth`](https://badgen.net/crates/v/objc2-core-bluetooth)](https://crates.io/crates/objc2-core-bluetooth) | [![docs.rs](https://docs.rs/objc2-core-bluetooth/badge.svg)](https://docs.rs/objc2-core-bluetooth/) |
| `CoreData` | [![`objc2-core-data`](https://badgen.net/crates/v/objc2-core-data)](https://crates.io/crates/objc2-core-data) | [![docs.rs](https://docs.rs/objc2-core-data/badge.svg)](https://docs.rs/objc2-core-data/) |
| `CoreFoundation` | [![`objc2-core-foundation`](https://badgen.net/crates/v/objc2-core-foundation)](https://crates.io/crates/objc2-core-foundation) | [![docs.rs](https://docs.rs/objc2-core-foundation/badge.svg)](https://docs.rs/objc2-core-foundation/) |
Expand Down
48 changes: 48 additions & 0 deletions framework-crates/objc2-core-audio-types/Cargo.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions framework-crates/objc2-core-audio-types/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions framework-crates/objc2-core-audio-types/src/generated

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions framework-crates/objc2-core-audio-types/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
//! # Bindings to the `CoreAudioTypes` 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/coreaudiotypes/
//! [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-core-audio-types/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::*;

// MacTypes.h
#[allow(dead_code)]
pub(crate) type OSStatus = i32;
#[allow(dead_code)]
pub(crate) type OSType = u32;
14 changes: 14 additions & 0 deletions framework-crates/objc2-core-audio-types/translation-config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
framework = "CoreAudioTypes"
crate = "objc2-core-audio-types"
required-dependencies = []
custom-lib-rs = true
macos = "10.15"
maccatalyst = "13.0"
ios = "13.0"
tvos = "13.0"
watchos = "6.0"
visionos = "1.0"
link = false # This framework only contains types

# Requires a cast
enum.anonymous.constants.AVAudioSessionErrorInsufficientPriority.skipped = true
2 changes: 1 addition & 1 deletion generated

0 comments on commit c89bf6f

Please sign in to comment.