# [PHP-GTK-DEV] module defined callbacks in php-gtk - function pointer experts needed :)

- Thread: https://externals.io/message/2970
- Original archive: https://news-web.php.net/php.internals/2970
- Started by Alan Knowles on 2003-06-29T16:11:13+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #2970 — Alan Knowles — 2003-06-29T16:11:13+00:00

URL: https://externals.io/message/2970#2970

Subject: [PHP-GTK-DEV] module defined callbacks in php-gtk - function 
pointer experts needed :)
Date: Mon, 30 Jun 2003 00:06:31 +0800
From: Alan Knowles <alan@akbkhome.com>
To: php-gtk-dev@lists.php.net, Andrei Zmievski <andrei@gravitonic.com>, 
  php-dev@lists.php.net

Andrei, attached is a patch for adding a callback registry to php-gtk,
so that callbacks that use gpointers or other 'unhandled' types, can be
mapped to module defined handlers.

In the example, the callback for GtkSheet::traverse is mapped to
php_gtk_sheet_callback_traverse, rather than the default mashaller.
using
php_gtk_register_callback("GtkSheet::traverse",php_gtk_sheet_callback_traverse);

I've just modified the  gtk_signal_connect_impl function to check the
registry (and moved it to php_gtk_object.c)

It almost works, except I guess I got a pointer wrong somewhere in the
process, cause it dont callback to the right place at present...

any ideas why? :)
-- cc'd to php-dev if anyone wants to help out with my crappy C code :)

Regards
Alan



-- 
Can you help out?
Need Consulting Services or Know of a Job?
http://www.akbkhome.com
