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

Signal macro #1643

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Signal macro #1643

wants to merge 8 commits into from

Conversation

jgcodes2020
Copy link
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
Member

Have you seen #1577 and the comments left there?

@jgcodes2020
Copy link
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.

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