Signal and event management.



Hi all,

I'm new in this list, this is my first post, and I do it because I have
some doubts that need expert advice.

A group of friends an me, are working on yet another OO wrapper for Gtk, it
is being designed for Object Pascal, our final idea is to make a clone of
Delphi (or something similar), well, the doubt I have, is that I want to
receive a notification of every single event sended to any GtkWidget, that
way, I can re-direct it to our own hierarchy of widgets, I've readed the
Gtk sources (1.0.6 version), and the ways I find to do it, are,

1.) asking a connection for the event "event" for every widget I create,
this is right, and I get them, but I receive raw events, not Gtk signals,
if I use this, I must to "translate" every received event to a GtkSignal
and dispatch it to our widgets. I don't like it because there are other
signals that I can not receive capturing the event "event", i.e. the
TICTACTOE signal in the tictactoe.c example.

2.) hooking my signal dispatcher to the gtk class default signal handlers,
this works, but I don't know if this is a correct way to do it.

What I don't want is to ask gtk for 50 or more signal_connect with every
gtk widget created, I prefer to have a global handler for all signal and I
will decide what signal to send or ask for the default processing.

There is an elegant way to do it ?, if so, Please could anyone explain me
how to do it.
There is any contra-indication in doing it the way I say ?

I've readed the sources and all documentation I have, but I can not find
any more knowledgeable answer, I don't want to bother but I really don't
know where I must loof for answers.

If you have any questions or want some aclarations, Please ask me.

Thanks for any info about this matters.

Enric.



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