Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

major API changes #72

Closed
vtjnash opened this issue Mar 9, 2014 · 10 comments
Closed

major API changes #72

vtjnash opened this issue Mar 9, 2014 · 10 comments

Comments

@vtjnash
Copy link
Contributor

vtjnash commented Mar 9, 2014

I'm am planning MAJOR api breakage for the next release version. Please tag existing packages as Gtk 0.1 0.6- to avoid upgrade headaches (including Winston.jl, ImageView.jl, ???)

  1. constructors will be removed from all types, replaced by a function new which can be more easily generalized to construct anything in an inheritence-friendly way
  2. the ...I suffix will be removed from interface types
  3. the types that currently are referenced without an ...I suffix will be renamed to ...Leaf and will NOT be exported
  4. abstract types will always be uniquely instantiated inside the GLib module (but @GType will generate the corresponding import GLib.newtype)
  5. leaf types will always be (non-uniquely) instantiated inside the client library
  6. deprecated getindex! alias to getproperty will be removed
  7. any other deprecated stuff will also be removed (original enum declarations, exporting stuff not prefixed with G from using Gtk, like Window and Canvas)
  8. I'm thinking of no longer automatically calling show in push! (ref. layouts forget to call show #30). Alternatives including calling showall in display, or just making the user aware of these functions
@timholy
Copy link
Member

timholy commented Mar 9, 2014

Thanks for the heads-up! Since the gtk branch of ImageView is not yet merged to master (I've been waiting for the "how do we handle the binary dependencies?" problem to be solved), people are kinda on their own anyway.

@bfredl
Copy link
Contributor

bfredl commented Mar 9, 2014

Looks good, I also have thought the interface types to be the 'real' types. There is a question though, with multiple libraries implementing the concrete types: should client libraries still cooperate so that each GObject instance has mostly one juila wrapper, even when two libraries happen to define leaf types to the same GObject type? ( I guess with #47 we want this)

@vtjnash
Copy link
Contributor Author

vtjnash commented Mar 10, 2014

Yes, the idea is to allow libraries to provide custom behavior for the leaf type, while maintaining a common trunk of abstract types.

The primary reason I didn't initially introduce interface types as the 'real' type was the inability to add constructors to them. However, an appropriately named function new should make this feasible

@tknopp
Copy link
Collaborator

tknopp commented Mar 10, 2014

Would be interesting to see an example of how the API will be used after this change.

I am also for explicit show. Currently one sometimes has to do it and sometimes not. For instance when using the builder API one has to do an explicit show (obviously).

@vtjnash
Copy link
Contributor Author

vtjnash commented Mar 10, 2014

I'll make a pull request in a few hours which implements most of this

@vtjnash
Copy link
Contributor Author

vtjnash commented Apr 12, 2014

some of this happened, some did not, but various improvements were made

@vtjnash vtjnash closed this as completed Apr 12, 2014
@tknopp
Copy link
Collaborator

tknopp commented Apr 20, 2014

@vtjnash So if I get this right we can now either use the macro syntax or the Leaf suffix, right? l ask because the examples still use the _new suffix. In README.md there is also still an example where _new is used.

@vtjnash
Copy link
Contributor Author

vtjnash commented Apr 21, 2014

thanks, i fixed the documentation. let me know if i missed anywhere else

@tknopp
Copy link
Collaborator

tknopp commented Apr 21, 2014

yes, the tests still use _new. I said examples in my last message but actually meant tests.
I have not yet found time to upgrade as I then have to upgrade Julietta.

@vtjnash
Copy link
Contributor Author

vtjnash commented Apr 22, 2014

i'm not sure how i missed that...fixed now

thanks again!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants