\hypertarget{group__Emotion__Init}{}\doxysection{Creation and initialization functions}
\label{group__Emotion__Init}\index{Creation and initialization functions@{Creation and initialization functions}}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
EMOTION\+\_\+\+API \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\+\_\+\+Object}} $\ast$ \mbox{\hyperlink{group__Emotion__Init_ga24f8978589d49e62ca8829f61fac83a9}{emotion\+\_\+object\+\_\+add}} (\mbox{\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}} $\ast$evas)
\begin{DoxyCompactList}\small\item\em Add an emotion object to the canvas. \end{DoxyCompactList}\item 
EMOTION\+\_\+\+API \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Emotion__Init_gaf0373828f33bd62aa6070f6c890f91a6}{emotion\+\_\+object\+\_\+file\+\_\+set}} (\mbox{\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 
EMOTION\+\_\+\+API const char $\ast$ \mbox{\hyperlink{group__Emotion__Init_gab1fff521e413af0613372c9ff11ed268}{emotion\+\_\+object\+\_\+file\+\_\+get}} (const \mbox{\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}


\doxysubsection{Detailed Description}


\doxysubsection{Function Documentation}
\mbox{\Hypertarget{group__Emotion__Init_ga24f8978589d49e62ca8829f61fac83a9}\label{group__Emotion__Init_ga24f8978589d49e62ca8829f61fac83a9}} 
\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}}
\doxysubsubsection{\texorpdfstring{emotion\_object\_add()}{emotion\_object\_add()}}
{\footnotesize\ttfamily EMOTION\+\_\+\+API \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\+\_\+\+Object}} $\ast$ emotion\+\_\+object\+\_\+add (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}} $\ast$}]{evas }\end{DoxyParamCaption})}



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 \mbox{\hyperlink{group__Emotion__Video_ga36753f32fa59baf864b42abae0f10616}{emotion\+\_\+object\+\_\+video\+\_\+mute\+\_\+set()}}.

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

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

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

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

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


References \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gae7cf7b1d66fa9022242e09fd53c06bb2}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+FALSE\+\_\+\+RETURN\+\_\+\+VAL}}, and \mbox{\hyperlink{group__Evas__Canvas_ga7987306d8b2c49352b9d2c41585d0ce9}{EVAS\+\_\+\+CANVAS\+\_\+\+CLASS}}.

\mbox{\Hypertarget{group__Emotion__Init_gaf0373828f33bd62aa6070f6c890f91a6}\label{group__Emotion__Init_gaf0373828f33bd62aa6070f6c890f91a6}} 
\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}}
\doxysubsubsection{\texorpdfstring{emotion\_object\_file\_set()}{emotion\_object\_file\_set()}}
{\footnotesize\ttfamily EMOTION\+\_\+\+API \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} emotion\+\_\+object\+\_\+file\+\_\+set (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\+\_\+\+Object}} $\ast$}]{obj,  }\item[{const char $\ast$}]{filename }\end{DoxyParamCaption})}



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}
EINA\+\_\+\+TRUE if the new file could be loaded successfully, and EINA\+\_\+\+FALSE 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 EINA\+\_\+\+FALSE.

Use {\ttfamily NULL} 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() 

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

\mbox{\hyperlink{group__Emotion__Init_gab1fff521e413af0613372c9ff11ed268}{emotion\+\_\+object\+\_\+file\+\_\+get()}} 
\end{DoxySeeAlso}
\begin{Desc}
\item[Examples]\par
\mbox{\hyperlink{emotion_basic_example_8c-example}{emotion\+\_\+basic\+\_\+example.\+c}}, \mbox{\hyperlink{emotion_signals_example_8c-example}{emotion\+\_\+signals\+\_\+example.\+c}}, and \mbox{\hyperlink{emotion_test_main_8c-example}{emotion\+\_\+test\+\_\+main.\+c}}.\end{Desc}
\mbox{\Hypertarget{group__Emotion__Init_gab1fff521e413af0613372c9ff11ed268}\label{group__Emotion__Init_gab1fff521e413af0613372c9ff11ed268}} 
\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}}
\doxysubsubsection{\texorpdfstring{emotion\_object\_file\_get()}{emotion\_object\_file\_get()}}
{\footnotesize\ttfamily EMOTION\+\_\+\+API const char $\ast$ emotion\+\_\+object\+\_\+file\+\_\+get (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\+\_\+\+Object}} $\ast$}]{obj }\end{DoxyParamCaption})}



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 NULL}.

\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, NULL)}.
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Emotion__Init_gaf0373828f33bd62aa6070f6c890f91a6}{emotion\+\_\+object\+\_\+file\+\_\+set()}} 
\end{DoxySeeAlso}
\begin{Desc}
\item[Examples]\par
\mbox{\hyperlink{emotion_test_main_8c-example}{emotion\+\_\+test\+\_\+main.\+c}}.\end{Desc}
