Re: gtk layering



On Wed, 2006-10-04 at 01:19 -0400, Bill Cunningham wrote:
> ----- Original Message ----- 
> From: "Matt Hoosier" <mwhoosier gmail com>
> To: "Bill Cunningham" <billcm charter net>
> Cc: <gtk-list gnome org>
> Sent: Wednesday, October 04, 2006 1:12 AM
> Subject: Re: gtk layering
> 
> 
> > Bill,
> >
> > glib and X11 are orthogonal; neither depends on the other. Gtk+ uses
> > each one directly.
> 
>     I see. Thanks Matt. These internals are fascinating to me. I understand
> things better. Does gtk use glib for frame buffering or just X? What does
> gtk use pango and cairo for?

lets be a little more accurate.

Gtk does not use X11 directly at all.

Gtk uses glib to provide data structures and portability for general
programming. 

Gtk uses Gdk to provide a set of mechanisms for creating windows,
drawing various kinds of things in them, managing their visibility and
handling events from a window system. There are implementations of Gdk
that work with X11, with the win32 GUI API (not sure which level it sits
at, possibly GDI but i don't know), with Aqua and with the linux
DirectFb API (amongst others). the window system is what actually
implements the things that Gdk is merely a wrapper around.

Pango is a library that handles drawing and data management for fonts
and text. It has a variety of ways of rendering font information, some
via Gdk, some via other means entirely such as Cairo.

Cairo is a general purpose drawing library that new versions of Gdk use
to draw things in windows. Cairo also can interface with a variety of
backends, include PostScript, X11, win32, etc etc. In current GTK
versions (2.10 etc) when you see a standard office-productivity style
application, most of it is being drawn using Cairo to actually control
the pixels, Gdk to provide a higher level abstraction of that stuff, and
Gtk to provide widgets.

--p





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