What type of window trim go on top of stucco and how?
You can use wood molding on top of stucco. I had the exact same situation as you describe and I did the following:


use a mortar scraper or similar tool to smooth rough stucco in the area where molding is to be installed





drill mounting holes in molding and countersink
mark stucco at mounting hole locations and drill and install plastic plug anchors, filling anchor holes with weatherproof caulk prior to tapping in anchors.
install molding with screws that sit flush (countersink), fill plastic anchors and molding holes with weatherproof caulk first.
cover countersunk screw heads with exterior spackle and sand smooth.
use paintable caulk all around molding perimeter.
prime and paint