-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
Regenerate with latest gir #1091
Changes from all commits
5955da9
1bd7eb3
3c0e253
55210d5
35261c4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -137,28 +137,15 @@ impl PixbufAnimation { | |
} | ||
} | ||
|
||
pub trait PixbufAnimationExt: 'static { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Before merging this we should make sure that it's impossible for external code to implement these traits on anything. Otherwise we need to mark the trait unsafe or implement one of the many sealing mechanisms. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have opened #1093 to keep track of this task There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think that is already happening as it requires There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could we merge this now? |
||
pub trait PixbufAnimationExt: IsA<PixbufAnimation> + 'static { | ||
#[doc(alias = "gdk_pixbuf_animation_get_height")] | ||
#[doc(alias = "get_height")] | ||
fn height(&self) -> i32; | ||
|
||
#[doc(alias = "gdk_pixbuf_animation_get_static_image")] | ||
#[doc(alias = "get_static_image")] | ||
fn static_image(&self) -> Option<Pixbuf>; | ||
|
||
#[doc(alias = "gdk_pixbuf_animation_get_width")] | ||
#[doc(alias = "get_width")] | ||
fn width(&self) -> i32; | ||
|
||
#[doc(alias = "gdk_pixbuf_animation_is_static_image")] | ||
fn is_static_image(&self) -> bool; | ||
} | ||
|
||
impl<O: IsA<PixbufAnimation>> PixbufAnimationExt for O { | ||
fn height(&self) -> i32 { | ||
unsafe { ffi::gdk_pixbuf_animation_get_height(self.as_ref().to_glib_none().0) } | ||
} | ||
|
||
#[doc(alias = "gdk_pixbuf_animation_get_static_image")] | ||
#[doc(alias = "get_static_image")] | ||
fn static_image(&self) -> Option<Pixbuf> { | ||
unsafe { | ||
from_glib_none(ffi::gdk_pixbuf_animation_get_static_image( | ||
|
@@ -167,10 +154,13 @@ impl<O: IsA<PixbufAnimation>> PixbufAnimationExt for O { | |
} | ||
} | ||
|
||
#[doc(alias = "gdk_pixbuf_animation_get_width")] | ||
#[doc(alias = "get_width")] | ||
fn width(&self) -> i32 { | ||
unsafe { ffi::gdk_pixbuf_animation_get_width(self.as_ref().to_glib_none().0) } | ||
} | ||
|
||
#[doc(alias = "gdk_pixbuf_animation_is_static_image")] | ||
fn is_static_image(&self) -> bool { | ||
unsafe { | ||
from_glib(ffi::gdk_pixbuf_animation_is_static_image( | ||
|
@@ -180,6 +170,8 @@ impl<O: IsA<PixbufAnimation>> PixbufAnimationExt for O { | |
} | ||
} | ||
|
||
impl<O: IsA<PixbufAnimation>> PixbufAnimationExt for O {} | ||
|
||
impl fmt::Display for PixbufAnimation { | ||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { | ||
f.write_str("PixbufAnimation") | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
Generated by gir (https://github.com/gtk-rs/gir @ 6a0603f52c3c) | ||
from gir-files (https://github.com/gtk-rs/gir-files @ b42700b30bb2) | ||
Generated by gir (https://github.com/gtk-rs/gir @ bf8c5e344a73) | ||
from gir-files (https://github.com/gtk-rs/gir-files @ 43cac7495ff5) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
Generated by gir (https://github.com/gtk-rs/gir @ 6a0603f52c3c) | ||
from gir-files (https://github.com/gtk-rs/gir-files @ b42700b30bb2) | ||
Generated by gir (https://github.com/gtk-rs/gir @ bf8c5e344a73) | ||
from gir-files (https://github.com/gtk-rs/gir-files @ 43cac7495ff5) |
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.
That should be a clippy lint.
EDIT: I made myself a memo to add it.