pub unsafe fn attach_to_parent(&mut self, parent: *mut c_void) {
        let parent_id = parent as id;
        let wk_webview = self.webview.get_native_handle();
        parent_id.addSubview_(wk_webview);
        let window_id: id = msg_send![parent_id, window];

        let ns_rect: NSRect = NSView::frame(wk_webview);
        let ns_size = ns_rect.size;
        window_id.setMinSize_(ns_size);
        window_id.setContentSize_(ns_size);
        window_id.setStyleMask_(
            NSWindowStyleMask::NSTitledWindowMask
                | NSWindowStyleMask::NSResizableWindowMask
                | NSWindowStyleMask::NSClosableWindowMask,
        );

        pin_to_parent(parent_id, wk_webview);
    }
/// Attach this webkit holder onto a NSView* that the host forwards. Does not attach listeners
/// or load the front-end URL.
///
/// # Safety
/// Unsafe due to:
///
/// - Operating over a void* passed in by the plugin host
/// - Calling into Objective-C APIs
Attach this webkit holder onto a NSView* that the host forwards. Does not attach listeners
or load the front-end URL.
Attach this webkit holder onto a NSView * that the host forwards . Does not attach listeners or load the front - end URL .
pub unsafe fn attach_to_parent(&mut self, parent: *mut c_void) {
        let parent_id = parent as id;
        let wk_webview = self.webview.get_native_handle();
        parent_id.addSubview_(wk_webview);
        let window_id: id = msg_send![parent_id, window];
        let ns_rect: NSRect = NSView::frame(wk_webview);
        let ns_size = ns_rect.size;
        window_id.setMinSize_(ns_size);
        window_id.setContentSize_(ns_size);
        window_id.setStyleMask_(
            NSWindowStyleMask::NSTitledWindowMask
                | NSWindowStyleMask::NSResizableWindowMask
                | NSWindowStyleMask::NSClosableWindowMask,
        );
        pin_to_parent(parent_id, wk_webview);
    }
pub unsafe fn attach_to_parent ( & mut self , parent : * mut c_void ) { let parent_id = parent as id ; let wk_webview = self . webview . get_native_handle ( ) ; parent_id . addSubview_ ( wk_webview ) ; let window_id : id = msg_send ! [ parent_id window ] ; let ns_rect : NSRect = NSView :: frame ( wk_webview ) ; let ns_size = ns_rect . size ; window_id . setMinSize_ ( ns_size ) ; window_id . setContentSize_ ( ns_size ) ; window_id . setStyleMask_ ( NSWindowStyleMask :: NSTitledWindowMask | NSWindowStyleMask :: NSResizableWindowMask | NSWindowStyleMask :: NSClosableWindowMask , ) ; pin_to_parent ( parent_id , wk_webview ) ; }
Attach this webkit holder onto a NSView* that the host forwards.
Attach this webkit holder onto a NSView * that the host forwards .
&mut self
parent
*mut c_void
&mut self
parent
*mut c_void
safety
Unsafe due to.

Operating over a void* passed in by the plugin host
Calling into Objective-C APIs
Unsafe due to . Operating over a void * passed in by the plugin host Calling into Objective - C APIs