Switch XlibHandle window to c_ulong

This commit is contained in:
Mark Swanson
2020-01-01 10:49:00 -05:00
parent 2a2ab3dc2a
commit c757ba827b
3 changed files with 6 additions and 1 deletions

1
Cargo.lock generated
View File

@@ -624,6 +624,7 @@ name = "wgpu-native"
version = "0.4.0"
dependencies = [
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"raw-window-handle 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"wgpu-core 0.1.0",

View File

@@ -29,3 +29,5 @@ version = "0.1"
lazy_static = "1.1"
parking_lot = "0.9"
raw-window-handle = "0.3"
libc = {version="0.2", features=[]}

View File

@@ -8,6 +8,8 @@ use core::{gfx_select, hub::Token, id};
use std::{marker::PhantomData, slice};
use libc::{c_ulong};
pub type RequestAdapterCallback =
unsafe extern "C" fn(id: id::AdapterId, userdata: *mut std::ffi::c_void);
pub type BufferMapReadCallback =
@@ -78,7 +80,7 @@ pub fn wgpu_create_surface(raw_handle: raw_window_handle::RawWindowHandle) -> id
#[no_mangle]
pub extern "C" fn wgpu_create_surface_from_xlib(
display: *mut *const std::ffi::c_void,
window: u64,
window: c_ulong,
) -> id::SurfaceId {
use raw_window_handle::unix::XlibHandle;
wgpu_create_surface(raw_window_handle::RawWindowHandle::Xlib(XlibHandle {