ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> php-gtk-dev
php-gtk-dev
Re: [PHP-GTK-DEV] Custom Signals Support
by Elizabeth Smith other posts by this author
Mar 8 2007 2:35PM messages near this date
Re: [PHP-GTK-DEV] Custom Signals Support | [PHP-GTK-DEV] Resizable and Scrollable TreeView
Andrei Zmievski wrote:
>  Elizabeth,
>  
>  Supporting custom signals will be quite a bit more involved than this. 
>  It'll probably be based on created a new class which will contain its 
>  signal descriptions and then registering it with GType system. If I have 
>  time this weekend I might work on that.. Unless we want to do beta 
>  release first.
>  
>  -Andrei

Evening Andrei,

I didn't mean to imply that the patch did all of custom signal support, 
just that I had the first part of it working. (you can register new 
signals with it and they do work)

As far as I'm aware pygtk allows two ways of registering new signals.

The gobject::signal_new method implementation I sent in the patch was 
just a php version of 
http://www.pygtk.org/docs/pygobject/gobject-functions.html#function-gobject--signal-new

The difference there is the signal_new I wrote is more flexible in it's 
callback implementation.  Python requires you to have a do_{signalname} 
method in your class for the callback - I'm not sure if we really want 
to be adding a ton of magic for a signal callback... and would also 
force you to extend a base class like gtkwindow in order to be able to 
add a new signal to it. (python has more flexibility in "adding in" 
methods to an existing class)

Pygtk also has the support as you mentioned for extending a class by 
using "magic properties" __gtype__ and a __signals__ so you can give 
your class a custom gtype and auto register signal.  (If you required 
this for extended classes to have their own signals that would fix the 
first gtype issue I asked about)  I didn't write that support (yet) 
because I wasn't sure if you wanted to head the pygtk route, or had a 
different implementation approach in mind.

Second issue still stands - how do you grab the gtype from the 
zend_class_entry?

And just a random question - why are basic gtype constants defined in 
gtk and not in gtype or gobject .... just curious

Thanks,
Elizabeth

-- 
PHP-GTK Development Mailing List (http://gtk.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Thread:
Elizabeth Smith
Andrei Zmievski
Steph Fox
Andrei Zmievski
Elizabeth Smith

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved