\section{Thumbnail}
\label{group__Thumb}\index{Thumbnail@{Thumbnail}}
\subsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \hyperlink{group__Thumb_ga2c8f75c07bc531d1bcc1b81d4cdd7e0c}{Elm\+\_\+\+Thumb\+\_\+\+Animation\+\_\+\+Setting} \{ \\*
\hyperlink{group__Thumb_gga2c8f75c07bc531d1bcc1b81d4cdd7e0caf2b60404cd65663f38bf0f2626751736}{E\+L\+M\+\_\+\+T\+H\+U\+M\+B\+\_\+\+A\+N\+I\+M\+A\+T\+I\+O\+N\+\_\+\+S\+T\+A\+R\+T} = 0, 
\\*
\hyperlink{group__Thumb_gga2c8f75c07bc531d1bcc1b81d4cdd7e0ca53bbe5da3bd620c5f0d301091cf587ab}{E\+L\+M\+\_\+\+T\+H\+U\+M\+B\+\_\+\+A\+N\+I\+M\+A\+T\+I\+O\+N\+\_\+\+L\+O\+O\+P}, 
\\*
\hyperlink{group__Thumb_gga2c8f75c07bc531d1bcc1b81d4cdd7e0ca4c17e3a462c93d324598068ab9451f19}{E\+L\+M\+\_\+\+T\+H\+U\+M\+B\+\_\+\+A\+N\+I\+M\+A\+T\+I\+O\+N\+\_\+\+S\+T\+O\+P}
 \}\begin{DoxyCompactList}\small\item\em Used to set if a video thumbnail is animating or not. \end{DoxyCompactList}
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
Eina\+\_\+\+Bool \hyperlink{group__Thumb_gaf60949008673f1ec68aa33138663ac57}{elm\+\_\+need\+\_\+ethumb} (void)
\begin{DoxyCompactList}\small\item\em Request that your elementary application needs ethumb. \end{DoxyCompactList}\item 
void $\ast$ \hyperlink{group__Thumb_gaeeecc853ab382c9369c64bd777b04ecb}{elm\+\_\+thumb\+\_\+ethumb\+\_\+client\+\_\+get} (void)
\begin{DoxyCompactList}\small\item\em Get the ethumb\+\_\+client handle so custom configuration can be made. \end{DoxyCompactList}\item 
Eina\+\_\+\+Bool \hyperlink{group__Thumb_gaba38787d6f9e8b6c35938152121632e0}{elm\+\_\+thumb\+\_\+ethumb\+\_\+client\+\_\+connected\+\_\+get} (void)
\begin{DoxyCompactList}\small\item\em Get the ethumb\+\_\+client connection state. \end{DoxyCompactList}\item 
Evas\+\_\+\+Object $\ast$ \hyperlink{group__Thumb_ga81aa834bfd0240b0cb3a23417aa9f698}{elm\+\_\+thumb\+\_\+add} (Evas\+\_\+\+Object $\ast$parent)
\begin{DoxyCompactList}\small\item\em Add a new thumb object to the parent. \end{DoxyCompactList}\item 
void \hyperlink{group__Thumb_gab3b3c6ee05fd1c80d3b07eecbf4794fb}{elm\+\_\+thumb\+\_\+file\+\_\+set} (Eo $\ast$obj, const char $\ast$file, const char $\ast$key)
\begin{DoxyCompactList}\small\item\em Set the file that will be used as thumbnail {\bfseries source}. \end{DoxyCompactList}\item 
void \hyperlink{group__Thumb_ga282f9f3c6071792a5248e43978f69132}{elm\+\_\+thumb\+\_\+file\+\_\+get} (const Eo $\ast$obj, const char $\ast$$\ast$file, const char $\ast$$\ast$key)
\begin{DoxyCompactList}\small\item\em Get the image or video path and key used to generate the thumbnail. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
 
\begin{DoxyImageNoCaption}
  \mbox{\includegraphics[width=\textwidth,height=\textheight/2,keepaspectratio=true]{thumb_inheritance_tree}}
