Skip to content
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.

basic_subclass: fix name of our GObject subclasss type #308

Merged
merged 2 commits into from
Apr 26, 2020
Merged

basic_subclass: fix name of our GObject subclasss type #308

merged 2 commits into from
Apr 26, 2020

Conversation

alatiera
Copy link
Contributor

Close #307

@alatiera
Copy link
Contributor Author

alatiera commented Apr 25, 2020

cc @sdroege I think this is correct but not entirely sure. The name constant there corresponds to what we would set with ClassName in C right?

@sdroege
Copy link
Member

sdroege commented Apr 25, 2020

The name constant there corresponds to what we would set with ClassName in C right?

Yes. That's why I usually do things different than you did here. An imp module with struct Foo for the implementation, and outside the imp module a struct Foo for the public type. This way you don't have the confusion about type names and can distinguish between the two via imp::Foo and super::Foo.

Copy link
Member

@sdroege sdroege left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have access to the private part of the object.
@alatiera
Copy link
Contributor Author

alatiera commented Apr 26, 2020

done as well, I think its from when I initially had implemented the functions on the public struct.

@sdroege
Copy link
Member

sdroege commented Apr 26, 2020

Looks good to me, @GuillaumeGomez please merge when green :)

@GuillaumeGomez
Copy link
Member

👍

@sdroege
Copy link
Member

sdroege commented Apr 26, 2020

@GuillaumeGomez green

@GuillaumeGomez GuillaumeGomez merged commit aa53d61 into gtk-rs:master Apr 26, 2020
@GuillaumeGomez
Copy link
Member

Thanks @alatiera !

@alatiera alatiera deleted the alatiera/fix-subclass-typename branch April 26, 2020 12:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

in basic_subclass exmaple, the Private struct is exposed to gtk
3 participants