jtomschroeder / cedar

Rust framework for building visual/interactive applications
MIT License
133 stars 9 forks source link

Move Program out of the backends #12

Closed linkmauve closed 7 years ago

linkmauve commented 7 years ago

It is currently almost identical between the Cocoa backend and the GTK+ one, and as it is the main entrypoint of the library it makes no sense to have it implemented by each backend.

jtomschroeder commented 7 years ago

I recall attempting this a while back and getting stuck on the different threading models of the backends. As discussed in #11, the plan is to (eventually) split cedar into multiple crates, including a core, which would likely include a Program trait (or something similar).

In the mean time, I'll leave this open in case you want to take a pass at it and submit a pull request.

Ppjet6 commented 7 years ago

I would like to see the same kind of change for View, but the import of widgets at the top annoys me a bit. I could do just like I did for the Application when moving Program in #14, but that feels a lot more like a hack. Any idea?

jtomschroeder commented 7 years ago

program has been simplified to a single function in #18. Also, View has been removed in favor of tree and dom.