-
-
Notifications
You must be signed in to change notification settings - Fork 198
Add gsk::RenderReplay bindings manually #2184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
16cf7ee to
52c17e6
Compare
gsk4/src/render_replay.rs
Outdated
| impl RenderReplay { | ||
| #[doc(alias = "gsk_render_replay_default")] | ||
| #[allow(clippy::should_implement_trait)] | ||
| pub fn default(&mut self, node: impl AsRef<RenderNode>) -> Option<RenderNode> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think any of those need &mut self
13e5bfa to
31ed695
Compare
gsk4/src/render_replay.rs
Outdated
| pub fn default(&self, node: impl AsRef<RenderNode>) -> Option<RenderNode> { | ||
| unsafe { | ||
| from_glib_full(ffi::gsk_render_replay_default( | ||
| self.to_glib_none_mut().0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You no longer have access to glib::translate::*, you should do self.ptr.as_ptr() for getters and as_mut_ptr for setters (those would require &mut self)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think https://docs.gtk.org/gsk4/struct.RenderReplay.html has any getter and I am not sure if the non set_ methods should be mut.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I settled for leaving only set_ methods as &mut self.
006fe2d to
8e972de
Compare
Generated by temporarily adding glib:get-type to the gir file, moving the generated file to src and then - Replace the glib::wrapper macro with `struct` and `impl Drop`. - Replace from_glib_borrow with Self(ptr) - Replace to_glib_none_mut with self.0.as_mut
8e972de to
3cec3c9
Compare
Generated by temporarily adding glib:get-type to the gir file, moving he
generated file to src and modifying the glib::wrapper macro.
This is based on top of #2183.