In a class of generalized gravity theories with general couplings between the scalar field and the scalar curvature in the Lagrangian, we can describe the quantum generation and the classical evolution of both the scalar and tensor structures in a simple and unified manner. An accelerated expansion phase based on the generalized gravity in the early universe drives microscopic quantum fluctuations inside a causal domain to expand into macroscopic ripples in the spacetime metric on scales larger than the local horizon. Following their generation from quantum fluctuations, the ripples in the metric spend a long period outside the causal domain. During this phase their evolution is characterized by their conserved amplitudes. The evolution of these fluctuations may lead to the observed large scale structures of the universe and anisotropies in the cosmic microwave background radiation.