Skip to content

Commit

Permalink
Use class macro
Browse files Browse the repository at this point in the history
  • Loading branch information
grovesNL committed Jul 17, 2018
1 parent a5930ad commit 82978bf
Show file tree
Hide file tree
Showing 5 changed files with 92 additions and 101 deletions.
2 changes: 1 addition & 1 deletion cocoa/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ block = "0.1"
bitflags = "1.0"
libc = "0.2"
core-graphics = { path = "../core-graphics", version = "0.15" }
objc = "0.2"
objc = "0.2.3"
4 changes: 2 additions & 2 deletions cocoa/examples/fullscreen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use cocoa::appkit::{NSApp, NSApplication, NSApplicationActivationPolicyRegular,

use core_graphics::display::CGDisplay;

use objc::runtime::{Class, Object, Sel};
use objc::runtime::{Object, Sel};
use objc::declare::ClassDecl;

fn main() {
Expand Down Expand Up @@ -44,7 +44,7 @@ fn main() {
app_menu_item.setSubmenu_(app_menu);

// Create NSWindowDelegate
let superclass = Class::get("NSObject").unwrap();
let superclass = class!(NSObject);
let mut decl = ClassDecl::new("MyWindowDelegate", superclass).unwrap();

extern fn will_use_fillscreen_presentation_options(_: &Object, _: Sel, _: id, _: NSUInteger) -> NSUInteger {
Expand Down
Loading

0 comments on commit 82978bf

Please sign in to comment.