Re: GTK Themes, and theme libraries : how do they fit (get plugged) into GTK ?
On Wed, Dec 13, 2006 at 04:01:48PM +0100, Philippe Bertin wrote: > > So how(/where in the code) are these theme libraries coming in the game > ? How can e.g. a GtkToggleButton possibly be drawn another way, e.g. > with more rounding, or with another kind of shading (as I said, I'm > explicitly *not* speaking of a different color scheme) ? How(/where in > the code) do these theme libraries get "plugged-in" into GTK ? All functions gtk_paint_foo() essentially do nothing more than call some method(s) of the GtkStyle object passed to them. That is, GtkStyle is a class and it has methods that actually draw the things. Widgets pass their style as the style argument, which is under normal circumstances the default style shared between all widgets (assigned in gtk_widget_init() and attached to windows when widgets are realized). The default style is set by the RC parser, which also loads the theme engine when it encounters a theme engine declaration in the RC file. gtk_theme_engine_get() simply uses the GTypeModule mechanism to load the module implementing a class (theme engine). To see the code, look at gtkstyle.c, gtkrc.c and gtkthemes.c. Yeti -- Whatever. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
GTK Themes, and theme libraries : how do they fit (get plugged) into GTK ?
Hello, all, Some time ago I asked a question on a library that hadn't been found upon installing a new GTK library (libqtengine.so, that was). I slowly start realising now that this was a file belonging to what's called a theme library, and that it is actually not an integral part of GTK itself (so typically part of a distribution, I guess) Then I asked myself how this theme mechanism is working in GTK. I found out that there's a whole lot of an object's properties that are customisable in gtkrc files. But the changeable properties in these files can (unless I'm wrong, or wrongly understand the code) at most explain some differences in colors, but not at all any difference in widget drawing method. So how(/where in the code) are these theme libraries coming in the game ? How can e.g. a GtkToggleButton possibly be drawn another way, e.g. with more rounding, or with another kind of shading (as I said, I'm explicitly *not* speaking of a different color scheme) ? How(/where in the code) do these theme libraries get "plugged-in" into GTK ? Could someone please give some beginning of conceptual explanation, and then give further (clues to) links to good documentation on how this is all working together (a hint in the GTK code can also do) ? Thanks, and kind regards, PhB. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list