\hypertarget{group__Edje__Object__Group}{\section{Edje Object}
\label{group__Edje__Object__Group}\index{Edje Object@{Edje Object}}
}


This group discusses functions that deal with Edje layouts and its components.  


\subsection*{Modules}
\begin{DoxyCompactItemize}
\item 
\hyperlink{group__Edje__Object__Communication__Interface__Signal}{Edje Communication Interface\-: Signal}
\begin{DoxyCompactList}\small\item\em Functions that deal with signals. \end{DoxyCompactList}\item 
\hyperlink{group__Edje__Object__Scale}{Edje Scale}
\begin{DoxyCompactList}\small\item\em Functions that deal with scaling objects. \end{DoxyCompactList}\item 
\hyperlink{group__Edje__Object__Color__Class}{Edje Class\-: Color}
\begin{DoxyCompactList}\small\item\em Functions that deal with Color Classes. \end{DoxyCompactList}\item 
\hyperlink{group__Edje__Object__Part}{Edje Part}
\begin{DoxyCompactList}\small\item\em Functions that deal with layout components. \end{DoxyCompactList}\item 
\hyperlink{group__Edje__Object__Geometry__Group}{Edje Object Geometry}
\begin{DoxyCompactList}\small\item\em Functions that deal with object's geometry. \end{DoxyCompactList}\item 
\hyperlink{group__Edje__Object__Text__Class}{Edje Class\-: Text}
\begin{DoxyCompactList}\small\item\em Functions that deal with Text Classes. \end{DoxyCompactList}\item 
\hyperlink{group__Edje__Object__File}{Edje Object File}
\begin{DoxyCompactList}\small\item\em Functions to deals with E\-D\-J files. \end{DoxyCompactList}\item 
\hyperlink{group__Edje__Object__Animation}{Edje Object Animation}
\begin{DoxyCompactList}\small\item\em Functions that deal with animations. \end{DoxyCompactList}\item 
\hyperlink{group__Edje__Object__Communication__Interface__Message}{Edje Communication Interface\-: Message}
\begin{DoxyCompactList}\small\item\em Functions that deal with messages. \end{DoxyCompactList}\item 
\hyperlink{group__Edje__Perspective}{Edje Perspective}
\begin{DoxyCompactList}\small\item\em Functions that deal with 3\-D projection of an 2\-D object. \end{DoxyCompactList}\end{DoxyCompactItemize}
\begin{DoxyCompactItemize}
\item 
\#define \hyperlink{group__Edje__Object__Group_ga837f6af6fb1facfdb2a47f6f5aee314a}{edje\-\_\-obj\-\_\-preload}(cancel, ret)~E\-D\-J\-E\-\_\-\-O\-B\-J\-\_\-\-I\-D(E\-D\-J\-E\-\_\-\-O\-B\-J\-\_\-\-S\-U\-B\-\_\-\-I\-D\-\_\-\-P\-R\-E\-L\-O\-A\-D), E\-O\-\_\-\-T\-Y\-P\-E\-C\-H\-E\-C\-K(\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\-\_\-\-Bool}, cancel), E\-O\-\_\-\-T\-Y\-P\-E\-C\-H\-E\-C\-K(\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\-\_\-\-Bool} $\ast$, ret)
\begin{DoxyCompactList}\small\item\em Preload the images on the Edje Object in the background. \end{DoxyCompactList}\end{DoxyCompactItemize}
\begin{DoxyCompactItemize}
\item 
\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\-\_\-\-Object} $\ast$ \hyperlink{group__Edje__Object__Group_ga2fb20b8db9d2c4384cca17e2f7637c40}{edje\-\_\-object\-\_\-add} (\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas} $\ast$evas)
\begin{DoxyCompactList}\small\item\em Instantiate a new Edje object. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\-\_\-\-Bool} \hyperlink{group__Edje__Object__Group_gad8e7f6fe3076c4aa32d3accfa3af1886}{edje\-\_\-object\-\_\-preload} (\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\-\_\-\-Object} $\ast$obj, \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\-\_\-\-Bool} cancel)
\begin{DoxyCompactList}\small\item\em Preload the images on the Edje Object in the background. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
This group discusses functions that deal with Edje layouts and its components. An important thing to know about this group is that there is no Edje\-\_\-\-Object in {\bfseries code}. What we refer here as object are layouts (or themes) defined by groups, and parts, both declared in E\-D\-C files. They are of type Evas\-\_\-\-Object as the other native objects of Evas, but they only exist in Edje, so that is why we are calling them \char`\"{}edje objects\char`\"{}.

With the Edje Object Group functions we can deal with layouts by managing its aspect, content, message and signal exchange and animation, among others. 

