Theory of multipartite entanglement for X-states