Skip to content

wrapper: Shouldn't assume every interface has GObject has prerequisite #1792

@sdroege

Description

@sdroege
glib::wrapper! {
    /// The `Purrable` interface provides a virtual method `is_purring`
    pub struct Purrable(ObjectInterface<iface::Purrable>);
}

This implements IsA<Object> etc, which is wrong for the interface implemented in https://github.com/gtk-rs/gtk-rs-core/blob/9f592fd3a85ea6889637586fb395819e06188c33/examples/virtual_methods/purrable.rs

We should probably automatically make GObject a prerequisite if none are given at all (i.e. not () but not at all) via #[glib::object_interface] as this is what most code will actually want, but the wrapper macro also needs fixes of some sort.

CC @felinira

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions