Controllling monitor usage

Maybe this question will qualify in the land of Arlie, and maybe not.

So,

I’ve got systems with (gasp) two heads. From the GUI, I can ‘extend my
windows desktop’ to the second head, or not.

I’ve looked high and low for an API (user mode, preferably) that performs
the same operation, and come up empty so far.

Anyone here have a cluelet?

–benson