[Gambas-devel] Gambas component queries

Srikanta Prasanna srikantux at ...176...
Tue Jan 18 05:41:04 CET 2005


Hi All,
In order to attempt writing of a ImageMagick component 
(thanks rob!) for Gambas, I was trying to understand 
the steps involved in adding a component to Gambas.

Below is a given my (still-very-basic) understanding 
of how things work, and why it is necessary, for 
Gambas and its component; also there are queries 
about some areas which I did not understand. Please 
correct me if you find my understanding to be wrong.

1) My component must contain a main.cpp (as the code
will be in cpp) and a main.h.
This main.cpp should implement a init and exit functions
which will be invoked by the interpreter at the startup
and cleanup of my component.
(Query) Is the init of all the components in a project
invoked when the project is executed? Or is it invoked
only when it is necessary (somewhat like 'Just-In-Time') ?
Similary, when is exit called ?

2) The GB refernce: 
Is this mandatory for every component?
If yes, what is the actual use of it in ones component?

3) Interpreter Hooks: 
Why are interpreter hooks necessary ? 
Can we have a component without any hooks to intrepreter ?
When are these hooks called by the intrepreter ?
Would the ImageMagick component need any of those ?

And finally, what are event-loops ?

Thanks!!

-- 
cheers
srikanta




More information about the Devel mailing list