Deprecate cocoa, cocoa-foundation and io-surface and link to objc2 crates instead (#731)
* Deprecate cocoa-foundation * Deprecate cocoa * Deprecate io-surface
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, 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;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, 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};
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#![allow(deprecated)]
|
||||
|
||||
#[cfg(test)]
|
||||
mod foundation {
|
||||
mod nsstring {
|
||||
|
||||
@@ -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)!
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#![allow(deprecated)] // the cocoa crate is deprecated
|
||||
use cocoa::base::{id, nil, selector, NO};
|
||||
|
||||
use cocoa::appkit::{
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#![allow(deprecated)] // the cocoa crate is deprecated
|
||||
use cocoa::appkit::{
|
||||
NSApp, NSApplication, NSApplicationActivateIgnoringOtherApps,
|
||||
NSApplicationActivationPolicyRegular, NSApplicationPresentationOptions, NSBackingStoreBuffered,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#![allow(deprecated)] // the cocoa crate is deprecated
|
||||
use cocoa::appkit::{
|
||||
NSApp, NSApplication, NSApplicationActivateIgnoringOtherApps,
|
||||
NSApplicationActivationPolicyRegular, NSBackingStoreBuffered, NSMenu, NSMenuItem,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#![allow(deprecated)] // the cocoa crate is deprecated
|
||||
use cocoa::base::{nil, selector, NO};
|
||||
use objc::*;
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#![allow(deprecated)] // the cocoa crate is deprecated
|
||||
use cocoa::base::{id, nil, selector, NO};
|
||||
|
||||
use cocoa::appkit::{
|
||||
|
||||
@@ -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};
|
||||
|
||||
@@ -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 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
pub use cocoa_foundation::base::*;
|
||||
@@ -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 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
pub use cocoa_foundation::foundation::*;
|
||||
+4
-3
@@ -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]
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
/// # }
|
||||
/// ```
|
||||
#[macro_export]
|
||||
#[deprecated = "use the objc2::define_class! macro instead"]
|
||||
macro_rules! delegate {
|
||||
(
|
||||
$name:expr, {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user