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

Generate missing doc aliases for newtypes #108

Merged
merged 1 commit into from Jun 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions cairo/src/device.rs
Expand Up @@ -33,6 +33,7 @@ impl<'a> Drop for DeviceAcquireGuard<'a> {
}

#[derive(Debug)]
#[doc(alias = "cairo_device_t")]
pub struct Device(ptr::NonNull<ffi::cairo_device_t>);

impl Device {
Expand Down
2 changes: 2 additions & 0 deletions cairo/src/font/font_face.rs
Expand Up @@ -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<ffi::cairo_font_face_t>);

match fn {
Expand All @@ -30,6 +31,7 @@ glib::wrapper! {

#[cfg(not(feature = "use_glib"))]
#[derive(Debug)]
#[doc(alias = "cairo_font_face_t")]
pub struct FontFace(ptr::NonNull<ffi::cairo_font_face_t>);

impl FontFace {
Expand Down
2 changes: 2 additions & 0 deletions cairo/src/font/font_options.rs
Expand Up @@ -21,6 +21,7 @@ use crate::{
#[cfg(feature = "use_glib")]
glib::wrapper! {
#[derive(Debug)]
#[doc(alias = "cairo_font_options_t")]
pub struct FontOptions(Boxed<ffi::cairo_font_options_t>);

match fn {
Expand All @@ -37,6 +38,7 @@ glib::wrapper! {

#[cfg(not(feature = "use_glib"))]
#[derive(Debug)]
#[doc(alias = "cairo_font_options_t")]
pub struct FontOptions(ptr::NonNull<ffi::cairo_font_options_t>);

impl FontOptions {
Expand Down
2 changes: 2 additions & 0 deletions cairo/src/font/scaled_font.rs
Expand Up @@ -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<ffi::cairo_scaled_font_t>);

match fn {
Expand All @@ -26,6 +27,7 @@ glib::wrapper! {

#[cfg(not(feature = "use_glib"))]
#[derive(Debug)]
#[doc(alias = "cairo_scaled_font_t")]
pub struct ScaledFont(ptr::NonNull<ffi::cairo_scaled_font_t>);

impl ScaledFont {
Expand Down
1 change: 1 addition & 0 deletions cairo/src/surface.rs
Expand Up @@ -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<ffi::cairo_surface_t>);

impl Surface {
Expand Down
4 changes: 4 additions & 0 deletions cairo/src/xcb.rs
Expand Up @@ -42,6 +42,7 @@ impl fmt::Display for XCBPixmap {
}

#[derive(Debug)]
#[doc(alias = "xcb_connection_t")]
pub struct XCBConnection(pub ptr::NonNull<ffi::xcb_connection_t>);

impl XCBConnection {
Expand Down Expand Up @@ -112,6 +113,7 @@ impl fmt::Display for XCBConnection {
}

#[derive(Debug)]
#[doc(alias = "xcb_render_pictforminfo_t")]
pub struct XCBRenderPictFormInfo(pub ptr::NonNull<ffi::xcb_render_pictforminfo_t>);

impl XCBRenderPictFormInfo {
Expand Down Expand Up @@ -188,6 +190,7 @@ impl fmt::Display for XCBRenderPictFormInfo {
}

#[derive(Debug)]
#[doc(alias = "xcb_screen_t")]
pub struct XCBScreen(pub ptr::NonNull<ffi::xcb_screen_t>);

impl XCBScreen {
Expand Down Expand Up @@ -349,6 +352,7 @@ impl XCBSurface {
}

#[derive(Debug)]
#[doc(alias = "xcb_visualtype_t")]
pub struct XCBVisualType(pub ptr::NonNull<ffi::xcb_visualtype_t>);

impl XCBVisualType {
Expand Down
1 change: 1 addition & 0 deletions gdk-pixbuf/src/pixbuf_animation_iter.rs
Expand Up @@ -6,6 +6,7 @@ use glib::translate::*;
use std::time::SystemTime;

glib::wrapper! {
#[doc(alias = "GdkPixbufAnimationIter")]
pub struct PixbufAnimationIter(Object<ffi::GdkPixbufAnimationIter>);

match fn {
Expand Down
1 change: 1 addition & 0 deletions glib/src/array.rs
Expand Up @@ -5,6 +5,7 @@ use std::fmt;

wrapper! {
#[derive(PartialEq, Eq, PartialOrd, Ord, Hash)]
#[doc(alias = "GArray")]
pub struct Array(Shared<ffi::GArray>);

match fn {
Expand Down
1 change: 1 addition & 0 deletions glib/src/byte_array.rs
Expand Up @@ -25,6 +25,7 @@ use std::slice;
use crate::Bytes;

wrapper! {
#[doc(alias = "GByteArray")]
pub struct ByteArray(Shared<ffi::GByteArray>);

match fn {
Expand Down
1 change: 1 addition & 0 deletions glib/src/bytes.rs
Expand Up @@ -25,6 +25,7 @@ wrapper! {
/// let b = Bytes::from_static(s);
/// assert_eq!(&s[..], b);
/// ```
#[doc(alias = "GBytes")]
pub struct Bytes(Shared<ffi::GBytes>);

match fn {
Expand Down
1 change: 1 addition & 0 deletions glib/src/closure.rs
Expand Up @@ -14,6 +14,7 @@ use crate::Value;

wrapper! {
#[derive(PartialEq, Eq, PartialOrd, Ord, Debug, Hash)]
#[doc(alias = "GClosure")]
pub struct Closure(Shared<gobject_ffi::GClosure>);

match fn {
Expand Down
1 change: 1 addition & 0 deletions glib/src/date.rs
Expand Up @@ -11,6 +11,7 @@ use std::fmt;
use std::hash;

wrapper! {
#[doc(alias = "GDate")]
pub struct Date(Boxed<ffi::GDate>);

match fn {
Expand Down
4 changes: 4 additions & 0 deletions glib/src/enums.rs
Expand Up @@ -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 {}
Expand Down Expand Up @@ -177,6 +178,7 @@ impl Clone for EnumClass {

/// Representation of a single enum value of an `EnumClass`.
#[derive(Debug, Clone)]
#[doc(alias = "GEnumValue")]
pub struct EnumValue(*const gobject_ffi::GEnumValue, EnumClass);

unsafe impl Send for EnumValue {}
Expand Down Expand Up @@ -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 {}
Expand Down Expand Up @@ -561,6 +564,7 @@ impl Clone for FlagsClass {

/// Representation of a single flags value of a `FlagsClass`.
#[derive(Debug, Clone)]
#[doc(alias = "GFlagsValue")]
pub struct FlagsValue(*const gobject_ffi::GFlagsValue, FlagsClass);

unsafe impl Send for FlagsValue {}
Expand Down
1 change: 1 addition & 0 deletions glib/src/error.rs
Expand Up @@ -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<ffi::GError>);

match fn {
Expand Down
2 changes: 2 additions & 0 deletions glib/src/object.rs
Expand Up @@ -2422,6 +2422,7 @@ impl ObjectClass {
}

wrapper! {
#[doc(alias = "GInitiallyUnowned")]
pub struct InitiallyUnowned(Object<gobject_ffi::GInitiallyUnowned, gobject_ffi::GInitiallyUnownedClass>);

match fn {
Expand All @@ -2430,6 +2431,7 @@ wrapper! {
}

#[derive(Debug)]
#[doc(alias = "GWeakRef")]
pub struct WeakRef<T: ObjectType>(Pin<Box<gobject_ffi::GWeakRef>>, PhantomData<*mut T>);

impl<T: ObjectType> WeakRef<T> {
Expand Down
1 change: 1 addition & 0 deletions glib/src/param_spec.rs
Expand Up @@ -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<gobject_ffi::GParamSpec>);

match fn {
Expand Down
1 change: 1 addition & 0 deletions glib/src/source.rs
Expand Up @@ -38,6 +38,7 @@ impl FromGlib<u32> for SourceId {

/// Process identificator
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
#[doc(alias = "GPid")]
pub struct Pid(pub ffi::GPid);

unsafe impl Send for Pid {}
Expand Down
1 change: 1 addition & 0 deletions glib/src/string.rs
Expand Up @@ -13,6 +13,7 @@ use std::str;

wrapper! {
/// A mutable text buffer that grows automatically.
#[doc(alias = "GString")]
pub struct String(Boxed<ffi::GString>);

match fn {
Expand Down
1 change: 1 addition & 0 deletions glib/src/thread_pool.rs
Expand Up @@ -7,6 +7,7 @@ use std::future::Future;
use std::ptr;

#[derive(Debug)]
#[doc(alias = "GThreadPool")]
pub struct ThreadPool(ptr::NonNull<ffi::GThreadPool>);

unsafe impl Send for ThreadPool {}
Expand Down
4 changes: 4 additions & 0 deletions glib/src/translate.rs
Expand Up @@ -935,6 +935,7 @@ where
}
}

#[doc(alias = "GList")]
pub struct List(*mut ffi::GList);

impl Drop for List {
Expand Down Expand Up @@ -1015,6 +1016,7 @@ where
}
}

#[doc(alias = "GSList")]
pub struct SList(*mut ffi::GSList);

impl Drop for SList {
Expand Down Expand Up @@ -1073,6 +1075,7 @@ impl<'a> ToGlibPtr<'a, *mut ffi::GHashTable> for HashMap<String, String> {
}
}

#[doc(alias = "GHashTable")]
pub struct HashTable(*mut ffi::GHashTable);

impl Drop for HashTable {
Expand All @@ -1081,6 +1084,7 @@ impl Drop for HashTable {
}
}

#[doc(alias = "GPtrArray")]
pub struct PtrArray(*mut ffi::GPtrArray);

impl Drop for PtrArray {
Expand Down
2 changes: 2 additions & 0 deletions glib/src/value.rs
Expand Up @@ -310,6 +310,7 @@ impl<T: ToValueOptional + StaticType + ?Sized> 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 {
Expand Down Expand Up @@ -688,6 +689,7 @@ macro_rules! from_glib {

from_glib!(Value, |v| v);

#[doc(alias = "GValue")]
pub struct ValueArray(Vec<gobject_ffi::GValue>);

impl Drop for ValueArray {
Expand Down
1 change: 1 addition & 0 deletions glib/src/value_array.rs
Expand Up @@ -8,6 +8,7 @@ use std::slice;

wrapper! {
#[derive(Debug)]
#[doc(alias = "GValueArray")]
pub struct ValueArray(Boxed<gobject_ffi::GValueArray>);

match fn {
Expand Down
1 change: 1 addition & 0 deletions glib/src/variant.rs
Expand Up @@ -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<ffi::GVariant>);

match fn {
Expand Down
1 change: 1 addition & 0 deletions glib/src/variant_dict.rs
Expand Up @@ -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<ffi::GVariantDict>);

match fn {
Expand Down
1 change: 1 addition & 0 deletions pango/src/attr_class.rs
Expand Up @@ -44,6 +44,7 @@ impl FromGlibPtrFull<*const ffi::PangoAttrClass> for AttrClass {
}
}

#[doc(alias = "PangoAttrClass")]
pub struct AttrClass(*mut ffi::PangoAttrClass);

impl AttrClass {
Expand Down
2 changes: 2 additions & 0 deletions pango/src/coverage.rs
Expand Up @@ -8,6 +8,7 @@ use std::ptr;

#[cfg(any(feature = "v1_44", feature = "dox"))]
glib::wrapper! {
#[doc(alias = "PangoCoverage")]
pub struct Coverage(Object<ffi::PangoCoverage>);

match fn {
Expand All @@ -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<ffi::PangoCoverage>);

match fn {
Expand Down
1 change: 1 addition & 0 deletions pango/src/glyph.rs
Expand Up @@ -33,6 +33,7 @@ impl GlyphItem {
}

#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
#[doc(alias = "PangoGlyphInfo")]
pub struct GlyphInfo(*mut ffi::PangoGlyphInfo);

impl GlyphInfo {
Expand Down
1 change: 1 addition & 0 deletions pango/src/language.rs
Expand Up @@ -4,6 +4,7 @@ use crate::Script;
use glib::translate::*;
use glib::GString;

#[doc(alias = "PangoLanguage")]
pub struct Language(*mut ffi::PangoLanguage);

#[doc(hidden)]
Expand Down