Current GTK+ Development

Matthias Clasen

mclasen@redhat.com

Usenix 2004

Boston, MA

June 27 – July 2, 2004

What is GTK+ ?

GTK+ is a fully featured toolkit for creating user interfaces with excellent internationalization support. It can be used with multiple programming languages, for example C, C++, Python, Perl, Java, Ada, ...

GTK+ Libraries

Application

GTK+

GDK

Pango

ATK

GLib

GObject

Font system

Window system

GTK+ Libraries

Application

GTK+

GDK

Pango

ATK

GLib

GObject

Font system

Window system

GLib is the low-level core library that forms the basis of GTK+ and GNOME. It provides data structure handling for C, portability wrappers, and interfaces for such runtime functionality as an event loop, threads and dynamic loading.

GTK+ Libraries

Application

GTK+

GDK

Pango

ATK

GLib

GObject

Font system

Window system

GObject is an object system with traditional features as inheritance, polymorphism and reference counting. It also contains a signal system for notification and an object attribute system.

GTK+ Libraries

Application

GTK+

GDK

Pango

ATK

GLib

GObject

Font system

Window system

The ATK library provides a set of interfaces for accessibility. By supporting the ATK interfaces, an application or toolkit can be used with such tools as screen readers, magnifiers, and alternative input devices.

GTK+ Libraries

Application

GTK+

GDK

Pango

ATK

GLib

GObject

Font system

Window system

Pango is a library for layout and rendering of text, with an emphasis on internationalization. It forms the core of text and font handling for GTK+.

GTK+ Libraries

Application

GTK+

GDK

Pango

ATK

GLib

GObject

Font system

Window system

The GDK library provides a layer of abstraction that sits between GTK+ and the underlying windowing system. Instead of making calls directly to the window system, widgets call GDK when they need to draw to the screen or handle events.

GTK+ Libraries

Application

GTK+

GDK

Pango

ATK

GLib

GObject

Font system

Window system

The GTK+ library contains the widgets which make up the toolkit, together with supporting code, such as a theming system and drag-and-drop support.

GTK+ Widgets

Standard controls:

GtkMenuBar

GtkToolbar

GtkButton

GtkStatusbar

GtkSpinButton

GtkEntry

GtkLabel

GTK+ Widgets

Layout containers:

GtkTable, GtkVBox, GtkHBox, etc

GtkTextView:

a model-view rich text widget

GtkTreeView:

a model-view tree and list widget

GTK+ History

Started as GIMP toolkit (ca. 96)

1.0 (Apr 98) basic widgets

1.2 (Feb 99) many new widgets, Glib split off

2.0 (Mar 02) tree view, text view, Win32 port, GObject, Pango, Atk

2.2 (Dec 02) multihead support

2.4 (Mar 04) new combo box, new file selector

GTK+ 2.4 Additions

The new file chooser

GTK+ 2.4 Additions

The new combo box

GTK+ History

1.0 - ca 93.000 lines of code

1.2 - ca 160.000 lines of code

2.0 - ca 460.000 lines of code

2.2 - ca 488.000 lines of code

2.4 - ca 558.000 lines of code

Current Goals

Full platform

Close gaps

Sanitize Gnome library stack

Maintain binary compatibility

Keep up with evolving UI needs

GTK+ 2.4 Maintenance

Fixing bugs

Performance improvements

Fixing bugs

Borderline case: Focus drawing in buttons

GtkWidget::focus_padding = 5

GtkWidget::focus_line_width = 5

GtkWidget::focus_line_pattern = “\10\5”

Fixing bugs

Borderline case: Focus drawing in buttons

Performance improvements

Predictive exposes

Reduce flicker by unsetting the background

Reduce signal emission overhead

Expose prediction

Application

X Server

Window Manager

MapWindow

MapRequest

MapWindow

MapNotify

Expose

Draw contents...

Expose prediction

For menus the window manager isn't involved

No need to wait for the map event

We can predict the expose

Expose prediction

Application

X Server

MapWindow

MapNotify

Expose

Draw contents...

Predict expose

Ignore predicted expose

GTK+ 2.6 development

Planned for December 2004

Solidify 2.4 additions

Smaller additions

More work going into Pango

GTK+ 2.6 improvements

Make the new file chooser work well

Add missing features to the new combobox

File Chooser improvements

Share settings with Nautilus

Automatic shortcuts, recent files

File formats in the Save dialog

Combobox improvements

Separators

Insensitive items

Scrolling

GTK+ 2.6 Additions

Command line argument parsing

Rotated text

Icon list widget

Progressbar cell renderer

Some widgets from libgnomeui

Rotated text

Icon list widget

Progress cell renderer

The Future

New rendering model (Cairo)

RGBA visuals

Improved theme system

Printing

Full introspection

http://www.gtk.org/plan/2.6/

Cairo

PostScript-like API

Alpha-compositing

Capabilities similar to Java 2D, SVG, PDF 1.4

Backends for X, OpenGL, local buffer, PostScript

Cairo

Drawing a red triangle:

cairo_set_rgb_color (cr, 1.0, 0.0, 0.0);

cairo_move_to (cr, 50.0, 0.0);

cairo_line_to (cr, 100.0, 87.0);

cairo_line_to (cr, 0.0, 87.0);

cairo_close_path (cr);

cairo_fill (cr);

RGBA visuals

Translucent windows

Fade-in effects for menus

Drop shadows

Improved theme system

Reduce GTK+ dependency

Use Cairo for rendering

Access to layout

Full specification

Use standard syntax: XML, CSS

Printing

Print dialog

Backends for CUPS, lpr, GDI

Based on Cairo

Full Introspection

GObject supports introspection of

type hierarchy

properties

signals

but not yet of

virtual functions in class structs

library functions

Uses of Introspection

IDEs

Documentation

Language bindings

The GTK+ team

Jonathan Blandford, Matthias Clasen, Tim Janik, Tor Lillqvist, Federico Mena Quintero, Kristian Rietveld, Soeren Sandmann, Owen Taylor, Sebastian Wilhelmi

...and hundreds of contributors.

Add here: rough LOC, outline of major accomplishments in each release,

my start of involvemente

Add here: rough LOC, outline of major accomplishments in each release,

my start of involvemente

Add here: rough LOC, outline of major accomplishments in each release,

my start of involvemente

Add here: rough LOC, outline of major accomplishments in each release,

my start of involvemente

Add here: rough LOC, outline of major accomplishments in each release,

my start of involvemente

Add here: rough LOC, outline of major accomplishments in each release,

my start of involvemente

Add here: rough LOC, outline of major accomplishments in each release,

my start of involvemente

Add here: rough LOC, outline of major accomplishments in each release,

my start of involvemente

Add here: rough LOC, outline of major accomplishments in each release,

my start of involvemente

Add here: rough LOC, outline of major accomplishments in each release,

my start of involvemente

Add here: rough LOC, outline of major accomplishments in each release,

my start of involvemente

Add here: rough LOC, outline of major accomplishments in each release,

my start of involvemente

Add here: rough LOC, outline of major accomplishments in each release,

my start of involvemente

Add here: rough LOC, outline of major accomplishments in each release,

my start of involvemente

2003-05-10T18:37:58