\chapter{Edje basics example}
\hypertarget{Example_Edje_Basics}{}\label{Example_Edje_Basics}\index{Edje basics example@{Edje basics example}}
In this example, we illustrate how to start using the Edje library, with the very basic one needs to instantiate an Edje object.

We place, in the canvas, an Edje object along with a {\bfseries{red}} border image to delimit its geometry. After we instantiate the Edje object, we {\bfseries{have}} to set a file and a group, within that file, to bind to it. For this example, we\textquotesingle{}re using an EDC file which declares two parts (blue and green rectangles) and an item data\+: 
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{collections\ \{}
\DoxyCodeLine{\ \ \ group\ \{}
\DoxyCodeLine{\ \ \ \ \ \ name:\ "{}example\_group"{};}
\DoxyCodeLine{\ \ \ \ \ \ max:\ 500\ 500;}
\DoxyCodeLine{\ \ \ \ \ \ min:\ 50\ 50;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ data\ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ item:\ "{}example\_data"{}\ "{}a\ string"{};}
\DoxyCodeLine{\ \ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ parts\ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ part\ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ name:\ "{}part\_one"{};}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ type:\ RECT;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ scale:\ 1;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ description\ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ min:\ 50\ 50;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ max:\ 50\ 50;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ state:\ "{}default"{}\ 0.0;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ color:\ 0\ 0\ 255\ 255;\ /*\ blue\ */}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ rel1.relative:\ 0.0\ 0.0;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ rel2.relative:\ 1.0\ 1.0;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ part\ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ name:\ "{}part\_two"{};}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ type:\ RECT;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ description\ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ state:\ "{}default"{}\ 0.0;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ color:\ 0\ 255\ 0\ 255;\ /*\ green\ */}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ rel1.relative:\ -\/1.0\ -\/1.0;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ rel2.relative:\ 0.0\ 0.0;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\ \ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \}}
\DoxyCodeLine{\}}

\end{DoxyCodeInclude}


We start by trying to access an {\bfseries{unexistant}} group in the file, so that you can see the usefulness of \doxylink{group__Edje__Object__Group_ga4d244ed455a48b9cbf286b6d8b802df3}{edje\+\_\+object\+\_\+load\+\_\+error\+\_\+get()} and \doxylink{group__Edje__Object__Group_gaa26fe971d6817a0db649480b63eb3791}{edje\+\_\+load\+\_\+error\+\_\+str()}. Check that the error message will tell you just that -- a group which didn\textquotesingle{}t exist in the file was called for\+:  
\begin{DoxyCodeInclude}{0}

\end{DoxyCodeInclude}
  
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\ \ \ edje\_obj\ =\ \mbox{\hyperlink{group__Edje__Object__Group_ga5548cef32568746f40df9bd0be339bea}{edje\_object\_add}}(evas);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{comment}{/*\ exercising\ Edje\ loading\ error,\ on\ purpose\ */}}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{group__Edje__Object__Group_gaec1edd24b5bd8e82823759a8dddc1996}{edje\_object\_file\_set}}(edje\_obj,\ edje\_file,\ \textcolor{stringliteral}{"{}unexistant\_group"{}}))}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ err\ =\ \mbox{\hyperlink{group__Edje__Object__Group_ga4d244ed455a48b9cbf286b6d8b802df3}{edje\_object\_load\_error\_get}}(edje\_obj);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *errmsg\ =\ \mbox{\hyperlink{group__Edje__Object__Group_gaa26fe971d6817a0db649480b63eb3791}{edje\_load\_error\_str}}(err);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ fprintf(stderr,\ \textcolor{stringliteral}{"{}Could\ not\ load\ 'unexistant\_group'\ from\ basic.edj:"{}}}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\ \%s\(\backslash\)n"{}},\ errmsg);}
\DoxyCodeLine{\ \ \ \ \ \}}

\end{DoxyCodeInclude}
 Than, we finally bind our Edje object to {\ttfamily "{}example\+\_\+group"{}}, printing a message afterwards\+:  
\begin{DoxyCodeInclude}{0}

\end{DoxyCodeInclude}
 What follows is a series of Edje API calls which are of general use. The first of them is edje\+\_\+object\+\_\+data\+\_\+get(), which we use to get the value we have put in the {\ttfamily "{}example\+\_\+data"{}} data field, in our EDC object declaration\+:  
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\ \ \ printf(\textcolor{stringliteral}{"{}'example\_data'\ data\ field\ in\ group\ 'example\_group'\ has\ "{}}}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}the\ value:\ \%s\(\backslash\)n"{}},\ edje\_object\_data\_get(edje\_obj,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}example\_data"{}}));}

