[PHP-GTK-DEV] Custom Signals Support
by Elizabeth Smith other posts by this author
Mar 7 2007 9:14AM messages near this date
[PHP-GTK-DEV] 1
|
Re: [PHP-GTK-DEV] Custom Signals Support
I've been working on getting custom signal support written because I'd
really like to use it in some work I'm doing.
I have Gobject::signal_new implemented and working (also registered the
signal run type constants). I've attached the patch for it as well as a
test script. However, I've run into a few limitations with the
implementation.
First of all, signals are assigned globally for a gtype. Right now php
classes that extend a php-gtk gtype aren't creating their own gtype but
just using their parents. Why is this bad? Well if you extend gtkwindow
and add a custom signal...the signal is added to gtkwindow (and by
default also to your extended class) which may not be the intended
behavior. Now, it is possible to create new gtypes that extend a parent
gtype so I know HOW to fix the problem, however I don't know WHERE that
code needs to go. Any suggestions?
The second problem is I'd like to allow custom signals to be created
using just a class name and not an object instance. I can grab the
zend_class_entry but right now the gtype is NOT stored in it. You can
get the class entry from the gtype...but not the other way around. Any
suggestions for fixing that problem?
Otherwise the patch allows custom signals.
Thread:
Elizabeth Smith
Andrei Zmievski
Steph Fox
Andrei Zmievski
Elizabeth Smith
|