gEDA-dev: [pcb] multiple hids in one .so
DJ Delorie
dj at delorie.com
Mon Oct 2 09:14:26 EDT 2006
> All callbacks that don't have gc param.
That's what I wanted to avoid. It's overkill for all the built-in
hids.
> 1. let's say PCB will never be multithreaded so using global variables in
> the API is ok (like it uses gui now). In this case the GUI hids should set
> a global var pointing to the selected HID. I'm not sure this would be a
> smaller patch but it would look worse :)
It's kinda what we do now, we just don't set gui for exporters until
after we're in redraw.
> 2. let's pass HID to _all_ calls and the drawing ones would extract gc
> from the HID structure. It's more work but would make the interface more
> orthogonal.
There are many gc's for each hid; you can't extract the right gc from
a hid.
> 3. Add a set_hid() callback that would inform the .so which hid is
> selected. Called only once, before any other hid function. Probably this
> is the less painful to add, but it seems like some workaround.
The core of pcb doesn't know about shared objects, so this is the same
solution as #1.
More information about the geda-dev
mailing list