\hypertarget{group__Emotion__Init}{}\section{Creation and initialization functions}
\label{group__Emotion__Init}\index{Creation and initialization functions@{Creation and initialization functions}}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\+\_\+\+Object} $\ast$ \hyperlink{group__Emotion__Init_ga9b89c712866a0ae77d4cdc6c676e6c01}{emotion\+\_\+object\+\_\+add} (\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas} $\ast$evas)
\begin{DoxyCompactList}\small\item\em Add an emotion object to the canvas. \end{DoxyCompactList}\item 
\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Emotion__Init_ga1b288409a547989d867fd735f7eec556}{emotion\+\_\+object\+\_\+file\+\_\+set} (\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\+\_\+\+Object} $\ast$obj, const char $\ast$filename)
\begin{DoxyCompactList}\small\item\em Set the file to be played in the Emotion object. \end{DoxyCompactList}\item 
\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} const char $\ast$ \hyperlink{group__Emotion__Init_ga8008498539eaf280060deb512b2bdfbc}{emotion\+\_\+object\+\_\+file\+\_\+get} (const \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\+\_\+\+Object} $\ast$obj)
\begin{DoxyCompactList}\small\item\em Get the filename of the file associated with the emotion object. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}


\subsection{Function Documentation}
\hypertarget{group__Emotion__Init_ga9b89c712866a0ae77d4cdc6c676e6c01}{}\index{Creation and initialization functions@{Creation and initialization functions}!emotion\+\_\+object\+\_\+add@{emotion\+\_\+object\+\_\+add}}
\index{emotion\+\_\+object\+\_\+add@{emotion\+\_\+object\+\_\+add}!Creation and initialization functions@{Creation and initialization functions}}
\subsubsection[{emotion\+\_\+object\+\_\+add(\+Evas $\ast$evas)}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} {\bf Evas\+\_\+\+Object}$\ast$ emotion\+\_\+object\+\_\+add (
\begin{DoxyParamCaption}
\item[{{\bf Evas} $\ast$}]{evas}
\end{DoxyParamCaption}
)}\label{group__Emotion__Init_ga9b89c712866a0ae77d4cdc6c676e6c01}


Add an emotion object to the canvas. 


\begin{DoxyParams}{Parameters}
{\em evas} & The canvas where the object will be added to. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The emotion object just created.
\end{DoxyReturn}
This function creates an emotion object and adds it to the specified {\ttfamily evas}. The returned object can be manipulated as any other Evas object, using the default object manipulation functions -\/ evas\+\_\+object\+\_\+$\ast$.

After creating the object with this function, it\textquotesingle{}s still necessary to initialize it with emotion\+\_\+object\+\_\+init(), and if an audio file is going to be played with this object instead of a video, use \hyperlink{group__Emotion__Video_gab01124714bf0633b7552c97152022233}{emotion\+\_\+object\+\_\+video\+\_\+mute\+\_\+set()}.

The next step is to open the desired file with \hyperlink{group__Emotion__Init_ga1b288409a547989d867fd735f7eec556}{emotion\+\_\+object\+\_\+file\+\_\+set()}, and start playing it with \hyperlink{group__Emotion__Play_ga9be5c239d2100e2c16e18c171e1c1790}{emotion\+\_\+object\+\_\+play\+\_\+set()}.

\begin{DoxySeeAlso}{See also}
emotion\+\_\+object\+\_\+init() 

\hyperlink{group__Emotion__Video_gab01124714bf0633b7552c97152022233}{emotion\+\_\+object\+\_\+video\+\_\+mute\+\_\+set()} 

\hyperlink{group__Emotion__Init_ga1b288409a547989d867fd735f7eec556}{emotion\+\_\+object\+\_\+file\+\_\+set()} 

\hyperlink{group__Emotion__Play_ga9be5c239d2100e2c16e18c171e1c1790}{emotion\+\_\+object\+\_\+play\+\_\+set()} 
\end{DoxySeeAlso}
\begin{Desc}
\item[Examples\+: ]\par
\hyperlink{emotion_basic_example_8c-example}{emotion\+\_\+basic\+\_\+example.\+c}, and \hyperlink{emotion_signals_example_8c-example}{emotion\+\_\+signals\+\_\+example.\+c}.\end{Desc}


References eo\+\_\+add.

