Fixed: GSignal connect with struct *pointer
- From: Matthias Mann <matman matman24 org>
- To: gtk-app-devel-list gnome org
- Subject: Fixed: GSignal connect with struct *pointer
- Date: Sun, 10 Aug 2003 22:12:27 +0200
On Saturday August 09 2003 13:57 CEST, Leandro A. F. Pereira
wrote:
Sure it's possible :)
Thanx to God ore something else. I got an idea and found two
important mistakes in my code. And also a bad discription
about g_signal_connect() in libglib API:
The G_CONNECT_SWAPPED flag is explained with "wether the
instance and data should be swapped when calling the handler".
This is very idiocy. I mean, nobody will get the idea to swap
the instance with the user datas.
I find out: without G_CONNECT_SWAPPED no data will be send to
the callback function. So the API of g_signal_connect() should
start with:
#define g_signal_connect(instance, detailed-signal,
c-handler, NULL);
_NO_ user data. To send user data to a callback function the
only way is to use g_signal_connect_swapped(). That's it! Or
did i oversee any thing?
Mathew
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]