We study the internal structure of a range of four-quark states with charm quark contributions using a two-body Bethe–Salpeter equation. Thereby, we examine charmonium-like states with hidden charm and quark content cbar{c}qbar{q}, open-charm states with quark content ccbar{q}bar{q} and all-charm states with ccbar{c}bar{c}. In particular we study the internal competition between meson–meson components and diquark–antidiquark components in the wave functions of these states. Our results indicate that the chi _{c1}(3872) and the Z_c(3900) are predominantly Dbar{D}^* states and that the recently discovered open-charm state T_{cc}^+ is dominated by an internal DD^* component. In both cases the diquark components are negligible. For the all-charm state X(6900) with as yet unknown quantum numbers we identify candidates in the excitation spectra of 0^+ and 1^+ states. Furthermore, our framework serves to provide predictions for further, yet undiscovered open and hidden charm four-quark states.