I present a construction of real or complex selfdual conformal 4-manifolds (of signature (2,2) in the real case) from a natural gauge field equation on a real or complex projective surface, the gauge group being the group of diffeomorphisms of a real or complex 2-manifold. The 4-manifolds obtained are characterized by the existence of a foliation by selfdual null surfaces of a special kind. When ... [Show full abstract] the gauge group reduces to the group of diffeomorphisms commuting with a vector field, I reobtain the classification by Dunajski and West of selfdual conformal 4-manifolds with a null conformal vector field. I then analyse the presence of compatible scalar-flat Kaehler, hypercomplex and hyperkaehler structures from a gauge-theoretic point of view. In an appendix, I discuss the twistor theory of projective surfaces, which I use in the body of the paper, but is also of independent interest.