-
-
Notifications
You must be signed in to change notification settings - Fork 10
Fix PixbufFormat, regen Pixbuf #57
Fix PixbufFormat, regen Pixbuf #57
Conversation
d97b088
to
62d23bf
Compare
Ok, PR is finished, |
I agree. Once CI is good, it's good for me as well. |
Forgot to check async function, at minimum |
Generally looks good, good work :) will check later in detail, not ideal from the phone |
62d23bf
to
bad7e46
Compare
Updated. |
@sdroege Please, look at this if you have time. |
I will tomorrow, thanks for the reminder. I missed that something is left to be done here |
Also feel free to remind me sooner than ~2 weeks later for such things in the future :) |
|
||
fn composite_color_simple(&self, dest_width: i32, dest_height: i32, interp_type: InterpType, overall_alpha: i32, check_size: i32, color1: u32, color2: u32) -> Option<Pixbuf>; | ||
|
||
fn copy(&self) -> Option<Pixbuf>; |
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.
Can this really fail? And the others returning an Option
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.
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 will check all others later.
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.
Interesting
src/auto/pixbuf.rs
Outdated
|
||
//#[cfg(any(feature = "v2_36", feature = "dox"))] | ||
//fn save_to_streamv_async<'a, P: IsA</*Ignored*/gio::OutputStream>, Q: Into<Option<&'a gio::Cancellable>>, R: /*Ignored*/gio::AsyncReadyCallback>(&self, stream: &P, type_: &str, option_keys: &[&str], option_values: &[&str], cancellable: Q, callback: R); | ||
//fn save_to_streamv_async<'a, P: IsA<gio::OutputStream>, Q: Into<Option<&'a gio::Cancellable>>, R: /*Unimplemented*/gio::AsyncReadyCallback>(&self, stream: &P, type_: &str, option_keys: &[&str], option_values: &[&str], cancellable: Q, callback: R); | ||
|
||
fn savev(&self, filename: &str, type_: &str, option_keys: &[&str], option_values: &[&str]) -> Result<(), Error>; |
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.
This was already weird before, but it seems like this should be taking a options: &[(&str, &str)]
instead? It's probably unsafe now if the arrays are different length?
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 right. Maybe even options: &[(AsRef<str>, AsRef<str>)]
@@ -178,10 +163,44 @@ impl Pixbuf { | |||
} | |||
} | |||
|
|||
pub fn copy(&self) -> Pixbuf { |
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.
Here it also was not returning an Option.
Maybe take a diff of the API changes here to make sure the API is not regressing without noticing.
src/pixbuf.rs
Outdated
@@ -178,10 +163,44 @@ impl Pixbuf { | |||
} | |||
} | |||
|
|||
pub fn copy(&self) -> Pixbuf { | |||
pub fn get_file_info(filename: &str) -> Option<(PixbufFormat, i32, i32)> { |
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.
This should probably be a &Path?
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.
Yes, I change it to AsRef<Path>
@sdroege Updated with |
👍 |
Thanks! |
Closes #55
Closes #56
Closes #23
Build will fails until gtk-rs/glib#278
cc @GuillaumeGomez, @sdroege