Re: GTK internals



hi
i started browsing the source code and found that gtkmain.c file contains
all the initializing stuff required to initialize GTK library. That was
pretty cool.
But i gave a thought that gdk should also be initialized before use as gtk
is getting initialized.
So i checked gdk/gdk.c, so i found gdk_init() there

but how gtk takes care of calling gdk_init is a mystery to me, as we never
call gdk_init from our gtk program. [we only call gtk_init() ] 

Can any one provide a view to that?

greetings 
varun


A bus station is where a bus stops.
A train station is where a train stops.
On my desk, I have a work station....
What more can I say........>----(^_^)----<





Tor Lillqvist wrote:
> 
> 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. 
> 
> Etc.
> 
> --tml
> _______________________________________________
> gtk-devel-list mailing list
> gtk-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-devel-list
> 
> 

-- 
View this message in context: http://www.nabble.com/GTK-internals-tf4012561.html#a11702473
Sent from the Gtk+ - Dev - General mailing list archive at Nabble.com.




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