\end{DoxyImageNoCaption}


 
\begin{DoxyImageNoCaption}
  \mbox{\includegraphics[width=\textwidth,height=\textheight/2,keepaspectratio=true]{img/widget/thumb/preview-00}}
\end{DoxyImageNoCaption}


A thumbnail object is used for displaying the thumbnail of an image or video. You must have compiled Elementary with {\ttfamily Ethumb\+\_\+\+Client} support. Also, Ethumb\textquotesingle{}s D\+Bus service must be present and auto-\/activated in order to have thumbnails generated. You must also have a {\bfseries session} bus, not a {\bfseries system} one.

Once the thumbnail object becomes visible, it will check if there is a previously generated thumbnail image for the file set on it. If not, it will start generating this thumbnail.

Different configuration settings will cause different thumbnails to be generated even on the same file.

Generated thumbnails are stored under {\ttfamily \$\+H\+O\+M\+E/}.thumbnails/. Check Ethumb\textquotesingle{}s documentation to change this path, and to see other configuration options.

If you set formatting features such as, aspect, size, format, orientation, crop, compression, or quality after the thumbnail has been shown, it needs to be reloaded with elm\+\_\+thumb\+\_\+reload.

This widget emits the following signals\+:
\begin{DoxyItemize}
\item {\ttfamily \char`\"{}clicked\char`\"{}} -\/ This is called when a user has clicked the thumbnail object without dragging it around.
\item {\ttfamily \char`\"{}clicked,double\char`\"{}} -\/ This is called when a user has double-\/clicked the thumbnail object.
\item {\ttfamily \char`\"{}press\char`\"{}} -\/ This is called when a user has pressed down over the thumbnail object.
\item {\ttfamily \char`\"{}generate,start\char`\"{}} -\/ The thumbnail generation has started.
\item {\ttfamily \char`\"{}generate,stop\char`\"{}} -\/ The generation process has stopped.
\item {\ttfamily \char`\"{}generate,error\char`\"{}} -\/ The thumbnail generation failed.
\item {\ttfamily \char`\"{}load,error\char`\"{}} -\/ The thumbnail image loading failed.
\end{DoxyItemize}

Available styles\+:
\begin{DoxyItemize}
\item {\ttfamily \char`\"{}default\char`\"{}} 
\item {\ttfamily \char`\"{}noframe\char`\"{}} 
\end{DoxyItemize}

An example of use of thumbnail\+:


\begin{DoxyItemize}
\item \hyperlink{thumb_example_01}{Thumb -\/ generating thumbnails.} 
\end{DoxyItemize}

\subsection{Enumeration Type Documentation}
\index{Thumbnail@{Thumbnail}!Elm\+\_\+\+Thumb\+\_\+\+Animation\+\_\+\+Setting@{Elm\+\_\+\+Thumb\+\_\+\+Animation\+\_\+\+Setting}}
\index{Elm\+\_\+\+Thumb\+\_\+\+Animation\+\_\+\+Setting@{Elm\+\_\+\+Thumb\+\_\+\+Animation\+\_\+\+Setting}!Thumbnail@{Thumbnail}}
\subsubsection[{Elm\+\_\+\+Thumb\+\_\+\+Animation\+\_\+\+Setting}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf Elm\+\_\+\+Thumb\+\_\+\+Animation\+\_\+\+Setting}}\label{group__Thumb_ga2c8f75c07bc531d1bcc1b81d4cdd7e0c}


Used to set if a video thumbnail is animating or not. 

\begin{Desc}
\item[Enumerator]\par
\begin{description}
\index{E\+L\+M\+\_\+\+T\+H\+U\+M\+B\+\_\+\+A\+N\+I\+M\+A\+T\+I\+O\+N\+\_\+\+S\+T\+A\+R\+T@{E\+L\+M\+\_\+\+T\+H\+U\+M\+B\+\_\+\+A\+N\+I\+M\+A\+T\+I\+O\+N\+\_\+\+S\+T\+A\+R\+T}!Thumbnail@{Thumbnail}}\index{Thumbnail@{Thumbnail}!E\+L\+M\+\_\+\+T\+H\+U\+M\+B\+\_\+\+A\+N\+I\+M\+A\+T\+I\+O\+N\+\_\+\+S\+T\+A\+R\+T@{E\+L\+M\+\_\+\+T\+H\+U\+M\+B\+\_\+\+A\+N\+I\+M\+A\+T\+I\+O\+N\+\_\+\+S\+T\+A\+R\+T}}\item[{\em 
E\+L\+M\+\_\+\+T\+H\+U\+M\+B\+\_\+\+A\+N\+I\+M\+A\+T\+I\+O\+N\+\_\+\+S\+T\+A\+R\+T\label{group__Thumb_gga2c8f75c07bc531d1bcc1b81d4cdd7e0caf2b60404cd65663f38bf0f2626751736}
}]Play animation once. \index{E\+L\+M\+\_\+\+T\+H\+U\+M\+B\+\_\+\+A\+N\+I\+M\+A\+T\+I\+O\+N\+\_\+\+L\+O\+O\+P@{E\+L\+M\+\_\+\+T\+H\+U\+M\+B\+\_\+\+A\+N\+I\+M\+A\+T\+I\+O\+N\+\_\+\+L\+O\+O\+P}!Thumbnail@{Thumbnail}}\index{Thumbnail@{Thumbnail}!E\+L\+M\+\_\+\+T\+H\+U\+M\+B\+\_\+\+A\+N\+I\+M\+A\+T\+I\+O\+N\+\_\+\+L\+O\+O\+P@{E\+L\+M\+\_\+\+T\+H\+U\+M\+B\+\_\+\+A\+N\+I\+M\+A\+T\+I\+O\+N\+\_\+\+L\+O\+O\+P}}\item[{\em 
E\+L\+M\+\_\+\+T\+H\+U\+M\+B\+\_\+\+A\+N\+I\+M\+A\+T\+I\+O\+N\+\_\+\+L\+O\+O\+P\label{group__Thumb_gga2c8f75c07bc531d1bcc1b81d4cdd7e0ca53bbe5da3bd620c5f0d301091cf587ab}
}]Keep playing animation until stop is requested. \index{E\+L\+M\+\_\+\+T\+H\+U\+M\+B\+\_\+\+A\+N\+I\+M\+A\+T\+I\+O\+N\+\_\+\+S\+T\+O\+P@{E\+L\+M\+\_\+\+T\+H\+U\+M\+B\+\_\+\+A\+N\+I\+M\+A\+T\+I\+O\+N\+\_\+\+S\+T\+O\+P}!Thumbnail@{Thumbnail}}\index{Thumbnail@{Thumbnail}!E\+L\+M\+\_\+\+T\+H\+U\+M\+B\+\_\+\+A\+N\+I\+M\+A\+T\+I\+O\+N\+\_\+\+S\+T\+O\+P@{E\+L\+M\+\_\+\+T\+H\+U\+M\+B\+\_\+\+A\+N\+I\+M\+A\+T\+I\+O\+N\+\_\+\+S\+T\+O\+P}}\item[{\em 
E\+L\+M\+\_\+\+T\+H\+U\+M\+B\+\_\+\+A\+N\+I\+M\+A\+T\+I\+O\+N\+\_\+\+S\+T\+O\+P\label{group__Thumb_gga2c8f75c07bc531d1bcc1b81d4cdd7e0ca4c17e3a462c93d324598068ab9451f19}
}]Stop playing the animation. \end{description}
\end{Desc}


\subsection{Function Documentation}
\index{Thumbnail@{Thumbnail}!elm\+\_\+need\+\_\+ethumb@{elm\+\_\+need\+\_\+ethumb}}
\index{elm\+\_\+need\+\_\+ethumb@{elm\+\_\+need\+\_\+ethumb}!Thumbnail@{Thumbnail}}
\subsubsection[{elm\+\_\+need\+\_\+ethumb(void)}]{\setlength{\rightskip}{0pt plus 5cm}Eina\+\_\+\+Bool elm\+\_\+need\+\_\+ethumb (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\label{group__Thumb_gaf60949008673f1ec68aa33138663ac57}


Request that your elementary application needs ethumb. 

This initializes the Ethumb library when called and if support exists it returns {\ttfamily E\+I\+N\+A\+\_\+\+T\+R\+U\+E}, otherwise returns {\ttfamily E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E}. This must be called before any other function that deals with elm\+\_\+thumb objects or ethumb\+\_\+client instances. \begin{Desc}
\item[Examples\+: ]\par
\hyperlink{fileselector_example_8c-example}{fileselector\+\_\+example.\+c}, and \hyperlink{thumb_example_01_8c-example}{thumb\+\_\+example\+\_\+01.\+c}.\end{Desc}
\index{Thumbnail@{Thumbnail}!elm\+\_\+thumb\+\_\+add@{elm\+\_\+thumb\+\_\+add}}
\index{elm\+\_\+thumb\+\_\+add@{elm\+\_\+thumb\+\_\+add}!Thumbnail@{Thumbnail}}
\subsubsection[{elm\+\_\+thumb\+\_\+add(\+Evas\+\_\+\+Object $\ast$parent)}]{\setlength{\rightskip}{0pt plus 5cm}Evas\+\_\+\+Object$\ast$ elm\+\_\+thumb\+\_\+add (
\begin{DoxyParamCaption}
\item[{Evas\+\_\+\+Object $\ast$}]{parent}
\end{DoxyParamCaption}
)}\label{group__Thumb_ga81aa834bfd0240b0cb3a23417aa9f698}


Add a new thumb object to the parent. 


\begin{DoxyParams}{Parameters}
{\em parent} & The parent object. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The new object or N\+U\+L\+L if it cannot be created.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__Thumb_gab3b3c6ee05fd1c80d3b07eecbf4794fb}{elm\+\_\+thumb\+\_\+file\+\_\+set()} 

\hyperlink{group__Thumb_gaeeecc853ab382c9369c64bd777b04ecb}{elm\+\_\+thumb\+\_\+ethumb\+\_\+client\+\_\+get()} 
\end{DoxySeeAlso}
\index{Thumbnail@{Thumbnail}!elm\+\_\+thumb\+\_\+ethumb\+\_\+client\+\_\+connected\+\_\+get@{elm\+\_\+thumb\+\_\+ethumb\+\_\+client\+\_\+connected\+\_\+get}}
\index{elm\+\_\+thumb\+\_\+ethumb\+\_\+client\+\_\+connected\+\_\+get@{elm\+\_\+thumb\+\_\+ethumb\+\_\+client\+\_\+connected\+\_\+get}!Thumbnail@{Thumbnail}}
\subsubsection[{elm\+\_\+thumb\+\_\+ethumb\+\_\+client\+\_\+connected\+\_\+get(void)}]{\setlength{\rightskip}{0pt plus 5cm}Eina\+\_\+\+Bool elm\+\_\+thumb\+\_\+ethumb\+\_\+client\+\_\+connected\+\_\+get (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\label{group__Thumb_gaba38787d6f9e8b6c35938152121632e0}


Get the ethumb\+\_\+client connection state. 

\begin{DoxyReturn}{Returns}
{\ttfamily E\+I\+N\+A\+\_\+\+T\+R\+U\+E} if the client is connected to the server or {\ttfamily E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} otherwise. 
\end{DoxyReturn}
\index{Thumbnail@{Thumbnail}!elm\+\_\+thumb\+\_\+ethumb\+\_\+client\+\_\+get@{elm\+\_\+thumb\+\_\+ethumb\+\_\+client\+\_\+get}}
\index{elm\+\_\+thumb\+\_\+ethumb\+\_\+client\+\_\+get@{elm\+\_\+thumb\+\_\+ethumb\+\_\+client\+\_\+get}!Thumbnail@{Thumbnail}}
\subsubsection[{elm\+\_\+thumb\+\_\+ethumb\+\_\+client\+\_\+get(void)}]{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ elm\+\_\+thumb\+\_\+ethumb\+\_\+client\+\_\+get (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\label{group__Thumb_gaeeecc853ab382c9369c64bd777b04ecb}


Get the ethumb\+\_\+client handle so custom configuration can be made. 

\begin{DoxyReturn}{Returns}
Ethumb\+\_\+\+Client instance or N\+U\+L\+L.
\end{DoxyReturn}
The ethumb client handle returned may or may not be N\+U\+L\+L. It may or may not survive into the future (ethumbd may become disconnected). Do not use this unless you know what you are doing. \index{Thumbnail@{Thumbnail}!elm\+\_\+thumb\+\_\+file\+\_\+get@{elm\+\_\+thumb\+\_\+file\+\_\+get}}
\index{elm\+\_\+thumb\+\_\+file\+\_\+get@{elm\+\_\+thumb\+\_\+file\+\_\+get}!Thumbnail@{Thumbnail}}
\subsubsection[{elm\+\_\+thumb\+\_\+file\+\_\+get(const Eo $\ast$obj, const char $\ast$$\ast$file, const char $\ast$$\ast$key)}]{\setlength{\rightskip}{0pt plus 5cm}void elm\+\_\+thumb\+\_\+file\+\_\+get (
\begin{DoxyParamCaption}
\item[{const Eo $\ast$}]{obj, }
\item[{const char $\ast$$\ast$}]{file, }
\item[{const char $\ast$$\ast$}]{key}
\end{DoxyParamCaption}
)}\label{group__Thumb_ga282f9f3c6071792a5248e43978f69132}


Get the image or video path and key used to generate the thumbnail. 

\begin{DoxySeeAlso}{See also}
\hyperlink{group__Thumb_gab3b3c6ee05fd1c80d3b07eecbf4794fb}{elm\+\_\+thumb\+\_\+file\+\_\+set()} 

elm\+\_\+thumb\+\_\+path\+\_\+get()
\end{DoxySeeAlso}

\begin{DoxyParams}[1]{Parameters}
\mbox{\tt out}  & {\em file} & The path to file that will be used as thumbnail source. \\
\hline
\mbox{\tt out}  & {\em key} & The key used in case of an E\+E\+T file. \\
\hline
\end{DoxyParams}
\index{Thumbnail@{Thumbnail}!elm\+\_\+thumb\+\_\+file\+\_\+set@{elm\+\_\+thumb\+\_\+file\+\_\+set}}
\index{elm\+\_\+thumb\+\_\+file\+\_\+set@{elm\+\_\+thumb\+\_\+file\+\_\+set}!Thumbnail@{Thumbnail}}
\subsubsection[{elm\+\_\+thumb\+\_\+file\+\_\+set(\+Eo $\ast$obj, const char $\ast$file, const char $\ast$key)}]{\setlength{\rightskip}{0pt plus 5cm}void elm\+\_\+thumb\+\_\+file\+\_\+set (
\begin{DoxyParamCaption}
\item[{Eo $\ast$}]{obj, }
\item[{const char $\ast$}]{file, }
\item[{const char $\ast$}]{key}
\end{DoxyParamCaption}
)}\label{group__Thumb_gab3b3c6ee05fd1c80d3b07eecbf4794fb}


Set the file that will be used as thumbnail {\bfseries source}. 

The file can be an image or a video (in that case, acceptable extensions are\+: avi, mp4, ogv, mov, mpg and wmv). To start the video animation, use the function elm\+\_\+thumb\+\_\+animate().

\begin{DoxySeeAlso}{See also}
\hyperlink{group__Thumb_ga282f9f3c6071792a5248e43978f69132}{elm\+\_\+thumb\+\_\+file\+\_\+get()} 

elm\+\_\+thumb\+\_\+reload() 

elm\+\_\+thumb\+\_\+animate()
\end{DoxySeeAlso}

\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em file} & The path to file that will be used as thumbnail source. \\
\hline
\mbox{\tt in}  & {\em key} & The key used in case of an E\+E\+T file. \\
\hline
\end{DoxyParams}