\end{DoxyCodeInclude}
 Than, we exemplify \doxylink{group__Edje__Object__Part_ga54caca972ea2036b5bbf6e7133729e4e}{edje\+\_\+object\+\_\+part\+\_\+exists()}\+:  
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\ \ \ printf(\textcolor{stringliteral}{"{}Testing\ if\ 'part\_one'\ part\ exists:\ \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Edje__Object__Part_ga54caca972ea2036b5bbf6e7133729e4e}{edje\_object\_part\_exists}}(edje\_obj,\ \textcolor{stringliteral}{"{}part\_one"{}})\ ?\ \textcolor{stringliteral}{"{}yes!"{}}\ :\ \textcolor{stringliteral}{"{}no"{}});}

\end{DoxyCodeInclude}
 The next call is to query {\ttfamily "{}part\+\_\+one"{}\textquotesingle{}s} geometry, relative to the whole Edje object\textquotesingle{}s area. The part will be situated in the middle of the Edje object\textquotesingle{}s, because it has a restricted forced size (we set its minimum size equal to its maximum, for that) and, by default, parts are aligned to the center of their containers\+:  
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Edje__Object__Group_ga739bc5265bedbc02c90900fc3bd11eed}{edje\_object\_part\_geometry\_get}}(edje\_obj,\ \textcolor{stringliteral}{"{}part\_one"{}},\ \&x,\ \&y,\ \&w,\ \&h);}
\DoxyCodeLine{\ \ \ printf(\textcolor{stringliteral}{"{}The\ geometry\ of\ that\ part\ inside\ the\ Edje\ object's\ area\ "{}}}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}is:\ x\ =\ \%d,\ y\ =\ \%d,\ w\ =\ \%d,\ h\ =\ \%d\(\backslash\)n"{}},\ x,\ y,\ w,\ h);}

\end{DoxyCodeInclude}
 We can grab a direct pointer on the rectangle implementing {\ttfamily "{}part\+\_\+one"{}}, by using \doxylink{group__Edje__Object__Group_ga6c5b6348f6ff76d2482e37cf91e89797}{edje\+\_\+object\+\_\+part\+\_\+object\+\_\+get()}. Since we are not allowed to set properties on it, we just check its color, to assure its really blue, as declared in the EDC\+:  
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_gad204691b53639244ee1062d3f349f1d9}{evas\_object\_color\_get}}(\mbox{\hyperlink{group__Edje__Object__Group_ga6c5b6348f6ff76d2482e37cf91e89797}{edje\_object\_part\_object\_get}}(edje\_obj,\ \textcolor{stringliteral}{"{}part\_one"{}}),}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \&x,\ \&y,\ \&w,\ \&h);}
\DoxyCodeLine{\ \ \ printf(\textcolor{stringliteral}{"{}That\ part's\ color\ components\ are:\ r\ =\ \%d,\ g\ =\ \%d,\ b\ =\ \%d,"{}}}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\ a\ =\ \%d\(\backslash\)n"{}},\ x,\ y,\ w,\ h);}

\end{DoxyCodeInclude}
 The {\ttfamily "{}min"{}} and {\ttfamily "{}max"{}} EDC properties can be queried with the following calls\+:  
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Edje__Object__Group_ga367ce6bad86acb63fa7a6b9f72597cda}{edje\_object\_size\_max\_get}}(edje\_obj,\ \&w,\ \&h);}
\DoxyCodeLine{\ \ \ printf(\textcolor{stringliteral}{"{}The\ Edje\ object's\ max.\ size\ is:\ \%d,\ \%d\(\backslash\)n"{}},\ w,\ h);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Edje__Object__Group_ga6e8cf0e56dcb9f1f96422334fa07a356}{edje\_object\_size\_min\_get}}(edje\_obj,\ \&w,\ \&h);}
\DoxyCodeLine{\ \ \ printf(\textcolor{stringliteral}{"{}The\ Edje\ object's\ min.\ size\ is:\ \%d,\ \%d\(\backslash\)n"{}},\ w,\ h);}

