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

Add annotation processors to register classes and compile resources #133

Open
jwharm opened this issue Aug 31, 2024 · 0 comments
Open

Add annotation processors to register classes and compile resources #133

jwharm opened this issue Aug 31, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@jwharm
Copy link
Owner

jwharm commented Aug 31, 2024

Implement an annotation processor to find @RegisteredType- and @GtkTemplate-annotated classes, and save the names in a resource file. On startup, the static class initializers in the global GObject and Gtk classes will read the resource file, and automatically register the types as GObject classes.

A new TypeCache method will be necessary to retrieve the gtype for a Class<? extends GObject>. (Currently the TypeCache only supports the reverse.)

Taking the idea a step further, an annotation processor could trigger a GResource compile step for UI files that are used in Gtk composite template classes. This would allow users to define the UI as an annotation inside the Java file. It would even be possible to call the Blueprint compiler automatically if the annotation processor recognizes a blueprint template.

@jwharm jwharm added the enhancement New feature or request label Aug 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant