deno-windowing / dwm

Deno Window Manager: Cross-platform window creation and management
https://deno.land/x/dwm
Apache License 2.0
138 stars 10 forks source link

feat(core) Add Mouse capture support, set/get mouse pos, set custom cursor image #12

Closed hironichu closed 1 year ago

hironichu commented 1 year ago

Hello,

I wanted to use DWM few days ago and found out that few methods were not yet implemented with GLFW,

This PR is adding some specific bindings that I needed for my prototype :

As a "bonus" i tried implementing setCustomCursor using the new FFI structs, tho I am very new to this so it might be something to re-write (it should work tho?)

Putting this PR in draft for now.

load1n9 commented 1 year ago

looking good so far

load1n9 commented 1 year ago

maybe also make an example for this

DjDeveloperr commented 1 year ago

LGTM. Is it tested? Can you add an example in examples/ to demonstrate the API?

hironichu commented 1 year ago

I have tested this myself and it works (on mac and windows as far as I know), will add examples later today.

hironichu commented 1 year ago

I made two examples for the methods that really needed it, there are other stuff we can do with glfwSetInputMode but going into detail can be done by just reading Glfw doc, same for glfwRawMouseMotionSupported