How can I customise the headline of my slides in order to have some white space above and below the title of the frame?

I guess I should change the template with the following instruction: \setbeamertemplate{headline}

but how?

-

From your description, it's not clear (at least to me) which template you need to modify; headline or frametile. Anyways, you can use \addtobeamertemplate to add the spacing before (using the first argument) and after (using the second argument) the headline or frametitle template; a little example (of course, instead of 1cm you can use the desired length):

\documentclass{beamer}
\usetheme{Warsaw}

\begin{document}

\begin{frame}
\frametitle{Test Frame}
test
\end{frame}

\end{document}


After the new requirement made in a comment, a redefinition of the frametitle template (as defined in beamerouterthemeshadow,sty since the theme used is Warsaw) is needed:

\documentclass{beamer}
\usetheme{Warsaw}

\makeatletter
\setbeamertemplate{frametitle}
{%
\nointerlineskip%
\vskip-2pt%
\hbox{\leavevmode
\beamer@tempdim=\textwidth%
\hskip-\Gm@lmargin\hbox{%
\setbox\beamer@tempbox=\hbox{\begin{minipage}[b]{\paperwidth}%
\vbox{}\vskip.50ex% NEW: original \vskip-.75ex
\leftskip0.3cm%
\rightskip0.3cm plus1fil\leavevmode
\insertframetitle%
\ifx\insertframesubtitle\@empty%
\strut\par%
\else
\fi%
\nointerlineskip
\vbox{}%
\end{minipage}}%
\beamer@tempdim=\ht\beamer@tempbox%
\begin{pgfpicture}{0pt}{0pt}{\paperwidth}{\beamer@tempdim}
\usebeamercolor{frametitle right}
\pgfpathrectangle{\pgfpointorigin}{\pgfpoint{\paperwidth}{\beamer@tempdim}}
\pgfusepath{clip}
\end{pgfpicture}
\hskip-\paperwidth%
\box\beamer@tempbox%
}%
\hskip-\Gm@rmargin%
}%
\nointerlineskip
\vskip-0.2pt
\vskip-2pt
}
\makeatother

\begin{document}

\begin{frame}
\frametitle{Test Frame Title}
\framesubtitle{Test Frame Subtitle}
test
\end{frame}

\end{document}


The lines that were changed are signaled in the code with % NEW; there you can adjust the lengths according to your needs.

-
thks so much...exactly what I needed!just another quick question: I'd also like to have some space in the headline around the word (e.g. Test Frame in your slide) so that the size of font is the same but the height of the headline is bigger...how can I do that? –  Matteo Dec 3 '12 at 22:02
@Matteo this probably requires a redefinition of the template itself; which theme are you using? –  Gonzalo Medina Dec 3 '12 at 22:05
\usetheme{Warsaw}, since I'm kind of a newbie in the beamer package, could you point me out some useful links on the redefinition of templates? –  Matteo Dec 3 '12 at 22:06
@Matteo I updated my answer with the needed redefinition; regarding your question, I am not aware of a document explaining the redefinition of templates (the beamer documentation contains some explanations, but at a basic level); for more sophisticated changes you need to look at the original code of the templates and made the necessary changes. –  Gonzalo Medina Dec 3 '12 at 22:19
you helped me a lot, thanks... I'll check and let you know if I have doubts... ;) –  Matteo Dec 3 '12 at 22:29
show 1 more comment