Implemented three position-related functions for the Window struct: position, set_position, and the on_position_changed callback.
It's worth mentioning that I am very unsure on the details of how the callbacks work, so that I'm not super confident that on_position_changed is correct. However in testing, it seemed to be working as intended, so hopefully it's implemented properly and idiomatically.
Thanks a lot! I cherry picked the commit directly from your repo to rewrite the commit message. See commit 86138946d55. Merging this PR via Github is thus no longer necessary.
Implemented three position-related functions for the
Window
struct:position
,set_position
, and theon_position_changed
callback.It's worth mentioning that I am very unsure on the details of how the callbacks work, so that I'm not super confident that
on_position_changed
is correct. However in testing, it seemed to be working as intended, so hopefully it's implemented properly and idiomatically.