[rescue] Sun Kit Needed for EE Student Here

Charles Shannon Hendrix shannon at widomaker.com
Mon May 8 10:17:16 CDT 2006


Sat, 06 May 2006 @ 00:08 -0500, Jonathan C. Patschke said:

> On Sat, 6 May 2006, Charles Shannon Hendrix wrote:
> 
> >As far as widgets go, many applications now draw widgets independently
> >of KDE and Gnome if they are running alone.  However, if KDE or Gnome
> >is loaded, they can make use of "engines" (I think that's what they
> >are called) which do a better job of drawing.
> 
> It's probably nothing more complicated than X resources.  

No, its a big more than that.

For font rendering, Gnome and GTK apps use Pango, which is a rendering
library. Not sure what KDE uses.

Font rendering was originally done outside of X because X font support sucked
so bad. Now that X is better, some things have moved there, but there is still
font rendering and layout code in the environments too.

With Gnome, even some themes are actually object code, not just data.

A lot of GTK apps are compiled to use the default GTK widgets and "theme"
unless Gnome is also loaded.

> If your fonts look great in vanilla X application when run under KDE or
> GNOME but like crap when not, it's just because KDE and GNOME are better
> at picking fonts than whatever you're normally using.

Well, I solved that problem.

As far as the rest, some font rendering is still done in KDE and Gnome for
their apps, though I don't know how much these days. I know in the past they
had to do all of it because X font support was so bad.

> Ah, actually you need to compile FireFox with the correct widget
> library.  GNOME widgets aren't "loaded" in some globall-accessible way
> just because GNOME is.  They're in a shared library like any other
> widget kit.  

No, that's not always true.

You do not have to load shared libraries at exec time, so it has become
popular to have the program decide, AFTER it loads, which libraries to load
and use.

See the POSIX dlopen, dlclose, dlerror, dlsym functions for more information.

> If you have Firefox compiled against GNOME and load it from bare X (no wm or
> anything at all), it'll still load those libraries and draw the widgets with
> which it was compiled to use.

Firefox might be that way, I'm not sure. I think it defers loading the
widgets, but then different builds are done in different ways. I've built it
before and I think you have a choice in how to handle that when you build it.

Openoffice is an example, and I put screenshots of this in action on the geeks
list recently.

> Just because one application (the desktop session manager or window manager
> or a file manager or whatever) uses a widget kit doesn't automatically make
> it available for other applications to use without the correct compile-time
> bindings.

Incorrect. Please see the dynamic loading functions for more information. Not
all shared libraries have compile-time bindings.

> Firefox (and other cross-platform GUI applications like it) do tend to
> have abstraction layers over the various widget kits, but they're rarely
> (if ever) as dynamic as you assume.

On the contrary, it seems to be increasing.

I've dealt with this a lot when building packages for distribution,
because you can no longer just check what a binary links against 
to determine what its dependencies are.

Fortunately, most applications that do this are graceful about it,
telling you at runtime what is missing, or just silently doing without
the features provided by the missing libraries.

For example, if you load Amarok (music player) and it cannot find the
gstreamer libraries, it will automatically switch to another sound engine, and
will disable features dependent on gstreamer.

-- 
shannon "AT" widomaker.com -- ["The strength of the Constitution lies
entirely in the determination of each citizen to defend it.  Only if every
single citizen feels duty bound to do his share in this defense are the
constitutional rights secure." -- Albert Einstein]



More information about the rescue mailing list