Re: gtk layering
- From: "Matt Fischer" <mattfischer84 gmail com>
- To: gtk-list gnome org
- Subject: Re: gtk layering
- Date: Thu, 5 Oct 2006 18:42:13 -0500
On 10/5/06, Bill Cunningham <billcm charter net> wrote:
----- Original Message -----
From: "Michael L Torrie" <
torriem chem byu edu>
To: <gtk-list gnome org>
Sent: Thursday, October 05, 2006 12:38 PM
Subject: Re: gtk layering
> On Thu, 2006-10-05 at 10:32 -0600, Michael L Torrie wrote:
> > Hopefully we can get some real experts to help improve and clarify it,
> > but here is a little simplified diagram that represents to me how Gtk's
> > layers work on X11:
> >
> > +-------------------------------+
> > | Gtk+ |
> > | +----------+ |
> > | | Pango | |
> > | | +----+------------+
> > | | | Gdk |
> > +-------+-----+---------+ |
> > | Cairo | |
> > +-----------------------+-------+
> > | X11 |
> > +-------------------------------+
> >
>
> Hmm. From what the pango.org site says, pango only depends on glib
> (which is not shown in this diagram since it's a foundation class
> library), not Gdk or Gtk. So it would appear to only be on top of Cairo
> and X11.
>
> Michael
Sounds to me more and more that X11 is more irrelevant to gtk and gdk.
Bill
_______________________________________________
gtk-list mailing list
gtk-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-list
Well, it's not that it's not relevant--at the end of the day, somebody still has to draw all the windows. But Gtk/Gdk/Cairo/etc. are separated from X by some abstraction, in that all they require is "some kind of window manager", not necessarily X itself. Think of them as links in a chain--X is the link that connects Gdk with the actual display driver. You can replace it by a different link that does the same thing (
e.g. DirectFB, a Win32 interface, whatever), but if you eliminated it completely, then you'd break the chain, and Gtk wouldn't be able to draw anything on the screen at all.
The ideology that Gtk uses (and, indeed, most good utility stacks) is one of lots of little pieces that each do one thing, all hooked together. None of the pieces should have to know about anything except the piece directly below them. The Linux filesystem is a good example of this: when I save a file, I don't need to care whether the file system drivers are directing my hard drive to write some sectors, or shuffling it off over the network to be written on a server. As long as the file gets saved, I'm happy. Just so, it doesn't matter to Gtk whether Gdk is doing its drawing by talking to X, Win32, Cocoa, or little elves. As long as it can call gdk_window_show() or whatever, and trust that GDK is somehow figuring out how to do it, it's happy.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]