Re: gtk_main?
Espen S Johnsen <[email protected]> 05 Apr 2006 23:44:38 +0200
| Newsgroups | gmane.lisp.clg.devel |
|---|---|
| Message-ID | <[email protected]> |
[email protected] (Pedro Kröger) writes: > I have some previous gtk experience with python, although I'am no gtk > expert. I'm using both gtk and pygtk tutorials to learn to use clg, > besides reading the clg examples and it's source code. Unfortunately, documentation for clg is still very much missing. I have been thinking about adapting the pygtk tutorial, but haven't found the time to do so. If someone else wants to take on that task, it would be very much appreciated. > Both gtk and pygtk tutorials use gtk_main to start the main loop while > in clg it returns nil: > > (defbinding main () nil) Defbinding just makes a foreign function available in lisp, in this case gtk_main, and is not a normal function definition. The nil indicates that the foreign function returns no value. > of course I can use widget-show or widget-show-all, but I'm wandering if > gtk:main will be "supported" or if widget-show-all and widget-show will > be the prefered way of doing it. In clg it is not necessary to run an explicit main loop as gtk events are handled in the background. You may still run a main loop with (gtk:init) as in pygtk, but this will block the REPL and should almost never be necessary. Widgets always have to be made visible before they appear on screen, even in C and Python. In clg you could also use the initargs :visible and :show-children to control the visibility of widgets (an explicit ':visible nil' in a child will override ':show-children t' in an ancestor). -- Espen ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642