1: \begin{abstract}
2: Let $M$ be a compact orientable surface equipped with a volume form $\omega$, $P$ be either $\mathbb{R}$ or $S^1$, $f:M\to P$ be a $C^{\infty}$ Morse map, and $H$ be the Hamiltonian vector field of $f$ with respect to $\omega$.
3: Let also $\mathcal{Z}_{\omega}(f) \subset C^{\infty}(M,\mathbb{R})$ be set of all functions taking constant values along orbits of $H$, and $\mathcal{S}_{\mathrm{id}}(f,\omega)$ be the identity path component of the group of diffeomorphisms of $M$ mutually preserving $\omega$ and $f$.
4:
5: We construct a canonical map $\varphi: \mathcal{Z}_{\omega}(f) \to \mathcal{S}_{\mathrm{id}}(f,\omega)$ being a homeomorphism whenever $f$ has at least one saddle point, and an infinite cyclic covering otherwise.
6: In particular, we obtain that $\mathcal{S}_{\mathrm{id}}(f,\omega)$ is either contractible or homotopy equivalent to the circle.
7:
8: Similar results hold in fact for a larger class of maps $\Mman\to\Pman$ whose singularities are equivalent to homogeneous polynomials without multiple factors.
9: \end{abstract}
10: