On Wed, Jul 18, 2001 at 04:32:09AM +0530, Deepika Sikri <[EMAIL PROTECTED]> 
wrote:
>    Any help reg writing customized GTK interfaces in PERL for GIMP will
>    be appreciated.

Basically, it works by NOT using Gimp::Fu. If you don't need arguments
then you can call the register function, which will not open a window
but instead will just call your plugin (e.g. examples/parasite-editor or
gap-vcr).

If you want arguments then it works very much like a plug-in in C:

   # register a function that's called when
   # gimp requests execution for it from this plugin
   Gimp::register_callback plugin_mine => \&plugin_mine;

   # gimp only clals us when we tell it which functions
   # we implement
   Gimp::on_query {
      Gimp->install_procedure("plugin_mine", .... see Perl-Server for an example)
   };

   # optionally, you can define more callbacks:
   Gimp::on_run { # optional
      # run before any callback
   };
   Gimp::on_net { # optional
      # when started from the network
   };
   Gimp::on_lib { # optional
      # when started using the direct interface
   };

   # that's mandatory ;)
   exit Gimp::main;

Inside your casllback you have to chekc the first argument (run_mode) as
usual. If you want to open a gtk dialog you should use call Gimp->gtk_init
instead of Gtk->init, because the former fetcvhes the corretc values
(ccube, visual etc..)

>    Thanks in advance.

if you have any questions feel free to aks them ;)

> The Information contained and transmitted by this E-MAIL is proprietary to 
> Wipro Limited and is intended for  use only by the individual or entity to which 

I pity you...

> recipient,  you are notified that any use, distribution, transmission, printing, 
> copying or dissemination of this information in any way or in any manner is 
> strictly prohibited. If you have received this communication in error, please 

and all this to a publicly arhcived mailinglist.. ;)

-- 
      -----==-                                             |
      ----==-- _                                           |
      ---==---(_)__  __ ____  __       Marc Lehmann      +--
      --==---/ / _ \/ // /\ \/ /       [EMAIL PROTECTED]      |e|
      -=====/_/_//_/\_,_/ /_/\_\       XX11-RIPE         --+
    The choice of a GNU generation                       |
                                                         |
_______________________________________________
Gimp-developer mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer

Reply via email to