[Gambas-devel] Events

Benoit Minisini gambas at ...20...
Fri Jun 6 00:10:45 CEST 2003


Le Mercredi 4 Juin 2003 23:48, Nigel GERRARD a écrit :
> Benoit,
>
> If I read this extract correctly from one of your user-list replies, there
> is currently no way to send an event notification from a non qt
> component....

The event management of gambas has nothing to do with qt event management, 
except that, in the qt component, gambas event are raised when qt events are 
raised.

To raise an event, you have the GB.Raise() function in the gambas API.

>
> 'The problem is - I'm ashamed :-) - that I didn't write the event loop
> inside the interpreter to manage events when a program do not use the qt
> component !
>
> Maybe I should do that ?'
>
> I was looking at and thinking about a socket component..not based on QT
> because I would like it to be available to GTK (when written) etc., that
> would send an event when it's read buffer has received something...and have
> been struggling to come up with the proper way of doing so :-)

The interpreter event loop I didn't write yet is simply a call to select().

There is a function named GB.Watch() in the gambas API to ask the event loop 
(qt one, or the not yet written one) to watch a file descriptor, for reading 
and/or writing.

See CProcess.c in the interpreter source code for more details.

>
> My hope is that you will be able to find time to create an independant
> event manager and this will be the answer!!
>
> Nigel

-- 
Benoit Minisini
mailto:gambas at ...1...




More information about the Devel mailing list