Re: PF_ENUM, SF_ENUM, dynamically defined enums for plugins

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

 



I continued to prototype this.
Proved that a plugin can cross the wire to GIMP with
gimp_procedure_add_enum.
It creates a dynamic GEnum on both sides of the wire.

But it revealed these problems:

1. GIMP crashes when it starts the second time after installation,
I suppose when it is reading plugins.rc, which contains the names of
dynamic enums,
that aren't defined types at the time.

2. The PDB Browser similarly crashes when it references dynamic enum types,
from the registered signatures of plugin procedures.
The PDB Browser is a plugin running in its own process,
and again the dynamic types are not defined yet,
in the GType runtime system.

I think a solution would be to keep a db of dynamic enums declared by
plugin procedures.
Similar to, or part of the PDB.

At startup, GIMP would dynamically define the enums from the db,
before reconstituting the procedure declarations in the PDB
(which reference the dynamic enums.)
This would make the dynamic enums defined by plugins available
to  all GIMP processes, the app or plugins.

Again, there might be a better solution (the aux_argument solution proposed
by Jehan.)
But this solution is not inventing a new concept.
This solution uses a concept (plugins can dynamically define enums) that
GLib supports,
and GIMP already has the concept of dynamically defined procedures (into
the PDB)
In other words, its just more of the same or similar,
dynamically defining enum types as well as procedure types.

I will soon submit a draft MR of the prototype so you can see what it
entails, so far.
_______________________________________________
gimp-developer-list mailing list
List address:    gimp-developer-list@xxxxxxxxx
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list



[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux