Interacting with the viewport via script.

Is there a way to have a callback or something so that when I do something in the viewport, like move an object, that a script I am running could update something.

bump