Skip to content

Commit 5afce24

Browse files
committed
Deprecate cocoa
1 parent f7dbd4f commit 5afce24

12 files changed

+15
-24
lines changed

cocoa/README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
Cocoa-rs
22
--------
33

4+
NOTE: This crate has been deprecated in favour of the `objc2` crates.
5+
46
This crate provides Rust bindings to Cocoa for macOS. It's dual-licensed MIT /
57
Apache 2.0. If you'd like to help improve cocoa-rs, check out [the Servo
6-
contributing guide](https://github.com/servo/servo/blob/main/CONTRIBUTING.md)!
8+
contributing guide](https://github.com/servo/servo/blob/main/CONTRIBUTING.md)!

cocoa/examples/color.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![allow(deprecated)] // the cocoa crate is deprecated
12
use cocoa::base::{id, nil, selector, NO};
23

34
use cocoa::appkit::{

cocoa/examples/fullscreen.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![allow(deprecated)] // the cocoa crate is deprecated
12
use cocoa::appkit::{
23
NSApp, NSApplication, NSApplicationActivateIgnoringOtherApps,
34
NSApplicationActivationPolicyRegular, NSApplicationPresentationOptions, NSBackingStoreBuffered,

cocoa/examples/hello_world.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![allow(deprecated)] // the cocoa crate is deprecated
12
use cocoa::appkit::{
23
NSApp, NSApplication, NSApplicationActivateIgnoringOtherApps,
34
NSApplicationActivationPolicyRegular, NSBackingStoreBuffered, NSMenu, NSMenuItem,

cocoa/examples/nsvisualeffectview_blur.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![allow(deprecated)] // the cocoa crate is deprecated
12
use cocoa::base::{nil, selector, NO};
23
use objc::*;
34

cocoa/examples/tab_view.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![allow(deprecated)] // the cocoa crate is deprecated
12
use cocoa::base::{id, nil, selector, NO};
23

34
use cocoa::appkit::{

cocoa/src/appkit.rs

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
// option. This file may not be copied, modified, or distributed
88
// except according to those terms.
99

10+
#![deprecated = "use the objc2-app-kit crate instead"]
1011
#![allow(non_upper_case_globals)]
1112

1213
use crate::base::{id, BOOL, SEL};

cocoa/src/base.rs

-10
This file was deleted.

cocoa/src/foundation.rs

-10
This file was deleted.

cocoa/src/lib.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@
77
// option. This file may not be copied, modified, or distributed
88
// except according to those terms.
99

10+
//! This crate has been deprecated in favour of the `objc2` crates.
1011
#![crate_name = "cocoa"]
1112
#![crate_type = "rlib"]
12-
#![allow(non_snake_case)]
13+
#![allow(non_snake_case, deprecated)]
1314

1415
#[cfg(target_os = "macos")]
1516
pub mod appkit;
16-
pub mod base;
17-
pub mod foundation;
17+
pub use cocoa_foundation::base;
18+
pub use cocoa_foundation::foundation;
1819
#[cfg(target_os = "macos")]
1920
pub mod quartzcore;
2021
#[macro_use]

cocoa/src/macros.rs

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
/// # }
3939
/// ```
4040
#[macro_export]
41+
#[deprecated = "use the objc2::define_class! macro instead"]
4142
macro_rules! delegate {
4243
(
4344
$name:expr, {

cocoa/src/quartzcore.rs

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
// option. This file may not be copied, modified, or distributed
88
// except according to those terms.
99

10+
#![deprecated = "use the objc2-quartz-core crate instead"]
1011
#![allow(non_upper_case_globals)]
1112

1213
use bitflags::bitflags;

0 commit comments

Comments
 (0)