Re: PerlGTK with GTK module written in C ?

upon rereading this, after having read the other, longer message you
sent later, i am beginning to understand what you're trying to do...

On Mon, 2004-07-12 at 23:14, Nagappan wrote:
I have written a GTK module in C (gtk_module_init). [...]
What I thought is, why
can't we integrate the different languages like Python, Perl, Java into
our module (Which I have already written it). So that people who knows
Python / Perl / Java can write an external plug-in. Which will be called
at run-time. This may be integrated by using signals (This is only my

so you're wanting a gtk module (a chunk of code which can be loaded
dynamically by gtk+ itself) which is implemented in something other than

so, for example, you could have a python program which loads pygtk and
triggers the loading of a gtkmodule written in perl.

this is possible, but rather involved.  you'll have to have C code to
implement the entry points of the gtk module for gtk+ to call, and the
main entry point gtk_module_init() will have to start a new embedded
interpreter (perl, python, jvm, etc -- C++ is a special case that
doesn't need all of this) which will then execute the correct code on
callbacks and such.  this module code should register callbacks for
signals, and all that *should* Just Work, but the devil is in the
details.  note that the perl/python/scheme/java interpreter won't be
running all the time, only when explicitly invoked (i have never used
gtk2-perl in this way, but i believe this is how the gimp uses scheme).

does that make sense?

muppet <scott at asofyet dot org>

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