What does it mean to integrate a complex function over a real domain? In complex form, we know that the $n$-th Fourier coefficient of a function $f$ is given by $$\int_{-\pi}^{\pi} f(\theta)e^{-in\theta} d\theta.$$ 

My question: What exactly does it mean to integrate the complex function $f(\theta)e^{-in\theta}$ over a real domain? How can I visualize this&mdash;in general and in this particular case?
Let $f:[a,b]\to \mathbb{C}$. Since $f$ is a complex-valued function, then there exist real valued functions $f_1,f_2$ such that $$f(x)=f_1(x)+i_2f(x),$$ 
($f_1,f_2$ are nothing but the real and imaginary part). You can simply define the integral of $f$ by
$$\int_a^b f(x)dx:=\int_a^b f_1(x)dx+i\int_a^b f_2(x)dx,$$ where $\int_a^b f_1(x)dx$ and $\int_a^b f_2(x)dx$ are the usual integrals of real valued functions.

You can even define integration of a function $f:\mathbb{C}\to \mathbb{C}$ over a countour in the complex plane.
On the positive real line, $\theta= 0$ and on the negative real line, $\theta= \pi$ .  Also $e^{-in\theta}= r cos(\theta)+ irsin(\theta)= r$ on the real line. So that complex integral can be written $\int_{-\pi}^0 f(\pi)x dx+ \int_0^{\pi} f(0)ydy$.