I think you should post this particular question in either the API section or the C section.

Your ideas are both very logical and the only obstacle is how to do it.

In the API and C sections, there are some real good programmers. They can help you.