Skip to content

Signal macro#1643

Open
jgcodes2020 wants to merge 11 commits into
gtk-rs:mainfrom
jgcodes2020:signal-macro
Open

Signal macro#1643
jgcodes2020 wants to merge 11 commits into
gtk-rs:mainfrom
jgcodes2020:signal-macro

Conversation

@jgcodes2020

Copy link
Copy Markdown
Contributor

Implements a macro for signals. This is still really rough around the edges and doesn't support things like extension traits. I also need to figure out how to write tests for this thing.

@bilelmoussaoui

Copy link
Copy Markdown
Member

Have you seen #1577 and the comments left there?

@jgcodes2020

Copy link
Copy Markdown
Contributor Author

Have you seen #1577 and the comments left there?

Just took a look; I'm not sure if they're still working on it. Where my implementation differs (as far as I can tell) is being able to specify no class handler using:

#[glib::signals]
impl Base {
    #[signal(run_first)]
    fn one(&self);
}

Without the macro, rust-analyzer will correctly parse the function signature before erroring saying it doesn't have a body.

@bilelmoussaoui

Copy link
Copy Markdown
Member

any plans for pushing this forward?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants