#gtk #macro #action #glib #user #awesome #self

macro awesome-glib

Bunch of macros to make a life of gtk/glib user easier

6 releases (3 breaking)

0.4.0 Mar 4, 2024
0.3.0 Jul 24, 2023
0.2.1 Apr 9, 2023
0.2.0 Feb 14, 2023
0.1.0 Aug 31, 2021

#464 in Procedural macros

Download history 13/week @ 2024-02-17 11/week @ 2024-02-24 155/week @ 2024-03-02 33/week @ 2024-03-09 4/week @ 2024-03-16 20/week @ 2024-03-30 47/week @ 2024-04-06 3/week @ 2024-04-13

159 downloads per month

MIT license

27KB
518 lines

Awesome GLib

Build codecov Crates.io Docs.rs

Supplemental macros for glib/gio

Actions

TLDR;

struct MyWidget ...

#[awesome_glib::actions]
impl MyWidget {
    fn action1(&self) ...
    fn action2(&self) ...
}

impl ObjectImpl for MyWidgetPrivate {
    fn constructed(&self, obj: &Self::Type) {
        ...
        obj.register_actions(obj);
        ...
    }
}

Dependencies

~310–770KB
~18K SLoC