+
Skip to content

Conversation

badcel
Copy link
Member

@badcel badcel commented Jan 20, 2024

  • I agree that my contribution may be licensed either under MIT or any version of LGPL license.

Fixes: #397, #919

Before working on this there should probably be a PR which introduces a new way of registering classes and subclasses. Additionally there should be a source generator which uses this way to register the types and subclasses with the existing TypeDictionary. Subclasses can be registered in their static constructor as they can't be created by GObject before they were used in c#. If this is done there can be work done to remove reflection and the TypeDictionary. In this PR.

Todo:

  • Ensure that classes and subclass can be created with their own gtype.
  • Allow users to Register their subclasses manually so all types are known to the typesystem
  • Create SourceGenerator to automatically register all subclasses (optional)
  • Find a way to remove the TypeDictionary and pass on the GType through constructor chain if a subclass is instantiated manually thus avoiding the lookup in the type dictionary
  • Make sure that it is possible to get an instance of a subclass even if the metod returns a GObject.Object

@badcel badcel linked an issue Jan 21, 2024 that may be closed by this pull request
@badcel
Copy link
Member Author

badcel commented Jan 21, 2025

Replaced by #1118.

@badcel badcel closed this Jan 21, 2025
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.

Avoid reflection when wrapping unknown handles Do not use reflection to create objects from IntPtr but SafeHandles

1 participant

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载