Arun Thondapu Eclipse SWT Project Co-Lead Equinox (Launcher) Committer 1 IBM arunkumar.thondapu@in.ibm.com EclipseCon NA 2015 3/12/2015
Motivation Evolution of GTK+ Porting SWT to GTK+ 3 Challenges Solutions Collaboration WIP What’s Next ?? Wayland support Broadway, HTML 5 GTK+ 4 2 EclipseCon NA 2015 3/12/2015
Linux vs Others Significant changes in underlying windowing system (GTK+) Separate API and ABI incompatible streams How to be on the “bleeding edge” Need parallel streams of development and maintenance Open and diverse nature of Linux distributions = support for a large range of GTK+ versions 3 EclipseCon NA 2015 3/12/2015
"GTK+ software architecture" by Shmuel Csaba Otto Traian. Licensed under CC BY-SA 4.0 via Wikimedia Commons - http://commons.wikimedia.org/wiki/File:GTK%2B_software_architecture.svg#mediaviewer/File:GTK%2B_software_architecture.svg 4 EclipseCon NA 2015 3/12/2015
Originally designed and used in the GNU Image Manipulation Program (GIMP) as a replacement of the Motif toolkit. GTK+ 2.0 improved text rendering using Pango a new theme engine improved accessibility using ATK complete transition to Unicode using UTF-8 strings more flexible API and new widgets usage of Cairo graphics library for rendering vector graphics (since version 2.8) 5 EclipseCon NA 2015 3/12/2015
GTK+ 3 cairo drawing throughout, GDK no longer wraps the antiquated X11 drawing API modern input device handling via XInput2 new theming API with CSS syntax for theme configuration and animations multiple backend support for GDK (including experimental support for Wayland and HTML5) integration of D-Bus support in GIO use GIO for launching applications new widgets, such as a switch and an application chooser improved support for touch and gestures 6 EclipseCon NA 2015 3/12/2015
Primary goal was a seamless user experience on a wide variety of Linux versions irrespective of underlying versions of GTK+ shipped by them. to be as backward compatible as possible in contrast to most native GTK+ apps including GNOME libswt-pi-gtk-****.so libswt-pi3-gtk-****.so libgtk-x11-2.0.so.0 libgtk-3.so.0 7 EclipseCon NA 2015 3/12/2015
Do not include individual headers Do not use deprecated symbols Use accessor functions instead of direct access Replace GDK_<keyname> with GDK_KEY_<keyname> Use GIO for launching applications instead of the gdk_spawn family of functions Use cairo for drawing GdkGC and GdkImage are removed gdk_draw family of functions are gone GtkWidget “expose - event” signal has been replaced by a new “draw” signal 8 EclipseCon NA 2015 3/12/2015
The modern GTK+ drawing model 9 EclipseCon NA 2015 3/12/2015
Many great and diverse contributions from community (led by Red Hat team) towards the GTK+ 3 port Much more stable and usable now Please continue to test, report bugs and contribute patches! 10 EclipseCon NA 2015 3/12/2015
Working on resolving most major outstanding problems before Mars Bugzilla summary tags – GTK3, GTK 3.10 Lots more stuff being deprecated and replaced by GTK+ GdkColor is being replaced by GdkRGBA Many enhancements as well but we may not be able to adopt right now, stability is the major concern Lack of backwards-compatibility in major updates continues to be an issue Can we aggressively drop support for older versions of GTK+ 2.x? 11 EclipseCon NA 2015 3/12/2015
Mars drops support for GTK+ < 2.18 How to find out which version of GTK+ is being used by my Eclipse or SWT application? Use the Java property org.eclipse.swt.internal.gtk.version Prevent linking against GTK+ 2.x and GTK+ 3.x in the same process Leads to unexpected hangs or hard-to-diagnose crashes 12 EclipseCon NA 2015 3/12/2015
Eclipse Mars GTK+ 3 always (assuming it is installed and available) Eclipse Luna, SR1 & SR2 GTK+ < 3.10 => GTK3 GTK+ >= 3.10 => GTK2 13 EclipseCon NA 2015 3/12/2015
Webkit is embedded by default on Linux but XULRunner is also supported libwebkitgtk-1.0-0 vs. libwebkitgtk-3.0-0 libwebkitgtk-1.0-0 is not installed by default on some distros => Luna and earlier do not have an active browser in Eclipse! libwebkit2gtk-3.0-25 vs. libwebkit2gtk-4.0-37 XULRunner does not have a GTK+ 3 port yet… 14 EclipseCon NA 2015 3/12/2015
Wayland is intended as a simpler replacement for X, easier to develop and maintain. Origins in initial effort towards X12. Hardware and applications are constantly evolving, X11 extensions are unable to fill in the gaps anymore. Design and build a new display server from scratch focusing on modern platforms. 15 EclipseCon NA 2015 3/12/2015
Wayland is a display protocol for a compositor to talk to its clients as well as a C library implementation of that protocol. Weston reference implementation is the only Wayland compositor as of now. Eliminates needless complexity and improves performance compared to X11. Smaller footprint. Designed to work well with non-PC interfaces (embedded devices, tablets and phones). Shipped on a number of embedded products, phones, and tablets. For the desktop, GNOME and KDE ports to Wayland (and of course the protocol itself) are currently WIP. 16 EclipseCon NA 2015 3/12/2015
17 EclipseCon NA 2015 3/12/2015
18 EclipseCon NA 2015 3/12/2015
19 EclipseCon NA 2015 3/12/2015
Rudimentary support available at • this stage Google Summer of Code 2014 • project by Joshua Barkovic 20 EclipseCon NA 2015 3/12/2015
GDK Broadway backend provides support for displaying GTK+ applications in a web browser, using HTML5 and web sockets. GDK_BACKEND = broadway http://127.0.0.1:8080 Works only with GTK3 Use multiple GTK+ applications in the same web browser window, by using the Broadway server, broadwayd , that ships with GTK+. broadwayd :5 BROADWAY_DISPLAY - Specifies the Broadway display number. BROADWAY_DISPLAY=:5 gedit 21 EclipseCon NA 2015 3/12/2015
22 EclipseCon NA 2015 3/12/2015
Can SWT itself use web (HTML5) based elements to build the UI of the application instead of the OS's native widgets? Eclipse running inside a web browser? Allows CSS customization of UI. Eclipse integration with Orion and Flux in a browser. 23 EclipseCon NA 2015 3/12/2015
Animations Scene graph Effects Improved CSS support Transformations Better cross-platform story Event bubbling Better support for application development No more GDK windows Touch and gesture support Multimedia Focus on HIG 24 EclipseCon NA 2015 3/12/2015
25 EclipseCon NA 2015 3/12/2015
“ GTK+ 4 shall be as rock-stable (and hence "boring") as GTK+ 2” 26 EclipseCon NA 2015 3/12/2015
27 EclipseCon NA 2015 3/12/2015
28 EclipseCon NA 2015 3/12/2015
Evaluate the sessions Sign in: www.eclipsecon.org +1 0 -1 29 EclipseCon NA 2015 3/12/2015
Recommend
More recommend