Crate glib_macros
source ·Macros
- Macro for passing variables as strong or weak references into a closure.
- Macro for creating a
Closureobject. This is a wrapper aroundClosure::newthat automatically type checks its arguments at run-time. - The same as
closure!but usesClosure::new_localas a constructor. This is useful for closures which can’t be sent across threads. See the documentation ofclosure!for details.
Attribute Macros
- Attribute macro for defining flags using the
bitflagscrate. This macro will also define aGFlags::type_function and theglib::Valuetraits. - Macro for boilerplate of
ObjectInterfaceimplementations. - Macro for boilerplate of
ObjectSubclassimplementations.
Derive Macros
- Macro for deriving implementations of
glib::clone::Downgradeandglib::clone::Upgradetraits and a weak type. - Derive macro for register a rust enum in the glib type system and derive the the [
glib::Value] traits. - Derive macro for defining a GLib error domain and its associated
ErrorDomaintrait. - Derive macro for serializing/deserializing custom structs as
glib::Variants.