\subsection{Macro Definition Documentation}
\hypertarget{group__Edje__Object__Group_ga837f6af6fb1facfdb2a47f6f5aee314a}{\index{Edje Object@{Edje Object}!edje\-\_\-obj\-\_\-preload@{edje\-\_\-obj\-\_\-preload}}
\index{edje\-\_\-obj\-\_\-preload@{edje\-\_\-obj\-\_\-preload}!Edje Object@{Edje Object}}
\subsubsection[{edje\-\_\-obj\-\_\-preload}]{\setlength{\rightskip}{0pt plus 5cm}\#define edje\-\_\-obj\-\_\-preload(
\begin{DoxyParamCaption}
\item[{}]{cancel, }
\item[{}]{ret}
\end{DoxyParamCaption}
)~E\-D\-J\-E\-\_\-\-O\-B\-J\-\_\-\-I\-D(E\-D\-J\-E\-\_\-\-O\-B\-J\-\_\-\-S\-U\-B\-\_\-\-I\-D\-\_\-\-P\-R\-E\-L\-O\-A\-D), E\-O\-\_\-\-T\-Y\-P\-E\-C\-H\-E\-C\-K({\bf Eina\-\_\-\-Bool}, cancel), E\-O\-\_\-\-T\-Y\-P\-E\-C\-H\-E\-C\-K({\bf Eina\-\_\-\-Bool} $\ast$, ret)}}\label{group__Edje__Object__Group_ga837f6af6fb1facfdb2a47f6f5aee314a}


Preload the images on the Edje Object in the background. 

\begin{DoxySince}{Since}
1.\-8
\end{DoxySince}

\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em cancel} & \\
\hline
\mbox{\tt out}  & {\em ret} & \\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See Also}
\hyperlink{group__Edje__Object__Group_gad8e7f6fe3076c4aa32d3accfa3af1886}{edje\-\_\-object\-\_\-preload} 
\end{DoxySeeAlso}


Referenced by edje\-\_\-object\-\_\-preload().



\subsection{Function Documentation}
\hypertarget{group__Edje__Object__Group_ga2fb20b8db9d2c4384cca17e2f7637c40}{\index{Edje Object@{Edje Object}!edje\-\_\-object\-\_\-add@{edje\-\_\-object\-\_\-add}}
\index{edje\-\_\-object\-\_\-add@{edje\-\_\-object\-\_\-add}!Edje Object@{Edje Object}}
\subsubsection[{edje\-\_\-object\-\_\-add}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Evas\-\_\-\-Object}$\ast$ edje\-\_\-object\-\_\-add (
\begin{DoxyParamCaption}
\item[{{\bf Evas} $\ast$}]{evas}
\end{DoxyParamCaption}
)}}\label{group__Edje__Object__Group_ga2fb20b8db9d2c4384cca17e2f7637c40}


Instantiate a new Edje object. 


\begin{DoxyParams}{Parameters}
{\em evas} & A valid Evas handle, the canvas to place the new object in \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A handle to the new object created or {\ttfamily N\-U\-L\-L}, on errors.
\end{DoxyReturn}
This function creates a new Edje smart object, returning its {\ttfamily Evas\-\_\-\-Object} handle. An Edje object is useless without a (source) file set to it, so you'd most probably call \hyperlink{group__Edje__Object__File_gaec1edd24b5bd8e82823759a8dddc1996}{edje\-\_\-object\-\_\-file\-\_\-set()} afterwards, like in\-: 
\begin{DoxyCode}
\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *edje;

edje = \hyperlink{group__Edje__Object__Group_ga2fb20b8db9d2c4384cca17e2f7637c40}{edje\_object\_add}(canvas);
\textcolor{keywordflow}{if} (!edje)
  \{
     fprintf(stderr, \textcolor{stringliteral}{"could not create edje object!\(\backslash\)n"});
     \textcolor{keywordflow}{return} NULL;
  \}

\textcolor{keywordflow}{if} (!\hyperlink{group__Edje__Object__File_gaec1edd24b5bd8e82823759a8dddc1996}{edje\_object\_file\_set}(edje, \textcolor{stringliteral}{"theme.edj"}, \textcolor{stringliteral}{"group\_name"}))
  \{
     \textcolor{keywordtype}{int} err = \hyperlink{group__Edje__Object__File_ga4d244ed455a48b9cbf286b6d8b802df3}{edje\_object\_load\_error\_get}(edje);
     \textcolor{keyword}{const} \textcolor{keywordtype}{char} *errmsg = \hyperlink{group__Edje__Object__File_ga034465c2de4ab495802da20f332c386e}{edje\_load\_error\_str}(err);
     fprintf(stderr, \textcolor{stringliteral}{"could not load 'group\_name' from theme.edj: %s"},
        errmsg);

     \hyperlink{group__Evas__Object__Group__Basic_ga7e7a625dab7a3890532aa13b43117076}{evas\_object\_del}(edje);
     \textcolor{keywordflow}{return} NULL;
  \}
