<div dir="auto"><div>Let's discard the adapter/shim (main goal is to reduce the dependency). <div dir="auto"><br></div><div dir="auto">Isn't there anything that we can do to reduce the dependency. Especially with Gtk.<div dir="auto"><br></div><div dir="auto">Why aren't CollabWrapper and SugarGame very common between activities? Especially CollabWrapper.</div><div dir="auto"><br></div><div dir="auto">If CollabWrapper is simple, why not expanding it?</div></div><br><br><div class="gmail_quote"><div dir="ltr">On Sun, Feb 10, 2019, 10:42 PM James Cameron <<a href="mailto:quozl@laptop.org">quozl@laptop.org</a> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Sun, Feb 10, 2019 at 08:19:03PM -0600, Alejandro García wrote:<br>
> I was thinking something like calling a GtkAdapter.Label(...) instead of<br>
> Gtk.Label (...), or a WebKitAdapter.emit_signal (...) instead of<br>
> WebKit2.emit_signal (...). <br>
> <br>
> Are these examples more clear of what I'm trying to say? <br>
<br>
Another word for this is a shim.  An abstraction that only exists to<br>
hide version dependencies.<br>
<br>
We have an example of a WebKit API verson independence shim in Sugar, see<br>
<br>
<a href="https://github.com/sugarlabs/sugar/tree/master/src/jarabe/view" rel="noreferrer noreferrer" target="_blank">https://github.com/sugarlabs/sugar/tree/master/src/jarabe/view</a><br>
<br>
viewhelp_webkit1.py is the shim for WebKit.<br>
<br>
viewhelp_webkit2.py is the shim for WebKit2.<br>
<br>
viewhelp.py choses which of the shims to use.<br>
<br>
A disadvantage of shims is huge increase in the number of lines of<br>
code to be maintained.<br>
<br>
We cannot use a shim for GTK 2 and GTK 3 independence, because at the<br>
same time the binding moved from static to introspection; PyGObject.<br>
<br>
> The CollabWrapper and SugarGame projects are closer to what I'm<br>
> trying to say.  But not the SugarToolkit, as it creates some<br>
> widgets, but if the developer needs more, he will use the Gtk<br>
> library directly.<br>
<br>
Okay.  But to proceed with this idea, you must identify a clear<br>
benefit to cover the maintenance cost of adding the shim.<br>
<br>
Long term, CollabWrapper could be added to the Toolkit, as it has no<br>
additional dependencies.<br>
<br>
Sugargame cannot be added without creating a dependency for Pygame,<br>
which is something that has been resisted for some time; Pygame<br>
activities often do not adapt well to screen rotation and different<br>
display sizes.<br>
<br>
-- <br>
James Cameron<br>
<a href="http://quozl.netrek.org/" rel="noreferrer noreferrer" target="_blank">http://quozl.netrek.org/</a><br>
_______________________________________________<br>
Sugar-devel mailing list<br>
<a href="mailto:Sugar-devel@lists.sugarlabs.org" target="_blank" rel="noreferrer">Sugar-devel@lists.sugarlabs.org</a><br>
<a href="http://lists.sugarlabs.org/listinfo/sugar-devel" rel="noreferrer noreferrer" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
</blockquote></div></div></div>