Re: GTK internals

varun_shrivastava writes:
 > So as i also want to know about the internals, where to start from the
 > source code?

That depends on what aspects of GTK internals you want to learn.

- The low-level window manipulation and graphics interface to the X11
window system? In that case you should first know the basics of the
X11 protocol and the Xlib library. Learn basic X11 concepts like
windows, GCs, the most common requests and events. Don't bother
reading anything about Xt in case you come across such... Then look
into the gdk/x11 folder in GTK+. Especially you could start by looking
at how windows are created in gdkwindow-x11.c and how events from X11
are received in gdkevents-x11.c.

- The interface to Windows's GDI etc, or Mac OS X's Quartz even? Then
you should similarily learn the basics of those windowing and graphics
APIs. Then look into the gdk/win32 or gdk/quartz folders in GTK+ and
then read files like gdkwindow-win32.c, gdkevents-win32.c,
gdkwindow-quartz.c etc.

- Actually, much of the low-level drawing is done through the cairo
layer and not gdk/x11, gdk/win32 or gdk/quartz. If you want to learn
about that, read about it, study its source code.

- The normal widgets like buttons, scrollbars, etc? Then you need a
basic understading of the GLib gobject system of types ("classes"),
type instances, properties and signals. Also get a basic understanding
of the GDK API. Then look into the gtk folder in GTK+. The file names
here are pretty self-explanatory.

- The support for internationalisation in text output and
bidirectionality? Look into Pango, which is a separate source module. 



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