On Sat, Nov 13, 1999 at 03:50:47PM +0100, Michael Natterer <[EMAIL PROTECTED]> 
wrote:
> Hm, I don't exactly know how the plug-in stuff works but there surely
> is a pipe to each client and the gimp (or gtk) does a select() at some
> place to wait for the pipes' file descriptors.

Many clients can share a pipe, so there should be a way to set a new
context.  Otherwise the problem I want this context stuff for is still not
solved, namely multiple clients connecting to the gimp.

And how does the application change between setting it's own context vs.
setting the gui context? I cannot see how this can be done without an
explicit PDB interface for this.

> But as I said, I'm not 100% sure if this asumptions are true... are they?

most plug-ins do not share a pipe. but many plug-ins (and most script-fu
scripts) would need a way to set either context.

> ...also true, but I'm not yet sure (see above) how to do it and if it can
> be done without breaking too much...  you're more a plug-in expert than
> I am, any idea where to do this context switching??

In the core, we have to find out _who_ is calling an internal pdb function
(or an external plug-in), and use the appropriate context during the
execution.

Every plug-in should get a copy-on-write-like context, and the option
to modify the parent context (or the gui context, but the latter is not
important at this point, as it is clearly a new feature).

You also need a way to copy/set the context, for clients sharing a pipe.

The default for 1.2 could be to modify the parent context anyway (but
I think that only a small minority of scripts require changes to
colours/brushes etc. to be backpropagated, so these could probably be
fixed)

> Yep, this sounds better ;-) But do we really need pdb context functions
> for 1.2 if internal context switching (depending on the plug-ins' file
> descriptors) is possible?

No (if!). But even if not we could not just decide not to fix the
(non-fatal for normal usage) bug.

It is still easy to confuse the gimp by calling normal plug-ins, even with
the context stuff.

> Maybe just a stripped down context interface (allowing e.g.
> the client to say if it wants a private context or not)

How about always having a provate context? Which plug-ins require that
their changes to the context are global? Most only set colours etc. for
their internal use, and backpropagating thes evalues is usually NOT
wanted, but unavoidable.

> uh, I guess this mail has too much "if"s...

If we could get some pdb functionality, we could even fix the big
annoyancies for script-users. And little annoyances for ui-users (ui users
are already aware that hell breaks loose when they try to call more than
one plug-in at a time).

-- 
      -----==-                                             |
      ----==-- _                                           |
      ---==---(_)__  __ ____  __       Marc Lehmann      +--
      --==---/ / _ \/ // /\ \/ /       [EMAIL PROTECTED] |e|
      -=====/_/_//_/\_,_/ /_/\_\       XX11-RIPE         --+
    The choice of a GNU generation                       |
                                                         |

Reply via email to