Updated winit to 0.27.2 for examples and raw-window-handle to 0.5.0

This commit is contained in:
David Johnson 2022-08-24 00:16:20 -05:00
parent bef3c52706
commit d30d3255c2
8 changed files with 72 additions and 41 deletions

View file

@ -1,5 +1,5 @@
use crate::{GraphicsContextImpl, SoftBufferError};
use raw_window_handle::{HasRawWindowHandle, AppKitHandle};
use raw_window_handle::{HasRawWindowHandle, AppKitWindowHandle};
use core_graphics::base::{kCGBitmapByteOrder32Little, kCGImageAlphaNoneSkipFirst, kCGRenderingIntentDefault};
use core_graphics::color_space::CGColorSpace;
use core_graphics::data_provider::CGDataProvider;
@ -17,7 +17,7 @@ pub struct CGImpl {
}
impl CGImpl {
pub unsafe fn new<W: HasRawWindowHandle>(handle: AppKitHandle) -> Result<Self, SoftBufferError<W>> {
pub unsafe fn new<W: HasRawWindowHandle>(handle: AppKitWindowHandle) -> Result<Self, SoftBufferError<W>> {
let view = handle.ns_view as id;
let layer = CALayer::new();
let subview: id = NSView::alloc(nil).initWithFrame_(view.frame());