macOS: Implement Refresh (#742)
* macOS: Implement Refresh * drawRect should take NSRect
This commit is contained in:
parent
33c8aa660f
commit
5a0b4dba47
3 changed files with 32 additions and 0 deletions
|
|
@ -2,6 +2,7 @@ use cocoa::appkit::NSWindowStyleMask;
|
|||
use cocoa::base::{id, nil};
|
||||
use cocoa::foundation::{NSRect, NSUInteger};
|
||||
use core_graphics::display::CGDisplay;
|
||||
use objc::runtime::{Class, Object};
|
||||
|
||||
use platform::platform::ffi;
|
||||
use platform::platform::window::IdRef;
|
||||
|
|
@ -39,6 +40,11 @@ pub unsafe fn toggle_style_mask(window: id, view: id, mask: NSWindowStyleMask, o
|
|||
window.makeFirstResponder_(view);
|
||||
}
|
||||
|
||||
pub unsafe fn superclass<'a>(this: &'a Object) -> &'a Class {
|
||||
let superclass: id = msg_send![this, superclass];
|
||||
&*(superclass as *const _)
|
||||
}
|
||||
|
||||
pub unsafe fn create_input_context(view: id) -> IdRef {
|
||||
let input_context: id = msg_send![class!(NSTextInputContext), alloc];
|
||||
let input_context: id = msg_send![input_context, initWithClient:view];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue