Re: gtk layering



On Wed, 2006-10-04 at 01:07 -0400, Bill Cunningham wrote:
>     I know for those of us who want to use gtk as an API it is there. Gnome
> is built on gtk of course. But what about gtk? Does it call directly glib or
> the X windowing system for frame buffer support?
> 
> gtk
> glib-2
> x windows
> 
> or does gtk work more like this?
> gtk
> /    \
> glib X
> 
> Simplified of course then there's pango and cairo and pangocairo.. :)

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               |
+-------------------------------+

The following things are not illustrated in this diagram or are
inaccurate:

- Pango talks directly to X11 for dealing with core fonts and using
Xrender to draw freetype fonts (although the pango cairo backend uses
cairo for this).  To draw directly to X11, pango just needs to ask Gdk
for the window contexts.  Does Pango use Gdk at all, except to get X11
window contexts?

- Cairo can and is often used outside of the Gtk context (it is a
standalone app api)

- Cairo can talk to the Glitz backend which sort of side-steps X11 and
renders directly to an OpenGL context

- Under Windows Pango most often renders fonts using the Win32 GDI,
bypassing Cairo and Gdk.

If anyone can clarify, simplify, or make more accurate this diagram,
please do so so we can all get a better understanding and appreciation
of the Gtk architecture, which like Bill, I find fascinating.

Michael


> 
> Bill
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list
> 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]