Skip to content

Commit

Permalink
Merge pull request #1264 from sdroege/0.18-backports
Browse files Browse the repository at this point in the history
0.18 backports
  • Loading branch information
sdroege authored Dec 30, 2023
2 parents 5a17fef + f21c9da commit 22c0f50
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cairo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ pub use crate::{
enums::*,
error::{BorrowError, Error, IoError, Result},
font::{
FontExtents, FontFace, FontOptions, FontSlant, FontType, FontWeight, Glyph, ScaledFont,
TextCluster, TextExtents, UserFontFace,
Antialias, FontExtents, FontFace, FontOptions, FontSlant, FontType, FontWeight, Glyph,
HintMetrics, HintStyle, ScaledFont, SubpixelOrder, TextCluster, TextExtents, UserFontFace,
},
image_surface::{ImageSurface, ImageSurfaceData, ImageSurfaceDataOwned},
matrices::Matrix,
Expand Down
5 changes: 3 additions & 2 deletions gdk-pixbuf/src/prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
// rustdoc-stripper-ignore-next
//! Traits intended for blanket imports.
#[doc(hidden)]
pub use gio::prelude::*;
#[doc(hidden)]
pub use glib::prelude::*;

#[doc(hidden)]
pub use gio::prelude::*;

pub use crate::{auto::traits::*, pixbuf_animation::PixbufAnimationExtManual};
3 changes: 2 additions & 1 deletion gdk-pixbuf/src/subclass/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ pub mod pixbuf_animation_iter;
pub mod pixbuf_loader;

pub mod prelude {
pub use gio::subclass::prelude::*;
pub use glib::subclass::prelude::*;

pub use gio::subclass::prelude::*;

pub use super::{
pixbuf_animation::{PixbufAnimationImpl, PixbufAnimationImplExt},
pixbuf_animation_iter::{PixbufAnimationIterImpl, PixbufAnimationIterImplExt},
Expand Down
4 changes: 4 additions & 0 deletions glib-macros/src/boxed_derive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,10 @@ pub fn impl_boxed(input: &syn::DeriveInput) -> TokenStream {

#impl_from_value

impl #crate_ident::translate::GlibPtrDefault for #name {
type GlibType = *mut #name;
}

impl #crate_ident::translate::FromGlibPtrBorrow<*const #name> for #name {
#[inline]
unsafe fn from_glib_borrow(ptr: *const #name) -> #crate_ident::translate::Borrowed<Self> {
Expand Down
4 changes: 4 additions & 0 deletions glib-macros/src/shared_boxed_derive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,10 @@ pub fn impl_shared_boxed(input: &syn::DeriveInput) -> proc_macro2::TokenStream {

#impl_from_value

impl #crate_ident::translate::GlibPtrDefault for #name {
type GlibType = *mut #refcounted_type_prefix::InnerType;
}

impl #crate_ident::translate::FromGlibPtrBorrow<*const #refcounted_type_prefix::InnerType> for #name {
#[inline]
unsafe fn from_glib_borrow(ptr: *const #refcounted_type_prefix::InnerType) -> #crate_ident::translate::Borrowed<Self> {
Expand Down

0 comments on commit 22c0f50

Please sign in to comment.