2020-02-28 13:34:34 +11:00
|
|
|
//! This crate provides pieces necessary for interfacing with `AppKit` (`Cocoa`, on macOS). It
|
|
|
|
//! tries to do so in a way that, if you've done programming for the framework before (in Swift or
|
|
|
|
//! Objective-C), will feel familiar. This is tricky in Rust due to the ownership model, but some
|
|
|
|
//! creative coding and assumptions can get us pretty far.
|
|
|
|
//!
|
|
|
|
//! Note that this crate relies on the Objective-C runtime. Interfacing with the runtime _requires_
|
|
|
|
//! unsafe blocks; this crate handles those unsafe interactions for you, but by using this crate
|
|
|
|
//! you understand that usage of `unsafe` is a given and will be somewhat rampant for wrapped
|
|
|
|
//! controls. This does _not_ mean you can't assess, review, or question unsafe usage - just know
|
|
|
|
//! it's happening, and in large part it's not going away.
|
|
|
|
//!
|
|
|
|
//! It's best to look at this crate as a bridge to the future: you can write your own (safe) Rust
|
|
|
|
//! code, and have it intermix in the (existing, unsafe) world.
|
|
|
|
//!
|
|
|
|
//! This crate is also, currently, _very_ early stage and may have bugs. Your usage of it is at
|
|
|
|
//! your own risk. With that said, provided you follow the rules (regarding memory/ownership) it's
|
|
|
|
//! already fine for some apps. Check the README for more info!
|
|
|
|
|
|
|
|
pub mod alert;
|
|
|
|
pub mod app;
|
2020-03-05 13:33:11 +11:00
|
|
|
pub mod button;
|
2020-03-17 16:22:15 +11:00
|
|
|
|
2020-03-18 10:55:09 +11:00
|
|
|
#[cfg(feature = "cloudkit")]
|
2020-03-17 16:22:15 +11:00
|
|
|
pub mod cloudkit;
|
|
|
|
|
2020-03-07 14:35:18 +11:00
|
|
|
pub mod color;
|
2020-03-05 13:33:11 +11:00
|
|
|
pub mod collection_view;
|
2020-03-07 14:35:18 +11:00
|
|
|
pub mod constants;
|
2020-03-05 13:33:11 +11:00
|
|
|
pub mod dragdrop;
|
2020-03-11 14:09:24 +11:00
|
|
|
pub mod error;
|
2020-02-28 13:34:34 +11:00
|
|
|
pub mod events;
|
2020-03-18 10:55:09 +11:00
|
|
|
//pub mod filesystem;
|
|
|
|
pub mod foundation;
|
2020-03-05 13:33:11 +11:00
|
|
|
pub mod geometry;
|
2020-03-13 12:18:32 +11:00
|
|
|
pub mod layout;
|
2020-02-28 13:34:34 +11:00
|
|
|
pub mod menu;
|
2020-03-05 13:33:11 +11:00
|
|
|
pub mod networking;
|
2020-03-17 16:08:12 +11:00
|
|
|
|
|
|
|
#[cfg(feature = "user-notifications")]
|
2020-02-28 13:34:34 +11:00
|
|
|
pub mod notifications;
|
2020-03-17 16:08:12 +11:00
|
|
|
|
2020-03-05 13:33:11 +11:00
|
|
|
pub mod pasteboard;
|
2020-03-16 13:53:09 +11:00
|
|
|
pub mod printing;
|
2020-03-05 13:33:11 +11:00
|
|
|
pub mod toolbar;
|
2020-03-16 17:10:43 +11:00
|
|
|
pub mod user_activity;
|
2020-03-05 13:33:11 +11:00
|
|
|
pub mod utils;
|
2020-03-18 10:55:09 +11:00
|
|
|
/*pub mod view;
|
2020-03-05 13:33:11 +11:00
|
|
|
pub mod webview;
|
2020-02-28 13:34:34 +11:00
|
|
|
pub mod window;
|
|
|
|
|
2020-03-11 14:09:24 +11:00
|
|
|
// We re-export these so that they can be used without increasing build times.
|
|
|
|
pub use url;
|
|
|
|
|
2020-02-28 13:34:34 +11:00
|
|
|
pub mod prelude {
|
2020-03-16 13:53:09 +11:00
|
|
|
pub use crate::app::{App, AppController, Dispatcher};
|
2020-02-28 13:34:34 +11:00
|
|
|
|
2020-03-13 12:18:32 +11:00
|
|
|
pub use crate::layout::LayoutConstraint;
|
|
|
|
|
2020-02-28 13:34:34 +11:00
|
|
|
pub use crate::menu::{Menu, MenuItem};
|
2020-03-17 16:08:12 +11:00
|
|
|
|
|
|
|
#[cfg(feature = "user-notifications")]
|
2020-02-28 13:34:34 +11:00
|
|
|
pub use crate::notifications::{Notification, NotificationCenter, NotificationAuthOption};
|
2020-03-17 16:08:12 +11:00
|
|
|
|
2020-03-13 06:33:41 +11:00
|
|
|
pub use crate::toolbar::{Toolbar, ToolbarController, ToolbarHandle};
|
2020-02-28 13:34:34 +11:00
|
|
|
|
|
|
|
pub use crate::networking::URLRequest;
|
|
|
|
|
|
|
|
pub use crate::window::{
|
2020-03-12 11:56:17 +11:00
|
|
|
Window, WindowController, WindowHandle
|
2020-02-28 13:34:34 +11:00
|
|
|
};
|
|
|
|
|
|
|
|
pub use crate::webview::{
|
|
|
|
WebView, WebViewConfig, WebViewController
|
|
|
|
};
|
|
|
|
|
2020-03-12 11:56:17 +11:00
|
|
|
pub use crate::view::{View, ViewHandle, ViewController};
|
2020-02-28 13:34:34 +11:00
|
|
|
|
|
|
|
pub use appkit_derive::{
|
2020-03-11 14:09:24 +11:00
|
|
|
WindowWrapper, ViewWrapper
|
2020-02-28 13:34:34 +11:00
|
|
|
};
|
2020-03-18 10:55:09 +11:00
|
|
|
}*/
|