While raw C is not super helpful for generating nice bindings, I think you could get most of the way there if there were annotations for everything, e.g. like how the __counted_by__ attribute was added.
Dynamic triple buffering is basically just giving the hardware time to clock itself up when there is a sudden change in workload, e.g. idling then opening the overview (drawing basically nothing -> redrawing basically the whole desktop).