
ROADMAP
=======

0.3 "Features"
--------------

### Features ###
* Widget theming support. Ideally we'd like to have an extra stylesheet with widget theming information and match this against the theme CSS, like:
    GtkComboBox > GtkToggleButton { 
      gtk: import("GtkComboBox { border-top: import; border-right: import; border-bottom: import;}");
    }
* Improve gtkrc export, use `:selected` and match it to base for now.
* Add a fixup stage when the stylesheet is loaded, handle things like 
  single `background-size: <length>;` there.
* Store type-name, type-id and selector-group in the GtkStyle and use that
  information if no widget is passed.
* Border images, c.f. [border-image in Firefox](http://ejohn.org/blog/border-image-in-firefox/).
* [Box-shadow](http://www.w3.org/TR/css3-background/#box-shadow).
* Additional border features, e.g. `collapsed`, `none`.
* Support per-object style attributes in libccss (and maybe also the engine, but how?).
  The node-class interface would have to be extended to support a `get_style()`
  method.
* Subcontrol selectors like QT? (requires patching libcroco). We'll probably go with widget roles, c.f. http://mail.gnome.org/archives/gtk-devel-list/2008-October/msg00107.html . Here's an initial list, orientation would have to be queried otherwise (e.g. "GtkVScrollbar > *.gtk-forward-stepper" or ".gtk-forward-stepper[orientation=vertical]"):
    * .gtk-check-mark: GtkCheckButton, GtkCheckMenuItem, GtkCellRendererToggle
    * .gtk-radio-knob: GtkRadioButton, GtkRadioMenuItem, GtkCellRendererToggle
    * .gtk-dropdown-button: GtkComboBox, GtkComboBoxEntry, GtkMenuToolButton, GtkOptionMenu
    * .gtk-expander: GtkExpander, GtkTreeView
    * .gtk-handle: GtkHandleBox, GtkStatusbar, GtkPaned
    * .gtk-tab: GtkNotebook
    * .gtk-header: GtkTreeView, GtkCalendar
    * .gtk-forward-stepper, .gtk-backward-stepper: GtkSpinButton, GtkHScrollbar, GtkVScrollbar
    * .gtk-secondary-forward-stepper, .gtk-secondary-backward-stepper: GtkHScrollbar, GtkVScrollbar
    * .gtk-progress-indicator: GtkProgressBar
  Libccss' `get_class()` could be extended to return `char**` or `GSList<char *>` so we could still support app-defined classes besides the built in ones. Or we do it via an optional `get_classes()`.


#### Done:
* Support system gtk system colors, e.g. `color: gtk-color(bg_color);`.
* Background attachment.

### Internals ###
* Embed the "property" struct in all properties, implement `ccss_selector_apply()`
  in a generic manner.
* Check all list iterators for const-ness.
* Make all string comparisons case insensitive?
* Get rid of the _match() functions all toghether?
* Check 80 column code width.
* Use `for` to iterate over `GSList`, e.g 
  `for (GSList const *iter = list; iter != NULL; iter = iter->next) { ... }`

### Theme ###
* Make theme active (use pseudo-classes).
* Set text color.
* Ready for desktop-wide use.

0.4 "Correctness"
-----------------

* Application-specific theming, someting like `@import "gimp.css" gimp;`, 
  maybe support wildcards like `gimp*` to match things like `gimp-1.2`.
* Implement `inherit' as per CSS spec. Do we need our own set of attributed 
  inherited by default?
* Multiple background images.
* Unit tests.
* Test using the theme torturer.
* Test using valgrind.
* Investigate splitting out `ccss_css2_style_t` from `ccss_style_t` making it
  an opaque `unsigned char[x]`. Install only a minimal number of of required
  headers (ccss, stylesheet, selector-group, style*, node).
* Think about per-stylesheet node-class and functions interface.
* Bugzilla module.

0.5 "Performance"
-----------------

* Match properties against properties, including namespaces:
  e.g. `GtkVScrollbar[adjustment:value="gtk:attribute(adjustment:lower)"]`.
  Can be used to implement custom inactive scrollbars, c.f. 
  [Link](http://mail.gnome.org/archives/usability/2008-August/msg00037.html).
  The `gtk:` prefix would trigger the property to be parsed instead of string-matched, actual prefix should of course be set by libccss consumer.
* Profile using the theme torturer.
* Can selectors and blocks be merged at theme load time?
* Can computed styles be attached to widgets using g_object_set_data()?
* Use a string pool for the lookup tables?
* Can we use binary search in the lookup tables?
* Cache the type name inside the node?

0.6 "Compliance"
----------------

* Animated images APNG, MNG, animated GIF, whatever gdk-pixbuf supports.
* Support widget mimicking by creating Gtk[Rc]Style style information and
  feeding it back into gtk, e.g. using `gtk_rc_parse()`. Maybe we would end up
  with two drawing modes, the `normal` one and the `GtkStyle` based one. In any
  case `gtk_rc_get_style_by_paths()` should work. This is very apparent e.g. with
  the empty treeview in TWF. Maybe need to fix this earlier, at least partially.

More 0. releases go here if needed ...

0.8 "Moving pictures"
---------------------

* [CSS Transitions](http://webkit.org/specs/CSSVisualEffects/CSSTransitions.html)


1.0 "Rejoicing"
---------------

* Implement additional CSS pseudo classes like `:first-element`,
  `:last-element`, maybe custom ones for `GtkTable`, `HippoCanvas`.
  Those will be queried on the container and can e.g. be used to
  make the outer corners of buttons in a button box rounded.

	`GtkHButtonBox GtkButton:first-element {
	  border-top-left-radius: 3px;
	  border-bottom-left-radius: 3px;
	}
	GtkHButtonBox GtkButton:last-element {
	  border-top-right-radius: 3px;
	  border-bottom-right-radius: 3px;
	}`

1.2 "Fonts"
-----------

* Implement font effects.

2.0 "Canvas"
------------

* Implement a WHATWG canvas and let the theme draw on it using ECMAScript.

Out of band
-----------

* Libcroco: fix `#foo` and `.bar` global selectors.
* Investigate libcroco CSS3 compliance: sequences, tuples (see background-image)
* Create a spiffy website, possibly on [GNOME Projects](http://gnome.org/projects). 
  Any volunteers?
* Evaluate alternative SVG renderers as they become available.
* Investigate a helper app for widget matching, like what's in 
  [GLE](http://testbit.eu/~timj/historic/gle/).

### Inspirations for themes ###
* [Mockscape](http://www.flickr.com/photos/andyfitz/2706976226/).
* [Garrett](http://ux.suse.de/~garrett/public/hackweek/oneclick/mockups/oneclick-mockup-trust%20and%20install.png).
* [cypohirogen](http://cypohirogen.deviantart.com/art/Mail-Scrollbar-for-Leopard-79257200).
* [Jimmac](http://jimmac.musichall.cz/guimockups.php?mockup=xgl)

### Other links ###
* [http://osku.de/simsui/](http://osku.de/simsui/)