\hypertarget{group__Emotion__Init_ga1b288409a547989d867fd735f7eec556}{}\index{Creation and initialization functions@{Creation and initialization functions}!emotion\+\_\+object\+\_\+file\+\_\+set@{emotion\+\_\+object\+\_\+file\+\_\+set}}
\index{emotion\+\_\+object\+\_\+file\+\_\+set@{emotion\+\_\+object\+\_\+file\+\_\+set}!Creation and initialization functions@{Creation and initialization functions}}
\subsubsection[{emotion\+\_\+object\+\_\+file\+\_\+set(\+Evas\+\_\+\+Object $\ast$obj, const char $\ast$filename)}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} {\bf Eina\+\_\+\+Bool} emotion\+\_\+object\+\_\+file\+\_\+set (
\begin{DoxyParamCaption}
\item[{{\bf Evas\+\_\+\+Object} $\ast$}]{obj, }
\item[{const char $\ast$}]{filename}
\end{DoxyParamCaption}
)}\label{group__Emotion__Init_ga1b288409a547989d867fd735f7eec556}


Set the file to be played in the Emotion object. 


\begin{DoxyParams}{Parameters}
{\em obj} & The emotion object where the file is being loaded. \\
\hline
{\em filename} & Path to the file to be loaded. It can be absolute or relative path. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
E\+I\+N\+A\+\_\+\+T\+R\+U\+E if the new file could be loaded successfully, and E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E if the file could not be loaded. This happens when the filename is could not be found, when the module couldn\textquotesingle{}t open the file, when no module is initialized in this object, or when the {\ttfamily filename} is the same as the one previously set.
\end{DoxyReturn}
This function sets the file to be used with this emotion object. If the object already has another file set, this file will be unset and unloaded, and the new file will be loaded to this emotion object. The seek position will be set to 0, and the emotion object will be paused, instead of playing.

If there was already a filename set, and it\textquotesingle{}s the same as the one being set now, this function does nothing and returns E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E.

Use {\ttfamily N\+U\+L\+L} as argument to {\ttfamily filename} if you want to unload the current file but don\textquotesingle{}t want to load anything else.

\begin{DoxySeeAlso}{See also}
emotion\+\_\+object\+\_\+init() 

\hyperlink{group__Emotion__Play_ga9be5c239d2100e2c16e18c171e1c1790}{emotion\+\_\+object\+\_\+play\+\_\+set()} 

\hyperlink{group__Emotion__Init_ga8008498539eaf280060deb512b2bdfbc}{emotion\+\_\+object\+\_\+file\+\_\+get()} 
\end{DoxySeeAlso}
\begin{Desc}
\item[Examples\+: ]\par
\hyperlink{emotion_basic_example_8c-example}{emotion\+\_\+basic\+\_\+example.\+c}, and \hyperlink{emotion_signals_example_8c-example}{emotion\+\_\+signals\+\_\+example.\+c}.\end{Desc}
\hypertarget{group__Emotion__Init_ga8008498539eaf280060deb512b2bdfbc}{}\index{Creation and initialization functions@{Creation and initialization functions}!emotion\+\_\+object\+\_\+file\+\_\+get@{emotion\+\_\+object\+\_\+file\+\_\+get}}
\index{emotion\+\_\+object\+\_\+file\+\_\+get@{emotion\+\_\+object\+\_\+file\+\_\+get}!Creation and initialization functions@{Creation and initialization functions}}
\subsubsection[{emotion\+\_\+object\+\_\+file\+\_\+get(const Evas\+\_\+\+Object $\ast$obj)}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} const char$\ast$ emotion\+\_\+object\+\_\+file\+\_\+get (
\begin{DoxyParamCaption}
\item[{const {\bf Evas\+\_\+\+Object} $\ast$}]{obj}
\end{DoxyParamCaption}
)}\label{group__Emotion__Init_ga8008498539eaf280060deb512b2bdfbc}


Get the filename of the file associated with the emotion object. 


\begin{DoxyParams}{Parameters}
{\em obj} & The emotion object from which the filename will be retrieved. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The path to the file loaded into this emotion object.
\end{DoxyReturn}
This function returns the path of the file loaded in this emotion object. If no object is loaded, it will return {\ttfamily N\+U\+L\+L}.

\begin{DoxyNote}{Note}
Don\textquotesingle{}t free or change the string returned by this function in any way. If you want to unset it, use {\ttfamily emotion\+\_\+object\+\_\+file\+\_\+set(obj, N\+U\+L\+L)}.
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__Emotion__Init_ga1b288409a547989d867fd735f7eec556}{emotion\+\_\+object\+\_\+file\+\_\+set()} 
\end{DoxySeeAlso}