\end{DoxyCodeInclude}
 The next two calls are to make {\bfseries{size calculations}} on our object. Because of the minimum size declared for {\ttfamily "{}part\+\_\+one"{}} part\textquotesingle{}s default state description, that will be our exact minimum size calculated for the group (remember the {\ttfamily "{}min"{}} declaration at group level is just a {\bfseries{hint}}, not an enforcement). We then exercise the \doxylink{group__Edje__Object__Group_ga98d74542aa2faa8399e93b86c41c828e}{edje\+\_\+object\+\_\+size\+\_\+min\+\_\+restricted\+\_\+calc()} function, passing a minimum size of 500, in each axis. Since we have {\bfseries{no}} object bigger than that, it will be the minimum size calculated, in the end\+:  
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Edje__Object__Group_gae8dc1397ff94126f3083280a0400cfbc}{edje\_object\_size\_min\_calc}}(edje\_obj,\ \&w,\ \&h);}
\DoxyCodeLine{\ \ \ printf(\textcolor{stringliteral}{"{}The\ Edje\ object's\ min.\ size\ reported\ by\ min.\ size"{}}}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\ calculation\ is:\ w\ =\ \%d,\ h\ =\ \%d\(\backslash\)n"{}},\ w,\ h);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Edje__Object__Group_ga98d74542aa2faa8399e93b86c41c828e}{edje\_object\_size\_min\_restricted\_calc}}(edje\_obj,\ \&w,\ \&h,\ 500,\ 500);}
\DoxyCodeLine{\ \ \ printf(\textcolor{stringliteral}{"{}The\ Edje\ object's\ min.\ size\ reported\ by\ *restricted*\ "{}}}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}min.\ size\ calculation\ is:\ w\ =\ \%d,\ h\ =\ \%d\(\backslash\)n"{}},\ w,\ h);}

\end{DoxyCodeInclude}
 {\ttfamily "{}part\+\_\+two"{}} part is there with a purpose\+: since it extrapolates the Edje object\textquotesingle{}s boundaries, the \doxylink{group__Edje__Object__Group_gac903f485812444eda3068f91cdb3c7f5}{edje\+\_\+object\+\_\+parts\+\_\+extends\+\_\+calc()} function will report origin coordinates for the rectangle grouping both parts with {\bfseries{negative}} values, indicating it extrapolates to the upper left of our group, just as we see it.

To interact with the last features exemplified in the program, there\textquotesingle{}s a command line interface. A help string can be asked for with the \textquotesingle{}h\textquotesingle{} key\+:  
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ commands[]\ =\ \(\backslash\)}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}commands\ are:\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)ts\ -\/\ change\ Edje's\ global\ scaling\ factor\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)tr\ -\/\ change\ center\ rectangle's\ scaling\ factor\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)tEsc\ -\/\ exit\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)th\ -\/\ print\ help\(\backslash\)n"{}};}

\end{DoxyCodeInclude}
 Those commands will change the scaling factors of our Edje objects. The first of them, {\ttfamily \textquotesingle{}s\textquotesingle{}}, will change Edje\textquotesingle{}s {\bfseries{global}} scaling factor between {\ttfamily 1.\+0} (no scaling) and {\ttfamily 2.\+0} (double scale). Scaling will be applied to {\ttfamily "{}part\+\_\+one"{}}, only, because that\textquotesingle{}s the part flagged to be scaled at EDC level\+:  
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (strcmp(ev-\/>key,\ \textcolor{stringliteral}{"{}s"{}})\ ==\ 0)\ \textcolor{comment}{/*\ global\ scaling\ factor\ */}}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordtype}{double}\ scale\ =\ \mbox{\hyperlink{group__Edje__Object__Scale_ga481c3d35b55207c2536872e1d3e235cf}{edje\_scale\_get}}();}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}got\ scale\ \%f\(\backslash\)n"{}},\ scale);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{group__Eina__Tools__Group_ga6bee37244b675b83d6a4f044a7a3d1e8}{EINA\_DBL\_EQ}}(scale,\ 1.0))\ scale\ =\ 1.0;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}\ scale\ =\ 2.0;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Edje__Object__Scale_gadfb6850eece96768a651702b0a7535fb}{edje\_scale\_set}}(scale);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}Setting\ global\ scaling\ factor\ to\ \%f.\(\backslash\)n"{}},\ scale);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}

