Re: [gtk-list] How to wrap custom widget in Gtk-perl?



Doh, this didn't get through to gtk-list.




BTW: there is a dedicated gtk-perl list, now, followups should go there.

On 02/13/00 jes@presto.med.upenn.edu wrote:
> Gtk-Perl is way cool.  Especially the way you can write widgets in
> Perl that are part of the Gtk object system.
> 
> The problem is, I need to go the other way: I have a custom widget,
> written in C, that I need to access from Gtk-Perl.  The Gtk-Perl
> distribution includes several such beasts, but I still can't quite get
> a handle on what I need to do myself and what I can leverage from
> Gtk-Perl.

The simplest example is the GtkHTML widget, you could just
copy the Makefile.PL, GtkHTML.pm, pkg.defs files.
Run s/GtkHTML/GtkMyWidget/ on them. Change pkg.defs to
define your widgets and enums/flags or boxed types.
pkg.typemap could be an empty file.
Copy also Depends.pm and tools/gendefs.pl from the distribution 
and change Makefile.PL accordingly.
If all is ok now you just run perl Makefile.PL...

lupus

-- 
Paolo Molaro, Open Source Developer, Linuxcare, Inc.
+39.049.8024648 tel, +39.049.8036484 fax
lupus@linuxcare.com, http://www.linuxcare.com/
Linuxcare. Support for the revolution.


-- 
To unsubscribe: mail gtk-perl-list-request@redhat.com with "unsubscribe"
as the Subject.





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