Skip to content
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

Add missing 1.12 items #241

Merged
merged 7 commits into from Feb 17, 2019

Conversation

Projects
None yet
2 participants
@GuillaumeGomez
Copy link
Member

GuillaumeGomez commented Feb 13, 2019

@sdroege

This comment has been minimized.

Copy link
Member

sdroege commented Feb 13, 2019

You mean 1.12?

@GuillaumeGomez

This comment has been minimized.

Copy link
Member Author

GuillaumeGomez commented Feb 13, 2019

... Indeed.

@GuillaumeGomez GuillaumeGomez changed the title Add missing 1.10 items Add missing 1.12 items Feb 13, 2019

@GuillaumeGomez GuillaumeGomez force-pushed the GuillaumeGomez:feature-1-10 branch from 0afc567 to 1346d17 Feb 13, 2019

Show resolved Hide resolved src/device.rs
Show resolved Hide resolved src/surface.rs Outdated

GuillaumeGomez added some commits Feb 13, 2019

Show resolved Hide resolved src/xcb.rs
Show resolved Hide resolved src/recording_surface.rs Outdated
@GuillaumeGomez

This comment has been minimized.

Copy link
Member Author

GuillaumeGomez commented Feb 14, 2019

Added the MappedImageSurface type. :)

@sdroege

This comment has been minimized.

Copy link
Member

sdroege commented on src/surface.rs in 3cbd5a9 Feb 14, 2019

#[derive(Debug)] :)

@sdroege

This comment has been minimized.

Copy link
Member

sdroege commented on src/surface.rs in 3cbd5a9 Feb 14, 2019

self.image_surface.to_raw_full(). According to the docs this takes ownership of the argument.

@GuillaumeGomez

This comment has been minimized.

Copy link
Member Author

GuillaumeGomez commented Feb 15, 2019

self.image_surface.to_raw_full(). According to the docs this takes ownership of the argument.

Problem being that there is no to_raw_full method implemented anywhere in cairo...

@GuillaumeGomez GuillaumeGomez force-pushed the GuillaumeGomez:feature-1-10 branch from 6b9dbbf to 36959e4 Feb 15, 2019

@sdroege

This comment has been minimized.

Copy link
Member

sdroege commented Feb 15, 2019

self.image_surface.to_raw_full(). According to the docs this takes ownership of the argument.

Problem being that there is no to_raw_full method implemented anywhere in cairo...

Then add one here :)

@sdroege

This comment has been minimized.

Copy link
Member

sdroege commented Feb 15, 2019

self.image_surface.to_raw_full(). According to the docs this takes ownership of the argument.

Problem being that there is no to_raw_full method implemented anywhere in cairo...

Then add one here :)

Or alternatively to to_raw_none and call `ref() on the returned pointer afterwards manually.

Show resolved Hide resolved .travis.yml Outdated

@GuillaumeGomez GuillaumeGomez force-pushed the GuillaumeGomez:feature-1-10 branch from 4b6261a to f39b886 Feb 15, 2019

debug_impl!(cairo_device_t);

#[repr(C)]
#[derive(Copy,Clone,Debug)]
pub struct cairo_pattern_t(u8);

This comment has been minimized.

@sdroege

sdroege Feb 16, 2019

Member

Elsewhere we use a tuple struct around c_void for this. That's probably a better idea, also to keep it consistent (please check if other things have the same problem).

}
}
_ => {
panic!("invalid device type")

This comment has been minimized.

@sdroege

sdroege Feb 16, 2019

Member

Maybe here (and elsewhere) you want to print the actual device type in the panic?

@@ -0,0 +1,122 @@
// Copyright 2015, The Gtk-rs Project Developers.

This comment has been minimized.

@sdroege

sdroege Feb 16, 2019

Member

It's 2019

This comment has been minimized.

@GuillaumeGomez

GuillaumeGomez Feb 16, 2019

Author Member

I was so close!

Some(ref e) => ffi::cairo_surface_map_to_image(self.to_raw_none(), e.to_raw_none()),
None => ffi::cairo_surface_map_to_image(self.to_raw_none(), 0 as *const _),
};
if p.is_null() {

This comment has been minimized.

@sdroege

sdroege Feb 16, 2019

Member

If you read the docs: this function never returns NULL but like with many other cairo functions you have to check the status of the returned surface.

This comment has been minimized.

@sdroege

sdroege Feb 16, 2019

Member

I.e. it would also return a Result and not an Option

@sdroege

This comment has been minimized.

Copy link
Member

sdroege commented Feb 16, 2019

Otherwise good to go for me

@sdroege

This comment has been minimized.

Copy link
Member

sdroege commented Feb 17, 2019

🎊 let's get it in then :)

@GuillaumeGomez

This comment has been minimized.

Copy link
Member Author

GuillaumeGomez commented Feb 17, 2019

Thanks for your review!

@GuillaumeGomez GuillaumeGomez merged commit e6567eb into gtk-rs:master Feb 17, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@GuillaumeGomez GuillaumeGomez deleted the GuillaumeGomez:feature-1-10 branch Feb 17, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.