[columbus.pm] Meeting next thursday

Howard, Matt howard at osn.state.oh.us
Thu Mar 2 13:18:22 CST 2000


As a follow-up/tangent, has anyone had any experience with graphics in GTK.
Specifically, I'm looking to write a program that handles a lot of
"sprites", arbitrary-sized scanned art that the user can drag and drop
around a window.

Any thoughts?  Perl is my prefered tool for this 'cause I'm still in the
protoyping stage.

Oh, did I mention that the target platform is MacPerl but the dev platform
is Linux?
<demonic_laughter>
	hahahahah
</demonic_laughter>

M

-----Original Message-----
From: Colin Walters [mailto:levanti at verbum.org]
Sent: Thursday, March 02, 2000 1:11 PM
To: columbus-pm-list at happyfunball.pm.org
Subject: Re: [columbus.pm] Meeting next thursday


>>>>> "Jason" == J Alex <jalex+ at osu.edu> writes:

    Jason> Ah, I am kissing the hopes of a meeting place with a
    Jason> projector and stuff goodbye for now.  How about next
    Jason> thursday at a coffee shop.  We met at Caribou Cafe in
    Jason> granville the first time last year, I believe.

A coffee shop would be ok, but someone should at least bring a laptop
or something :)  I'm all for another meeting though.  Does anyone want
to do presentations?

    Jason> Also, can someone please complain about this group if you
    Jason> are unhappy with it?

I think we just need to be more organized.  

    Jason> One of the biggest needs in the perl community, from my
    Jason> point of view, is some good documentation and tutorials.
    Jason> So many of the non-oreilly books are crap, and outside of
    Jason> the awesome perldoc stuff, there isn't a ton of literature.
    Jason> Especially on perl/GTK.  Sure, you can program in it
    Jason> reasonably easy, but I haven't met many people who actually
    Jason> understand what the heck is going on when they use it.

Well, it's actually pretty simple:

Gtk.pm is a extremely thin wrapper over libgtk-1.2.so.  It uses
DynaLoader.pm, which works OS-specific dlopen() magic.  Basically,
what happens when you do

my $topwindow = new Gtk::Widget("GtkButton", foo, bar);

is Gtk.pm translates Gtk::Widget::new("GtkButton") into
gtk_widget_new("GtkButton", foo, bar).  Then DynaLoader.pm uses
dlsym() to extract the function address of gtk_widget_new from
libgtk-1.2.so, then it translates the perl strings and whatnot into
the equivalent C structures, then it calls gtk_widget_new with the
given arguments, and finally it packs the C return value into a perl
data structure, and returns it.

In summary, programming in Gtk/Perl is _exactly_ like programming in
Gtk/C.  You just get automatic translation of function arguments in
between C and perl data structures.

-- 
Colin Walters <levanti at verbum.org>
http://web.verbum.org/levanti
(1024D/C207843A) A580 5AA1 0887 2032 7EFB  19F4 9776 6282 C207 843A
-----------------------------------------------------------------------
To send mail to the Columbus.pm list send email to
columbus-pm-list at happyfunball.pm.org

To unsubscribe send an email to majordomo at hfb.pm.org  with
unsubscribe columbus-pm-list youremail at yourdomain.com
-----------------------------------------------------------------------
-----------------------------------------------------------------------
To send mail to the Columbus.pm list send email to
columbus-pm-list at happyfunball.pm.org

To unsubscribe send an email to majordomo at hfb.pm.org  with
unsubscribe columbus-pm-list youremail at yourdomain.com
-----------------------------------------------------------------------



More information about the Columbus-pm mailing list