Bar Theming API

This is the first approach to replace the current theming API.


  • Provide backwards compatibility.
  • Don't need to access object members like parents or other stuff.
  • Avoid the need to know implementation details of widgets to write engines.
  • Improve support for dynamic style properties.
  • Provide an extensible context information provider from widgets (kill the detail string!)

Proposal: GtkStyleContext

  • A new GtkStyleContext object that can contain multiple values/hints. This would substitute the detail string, and would allow less scary if switches within the engines implementation.

  • Each GtkStyleContext should have an unique id, such as GtkComboBox.Button, for a button in a combobox. This naming should have some sort of consistency.

Backwards compatibility

  • Reimplement a compatibility layer for legacy primitives. This legacy implementation would call the new primitives by creating a new GtkStyleContext that would fit the current call+detail string. It's pretty much like emulating what a current engine does, but instead of painting, calling the new primitives.

Projects/GTK/NewThemeApi/Bar (last edited 2018-12-05 15:46:54 by EmmanueleBassi)