\end{DoxyCodeInclude}
 Note, finally, that the {\ttfamily \textquotesingle{}s\textquotesingle{}} command will depend on the \textquotesingle{}r\textquotesingle{} one to have its effects applied. The latter will change {\ttfamily "{}part\+\_\+one"{}\textquotesingle{}s} {\bfseries{individual}} scaling factor, which {\bfseries{overrides}} Edje\textquotesingle{}s global scaling factor. Only when the individual one is set to zero, will the global one take effect\+:  
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (strcmp(ev-\/>key,\ \textcolor{stringliteral}{"{}r"{}})\ ==\ 0)\ \textcolor{comment}{/*\ individual\ scaling\ factor\ */}}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordtype}{double}\ scale\ =\ \mbox{\hyperlink{group__Edje__Object__Scale_ga0f4bf41cc9dcd8b2524aad08adbd23fb}{edje\_object\_scale\_get}}(edje\_obj);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}got\ scale\ \%f\(\backslash\)n"{}},\ scale);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{group__Eina__Tools__Group_ga6bee37244b675b83d6a4f044a7a3d1e8}{EINA\_DBL\_EQ}}(scale,\ 0))\ scale\ =\ 1.0;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{group__Eina__Tools__Group_ga6bee37244b675b83d6a4f044a7a3d1e8}{EINA\_DBL\_EQ}}(scale,\ 1.0))\ scale\ =\ 2.0;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}\ scale\ =\ 0.0;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Edje__Object__Scale_ga9de0e4aa12e0e825ffa6890be99a4e49}{edje\_object\_scale\_set}}(edje\_obj,\ scale);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}Setting\ center\ rectangle's\ scaling\ factor\ to\ \%f.\(\backslash\)n"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ scale);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}

\end{DoxyCodeInclude}


The example\textquotesingle{}s window should look like this picture\+:

  
\begin{DoxyImageNoCaption}
  \mbox{\includegraphics[width=\textwidth]{edje-basics-example}}
\end{DoxyImageNoCaption}