\end{DoxyCode}


\begin{DoxyNote}{Note}
You can get a callback every time edje re-\/calculates the object (either due to animation or some kind of signal or input). This is called in-\/line just after the recalculation has occurred. It is a good idea not to go and delete or alter the object inside this callbacks, simply make a note that the recalculation has taken place and then do something about it outside the callback. to register a callback use code like\-:
\end{DoxyNote}

\begin{DoxyCode}
\hyperlink{group__Evas__Smart__Object__Group_ga18a8b179f94d21b2b09e19db11741061}{evas\_object\_smart\_callback\_add}(edje\_obj, \textcolor{stringliteral}{"recalc"}, my\_cb, my\_cb\_data);
\end{DoxyCode}


\begin{DoxySeeAlso}{See Also}
\hyperlink{group__Evas__Smart__Object__Group_ga18a8b179f94d21b2b09e19db11741061}{evas\-\_\-object\-\_\-smart\-\_\-callback\-\_\-add()}
\end{DoxySeeAlso}
\begin{DoxyNote}{Note}
Before creating the first Edje object in your code, remember to initialize the library, with \hyperlink{group__Edje__General__Group_ga1c9c6594f38023c29fbfb2d0c8c675db}{edje\-\_\-init()}, or unexpected behavior might occur. 
\end{DoxyNote}
\begin{Desc}
\item[Examples\-: ]\par
\hyperlink{edje-basic_8c-example}{edje-\/basic.\-c}, \hyperlink{edje-box_8c-example}{edje-\/box.\-c}, \hyperlink{edje-box2_8c-example}{edje-\/box2.\-c}, \hyperlink{edje-color-class_8c-example}{edje-\/color-\/class.\-c}, \hyperlink{edje-drag_8c-example}{edje-\/drag.\-c}, \hyperlink{edje-perspective_8c-example}{edje-\/perspective.\-c}, \hyperlink{edje-signals-messages_8c-example}{edje-\/signals-\/messages.\-c}, \hyperlink{edje-swallow_8c-example}{edje-\/swallow.\-c}, \hyperlink{edje-table_8c-example}{edje-\/table.\-c}, \hyperlink{edje-text_8c-example}{edje-\/text.\-c}, and \hyperlink{evas-aspect-hints_8c-example}{evas-\/aspect-\/hints.\-c}.\end{Desc}


Referenced by edje\-\_\-edit\-\_\-part\-\_\-source\-\_\-set().

\hypertarget{group__Edje__Object__Group_gad8e7f6fe3076c4aa32d3accfa3af1886}{\index{Edje Object@{Edje Object}!edje\-\_\-object\-\_\-preload@{edje\-\_\-object\-\_\-preload}}
\index{edje\-\_\-object\-\_\-preload@{edje\-\_\-object\-\_\-preload}!Edje Object@{Edje Object}}
\subsubsection[{edje\-\_\-object\-\_\-preload}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Eina\-\_\-\-Bool} edje\-\_\-object\-\_\-preload (
\begin{DoxyParamCaption}
\item[{{\bf Evas\-\_\-\-Object} $\ast$}]{obj, }
\item[{{\bf Eina\-\_\-\-Bool}}]{cancel}
\end{DoxyParamCaption}
)}}\label{group__Edje__Object__Group_gad8e7f6fe3076c4aa32d3accfa3af1886}


Preload the images on the Edje Object in the background. 


\begin{DoxyParams}{Parameters}
{\em obj} & A handle to an Edje object \\
\hline
{\em cancel} & {\ttfamily E\-I\-N\-A\-\_\-\-F\-A\-L\-S\-E} will add it the preloading work queue, {\ttfamily E\-I\-N\-A\-\_\-\-T\-R\-U\-E} will remove it (if it was issued before). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
{\ttfamily E\-I\-N\-A\-\_\-\-F\-A\-S\-L\-E} if obj was not a valid Edje object otherwise {\ttfamily E\-I\-N\-A\-\_\-\-T\-R\-U\-E} 
\end{DoxyReturn}
This function requests the preload of all data images (on the given object) in the background. The work is queued before being processed (because there might be other pending requests of this type). It emits a signal \char`\"{}preload,done\char`\"{} when finished.

\begin{DoxyNote}{Note}
Use {\ttfamily E\-I\-N\-A\-\_\-\-T\-R\-U\-E} on scenarios where you don't need the image data preloaded anymore. 
\end{DoxyNote}


References edje\-\_\-obj\-\_\-preload, and E\-I\-N\-A\-\_\-\-F\-A\-L\-S\-E.

