Re: transparent layer over image




On Oct 27, 2004, at 9:06 AM, Dmitriy Kuvshinov wrote:

if you already have XS code in your module, then it will be much easier for you to draw on the image in C.

After insert #include "gtk2-perl.h" in my *.xs, system cannot find path for header files like gperl.h or gtk/gtk.h (bit i see it *.h files in /usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi/Gtk2)
... :(

this was why i mentioned ExtUtils::Depends. it's entire purpose is to find include paths and typemaps for other XS modules, and turn that information into something that WriteMakefile can use.

in your Makefile.PL, you'd do something like this:

  use ExtUtils::Depends;
  # create an EU::Depends module that depends on Gtk2.
  # since 0.200, it chains dependencies, and will pick up Glib for you.
  my $dep = ExtUtils::Depends->new ('MyModule' => 'Gtk2');
  $dep->add_xs (<*.xs>);  # add your XS files
  # add your pm files; see the docs for PM in MakeMaker for more info.
  # note that $(INST_LIBDIR) is Makefile syntax, not perl.
  $dep->add_pm ('MyModule.pm' => '$(INST_LIBDIR)/MyModule.pm');

  WriteMakefile (
      NAME => 'MyModule',
      VERSION_FROM => 'MyModule.pm',
      $dep->get_makefile_vars,
         # get_makefile_vars replaces all your custom stuff like
         # INC, LIBS, TYPEMAPS, etc
  );


the various Gtk2-Perl modules' Makefile.PLs have more advanced examples.

--
Examples really shouldn't include unexploded ordnance.
  -- Joe Smith, referring to an example program i wrote.




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