xwt, a cross-desktop ui library

17
Xwt A cross-desktop UI toolkit Jérémie Laval @jeremie_laval

Upload: jeremie-laval

Post on 18-Dec-2014

2.993 views

Category:

Technology


0 download

DESCRIPTION

At Xamarin we have historically been a GTK+ shop but with our new multi-platform focus, we have recently developed Xwt, a cross-desktop UI library which allows us to write our UI code once and run it natively on GTK+, Cocoa and WPF. Come to learn how the API works, how it's built and, why not, help us improve it.

TRANSCRIPT

Page 1: Xwt, a cross-desktop UI library

Xwt

A cross-desktop UI toolkit

Jérémie Laval

@jeremie_laval

Page 2: Xwt, a cross-desktop UI library

Quickie about me

I A Xamarin-ista

I Mono Contributor (classlib, Pfx, PLinq, …)

I MonoDevelop team (these days)

Page 3: Xwt, a cross-desktop UI library

Xwt: WAT?

X-platform Widget Toolkit

One UI toolkit to rule them all

Page 4: Xwt, a cross-desktop UI library

Why Xwt?

I Pushing native UI feature with minimal cost

I Goals:

I Long-term → Xwt-based MonoDevelopI Short-term → share UI features between VS and MD

I Create a nicer (hopefully!) API in the process

Page 5: Xwt, a cross-desktop UI library

Xwt all the things

Xamarin Android Designer

Page 6: Xwt, a cross-desktop UI library

Where we stand

I 2 main approaches: WxWidgets and Qt

I WxWidgets→ native widgets, limited to common denominator

I Qt→ fully emulated, look&feel through theming

I*

: Xwt strikes a balance of both

*( = Lluis Sanchez, Xwt creator, as Dogbert)

Page 7: Xwt, a cross-desktop UI library

Design goals

I Not general purpose, solving a problem at hand

I Architecture:

I MVCI Gtk box modelI Cairo-like drawing API

I Can be easily integrated with existing UI code

Page 8: Xwt, a cross-desktop UI library

Relationship with Gtk

I NIH, we borrow heavily from Gtk+ API

I : We love Gtk but…

I Simpler widget hierarchy

I No (Gtk,Gdk)Window dichotomy

I No container class

Page 9: Xwt, a cross-desktop UI library

Where we differ

Miguel on WPF (2004): “The implementation details transpire everywhere”

Page 10: Xwt, a cross-desktop UI library

General architecture

Page 11: Xwt, a cross-desktop UI library

What it looks like?

Page 12: Xwt, a cross-desktop UI library

Demo

Let's make a new widget: awesometacular arrow

Page 13: Xwt, a cross-desktop UI library

Demo

Let's integrate Xwt with Gtk

Page 14: Xwt, a cross-desktop UI library

Demo

Let's spicy up Xwt.Gtk with Xwt.Mac

Page 15: Xwt, a cross-desktop UI library

The Future

I Sort out the WPF backend (layout, drawing, …)

I Animation support (CoreAnimation, Clutter, …)

I More widgets

Page 16: Xwt, a cross-desktop UI library

The Good Stuff

I https://github.com/mono/xwt

I https://github.com/mono/xwt/wiki/Coding-Guidelines

I http://group.google.com/group/xwt-list

Page 17: Xwt, a cross-desktop UI library

The End

Questions?