Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions druid-shell/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,6 @@
pub use kurbo;
pub use piet_common as piet;

#[cfg(target_os = "windows")]
#[macro_use]
extern crate winapi;

#[cfg(all(target_os = "macos", not(feature = "use_gtk")))]
#[macro_use]
extern crate objc;

#[cfg(not(any(feature = "use_gtk", target_os = "linux")))]
#[macro_use]
extern crate lazy_static;

#[cfg(all(target_os = "linux", feature = "x11"))]
#[macro_use]
extern crate lazy_static;

mod application;
mod clipboard;
mod common_util;
Expand Down
2 changes: 2 additions & 0 deletions druid-shell/src/platform/mac/application.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ use crate::application::AppHandler;
use cocoa::appkit::{NSApp, NSApplication, NSApplicationActivationPolicyRegular};
use cocoa::base::{id, nil, YES};
use cocoa::foundation::NSAutoreleasePool;
use lazy_static::lazy_static;
use objc::declare::ClassDecl;
use objc::runtime::{Class, Object, Sel};
use objc::{class, msg_send, sel, sel_impl};

static APP_HANDLER_IVAR: &str = "druidAppHandler";

Expand Down
1 change: 1 addition & 0 deletions druid-shell/src/platform/mac/clipboard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
use cocoa::appkit::NSPasteboardTypeString;
use cocoa::base::{id, nil, BOOL, YES};
use cocoa::foundation::{NSArray, NSInteger, NSUInteger};
use objc::{class, msg_send, sel, sel_impl};

use super::util;
use crate::clipboard::{ClipboardFormat, FormatId};
Expand Down
1 change: 1 addition & 0 deletions druid-shell/src/platform/mac/dialog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ use std::ffi::OsString;

use cocoa::base::{id, nil, YES};
use cocoa::foundation::{NSArray, NSInteger};
use objc::{class, msg_send, sel, sel_impl};

use super::util::{from_nsstring, make_nsstring};
use crate::dialog::{FileDialogOptions, FileDialogType};
Expand Down
1 change: 1 addition & 0 deletions druid-shell/src/platform/mac/menu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
use cocoa::appkit::{NSEventModifierFlags, NSMenu, NSMenuItem};
use cocoa::base::{id, nil, NO};
use cocoa::foundation::NSAutoreleasePool;
use objc::{msg_send, sel, sel_impl};

use super::util::make_nsstring;
use crate::common_util::strip_access_key;
Expand Down
1 change: 1 addition & 0 deletions druid-shell/src/platform/mac/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ use std::ffi::c_void;

use cocoa::base::{id, nil, BOOL, YES};
use cocoa::foundation::{NSAutoreleasePool, NSString, NSUInteger};
use objc::{class, msg_send, sel, sel_impl};

/// Panic if not on the main thread.assert_main_thread()
///
Expand Down
2 changes: 2 additions & 0 deletions druid-shell/src/platform/mac/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ use cocoa::appkit::{
};
use cocoa::base::{id, nil, BOOL, NO, YES};
use cocoa::foundation::{NSAutoreleasePool, NSPoint, NSRect, NSSize, NSString};
use lazy_static::lazy_static;
use objc::declare::ClassDecl;
use objc::rc::WeakPtr;
use objc::runtime::{Class, Object, Sel};
use objc::{class, msg_send, sel, sel_impl};

use cairo::{Context, QuartzSurface};
use log::{error, info};
Expand Down
1 change: 1 addition & 0 deletions druid-shell/src/platform/windows/accels.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

//! Wrappers for Windows of Accelerate Table.

use lazy_static::lazy_static;
use winapi::ctypes::c_int;
use winapi::shared::windef::*;
use winapi::um::winuser::*;
Expand Down
2 changes: 1 addition & 1 deletion druid-shell/src/platform/windows/dialog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use winapi::um::combaseapi::*;
use winapi::um::shobjidl::*;
use winapi::um::shobjidl_core::*;
use winapi::um::shtypes::COMDLG_FILTERSPEC;
use winapi::Interface;
use winapi::{Interface, DEFINE_GUID};
use wio::com::ComPtr;

use super::error::Error;
Expand Down
1 change: 1 addition & 0 deletions druid-shell/src/platform/windows/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ use std::os::windows::ffi::{OsStrExt, OsStringExt};
use std::ptr;
use std::slice;

use lazy_static::lazy_static;
use winapi::ctypes::c_void;
use winapi::shared::guiddef::REFIID;
use winapi::shared::minwindef::{HMODULE, UINT};
Expand Down
2 changes: 2 additions & 0 deletions druid-shell/src/platform/x11/application.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ use crate::application::AppHandler;
use crate::kurbo::Point;
use crate::{KeyCode, KeyModifiers, MouseButton, MouseEvent};

use lazy_static::lazy_static;

struct XcbConnection {
connection: Arc<xcb::Connection>,
screen_num: i32,
Expand Down