To Pd dev -
I don't know if any of you remember this, but at the first Pd convention
in 2004, someone (I forget who) had the idea of replacing the Pd front
end by using the tcl parser but making gtk bindings in place of the tk
ones. This is not the most streamlined or elegant way to replace Pd's
front end, but it has the advantage of easily coexisting with the
existing setup.
Well, I made a stab at doing the same thing with GTK4 - you can grab it
here: http://msp.ucsd.edu/tmp/2024.09.28-pdgtk.tgz . It's about 1200
lines of code and does only a coupe of very basic things, but it allows
us to guess what it would entail to do the whole job. Of the 325 calls
to pdgui_v[a]mess in the PD source, it takes care of about 10 I think.
To proceed further it would be best to replace calls like <canvas-tag>
itemconfigure <item-tag> -width 4 with calls to specific purpose-build
tcl procedures like pdtk_canvas_configure_line_width, of which there
would probably be 100 or so. I haven't done any of this since I'd like
to see if the rest of you have thoughts about doing that. Proceeding
that way, and perhaps taking care of 10 cases a day, I think this can be
done in a month of work (and then years of followup as usual :)
I've heard it suggested that ther could be a C API in Pd that would
break out all these calls, but I personally think the pdgui_vmess
protocol is good enough and is much easier to manage. We could even
replace the ASCII strings with a binary format without changing anything
outside of s_inter_gui.c on the PD side, a binary-to-ascii converter for
the tcl/tk layer, and then do away entirely with the TCL interpreter for
the GTK front end, replaing it with a simple function dispatcher.
---
pd-dev@lists.iem.at - the Pd developers' mailinglist
https://lists.iem.at/hyperkitty/list/pd-dev@lists.iem.at/message/BLPPJCU2DGEH4IEHIPISPLRSFGZFJB3Y/