From 02aa384cca50eb82dd4b1fcbe8f37dc172c105e8 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Tue, 1 Jun 2021 14:58:12 +0200 Subject: [PATCH] Generate missing doc aliases for newtypes --- cairo/src/device.rs | 1 + cairo/src/font/font_face.rs | 2 ++ cairo/src/font/font_options.rs | 2 ++ cairo/src/font/scaled_font.rs | 2 ++ cairo/src/surface.rs | 1 + cairo/src/xcb.rs | 4 ++++ gdk-pixbuf/src/pixbuf_animation_iter.rs | 1 + glib/src/array.rs | 1 + glib/src/byte_array.rs | 1 + glib/src/bytes.rs | 1 + glib/src/closure.rs | 1 + glib/src/date.rs | 1 + glib/src/enums.rs | 4 ++++ glib/src/error.rs | 1 + glib/src/object.rs | 2 ++ glib/src/param_spec.rs | 1 + glib/src/source.rs | 1 + glib/src/string.rs | 1 + glib/src/thread_pool.rs | 1 + glib/src/translate.rs | 4 ++++ glib/src/value.rs | 2 ++ glib/src/value_array.rs | 1 + glib/src/variant.rs | 1 + glib/src/variant_dict.rs | 1 + pango/src/attr_class.rs | 1 + pango/src/coverage.rs | 2 ++ pango/src/glyph.rs | 1 + pango/src/language.rs | 1 + 28 files changed, 43 insertions(+) diff --git a/cairo/src/device.rs b/cairo/src/device.rs index f98774382713..6c7bfc4c1626 100644 --- a/cairo/src/device.rs +++ b/cairo/src/device.rs @@ -33,6 +33,7 @@ impl<'a> Drop for DeviceAcquireGuard<'a> { } #[derive(Debug)] +#[doc(alias = "cairo_device_t")] pub struct Device(ptr::NonNull); impl Device { diff --git a/cairo/src/font/font_face.rs b/cairo/src/font/font_face.rs index fe74cd9c8530..560db111a7c1 100644 --- a/cairo/src/font/font_face.rs +++ b/cairo/src/font/font_face.rs @@ -19,6 +19,7 @@ use crate::utils::status_to_result; #[cfg(feature = "use_glib")] glib::wrapper! { #[derive(Debug)] + #[doc(alias = "cairo_font_face_t")] pub struct FontFace(Shared); match fn { @@ -30,6 +31,7 @@ glib::wrapper! { #[cfg(not(feature = "use_glib"))] #[derive(Debug)] +#[doc(alias = "cairo_font_face_t")] pub struct FontFace(ptr::NonNull); impl FontFace { diff --git a/cairo/src/font/font_options.rs b/cairo/src/font/font_options.rs index d190b62fdb9f..3d080989c854 100644 --- a/cairo/src/font/font_options.rs +++ b/cairo/src/font/font_options.rs @@ -21,6 +21,7 @@ use crate::{ #[cfg(feature = "use_glib")] glib::wrapper! { #[derive(Debug)] + #[doc(alias = "cairo_font_options_t")] pub struct FontOptions(Boxed); match fn { @@ -37,6 +38,7 @@ glib::wrapper! { #[cfg(not(feature = "use_glib"))] #[derive(Debug)] +#[doc(alias = "cairo_font_options_t")] pub struct FontOptions(ptr::NonNull); impl FontOptions { diff --git a/cairo/src/font/scaled_font.rs b/cairo/src/font/scaled_font.rs index ef7eb5d303e9..e84c51d8cf73 100644 --- a/cairo/src/font/scaled_font.rs +++ b/cairo/src/font/scaled_font.rs @@ -15,6 +15,7 @@ use super::{FontFace, FontOptions}; #[cfg(feature = "use_glib")] glib::wrapper! { #[derive(Debug)] + #[doc(alias = "cairo_scaled_font_t")] pub struct ScaledFont(Shared); match fn { @@ -26,6 +27,7 @@ glib::wrapper! { #[cfg(not(feature = "use_glib"))] #[derive(Debug)] +#[doc(alias = "cairo_scaled_font_t")] pub struct ScaledFont(ptr::NonNull); impl ScaledFont { diff --git a/cairo/src/surface.rs b/cairo/src/surface.rs index dc4aed6a2d3a..62494f999426 100644 --- a/cairo/src/surface.rs +++ b/cairo/src/surface.rs @@ -19,6 +19,7 @@ use crate::rectangle::Rectangle; use crate::rectangle_int::RectangleInt; #[derive(Debug)] +#[doc(alias = "cairo_surface_t")] pub struct Surface(ptr::NonNull); impl Surface { diff --git a/cairo/src/xcb.rs b/cairo/src/xcb.rs index 064c00e9a51a..cffe26dc53fc 100644 --- a/cairo/src/xcb.rs +++ b/cairo/src/xcb.rs @@ -42,6 +42,7 @@ impl fmt::Display for XCBPixmap { } #[derive(Debug)] +#[doc(alias = "xcb_connection_t")] pub struct XCBConnection(pub ptr::NonNull); impl XCBConnection { @@ -112,6 +113,7 @@ impl fmt::Display for XCBConnection { } #[derive(Debug)] +#[doc(alias = "xcb_render_pictforminfo_t")] pub struct XCBRenderPictFormInfo(pub ptr::NonNull); impl XCBRenderPictFormInfo { @@ -188,6 +190,7 @@ impl fmt::Display for XCBRenderPictFormInfo { } #[derive(Debug)] +#[doc(alias = "xcb_screen_t")] pub struct XCBScreen(pub ptr::NonNull); impl XCBScreen { @@ -349,6 +352,7 @@ impl XCBSurface { } #[derive(Debug)] +#[doc(alias = "xcb_visualtype_t")] pub struct XCBVisualType(pub ptr::NonNull); impl XCBVisualType { diff --git a/gdk-pixbuf/src/pixbuf_animation_iter.rs b/gdk-pixbuf/src/pixbuf_animation_iter.rs index 9eecb8e16860..2f840febf480 100644 --- a/gdk-pixbuf/src/pixbuf_animation_iter.rs +++ b/gdk-pixbuf/src/pixbuf_animation_iter.rs @@ -6,6 +6,7 @@ use glib::translate::*; use std::time::SystemTime; glib::wrapper! { + #[doc(alias = "GdkPixbufAnimationIter")] pub struct PixbufAnimationIter(Object); match fn { diff --git a/glib/src/array.rs b/glib/src/array.rs index 5926bf9bea86..1d041df309b1 100644 --- a/glib/src/array.rs +++ b/glib/src/array.rs @@ -5,6 +5,7 @@ use std::fmt; wrapper! { #[derive(PartialEq, Eq, PartialOrd, Ord, Hash)] + #[doc(alias = "GArray")] pub struct Array(Shared); match fn { diff --git a/glib/src/byte_array.rs b/glib/src/byte_array.rs index 4c041675f4c9..3f187f8a0ce2 100644 --- a/glib/src/byte_array.rs +++ b/glib/src/byte_array.rs @@ -25,6 +25,7 @@ use std::slice; use crate::Bytes; wrapper! { + #[doc(alias = "GByteArray")] pub struct ByteArray(Shared); match fn { diff --git a/glib/src/bytes.rs b/glib/src/bytes.rs index c2dec23d6447..3c6c79053aa7 100644 --- a/glib/src/bytes.rs +++ b/glib/src/bytes.rs @@ -25,6 +25,7 @@ wrapper! { /// let b = Bytes::from_static(s); /// assert_eq!(&s[..], b); /// ``` + #[doc(alias = "GBytes")] pub struct Bytes(Shared); match fn { diff --git a/glib/src/closure.rs b/glib/src/closure.rs index 5a447cf92ea3..e60aa5dbd06e 100644 --- a/glib/src/closure.rs +++ b/glib/src/closure.rs @@ -14,6 +14,7 @@ use crate::Value; wrapper! { #[derive(PartialEq, Eq, PartialOrd, Ord, Debug, Hash)] + #[doc(alias = "GClosure")] pub struct Closure(Shared); match fn { diff --git a/glib/src/date.rs b/glib/src/date.rs index 0435fc17ecbf..66aabfc91e82 100644 --- a/glib/src/date.rs +++ b/glib/src/date.rs @@ -11,6 +11,7 @@ use std::fmt; use std::hash; wrapper! { + #[doc(alias = "GDate")] pub struct Date(Boxed); match fn { diff --git a/glib/src/enums.rs b/glib/src/enums.rs index 300f1eb0c023..9b3890b1241f 100644 --- a/glib/src/enums.rs +++ b/glib/src/enums.rs @@ -51,6 +51,7 @@ impl IntoGlib for UserDirectory { /// Representation of an `enum` for dynamically, at runtime, querying the values of the enum and /// using them. #[derive(Debug)] +#[doc(alias = "GEnumClass")] pub struct EnumClass(*mut gobject_ffi::GEnumClass); unsafe impl Send for EnumClass {} @@ -177,6 +178,7 @@ impl Clone for EnumClass { /// Representation of a single enum value of an `EnumClass`. #[derive(Debug, Clone)] +#[doc(alias = "GEnumValue, EnumClass")] pub struct EnumValue(*const gobject_ffi::GEnumValue, EnumClass); unsafe impl Send for EnumValue {} @@ -248,6 +250,7 @@ impl Ord for EnumValue { /// Representation of a `flags` for dynamically, at runtime, querying the values of the enum and /// using them #[derive(Debug)] +#[doc(alias = "GFlagsClass")] pub struct FlagsClass(*mut gobject_ffi::GFlagsClass); unsafe impl Send for FlagsClass {} @@ -561,6 +564,7 @@ impl Clone for FlagsClass { /// Representation of a single flags value of a `FlagsClass`. #[derive(Debug, Clone)] +#[doc(alias = "GFlagsValue, FlagsClass")] pub struct FlagsValue(*const gobject_ffi::GFlagsValue, FlagsClass); unsafe impl Send for FlagsValue {} diff --git a/glib/src/error.rs b/glib/src/error.rs index 9f42c66116d6..4b4dc090bace 100644 --- a/glib/src/error.rs +++ b/glib/src/error.rs @@ -14,6 +14,7 @@ use std::str; wrapper! { /// A generic error capable of representing various error domains (types). #[derive(PartialEq, Eq, PartialOrd, Ord, Hash)] + #[doc(alias = "GError")] pub struct Error(Boxed); match fn { diff --git a/glib/src/object.rs b/glib/src/object.rs index 04aa0cd1083f..47db9773303b 100644 --- a/glib/src/object.rs +++ b/glib/src/object.rs @@ -2422,6 +2422,7 @@ impl ObjectClass { } wrapper! { + #[doc(alias = "GInitiallyUnowned, gobject_")] pub struct InitiallyUnowned(Object); match fn { @@ -2430,6 +2431,7 @@ wrapper! { } #[derive(Debug)] +#[doc(alias = "GWeakRef")] pub struct WeakRef(Pin>, PhantomData<*mut T>); impl WeakRef { diff --git a/glib/src/param_spec.rs b/glib/src/param_spec.rs index 989976188730..1214b1f4b209 100644 --- a/glib/src/param_spec.rs +++ b/glib/src/param_spec.rs @@ -14,6 +14,7 @@ use std::ffi::CStr; // Can't use get_type here as this is not a boxed type but another fundamental type wrapper! { #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[doc(alias = "GParamSpec")] pub struct ParamSpec(Shared); match fn { diff --git a/glib/src/source.rs b/glib/src/source.rs index f19cd1c64a17..be13f1a52ab0 100644 --- a/glib/src/source.rs +++ b/glib/src/source.rs @@ -38,6 +38,7 @@ impl FromGlib for SourceId { /// Process identificator #[derive(Copy, Clone, Debug, Eq, PartialEq)] +#[doc(alias = "GPid")] pub struct Pid(pub ffi::GPid); unsafe impl Send for Pid {} diff --git a/glib/src/string.rs b/glib/src/string.rs index 6c417bff7fdd..ea6103d2c971 100644 --- a/glib/src/string.rs +++ b/glib/src/string.rs @@ -13,6 +13,7 @@ use std::str; wrapper! { /// A mutable text buffer that grows automatically. + #[doc(alias = "GString")] pub struct String(Boxed); match fn { diff --git a/glib/src/thread_pool.rs b/glib/src/thread_pool.rs index 7938ee23b80a..2a1546995470 100644 --- a/glib/src/thread_pool.rs +++ b/glib/src/thread_pool.rs @@ -7,6 +7,7 @@ use std::future::Future; use std::ptr; #[derive(Debug)] +#[doc(alias = "GThreadPool")] pub struct ThreadPool(ptr::NonNull); unsafe impl Send for ThreadPool {} diff --git a/glib/src/translate.rs b/glib/src/translate.rs index e22b5558ebe9..7a84e1168479 100644 --- a/glib/src/translate.rs +++ b/glib/src/translate.rs @@ -935,6 +935,7 @@ where } } +#[doc(alias = "GList")] pub struct List(*mut ffi::GList); impl Drop for List { @@ -1015,6 +1016,7 @@ where } } +#[doc(alias = "GSList")] pub struct SList(*mut ffi::GSList); impl Drop for SList { @@ -1073,6 +1075,7 @@ impl<'a> ToGlibPtr<'a, *mut ffi::GHashTable> for HashMap { } } +#[doc(alias = "GHashTable")] pub struct HashTable(*mut ffi::GHashTable); impl Drop for HashTable { @@ -1081,6 +1084,7 @@ impl Drop for HashTable { } } +#[doc(alias = "GPtrArray")] pub struct PtrArray(*mut ffi::GPtrArray); impl Drop for PtrArray { diff --git a/glib/src/value.rs b/glib/src/value.rs index dbaefff3fd54..0c2be33853db 100644 --- a/glib/src/value.rs +++ b/glib/src/value.rs @@ -310,6 +310,7 @@ impl ToValueOptional for &T { /// See the [module documentation](index.html) for more details. // TODO: Should use impl !Send for Value {} once stable #[repr(transparent)] +#[doc(alias = "GValue")] pub struct Value(pub(crate) gobject_ffi::GValue); impl Value { @@ -688,6 +689,7 @@ macro_rules! from_glib { from_glib!(Value, |v| v); +#[doc(alias = "GValue")] pub struct ValueArray(Vec); impl Drop for ValueArray { diff --git a/glib/src/value_array.rs b/glib/src/value_array.rs index 68479c23d2d8..50f39a0f3311 100644 --- a/glib/src/value_array.rs +++ b/glib/src/value_array.rs @@ -8,6 +8,7 @@ use std::slice; wrapper! { #[derive(Debug)] + #[doc(alias = "GValueArray")] pub struct ValueArray(Boxed); match fn { diff --git a/glib/src/variant.rs b/glib/src/variant.rs index 9526a6f5f985..a614d09ed09f 100644 --- a/glib/src/variant.rs +++ b/glib/src/variant.rs @@ -103,6 +103,7 @@ wrapper! { /// A generic immutable value capable of carrying various types. /// /// See the [module documentation](index.html) for more details. + #[doc(alias = "GVariant")] pub struct Variant(Shared); match fn { diff --git a/glib/src/variant_dict.rs b/glib/src/variant_dict.rs index 3330fcdfbeb2..89b6ebd7be2b 100644 --- a/glib/src/variant_dict.rs +++ b/glib/src/variant_dict.rs @@ -18,6 +18,7 @@ wrapper! { /// /// Note, pretty much all methods on this struct will panic if the /// [`end_unsafe()`](#method.end_unsafe) method was called on the instance. + #[doc(alias = "GVariantDict")] pub struct VariantDict(Shared); match fn { diff --git a/pango/src/attr_class.rs b/pango/src/attr_class.rs index 73c72d1e2cee..dc7ee1242423 100644 --- a/pango/src/attr_class.rs +++ b/pango/src/attr_class.rs @@ -44,6 +44,7 @@ impl FromGlibPtrFull<*const ffi::PangoAttrClass> for AttrClass { } } +#[doc(alias = "PangoAttrClass")] pub struct AttrClass(*mut ffi::PangoAttrClass); impl AttrClass { diff --git a/pango/src/coverage.rs b/pango/src/coverage.rs index 619223a23fc0..eac9af13ec94 100644 --- a/pango/src/coverage.rs +++ b/pango/src/coverage.rs @@ -8,6 +8,7 @@ use std::ptr; #[cfg(any(feature = "v1_44", feature = "dox"))] glib::wrapper! { + #[doc(alias = "PangoCoverage")] pub struct Coverage(Object); match fn { @@ -19,6 +20,7 @@ glib::wrapper! { #[cfg(not(any(feature = "v1_44", feature = "dox")))] glib::wrapper! { #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[doc(alias = "PangoCoverage")] pub struct Coverage(Shared); match fn { diff --git a/pango/src/glyph.rs b/pango/src/glyph.rs index 57f1f4215aa7..55fbc8b09c67 100644 --- a/pango/src/glyph.rs +++ b/pango/src/glyph.rs @@ -33,6 +33,7 @@ impl GlyphItem { } #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] +#[doc(alias = "PangoGlyphInfo")] pub struct GlyphInfo(*mut ffi::PangoGlyphInfo); impl GlyphInfo { diff --git a/pango/src/language.rs b/pango/src/language.rs index 5e8cd1af90b0..3fbe5676cf01 100644 --- a/pango/src/language.rs +++ b/pango/src/language.rs @@ -4,6 +4,7 @@ use crate::Script; use glib::translate::*; use glib::GString; +#[doc(alias = "PangoLanguage")] pub struct Language(*mut ffi::PangoLanguage); #[doc(hidden)]