Surface Electronic Structure via Generalized Wannier Functions