gtk C++ signals/slots




I've been thinking for a while of modifying the current C++ interface
of gtk for better use of C++'s features that most C++ compilers
already supports -- like templates.  Current version (gtk--) does use
too much visible #defines for my taste - Code made atop of gtk-- does
not really look like typhical C++ code with all those 
METHOD_CALLBACK_EXTERNAL() thingys :)

Now I have few questions:
1) Is it reasonable thing to do?
   - There already is a working(?) C++ interface, is there need for
     another one? 
2) Is there other C++ interface projects available for gtk I should be
   aware of before creating one?
2) Is there some things in the current signal/slot implementation of C++
   interface that absolutely must be preserved for it to work with gtk?
   - signals have name which is used in connecting it to slots. Is it used 
     in any other place than making the connection?
     - I've been wondering why is that string-format identifier for signals
       needed? Maybe same functionality could be made using static language 
       consepts.
3) Any other issues that you would like to have in C++ interface for gtk?
4) For future (and existing) gtk widgets there should probably be
   parser for converting header file of a gtk widget to create C++ wrapper
   for it? (how was the current C++ interface made? writing by hand or
   using some generator? -- there's alot of gtk objects available and
   it'd be wasted if everyone making a new widget would need to do
   interfaces for n+1 different languages)

Check http://www.cs.tut.fi/~p150650/sigslot.html for some initial thoughts
about this issue. (these ideas in the web page came from dealing with
trolltech's Qt Gui library, which also uses signal/slot thingys...)

Comments, flames, and improvement suggestions are welcome.

-- Tero Pulkkinen -- terop@modeemi.cs.tut.fi --



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