Topic: Widgets and native code drawing into the framebuffer

I have some native code that draws into the framebuffer. In order to actually see any output I first need to run the stop_control_panel script which is less than ideal.

What's the best practice way of doing this? I'm thinking that I can launch native code from a widget via a cgi-bin/custom url and that it will block the widget redrawing itself as long as the native code is running allowing the native code to draw into the framebuffer.

Of course even if that works it is super hacky. What I'd really like is to somehow have my native code run without blocking the widget and have the native code provide the widget a buffer that it can use for drawing. Is this sorta thing just not possible? I guess I could have my native code spit out images for the widget to continuously load, but I'd still need to deal with the native code blocking.