The full example follows. 
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#ifdef\ HAVE\_CONFIG\_H}}
\DoxyCodeLine{\textcolor{preprocessor}{\#\ include\ "{}config.h"{}}}
\DoxyCodeLine{\textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\textcolor{preprocessor}{\#\ define\ EINA\_UNUSED}}
\DoxyCodeLine{\textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#ifndef\ PACKAGE\_DATA\_DIR}}
\DoxyCodeLine{\textcolor{preprocessor}{\#define\ PACKAGE\_DATA\_DIR\ "{}."{}}}
\DoxyCodeLine{\textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#include\ <stdio.h>}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#include\ <\mbox{\hyperlink{Eina_8h}{Eina.h}}>}}
\DoxyCodeLine{\textcolor{preprocessor}{\#include\ <Ecore.h>}}
\DoxyCodeLine{\textcolor{preprocessor}{\#include\ <\mbox{\hyperlink{Ecore__Evas_8h}{Ecore\_Evas.h}}>}}
\DoxyCodeLine{\textcolor{preprocessor}{\#include\ <\mbox{\hyperlink{Edje_8h}{Edje.h}}>}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#define\ WIDTH\ \ (300)}}
\DoxyCodeLine{\textcolor{preprocessor}{\#define\ HEIGHT\ (300)}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ commands[]\ =\ \(\backslash\)}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}commands\ are:\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)ts\ -\/\ change\ Edje's\ global\ scaling\ factor\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)tr\ -\/\ change\ center\ rectangle's\ scaling\ factor\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)tEsc\ -\/\ exit\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)th\ -\/\ print\ help\(\backslash\)n"{}};}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_on\_keydown(\textcolor{keywordtype}{void}\ \ \ \ \ \ \ \ *data,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ Evas\ \ \ \ \ \ \ \ *evas\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ Evas\_Object\ *o\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ \ \ \ \ \ \ \ *einfo)}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{struct__Evas__Event__Key__Down}{Evas\_Event\_Key\_Down}}\ *ev;}
\DoxyCodeLine{\ \ \ Evas\_Object\ \ \ \ \ \ \ \ \ *edje\_obj;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ ev\ =\ (\mbox{\hyperlink{struct__Evas__Event__Key__Down}{Evas\_Event\_Key\_Down}}\ *)einfo;}
\DoxyCodeLine{\ \ \ edje\_obj\ =\ (Evas\_Object\ *)data;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (strcmp(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}},\ \textcolor{stringliteral}{"{}h"{}})\ ==\ 0)\ \textcolor{comment}{/*\ print\ help\ */}}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(commands);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (strcmp(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}},\ \textcolor{stringliteral}{"{}s"{}})\ ==\ 0)\ \textcolor{comment}{/*\ global\ scaling\ factor\ */}}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordtype}{double}\ scale\ =\ \mbox{\hyperlink{group__Edje__Object__Scale_ga481c3d35b55207c2536872e1d3e235cf}{edje\_scale\_get}}();}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}got\ scale\ \%f\(\backslash\)n"{}},\ scale);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{group__Eina__Tools__Group_ga6bee37244b675b83d6a4f044a7a3d1e8}{EINA\_DBL\_EQ}}(scale,\ 1.0))\ scale\ =\ 1.0;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}\ scale\ =\ 2.0;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Edje__Object__Scale_gadfb6850eece96768a651702b0a7535fb}{edje\_scale\_set}}(scale);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}Setting\ global\ scaling\ factor\ to\ \%f.\(\backslash\)n"{}},\ scale);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (strcmp(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}},\ \textcolor{stringliteral}{"{}r"{}})\ ==\ 0)\ \textcolor{comment}{/*\ individual\ scaling\ factor\ */}}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordtype}{double}\ scale\ =\ \mbox{\hyperlink{group__Edje__Object__Scale_ga0f4bf41cc9dcd8b2524aad08adbd23fb}{edje\_object\_scale\_get}}(edje\_obj);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}got\ scale\ \%f\(\backslash\)n"{}},\ scale);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{group__Eina__Tools__Group_ga6bee37244b675b83d6a4f044a7a3d1e8}{EINA\_DBL\_EQ}}(scale,\ 0))\ scale\ =\ 1.0;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{group__Eina__Tools__Group_ga6bee37244b675b83d6a4f044a7a3d1e8}{EINA\_DBL\_EQ}}(scale,\ 1.0))\ scale\ =\ 2.0;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}\ scale\ =\ 0.0;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Edje__Object__Scale_ga9de0e4aa12e0e825ffa6890be99a4e49}{edje\_object\_scale\_set}}(edje\_obj,\ scale);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}Setting\ center\ rectangle's\ scaling\ factor\ to\ \%f.\(\backslash\)n"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ scale);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (!strcmp(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}},\ \textcolor{stringliteral}{"{}Escape"{}}))}
\DoxyCodeLine{\ \ \ \ \ \mbox{\hyperlink{group__Ecore__Main__Loop__Group_ga95cf8e97dff0716433c2c5474d606a98}{ecore\_main\_loop\_quit}}();}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{else}}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}unhandled\ key:\ \%s\(\backslash\)n"{}},\ ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}});}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(commands);}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_on\_delete(Ecore\_Evas\ *ee\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Ecore__Main__Loop__Group_ga95cf8e97dff0716433c2c5474d606a98}{ecore\_main\_loop\_quit}}();}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keywordtype}{int}}
\DoxyCodeLine{main(\textcolor{keywordtype}{int}\ argc\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}},\ \textcolor{keywordtype}{char}\ *argv[]\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ \ *img\_file\ =\ PACKAGE\_DATA\_DIR\textcolor{stringliteral}{"{}/red.png"{}};}
\DoxyCodeLine{\ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ \ *edje\_file\ =\ PACKAGE\_DATA\_DIR\textcolor{stringliteral}{"{}/basic.edj"{}};}
\DoxyCodeLine{\ \ \ Ecore\_Evas\ \ *ee;}
\DoxyCodeLine{\ \ \ Evas\ \ \ \ \ \ \ \ *evas;}
\DoxyCodeLine{\ \ \ Evas\_Object\ *bg;}
\DoxyCodeLine{\ \ \ Evas\_Object\ *border;}
\DoxyCodeLine{\ \ \ Evas\_Object\ *edje\_obj;}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{int}\ \ \ \ \ \ \ \ \ \ x;}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{int}\ \ \ \ \ \ \ \ \ \ y;}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{int}\ \ \ \ \ \ \ \ \ \ w;}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{int}\ \ \ \ \ \ \ \ \ \ h;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{group__Ecore__Evas__Group_ga32ddbb6457033ad435a177eb0c4fe235}{ecore\_evas\_init}}())}
\DoxyCodeLine{\ \ \ \ \ \textcolor{keywordflow}{return}\ EXIT\_FAILURE;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{group__Edje__General__Group_ga1c9c6594f38023c29fbfb2d0c8c675db}{edje\_init}}())}
\DoxyCodeLine{\ \ \ \ \ \textcolor{keywordflow}{goto}\ shutdown\_ecore\_evas;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{comment}{/*\ this\ will\ give\ you\ a\ window\ with\ an\ Evas\ canvas\ under\ the\ first}}
\DoxyCodeLine{\textcolor{comment}{\ \ \ \ *\ engine\ available\ */}}
\DoxyCodeLine{\ \ \ ee\ =\ \mbox{\hyperlink{group__Ecore__Evas__Group_gaaa770b6f2f1395f9eeb0e50e26c3f933}{ecore\_evas\_new}}(NULL,\ 0,\ 0,\ WIDTH,\ HEIGHT,\ NULL);}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (!ee)\ \textcolor{keywordflow}{goto}\ shutdown\_edje;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Ecore__Evas__Group_ga3d478e975e2101b9b821ef24baf3dd9e}{ecore\_evas\_callback\_delete\_request\_set}}(ee,\ \_on\_delete);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Ecore__Evas__Group_ga3b2832e0373bbafae2bb7143618535c1}{ecore\_evas\_title\_set}}(ee,\ \textcolor{stringliteral}{"{}Edje\ Basics\ Example"{}});}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ evas\ =\ \mbox{\hyperlink{group__Ecore__Evas__Group_ga6f8d214cd55bc940d7cc62fecd8dbc06}{ecore\_evas\_get}}(ee);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ bg\ =\ \mbox{\hyperlink{group__Evas__Object__Rectangle_ga1b7a9d8e6ce240590c1734da5f3449d2}{evas\_object\_rectangle\_add}}(evas);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_gab751e9d24c16e74af6f7c08ea5b930c2}{evas\_object\_color\_set}}(bg,\ 255,\ 255,\ 255,\ 255);\ \textcolor{comment}{/*\ white\ bg\ */}}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga335c8ee6eaeaac9710656af4f8b0db91}{evas\_object\_move}}(bg,\ 0,\ 0);\ \textcolor{comment}{/*\ at\ canvas'\ origin\ */}}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gacad94595f83580c18908cb3b69b08d1a}{evas\_object\_resize}}(bg,\ WIDTH,\ HEIGHT);\ \textcolor{comment}{/*\ covers\ full\ canvas\ */}}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(bg);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Ecore__Evas__Group_gac35627a5c3a766ee42762dbcc9eb733d}{ecore\_evas\_object\_associate}}(ee,\ bg,\ ECORE\_EVAS\_OBJECT\_ASSOCIATE\_BASE);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gac6d65f8896ab59780553676d0017c2ef}{evas\_object\_focus\_set}}(bg,\ \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ edje\_obj\ =\ \mbox{\hyperlink{group__Edje__Object__Group_ga5548cef32568746f40df9bd0be339bea}{edje\_object\_add}}(evas);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{comment}{/*\ exercising\ Edje\ loading\ error,\ on\ purpose\ */}}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{group__Edje__Object__Group_gaec1edd24b5bd8e82823759a8dddc1996}{edje\_object\_file\_set}}(edje\_obj,\ edje\_file,\ \textcolor{stringliteral}{"{}unexistant\_group"{}}))}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ err\ =\ \mbox{\hyperlink{group__Edje__Object__Group_ga4d244ed455a48b9cbf286b6d8b802df3}{edje\_object\_load\_error\_get}}(edje\_obj);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *errmsg\ =\ \mbox{\hyperlink{group__Edje__Object__Group_gaa26fe971d6817a0db649480b63eb3791}{edje\_load\_error\_str}}(err);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ fprintf(stderr,\ \textcolor{stringliteral}{"{}Could\ not\ load\ 'unexistant\_group'\ from\ basic.edj:"{}}}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\ \%s\(\backslash\)n"{}},\ errmsg);}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{group__Edje__Object__Group_gaec1edd24b5bd8e82823759a8dddc1996}{edje\_object\_file\_set}}(edje\_obj,\ edje\_file,\ \textcolor{stringliteral}{"{}example\_group"{}}))}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ err\ =\ \mbox{\hyperlink{group__Edje__Object__Group_ga4d244ed455a48b9cbf286b6d8b802df3}{edje\_object\_load\_error\_get}}(edje\_obj);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *errmsg\ =\ \mbox{\hyperlink{group__Edje__Object__Group_gaa26fe971d6817a0db649480b63eb3791}{edje\_load\_error\_str}}(err);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ fprintf(stderr,\ \textcolor{stringliteral}{"{}Could\ not\ load\ 'example\_group'\ from\ basic.edj:\ \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ errmsg);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga9217cf1d90690dbd1960db155d1c7476}{evas\_object\_del}}(edje\_obj);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{goto}\ shutdown\_edje;}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ printf(\textcolor{stringliteral}{"{}Loaded\ Edje\ object\ bound\ to\ group\ 'example\_group'\ from"{}}}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\ file\ basic.edj\ with\ success!\(\backslash\)n"{}});}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga335c8ee6eaeaac9710656af4f8b0db91}{evas\_object\_move}}(edje\_obj,\ 20,\ 20);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gacad94595f83580c18908cb3b69b08d1a}{evas\_object\_resize}}(edje\_obj,\ WIDTH\ -\/\ 40,\ HEIGHT\ -\/\ 40);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(edje\_obj);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Events_gac71a1038dad71da36f57b70c8ad10252}{evas\_object\_event\_callback\_add}}(bg,\ \mbox{\hyperlink{Evas__Common_8h_ad64cde0da38a60e7cb7905b3ab216968a336b86bad4f145f84c155e4922335584}{EVAS\_CALLBACK\_KEY\_DOWN}},\ \_on\_keydown,\ edje\_obj);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{comment}{/*\ this\ is\ a\ border\ around\ the\ Edje\ object\ above,\ here\ just\ to}}
\DoxyCodeLine{\textcolor{comment}{\ \ \ \ *\ emphasize\ its\ geometry\ */}}
\DoxyCodeLine{\ \ \ border\ =\ \mbox{\hyperlink{group__Evas__Object__Image_gafb52be265f315186a28d43af2d559ec6}{evas\_object\_image\_filled\_add}}(evas);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Image_gac2e588476b16b04f85ca9a594c140c1d}{evas\_object\_image\_file\_set}}(border,\ img\_file,\ NULL);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Image_ga063e5ad38b43897311bbdecfe8dc312d}{evas\_object\_image\_border\_set}}(border,\ 2,\ 2,\ 2,\ 2);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Image_ga5749943ce62e85ead67a1440960677fa}{evas\_object\_image\_border\_center\_fill\_set}}(border,\ \mbox{\hyperlink{group__Evas__Object__Image_gga9f789224285e646309b7dd81a2401910a2ad856ac6aab5e2659c3a584a37aec70}{EVAS\_BORDER\_FILL\_NONE}});}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gacad94595f83580c18908cb3b69b08d1a}{evas\_object\_resize}}(border,\ WIDTH\ -\/\ 40\ +\ 4,\ HEIGHT\ -\/\ 40\ +\ 4);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga335c8ee6eaeaac9710656af4f8b0db91}{evas\_object\_move}}(border,\ 20\ -\/\ 2,\ 20\ -\/\ 2);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(border);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ printf(\textcolor{stringliteral}{"{}'example\_data'\ data\ field\ in\ group\ 'example\_group'\ has\ "{}}}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}the\ value:\ \%s\(\backslash\)n"{}},\ edje\_object\_data\_get(edje\_obj,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}example\_data"{}}));}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ printf(\textcolor{stringliteral}{"{}Testing\ if\ 'part\_one'\ part\ exists:\ \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Edje__Object__Part_ga54caca972ea2036b5bbf6e7133729e4e}{edje\_object\_part\_exists}}(edje\_obj,\ \textcolor{stringliteral}{"{}part\_one"{}})\ ?\ \textcolor{stringliteral}{"{}yes!"{}}\ :\ \textcolor{stringliteral}{"{}no"{}});}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Edje__Object__Group_ga739bc5265bedbc02c90900fc3bd11eed}{edje\_object\_part\_geometry\_get}}(edje\_obj,\ \textcolor{stringliteral}{"{}part\_one"{}},\ \&x,\ \&y,\ \&w,\ \&h);}
\DoxyCodeLine{\ \ \ printf(\textcolor{stringliteral}{"{}The\ geometry\ of\ that\ part\ inside\ the\ Edje\ object's\ area\ "{}}}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}is:\ x\ =\ \%d,\ y\ =\ \%d,\ w\ =\ \%d,\ h\ =\ \%d\(\backslash\)n"{}},\ x,\ y,\ w,\ h);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_gad204691b53639244ee1062d3f349f1d9}{evas\_object\_color\_get}}(\mbox{\hyperlink{group__Edje__Object__Group_ga6c5b6348f6ff76d2482e37cf91e89797}{edje\_object\_part\_object\_get}}(edje\_obj,\ \textcolor{stringliteral}{"{}part\_one"{}}),}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \&x,\ \&y,\ \&w,\ \&h);}
\DoxyCodeLine{\ \ \ printf(\textcolor{stringliteral}{"{}That\ part's\ color\ components\ are:\ r\ =\ \%d,\ g\ =\ \%d,\ b\ =\ \%d,"{}}}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\ a\ =\ \%d\(\backslash\)n"{}},\ x,\ y,\ w,\ h);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Edje__Object__Group_ga367ce6bad86acb63fa7a6b9f72597cda}{edje\_object\_size\_max\_get}}(edje\_obj,\ \&w,\ \&h);}
\DoxyCodeLine{\ \ \ printf(\textcolor{stringliteral}{"{}The\ Edje\ object's\ max.\ size\ is:\ \%d,\ \%d\(\backslash\)n"{}},\ w,\ h);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Edje__Object__Group_ga6e8cf0e56dcb9f1f96422334fa07a356}{edje\_object\_size\_min\_get}}(edje\_obj,\ \&w,\ \&h);}
\DoxyCodeLine{\ \ \ printf(\textcolor{stringliteral}{"{}The\ Edje\ object's\ min.\ size\ is:\ \%d,\ \%d\(\backslash\)n"{}},\ w,\ h);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Edje__Object__Group_gae8dc1397ff94126f3083280a0400cfbc}{edje\_object\_size\_min\_calc}}(edje\_obj,\ \&w,\ \&h);}
\DoxyCodeLine{\ \ \ printf(\textcolor{stringliteral}{"{}The\ Edje\ object's\ min.\ size\ reported\ by\ min.\ size"{}}}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\ calculation\ is:\ w\ =\ \%d,\ h\ =\ \%d\(\backslash\)n"{}},\ w,\ h);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Edje__Object__Group_ga98d74542aa2faa8399e93b86c41c828e}{edje\_object\_size\_min\_restricted\_calc}}(edje\_obj,\ \&w,\ \&h,\ 500,\ 500);}
\DoxyCodeLine{\ \ \ printf(\textcolor{stringliteral}{"{}The\ Edje\ object's\ min.\ size\ reported\ by\ *restricted*\ "{}}}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}min.\ size\ calculation\ is:\ w\ =\ \%d,\ h\ =\ \%d\(\backslash\)n"{}},\ w,\ h);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Edje__Object__Group_gac903f485812444eda3068f91cdb3c7f5}{edje\_object\_parts\_extends\_calc}}(edje\_obj,\ \&x,\ \&y,\ \&w,\ \&h);}
\DoxyCodeLine{\ \ \ printf(\textcolor{stringliteral}{"{}The\ Edje\ object's\ \(\backslash\)"{}extended\(\backslash\)"{}\ geometry\ is:\ x\ =\ \%d,\ "{}}}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}y\ =\ \%d,\ w\ =\ \%d,\ h\ =\ \%d\(\backslash\)n"{}},\ x,\ y,\ w,\ h);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ printf(commands);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Ecore__Evas__Group_ga4953047ff97d4f1b0d75a7d513d4f317}{ecore\_evas\_show}}(ee);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Ecore__Main__Loop__Group_gaf103b9f668bb3e4fed12e52c6180132d}{ecore\_main\_loop\_begin}}();}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Ecore__Evas__Group_gad3ec61f2aa03df4d3dbfd0d311e0c8dc}{ecore\_evas\_free}}(ee);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Ecore__Evas__Group_gab8fa311077f749190c9b622f672b2214}{ecore\_evas\_shutdown}}();}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Edje__General__Group_ga01041f6702f2d81bf10c3e41899805cb}{edje\_shutdown}}();}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{return}\ EXIT\_SUCCESS;}
\DoxyCodeLine{}
\DoxyCodeLine{\ shutdown\_edje:}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Edje__General__Group_ga01041f6702f2d81bf10c3e41899805cb}{edje\_shutdown}}();}
\DoxyCodeLine{\ shutdown\_ecore\_evas:}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Ecore__Evas__Group_gab8fa311077f749190c9b622f672b2214}{ecore\_evas\_shutdown}}();}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{return}\ EXIT\_FAILURE;}
\DoxyCodeLine{\}}

\end{DoxyCodeInclude}


To compile use this command\+: \begin{DoxyVerb}* gcc -o edje-basic edje-basic.c -DPACKAGE_BIN_DIR=\"/Where/enlightenment/is/installed/bin\" -DPACKAGE_LIB_DIR=\"/Where/enlightenment/is/installed/lib\"
* -DPACKAGE_DATA_DIR=\"/Where/enlightenment/is/installed/share\"
* `pkg-config --cflags --libs evas ecore ecore-evas edje`
*
* edje_cc basic.edc
* \end{DoxyVerb}
 