2022-09-08 16:45:29 +02:00
|
|
|
//! Safe bindings for the AppKit framework.
|
|
|
|
|
//!
|
|
|
|
|
//! These are split out from the rest of `winit` to make safety easier to review.
|
|
|
|
|
//! In the future, these should probably live in another crate like `cacao`.
|
|
|
|
|
//!
|
|
|
|
|
//! TODO: Main thread safety.
|
2022-09-02 21:02:40 +02:00
|
|
|
// Objective-C methods have different conventions, and it's much easier to
|
|
|
|
|
// understand if we just use the same names
|
|
|
|
|
#![allow(non_snake_case)]
|
2022-09-08 16:45:29 +02:00
|
|
|
#![allow(clippy::too_many_arguments)]
|
|
|
|
|
#![allow(clippy::enum_variant_names)]
|
|
|
|
|
#![allow(non_upper_case_globals)]
|
2022-09-02 18:46:18 +02:00
|
|
|
|
2022-10-19 03:34:36 +09:00
|
|
|
mod appearance;
|
2022-09-02 18:46:18 +02:00
|
|
|
mod application;
|
2022-09-08 16:45:29 +02:00
|
|
|
mod button;
|
|
|
|
|
mod color;
|
|
|
|
|
mod control;
|
2022-09-02 21:02:40 +02:00
|
|
|
mod cursor;
|
2022-09-08 16:45:29 +02:00
|
|
|
mod event;
|
2022-09-02 21:02:40 +02:00
|
|
|
mod image;
|
2022-09-08 16:45:29 +02:00
|
|
|
mod menu;
|
|
|
|
|
mod menu_item;
|
|
|
|
|
mod pasteboard;
|
2022-09-02 18:46:18 +02:00
|
|
|
mod responder;
|
2022-09-08 16:45:29 +02:00
|
|
|
mod screen;
|
2023-07-13 06:52:34 +00:00
|
|
|
mod tab_group;
|
2022-09-08 16:45:29 +02:00
|
|
|
mod text_input_context;
|
|
|
|
|
mod version;
|
2022-09-02 18:46:18 +02:00
|
|
|
mod view;
|
|
|
|
|
mod window;
|
|
|
|
|
|
2022-10-19 03:34:36 +09:00
|
|
|
pub(crate) use self::appearance::NSAppearance;
|
2022-09-08 16:45:29 +02:00
|
|
|
pub(crate) use self::application::{
|
|
|
|
|
NSApp, NSApplication, NSApplicationActivationPolicy, NSApplicationPresentationOptions,
|
|
|
|
|
NSRequestUserAttentionType,
|
|
|
|
|
};
|
|
|
|
|
pub(crate) use self::button::NSButton;
|
|
|
|
|
pub(crate) use self::color::NSColor;
|
|
|
|
|
pub(crate) use self::control::NSControl;
|
2022-09-02 21:02:40 +02:00
|
|
|
pub(crate) use self::cursor::NSCursor;
|
2022-09-08 16:45:29 +02:00
|
|
|
#[allow(unused_imports)]
|
|
|
|
|
pub(crate) use self::event::{
|
|
|
|
|
NSEvent, NSEventModifierFlags, NSEventPhase, NSEventSubtype, NSEventType,
|
|
|
|
|
};
|
2022-09-02 21:02:40 +02:00
|
|
|
pub(crate) use self::image::NSImage;
|
2022-09-08 16:45:29 +02:00
|
|
|
pub(crate) use self::menu::NSMenu;
|
|
|
|
|
pub(crate) use self::menu_item::NSMenuItem;
|
|
|
|
|
pub(crate) use self::pasteboard::{NSFilenamesPboardType, NSPasteboard, NSPasteboardType};
|
2022-09-02 18:46:18 +02:00
|
|
|
pub(crate) use self::responder::NSResponder;
|
2022-09-08 16:45:29 +02:00
|
|
|
#[allow(unused_imports)]
|
|
|
|
|
pub(crate) use self::screen::{NSDeviceDescriptionKey, NSScreen};
|
2023-07-13 06:52:34 +00:00
|
|
|
pub(crate) use self::tab_group::NSWindowTabGroup;
|
2022-09-08 16:45:29 +02:00
|
|
|
pub(crate) use self::text_input_context::NSTextInputContext;
|
|
|
|
|
pub(crate) use self::version::NSAppKitVersion;
|
|
|
|
|
pub(crate) use self::view::{NSTrackingRectTag, NSView};
|
|
|
|
|
pub(crate) use self::window::{
|
|
|
|
|
NSBackingStoreType, NSWindow, NSWindowButton, NSWindowLevel, NSWindowOcclusionState,
|
2023-07-13 21:14:04 -07:00
|
|
|
NSWindowOrderingMode, NSWindowSharingType, NSWindowStyleMask, NSWindowTabbingMode,
|
|
|
|
|
NSWindowTitleVisibility,
|
2022-09-08 16:45:29 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#[link(name = "AppKit", kind = "framework")]
|
|
|
|
|
extern "C" {}
|