raw window handle 0.5.0

This commit is contained in:
Alex Janka 2023-03-06 12:08:09 +11:00
parent 9df8b59940
commit a8d6d94726
6 changed files with 6 additions and 6 deletions

View file

@ -24,7 +24,7 @@ png = "0.17"
cc = "1.0"
[dependencies]
raw-window-handle = "0.4"
raw-window-handle = "0.5"
[target.'cfg(windows)'.dependencies.winapi]
version = "0.3"

View file

@ -263,7 +263,7 @@ unsafe extern "C" fn char_callback(window: *mut c_void, code_point: u32) {
unsafe impl raw_window_handle::HasRawWindowHandle for Window {
fn raw_window_handle(&self) -> raw_window_handle::RawWindowHandle {
let mut handle = raw_window_handle::AppKitHandle::empty();
let mut handle = raw_window_handle::AppKitWindowHandle::empty();
handle.ns_window = self.window_handle as *mut _;
handle.ns_view = self.view_handle as *mut _;
raw_window_handle::RawWindowHandle::AppKit(handle)

View file

@ -1265,7 +1265,7 @@ impl Window {
unsafe impl raw_window_handle::HasRawWindowHandle for Window {
fn raw_window_handle(&self) -> raw_window_handle::RawWindowHandle {
let mut handle = raw_window_handle::WaylandHandle::empty();
let mut handle = raw_window_handle::WaylandWindowHandle::empty();
handle.surface = self.display.surface.as_ref().c_ptr() as *mut _ as *mut c_void;
handle.display = self
.display

View file

@ -332,7 +332,7 @@ pub struct Window {
unsafe impl raw_window_handle::HasRawWindowHandle for Window {
fn raw_window_handle(&self) -> raw_window_handle::RawWindowHandle {
let mut handle = raw_window_handle::XlibHandle::empty();
let mut handle = raw_window_handle::XlibWindowHandle::empty();
handle.window = self.handle;
handle.display = self.d.display as *mut core::ffi::c_void;
raw_window_handle::RawWindowHandle::Xlib(handle)

View file

@ -428,7 +428,7 @@ impl Menu {
unsafe impl raw_window_handle::HasRawWindowHandle for Window {
fn raw_window_handle(&self) -> raw_window_handle::RawWindowHandle {
//TODO: assign a different ID to each window
let handle = raw_window_handle::WebHandle::empty();
let handle = raw_window_handle::WebWindowHandle::empty();
raw_window_handle::RawWindowHandle::Web(handle)
}
}

View file

@ -509,7 +509,7 @@ pub struct Window {
unsafe impl raw_window_handle::HasRawWindowHandle for Window {
fn raw_window_handle(&self) -> raw_window_handle::RawWindowHandle {
let mut handle = raw_window_handle::Win32Handle::empty();
let mut handle = raw_window_handle::Win32WindowHandle::empty();
handle.hwnd = self.window.unwrap() as *mut raw::c_void;
handle.hinstance =
unsafe { libloaderapi::GetModuleHandleA(ptr::null()) } as *mut raw::c_void;