update deps
This commit is contained in:
parent
e31a11f1c7
commit
0d20459065
28
Cargo.toml
28
Cargo.toml
|
@ -19,16 +19,20 @@ default = ["opengl"]
|
|||
opengl = ["uuid", "x11/glx"]
|
||||
|
||||
[dependencies]
|
||||
keyboard-types = { version = "0.6.1", default-features = false }
|
||||
raw-window-handle = "0.6"
|
||||
keyboard-types = { version = "0.7.0", default-features = false }
|
||||
raw-window-handle = "0.6.2"
|
||||
|
||||
[target.'cfg(target_os="linux")'.dependencies]
|
||||
x11rb = { version = "0.13.0", features = ["cursor", "resource_manager", "allow-unsafe-code"] }
|
||||
x11 = { version = "2.21", features = ["xlib", "xlib_xcb"] }
|
||||
nix = "0.22.0"
|
||||
x11rb = { version = "0.13.1", features = [
|
||||
"cursor",
|
||||
"resource_manager",
|
||||
"allow-unsafe-code",
|
||||
] }
|
||||
x11 = { version = "2.21.0", features = ["xlib", "xlib_xcb"] }
|
||||
nix = { version = "0.29.0", features = ["poll"] }
|
||||
|
||||
[target.'cfg(target_os="windows")'.dependencies]
|
||||
winapi = { version = "0.3.8", features = [
|
||||
winapi = { version = "0.3.9", features = [
|
||||
"libloaderapi",
|
||||
"winuser",
|
||||
"windef",
|
||||
|
@ -42,17 +46,17 @@ winapi = { version = "0.3.8", features = [
|
|||
"shellapi",
|
||||
"winerror",
|
||||
] }
|
||||
uuid = { version = "0.8", features = ["v4"], optional = true }
|
||||
uuid = { version = "1.10.0", features = ["v4"], optional = true }
|
||||
|
||||
[target.'cfg(target_os="macos")'.dependencies]
|
||||
cocoa = "0.24.0"
|
||||
core-foundation = "0.9.1"
|
||||
cocoa = "0.26.0"
|
||||
core-foundation = "0.10.0"
|
||||
objc = "0.2.7"
|
||||
uuid = { version = "0.8", features = ["v4"] }
|
||||
uuid = { version = "1.10.0", features = ["v4"] }
|
||||
|
||||
[dev-dependencies]
|
||||
rtrb = "0.2"
|
||||
softbuffer = "0.3.4"
|
||||
rtrb = "0.3.1"
|
||||
softbuffer = "0.4.5"
|
||||
|
||||
[workspace]
|
||||
members = ["examples/render_femtovg"]
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
msrv = '1.59'
|
||||
msrv = '1.63'
|
||||
check-private-items = true
|
||||
|
|
|
@ -86,7 +86,7 @@ impl GlContext {
|
|||
|
||||
// Create temporary window and context to load function pointers
|
||||
|
||||
let class_name_str = format!("raw-gl-context-window-{}", uuid::Uuid::new_v4().to_simple());
|
||||
let class_name_str = format!("raw-gl-context-window-{}", uuid::Uuid::new_v4().simple());
|
||||
let mut class_name: Vec<WCHAR> = OsStr::new(&class_name_str).encode_wide().collect();
|
||||
class_name.push(0);
|
||||
|
||||
|
|
|
@ -138,7 +138,7 @@ unsafe fn create_view_class() -> &'static Class {
|
|||
// the class was stored in a OnceCell after creation. This way, we didn't
|
||||
// have to recreate it each time a view was opened, but now we don't leave
|
||||
// any class definitions lying around when the plugin is closed.
|
||||
let class_name = format!("BaseviewNSView_{}", Uuid::new_v4().to_simple());
|
||||
let class_name = format!("BaseviewNSView_{}", Uuid::new_v4().simple());
|
||||
let mut class = ClassDecl::new(&class_name, class!(NSView)).unwrap();
|
||||
|
||||
class.add_method(
|
||||
|
|
|
@ -5,7 +5,7 @@ use crate::{
|
|||
WindowInfo,
|
||||
};
|
||||
use std::error::Error;
|
||||
use std::os::fd::AsRawFd;
|
||||
use std::os::fd::AsFd;
|
||||
use std::time::{Duration, Instant};
|
||||
use x11rb::connection::Connection;
|
||||
use x11rb::protocol::Event as XEvent;
|
||||
|
@ -68,8 +68,6 @@ impl EventLoop {
|
|||
pub fn run(&mut self) -> Result<(), Box<dyn Error>> {
|
||||
use nix::poll::*;
|
||||
|
||||
let xcb_fd = self.window.xcb_connection.conn.as_raw_fd();
|
||||
|
||||
let mut last_frame = Instant::now();
|
||||
self.event_loop_running = true;
|
||||
|
||||
|
@ -86,14 +84,14 @@ impl EventLoop {
|
|||
last_frame = Instant::max(next_frame, Instant::now() - self.frame_interval);
|
||||
}
|
||||
|
||||
let mut fds = [PollFd::new(xcb_fd, PollFlags::POLLIN)];
|
||||
|
||||
// Check for any events in the internal buffers
|
||||
// before going to sleep:
|
||||
self.drain_xcb_events()?;
|
||||
|
||||
let mut fds = [PollFd::new(self.window.xcb_connection.conn.as_fd(), PollFlags::POLLIN)];
|
||||
|
||||
// FIXME: handle errors
|
||||
poll(&mut fds, next_frame.duration_since(Instant::now()).subsec_millis() as i32)
|
||||
poll(&mut fds, next_frame.duration_since(Instant::now()).subsec_millis() as u16)
|
||||
.unwrap();
|
||||
|
||||
if let Some(revents) = fds[0].revents() {
|
||||
|
|
Loading…
Reference in a new issue