UndeadLeech on FreenodeIf you really dislike Qt, why are you letting it create windows for you?
fuzbuz on FreenodeI'm not. Someone else is and then giving me the window handle.
UndeadLeech on FreenodeAre you being held hostage?
fuzbuz on FreenodeIn the literal sense, no. I do like keeping my boss happy, though.
UndeadLeech on FreenodeWhat exactly do you want winit to do for you?
fuzbuz on FreenodeThe Rust code takes a winit Window as an argument for the rendering. If there's a nice way to turn a raw handle into a winit Window, I don't have to change the rendering library - it will just fit. If there's not a nice way, I can work around it.
fuzbuz on FreenodeAt some point the rendering code has to turn it back into a raw handle for OS reasons, I can just add a function that passes an already-raw-handle down to that level.
fuzbuz on FreenodeBut it would be nice if I didn't have to do that.
UndeadLeech on FreenodeIs that a crate, or did you write the rendering library yourself? Fundamentally taking just a winit window for rendering doesn't make a ton of sense.
fuzbuz on FreenodeI have a rendering crate that is used in several Rust-only projects. The rendering crate takes a winit Window to provide the rendering context as the Rust-only projects use winit for managing the windows and window events. A new project, mostly in C++, wants to also use the rendering code and can provide me with a raw window handle.
fuzbuz on FreenodeI'm just curious if there is a way to do the former that I am failing to discover by reading the docs
UndeadLeech on FreenodeWhich should be documented in winit's documentation.
UndeadLeech on Freenodehttps://docs.rs/winit/0.23.0/winit/event_loop/struct.EventLoop.html#method.new
UndeadLeech on FreenodeI don't see how it could be any more clear tbh.
UndeadLeech on FreenodeYou're aware that EventLoop is !Send + !Sync, right?
UndeadLeech on FreenodeBut I don't see why you would ever do that.
UndeadLeech on FreenodeSince that just increases latency.
Ralith > <@freenode_fuzbuz:matrix.org> As I'm making the C FFI interface for the rendering crate, I need to either turn that raw handle into a winit Window or I need to make changes to the rendering to allow using raw handles. The former is cleaner but the latter isn't a problem.
the latter is definitely the idiomatic thing to do, fwiw; this is the problem raw-window-handle was intended to solve in the first place
arturkovacsHas anyone made a winit app that can do this?
arturkovacsYeah, not an issue, I can associate the filetype to my app but the problem relies in that macOS doesn't seem to use the program arguments to specify the file that the user selected. Instead there's an event that the application receives that tells the path to the files
arturkovacsUndeadLeech: What I meant by event is that this function gets called: https://developer.apple.com/documentation/appkit/nsapplicationdelegate/1428612-application?language=objc
UndeadLeech on FreenodeThat seems unnecessarily complicated, so that's probably how it works on macOS, yes. :)
arturkovacsHaha. As I was looking around I found other callback that can be registered for essentially the same thing from what I could tell but this was the one that worked when I tested with a minimal Objective-C test app
arturkovacs* Haha. As I was looking around I found other callbacks that can be registered for essentially the same thing from what I could tell but this was the one that worked when I tested with a minimal Objective-C test app
arturkovacsBased on the feedback I got so far it seems to me that this is a missing feature so I opened: rust-windowing/winit#1751
UndeadLeech on FreenodeIt certainly can emit it.
kchibisov on FreenodeIs Francesca here though?
ildarIs it worth asking here about it?
kchibisov on FreenodeI think, I'm not aware of any other channel to talk about winit/glutin.
ildar > <@freenode_kchibisov:matrix.org> Is Francesca here though?