diff --git a/cocoa-foundation/src/base.rs b/cocoa-foundation/src/base.rs index 028205e8..314c703d 100644 --- a/cocoa-foundation/src/base.rs +++ b/cocoa-foundation/src/base.rs @@ -6,6 +6,7 @@ // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. +#![deprecated = "use the objc2 crate instead"] use objc::runtime; diff --git a/cocoa-foundation/src/foundation.rs b/cocoa-foundation/src/foundation.rs index f518d6e0..6800e2c2 100644 --- a/cocoa-foundation/src/foundation.rs +++ b/cocoa-foundation/src/foundation.rs @@ -6,7 +6,7 @@ // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. - +#![deprecated = "use the objc2-foundation crate instead"] #![allow(non_upper_case_globals)] use crate::base::{id, nil, BOOL, NO, SEL}; diff --git a/cocoa-foundation/src/lib.rs b/cocoa-foundation/src/lib.rs index cf224b5a..9ffc821d 100644 --- a/cocoa-foundation/src/lib.rs +++ b/cocoa-foundation/src/lib.rs @@ -7,7 +7,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![allow(non_snake_case)] +//! This crate has been deprecated in favour of the `objc2-foundation` crate. +#![allow(non_snake_case, deprecated)] pub mod base; pub mod foundation; diff --git a/cocoa-foundation/tests/foundation.rs b/cocoa-foundation/tests/foundation.rs index c726cc15..680e853b 100644 --- a/cocoa-foundation/tests/foundation.rs +++ b/cocoa-foundation/tests/foundation.rs @@ -1,3 +1,5 @@ +#![allow(deprecated)] + #[cfg(test)] mod foundation { mod nsstring { diff --git a/cocoa/README.md b/cocoa/README.md index 597d6c58..34ac84c6 100644 --- a/cocoa/README.md +++ b/cocoa/README.md @@ -1,6 +1,8 @@ Cocoa-rs -------- +NOTE: This crate has been deprecated in favour of the `objc2` crates. + This crate provides Rust bindings to Cocoa for macOS. It's dual-licensed MIT / Apache 2.0. If you'd like to help improve cocoa-rs, check out [the Servo -contributing guide](https://github.com/servo/servo/blob/main/CONTRIBUTING.md)! +contributing guide](https://github.com/servo/servo/blob/main/CONTRIBUTING.md)! diff --git a/cocoa/examples/color.rs b/cocoa/examples/color.rs index 401bdeac..e97cb540 100644 --- a/cocoa/examples/color.rs +++ b/cocoa/examples/color.rs @@ -1,3 +1,4 @@ +#![allow(deprecated)] // the cocoa crate is deprecated use cocoa::base::{id, nil, selector, NO}; use cocoa::appkit::{ diff --git a/cocoa/examples/fullscreen.rs b/cocoa/examples/fullscreen.rs index 7571e8d1..19c14b1c 100644 --- a/cocoa/examples/fullscreen.rs +++ b/cocoa/examples/fullscreen.rs @@ -1,3 +1,4 @@ +#![allow(deprecated)] // the cocoa crate is deprecated use cocoa::appkit::{ NSApp, NSApplication, NSApplicationActivateIgnoringOtherApps, NSApplicationActivationPolicyRegular, NSApplicationPresentationOptions, NSBackingStoreBuffered, diff --git a/cocoa/examples/hello_world.rs b/cocoa/examples/hello_world.rs index 2c64a9fe..7bba17e6 100644 --- a/cocoa/examples/hello_world.rs +++ b/cocoa/examples/hello_world.rs @@ -1,3 +1,4 @@ +#![allow(deprecated)] // the cocoa crate is deprecated use cocoa::appkit::{ NSApp, NSApplication, NSApplicationActivateIgnoringOtherApps, NSApplicationActivationPolicyRegular, NSBackingStoreBuffered, NSMenu, NSMenuItem, diff --git a/cocoa/examples/nsvisualeffectview_blur.rs b/cocoa/examples/nsvisualeffectview_blur.rs index 994b94f8..d93e6950 100644 --- a/cocoa/examples/nsvisualeffectview_blur.rs +++ b/cocoa/examples/nsvisualeffectview_blur.rs @@ -1,3 +1,4 @@ +#![allow(deprecated)] // the cocoa crate is deprecated use cocoa::base::{nil, selector, NO}; use objc::*; diff --git a/cocoa/examples/tab_view.rs b/cocoa/examples/tab_view.rs index 7e98eb74..4beed87a 100644 --- a/cocoa/examples/tab_view.rs +++ b/cocoa/examples/tab_view.rs @@ -1,3 +1,4 @@ +#![allow(deprecated)] // the cocoa crate is deprecated use cocoa::base::{id, nil, selector, NO}; use cocoa::appkit::{ diff --git a/cocoa/src/appkit.rs b/cocoa/src/appkit.rs index 36bd2634..1b20503c 100644 --- a/cocoa/src/appkit.rs +++ b/cocoa/src/appkit.rs @@ -7,6 +7,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![deprecated = "use the objc2-app-kit crate instead"] #![allow(non_upper_case_globals)] use crate::base::{id, BOOL, SEL}; diff --git a/cocoa/src/base.rs b/cocoa/src/base.rs deleted file mode 100644 index d1a6f892..00000000 --- a/cocoa/src/base.rs +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2013 The Servo Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -pub use cocoa_foundation::base::*; diff --git a/cocoa/src/foundation.rs b/cocoa/src/foundation.rs deleted file mode 100644 index 3608d55d..00000000 --- a/cocoa/src/foundation.rs +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2013 The Servo Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -pub use cocoa_foundation::foundation::*; diff --git a/cocoa/src/lib.rs b/cocoa/src/lib.rs index 1650ae11..ce8dee5c 100644 --- a/cocoa/src/lib.rs +++ b/cocoa/src/lib.rs @@ -7,14 +7,15 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +//! This crate has been deprecated in favour of the `objc2` crates. #![crate_name = "cocoa"] #![crate_type = "rlib"] -#![allow(non_snake_case)] +#![allow(non_snake_case, deprecated)] #[cfg(target_os = "macos")] pub mod appkit; -pub mod base; -pub mod foundation; +pub use cocoa_foundation::base; +pub use cocoa_foundation::foundation; #[cfg(target_os = "macos")] pub mod quartzcore; #[macro_use] diff --git a/cocoa/src/macros.rs b/cocoa/src/macros.rs index 7063da85..781ff4cc 100644 --- a/cocoa/src/macros.rs +++ b/cocoa/src/macros.rs @@ -38,6 +38,7 @@ /// # } /// ``` #[macro_export] +#[deprecated = "use the objc2::define_class! macro instead"] macro_rules! delegate { ( $name:expr, { diff --git a/cocoa/src/quartzcore.rs b/cocoa/src/quartzcore.rs index c96d8651..f2133f7a 100644 --- a/cocoa/src/quartzcore.rs +++ b/cocoa/src/quartzcore.rs @@ -7,6 +7,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![deprecated = "use the objc2-quartz-core crate instead"] #![allow(non_upper_case_globals)] use bitflags::bitflags; diff --git a/io-surface/src/lib.rs b/io-surface/src/lib.rs index 5b84aa4f..9331cde7 100644 --- a/io-surface/src/lib.rs +++ b/io-surface/src/lib.rs @@ -7,6 +7,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +//! This crate has been deprecated in favour of the `objc2-io-surface` crate. +#![deprecated = "use the objc2-io-surface crate instead"] #![crate_name = "io_surface"] #![crate_type = "rlib"]