In this example, we demonstrate the use of Evas box objects.

We cover changing boxes\textquotesingle{} layouts (with a custom layout, besides the ones provided by Evas), box padding and alignment influence on the layouts, insertion and removal of box items.

The interesting part of the code starts, naturally, when we add a box object to the canvas. Just after it, we place five rectangles, with random colors, inside of it. Those rectangles get a minimum size hint of 50 pixels on each axis, which will be respected by most of the box\textquotesingle{}s possible layouts\+:  
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\ \ \ d.box\ =\ \mbox{\hyperlink{group__Evas__Object__Box__Group_ga79c13db775cfad42ac5500dd2607bdc6}{evas\_object\_box\_add}}(d.evas);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(d.box);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{for}\ (i\ =\ 1;\ i\ <=\ 5;\ i++)}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ o\ =\ last\ =\ \mbox{\hyperlink{group__Evas__Object__Rectangle_ga1b7a9d8e6ce240590c1734da5f3449d2}{evas\_object\_rectangle\_add}}(d.evas);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gaf20fdb7dc524a95091d72d24cf6a05e8}{evas\_object\_size\_hint\_min\_set}}(o,\ 50,\ 50);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_gab751e9d24c16e74af6f7c08ea5b930c2}{evas\_object\_color\_set}}(}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ o,\ rand()\ \%\ 256,\ rand()\ \%\ 256,\ rand()\ \%\ 256,\ 255);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(o);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{group__Evas__Object__Box__Group_ga901a603e429bdf752f8c184b418070ae}{evas\_object\_box\_append}}(d.box,\ o))}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ fprintf(stderr,\ \textcolor{stringliteral}{"{}Error\ appending\ child\ object\ on\ the\ box!\(\backslash\)n"{}});}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{goto}\ error;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\ \ \ \ \ \}}

\end{DoxyCodeInclude}
 Just like in other Evas examples, we have a white background on the canvas and a red border around the container object of interest, the box, to mark its boundaries. Resizing of the canvas will keep the box\textquotesingle{}s proportion with regard to the whole canvas\textquotesingle{}, so that you can experiment with different sizes of the box to accommodate its children\+:  
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}\ \textcolor{comment}{/*\ adjust\ canvas'\ contents\ on\ resizes\ */}}
\DoxyCodeLine{\_canvas\_resize\_cb(Ecore\_Evas\ *ee)}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{int}\ w,\ h;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Ecore__Evas__Group_ga931aadf4603731e73e8a84e4b14f1493}{ecore\_evas\_geometry\_get}}(ee,\ NULL,\ NULL,\ \&w,\ \&h);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gacad94595f83580c18908cb3b69b08d1a}{evas\_object\_resize}}(d.bg,\ w,\ h);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga335c8ee6eaeaac9710656af4f8b0db91}{evas\_object\_move}}(d.box,\ (w\ /\ 4),\ (h\ /\ 4));}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gacad94595f83580c18908cb3b69b08d1a}{evas\_object\_resize}}(d.box,\ (w\ /\ 2),\ (h\ /\ 2));}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga335c8ee6eaeaac9710656af4f8b0db91}{evas\_object\_move}}(d.border,\ (w\ /\ 4)\ -\/\ 2,\ (h\ /\ 4)\ -\/\ 2);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gacad94595f83580c18908cb3b69b08d1a}{evas\_object\_resize}}(d.border,\ (w\ /\ 2)\ +\ 4,\ (h\ /\ 2)\ +\ 4);}
\DoxyCodeLine{\}}

\end{DoxyCodeInclude}
 Again, one interacts with this program by means of key commands\+:  
\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\)ta\ -\/\ change\ the\ box's\ alignment\ values\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)tp\ -\/\ change\ the\ box's\ padding\ values\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)t1\ -\/\ change\ the\ box's\ layout\ to\ horizontal\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)t2\ -\/\ change\ the\ box's\ layout\ to\ vertical\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)t3\ -\/\ change\ the\ box's\ layout\ to\ horizontal\ homogeneous\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)t4\ -\/\ change\ the\ box's\ layout\ to\ vertical\ homogeneous\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)t5\ -\/\ change\ the\ box's\ layout\ to\ horizontal\ maximum\ size\ homogeneous\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)t6\ -\/\ change\ the\ box's\ layout\ to\ vertical\ maximum\ size\ homogeneous\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)t7\ -\/\ change\ the\ box's\ layout\ to\ horizontal\ flow\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)t8\ -\/\ change\ the\ box's\ layout\ to\ vertical\ flow\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)t9\ -\/\ change\ the\ box's\ layout\ to\ stack\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)t0\ -\/\ change\ the\ box's\ layout\ to\ a\ custom-\/made\ one\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)tCtrl\ +\ NUMBER\ -\/\ insert\ a\ new\ child\ object\ at\ that\ position\ in\ the\ box\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)tShift\ +\ NUMBER\ -\/\ remove\ the\ child\ object\ at\ that\ position\ in\ the\ box\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)th\ -\/\ print\ help\(\backslash\)n"{}};}

\end{DoxyCodeInclude}
 Let\textquotesingle{}s start with the {\bfseries{numeric}} ones, each of which will impose a different layout on the box object.

The initial layout the box starts at is the one triggered by the key {\ttfamily \textquotesingle{}1\textquotesingle{}} -- the horizontal layout. Thus, the initial appearance of this program, demonstrating this layout, is something like\+:

  
\begin{DoxyImageNoCaption}
  \mbox{\includegraphics[width=\textwidth,height=\textheight/2,keepaspectratio=true]{evas-box-example-00}}
\end{DoxyImageNoCaption}


The vertical layout ({\ttfamily \textquotesingle{}2\textquotesingle{}} key) is very similar, but just disposing the items vertically\+:

  
\begin{DoxyImageNoCaption}
  \mbox{\includegraphics[width=\textwidth,height=\textheight/2,keepaspectratio=true]{evas-box-example-01}}
\end{DoxyImageNoCaption}


Note the influence of the (default) {\ttfamily 0.\+5} box alignment property, which will let the children line in the middle of the box\textquotesingle{}s area. Also, because the space required by them extrapolates the box\textquotesingle{}s height (we resized it to be smaller), they\textquotesingle{}ll be drawn out if its bounds.

Next, comes the horizontal {\bfseries{homogeneous}} layout ({\ttfamily \textquotesingle{}3\textquotesingle{}} key). See how it reserves an equal amount of space for each child to take\+:

  
\begin{DoxyImageNoCaption}
  \mbox{\includegraphics[width=\textwidth,height=\textheight/2,keepaspectratio=true]{evas-box-example-02}}
\end{DoxyImageNoCaption}


Its vertical equivalent can be triggered by the {\ttfamily \textquotesingle{}4\textquotesingle{}} key. The next different layout of interest is the horizontal maximum size homogeneous ({\ttfamily \textquotesingle{}5\textquotesingle{}} key). It will reserve cells to children sized equally to the dimensions of the child with bigger size (or minimum size hints). For this example, all cells would be just the size of our rectangles\textquotesingle{} minimum size hints and, to prove that, insert a new (smaller) rectangle at position 3, say, with {\ttfamily Ctrl} and {\ttfamily 3} keys together\+:

  
\begin{DoxyImageNoCaption}
  \mbox{\includegraphics[width=\textwidth,height=\textheight/2,keepaspectratio=true]{evas-box-example-03}}
\end{DoxyImageNoCaption}


The code for the commands inserting and deleting box items is\+:  
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{group__Evas__Keys_ga3911de57560f663a7330b00dcfeb6e07}{evas\_key\_modifier\_is\_set}}(mods,\ \textcolor{stringliteral}{"{}Shift"{}}))}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ pos;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}\ ret;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}}\ *obj;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{struct__Eina__List}{Eina\_List}}\ *children;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ pos\ =\ atoi(ev-\/>key);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ children\ =\ \mbox{\hyperlink{group__Evas__Object__Box__Group_gad70d6bbbbf4a0e093010a9a23c3a32e9}{evas\_object\_box\_children\_get}}(d.box);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ obj\ =\ \mbox{\hyperlink{group__Eina__List__Group_ga5638b455370e1b4a2fb230b59ce9c631}{eina\_list\_nth}}(children,\ pos);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!obj)\ \textcolor{keywordflow}{goto}\ list\_free;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ ret\ =\ \mbox{\hyperlink{group__Evas__Object__Box__Group_ga701997cf7633cfeb78255a325f91bc58}{evas\_object\_box\_remove\_at}}(d.box,\ pos);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (ret)\ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga9217cf1d90690dbd1960db155d1c7476}{evas\_object\_del}}(obj);}
\DoxyCodeLine{}
\DoxyCodeLine{list\_free:}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Eina__List__Group_ga82a1bfa543e21853f9ea3ff88dd1250b}{eina\_list\_free}}(children);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{group__Evas__Keys_ga3911de57560f663a7330b00dcfeb6e07}{evas\_key\_modifier\_is\_set}}(mods,\ \textcolor{stringliteral}{"{}Control"{}}))}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}}\ *o\_;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ pos;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ pos\ =\ atoi(ev-\/>key);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ o\_\ =\ \_new\_rectangle\_add(d.evas);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{group__Evas__Object__Box__Group_gaa14c9550800631ba1ab4c899a3100b7d}{evas\_object\_box\_insert\_at}}(d.box,\ o\_,\ pos))}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Box__Group_ga901a603e429bdf752f8c184b418070ae}{evas\_object\_box\_append}}(d.box,\ o\_);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}

\end{DoxyCodeInclude}
 
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\textcolor{keyword}{static}\ \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}}\ *\ \textcolor{comment}{/*\ new\ rectangle\ to\ be\ put\ in\ the\ box\ */}}
\DoxyCodeLine{\_new\_rectangle\_add(\mbox{\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}}\ *e)}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}}\ *o;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ o\ =\ \mbox{\hyperlink{group__Evas__Object__Rectangle_ga1b7a9d8e6ce240590c1734da5f3449d2}{evas\_object\_rectangle\_add}}(e);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gacad94595f83580c18908cb3b69b08d1a}{evas\_object\_resize}}(o,\ 10,\ 10);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_gab751e9d24c16e74af6f7c08ea5b930c2}{evas\_object\_color\_set}}(o,\ 0,\ 255,\ 0,\ 255);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(o);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{return}\ o;}
\DoxyCodeLine{\}}

\end{DoxyCodeInclude}
In that code, we exemplify \mbox{\hyperlink{group__Evas__Object__Box__Group_gad70d6bbbbf4a0e093010a9a23c3a32e9}{evas\+\_\+object\+\_\+box\+\_\+children\+\_\+get()}}, to fetch a child element at an exact position. After the element removal from the box (leaving it unparented again), we delete it and free that list. The code inserting a new rectangle, there, is straightforward.

Try the {\ttfamily \textquotesingle{}6\textquotesingle{}} key for the vertical equivalent of the last shown layout. Then, comes the {\bfseries{flow}} layout, triggered by the {\ttfamily \textquotesingle{}7\textquotesingle{}} key. We make our box small to demonstrate the effect on the items layouting\+:

  
\begin{DoxyImageNoCaption}
  \mbox{\includegraphics[width=\textwidth,height=\textheight/2,keepaspectratio=true]{evas-box-example-04}}
\end{DoxyImageNoCaption}


The next two numerical commands are for the vertical equivalent of the last and the stack one, respectively. Try them out to get their looks.

The last numerical key, {\ttfamily \textquotesingle{}0\textquotesingle{}}, shows the effect of a {\bfseries{custom}} layout on the box. We wrote one that would split the width and height of the box equally and, then, place the items in the cells in the diagonal\+:  
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (strcmp(ev-\/>key,\ \textcolor{stringliteral}{"{}0"{}})\ ==\ 0)}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Box__Group_gacabb47de0d8706b4c8628b519b2d1494}{evas\_object\_box\_layout\_set}}(d.box,\ \_custom\_layout,\ NULL,\ NULL);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}Applying\ '\%s'\ layout\ on\ the\ box\(\backslash\)n"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}CUSTOM"{}});}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}

\end{DoxyCodeInclude}
 
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}\ \textcolor{comment}{/*\ custom\ 'diagonal'\ layout\ */}}
\DoxyCodeLine{\_custom\_layout(\mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}}\ \ \ \ \ \ \ \ \ \ *o,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{struct__Evas__Object__Box__Data}{Evas\_Object\_Box\_Data}}\ *p,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *data\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{int}\ x,\ y,\ w,\ h;}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{int}\ xx,\ yy,\ ww,\ hh;}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{int}\ count;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{struct__Eina__List}{Eina\_List}}\ *l;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{struct__Evas__Object__Box__Option}{Evas\_Object\_Box\_Option}}\ *opt;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga6e8e78e110392480dd612df86a16b630}{evas\_object\_geometry\_get}}(o,\ \&x,\ \&y,\ \&w,\ \&h);}
\DoxyCodeLine{\ \ \ count\ =\ eina\_list\_count(p-\/>children);}
\DoxyCodeLine{\ \ \ ww\ =\ w\ /\ (count\ ?\ :\ 1);}
\DoxyCodeLine{\ \ \ hh\ =\ h\ /\ (count\ ?\ :\ 1);}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (ww\ <\ 1)\ ww\ =\ 1;}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (hh\ <\ 1)\ hh\ =\ 1;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ xx\ =\ x;}
\DoxyCodeLine{\ \ \ yy\ =\ y;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eina__List__Group_gac6efafc19f526d916cdb9757240a8773}{EINA\_LIST\_FOREACH}}(p-\/>children,\ l,\ opt)}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga335c8ee6eaeaac9710656af4f8b0db91}{evas\_object\_move}}(opt-\/>\mbox{\hyperlink{struct__Evas__Object__Box__Option_af01dd3e815a84ac6c7cbfbd3a6dbc148}{obj}},\ xx,\ yy);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ xx\ +=\ ww;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ yy\ +=\ hh;}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{\}}

\end{DoxyCodeInclude}
   
\begin{DoxyImageNoCaption}
  \mbox{\includegraphics[width=\textwidth,height=\textheight/2,keepaspectratio=true]{evas-box-example-05}}
\end{DoxyImageNoCaption}


Finally, the {\ttfamily \textquotesingle{}a\textquotesingle{}} and {\ttfamily \textquotesingle{}p\textquotesingle{}} commands will change the box\textquotesingle{}s alignment and padding property values, respectively. For each of the layouts above, see the effects they make by setting different values on those properties.

The full code for this example follows. For an exercise on {\bfseries{the effect of children box elements\textquotesingle{} size hints on a box layout}}, try the \mbox{\hyperlink{Example_Evas_Size_Hints}{Evas alignment, minimum size, maximum size, padding and weight hints example}}.


\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\ PACKAGE\_EXAMPLES\_DIR\ "{}."{}}}
\DoxyCodeLine{\textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#include\ <Ecore.h>}}
\DoxyCodeLine{\textcolor{preprocessor}{\#include\ <\mbox{\hyperlink{Ecore__Evas_8h}{Ecore\_Evas.h}}>}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#include\ <stdlib.h>}}
\DoxyCodeLine{\textcolor{preprocessor}{\#include\ <stdio.h>}}
\DoxyCodeLine{\textcolor{preprocessor}{\#include\ <string.h>}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#include\ "{}evas-\/common.h"{}}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#define\ WIDTH\ \ (640)}}
\DoxyCodeLine{\textcolor{preprocessor}{\#define\ HEIGHT\ (480)}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *border\_img\_path\ =\ PACKAGE\_EXAMPLES\_DIR\ EVAS\_IMAGE\_FOLDER\ \textcolor{stringliteral}{"{}/red.png"{}};}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *commands\ =\ \(\backslash\)}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}commands\ are:\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)ta\ -\/\ change\ the\ box's\ alignment\ values\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)tp\ -\/\ change\ the\ box's\ padding\ values\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)t1\ -\/\ change\ the\ box's\ layout\ to\ horizontal\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)t2\ -\/\ change\ the\ box's\ layout\ to\ vertical\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)t3\ -\/\ change\ the\ box's\ layout\ to\ horizontal\ homogeneous\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)t4\ -\/\ change\ the\ box's\ layout\ to\ vertical\ homogeneous\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)t5\ -\/\ change\ the\ box's\ layout\ to\ horizontal\ maximum\ size\ homogeneous\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)t6\ -\/\ change\ the\ box's\ layout\ to\ vertical\ maximum\ size\ homogeneous\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)t7\ -\/\ change\ the\ box's\ layout\ to\ horizontal\ flow\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)t8\ -\/\ change\ the\ box's\ layout\ to\ vertical\ flow\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)t9\ -\/\ change\ the\ box's\ layout\ to\ stack\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)t0\ -\/\ change\ the\ box's\ layout\ to\ a\ custom-\/made\ one\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)tCtrl\ +\ NUMBER\ -\/\ insert\ a\ new\ child\ object\ at\ that\ position\ in\ the\ box\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)tShift\ +\ NUMBER\ -\/\ remove\ the\ child\ object\ at\ that\ position\ in\ the\ box\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)th\ -\/\ print\ help\(\backslash\)n"{}};}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{struct\ }example\_data}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ Ecore\_Evas\ \ *ee;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}}\ \ \ \ \ \ \ \ *evas;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}}\ *bg,\ *box,\ *border;}
\DoxyCodeLine{\};}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keyword}{struct\ }example\_data\ d;}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}\ \textcolor{comment}{/*\ custom\ 'diagonal'\ layout\ */}}
\DoxyCodeLine{\_custom\_layout(\mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}}\ \ \ \ \ \ \ \ \ \ *o,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{struct__Evas__Object__Box__Data}{Evas\_Object\_Box\_Data}}\ *p,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *data\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{int}\ x,\ y,\ w,\ h;}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{int}\ xx,\ yy,\ ww,\ hh;}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{int}\ count;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{struct__Eina__List}{Eina\_List}}\ *l;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{struct__Evas__Object__Box__Option}{Evas\_Object\_Box\_Option}}\ *opt;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga6e8e78e110392480dd612df86a16b630}{evas\_object\_geometry\_get}}(o,\ \&x,\ \&y,\ \&w,\ \&h);}
\DoxyCodeLine{\ \ \ count\ =\ eina\_list\_count(p-\/>children);}
\DoxyCodeLine{\ \ \ ww\ =\ w\ /\ (count\ ?\ :\ 1);}
\DoxyCodeLine{\ \ \ hh\ =\ h\ /\ (count\ ?\ :\ 1);}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (ww\ <\ 1)\ ww\ =\ 1;}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (hh\ <\ 1)\ hh\ =\ 1;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ xx\ =\ x;}
\DoxyCodeLine{\ \ \ yy\ =\ y;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eina__List__Group_gac6efafc19f526d916cdb9757240a8773}{EINA\_LIST\_FOREACH}}(p-\/>children,\ l,\ opt)}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga335c8ee6eaeaac9710656af4f8b0db91}{evas\_object\_move}}(opt-\/>\mbox{\hyperlink{struct__Evas__Object__Box__Option_af01dd3e815a84ac6c7cbfbd3a6dbc148}{obj}},\ xx,\ yy);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ xx\ +=\ ww;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ yy\ +=\ hh;}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}}\ *\ \textcolor{comment}{/*\ new\ rectangle\ to\ be\ put\ in\ the\ box\ */}}
\DoxyCodeLine{\_new\_rectangle\_add(\mbox{\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}}\ *e)}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}}\ *o;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ o\ =\ \mbox{\hyperlink{group__Evas__Object__Rectangle_ga1b7a9d8e6ce240590c1734da5f3449d2}{evas\_object\_rectangle\_add}}(e);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gacad94595f83580c18908cb3b69b08d1a}{evas\_object\_resize}}(o,\ 10,\ 10);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_gab751e9d24c16e74af6f7c08ea5b930c2}{evas\_object\_color\_set}}(o,\ 0,\ 255,\ 0,\ 255);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(o);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{return}\ o;}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{/*\ use\ the\ following\ commands\ to\ interact\ with\ this\ example\ -\/\ 'h'\ is}}
\DoxyCodeLine{\textcolor{comment}{\ *\ the\ key\ for\ help\ */}}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_on\_keydown(\textcolor{keywordtype}{void}\ \ \ \ \ \ \ \ *data\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}}\ \ \ \ \ \ \ \ *evas\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{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\ =\ einfo;}
\DoxyCodeLine{\ \ \ \textcolor{keyword}{const}\ Evas\_Modifier\ *mods\ =\ \mbox{\hyperlink{group__Evas__Canvas_ga3719af7c5cdb5fc67427616d167a6347}{evas\_key\_modifier\_get}}(evas);}
\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(\textcolor{stringliteral}{"{}\%s"{}},\ \ commands);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{group__Evas__Keys_ga3911de57560f663a7330b00dcfeb6e07}{evas\_key\_modifier\_is\_set}}(mods,\ \textcolor{stringliteral}{"{}Shift"{}}))}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ pos;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}\ ret;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}}\ *obj;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{struct__Eina__List}{Eina\_List}}\ *children;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ pos\ =\ atoi(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}});}
\DoxyCodeLine{\ \ \ \ \ \ \ \ children\ =\ \mbox{\hyperlink{group__Evas__Object__Box__Group_gad70d6bbbbf4a0e093010a9a23c3a32e9}{evas\_object\_box\_children\_get}}(d.box);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ obj\ =\ \mbox{\hyperlink{group__Eina__List__Group_ga5638b455370e1b4a2fb230b59ce9c631}{eina\_list\_nth}}(children,\ pos);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!obj)\ \textcolor{keywordflow}{goto}\ list\_free;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ ret\ =\ \mbox{\hyperlink{group__Evas__Object__Box__Group_ga701997cf7633cfeb78255a325f91bc58}{evas\_object\_box\_remove\_at}}(d.box,\ pos);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (ret)\ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga9217cf1d90690dbd1960db155d1c7476}{evas\_object\_del}}(obj);}
\DoxyCodeLine{}
\DoxyCodeLine{list\_free:}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Eina__List__Group_ga82a1bfa543e21853f9ea3ff88dd1250b}{eina\_list\_free}}(children);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{group__Evas__Keys_ga3911de57560f663a7330b00dcfeb6e07}{evas\_key\_modifier\_is\_set}}(mods,\ \textcolor{stringliteral}{"{}Control"{}}))}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}}\ *o\_;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ pos;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ pos\ =\ atoi(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}});}
\DoxyCodeLine{\ \ \ \ \ \ \ \ o\_\ =\ \_new\_rectangle\_add(d.evas);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{group__Evas__Object__Box__Group_gaa14c9550800631ba1ab4c899a3100b7d}{evas\_object\_box\_insert\_at}}(d.box,\ o\_,\ pos))}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Box__Group_ga901a603e429bdf752f8c184b418070ae}{evas\_object\_box\_append}}(d.box,\ o\_);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (strcmp(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}},\ \textcolor{stringliteral}{"{}a"{}})\ ==\ 0)}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordtype}{double}\ h,\ v;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Box__Group_ga0feb8b7c8bef4b7e60884a885a9778e7}{evas\_object\_box\_align\_get}}(d.box,\ \&h,\ \&v);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{group__Eina__Tools__Group_ga6bee37244b675b83d6a4f044a7a3d1e8}{EINA\_DBL\_EQ}}(h,\ 0.5))}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ h\ =\ v\ =\ 1.0;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{group__Eina__Tools__Group_ga6bee37244b675b83d6a4f044a7a3d1e8}{EINA\_DBL\_EQ}}(h,\ 1.0))}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ h\ =\ v\ =\ -\/1.0;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{group__Eina__Tools__Group_ga6bee37244b675b83d6a4f044a7a3d1e8}{EINA\_DBL\_EQ}}(h,\ -\/1.0))}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ h\ =\ v\ =\ 0.0;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{group__Eina__Tools__Group_ga6bee37244b675b83d6a4f044a7a3d1e8}{EINA\_DBL\_EQ}}(h,\ 0.0))}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ h\ =\ v\ =\ 0.5;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Box__Group_gab363f1603f6897dc1ebb8271b7917d2b}{evas\_object\_box\_align\_set}}(d.box,\ h,\ v);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}Applying\ new\ alignment\ values\ (\%.1f,\ \%.1f)\ on\ the\ box\(\backslash\)n"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ h,\ v);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (strcmp(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}},\ \textcolor{stringliteral}{"{}p"{}})\ ==\ 0)}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ h,\ v;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Box__Group_gad462c975b42819fdd4e81a8f4fe06116}{evas\_object\_box\_padding\_get}}(d.box,\ \&h,\ \&v);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (h\ ==\ 0)}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ h\ =\ v\ =\ 50;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ h\ =\ v\ =\ 0;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Box__Group_gab220426e0cd46980ee7b8fde662bfb19}{evas\_object\_box\_padding\_set}}(d.box,\ h,\ v);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}Applying\ new\ padding\ values\ (\%d,\ \%d)\ on\ the\ box\(\backslash\)n"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ h,\ v);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (strcmp(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}},\ \textcolor{stringliteral}{"{}1"{}})\ ==\ 0)}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Box__Group_gacabb47de0d8706b4c8628b519b2d1494}{evas\_object\_box\_layout\_set}}(}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ d.box,\ \mbox{\hyperlink{group__Evas__Object__Box__Group_gaaaaf1c9ba2bd49e51108c1202aea9c3c}{evas\_object\_box\_layout\_horizontal}},\ NULL,\ NULL);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}Applying\ '\%s'\ layout\ on\ the\ box\(\backslash\)n"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}horizontal"{}});}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (strcmp(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}},\ \textcolor{stringliteral}{"{}2"{}})\ ==\ 0)}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Box__Group_gacabb47de0d8706b4c8628b519b2d1494}{evas\_object\_box\_layout\_set}}(}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ d.box,\ \mbox{\hyperlink{group__Evas__Object__Box__Group_ga8836b5287edf32f687e2ad05a140e836}{evas\_object\_box\_layout\_vertical}},\ NULL,\ NULL);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}Applying\ '\%s'\ layout\ on\ the\ box\(\backslash\)n"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}vertical"{}});}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (strcmp(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}},\ \textcolor{stringliteral}{"{}3"{}})\ ==\ 0)}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Box__Group_gacabb47de0d8706b4c8628b519b2d1494}{evas\_object\_box\_layout\_set}}(}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ d.box,\ \mbox{\hyperlink{group__Evas__Object__Box__Group_ga5fe32364de114ac27926faf36a92565f}{evas\_object\_box\_layout\_homogeneous\_horizontal}},\ NULL,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ NULL);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}Applying\ '\%s'\ layout\ on\ the\ box\(\backslash\)n"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}horizontal\ homogeneous"{}});}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (strcmp(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}},\ \textcolor{stringliteral}{"{}4"{}})\ ==\ 0)}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Box__Group_gacabb47de0d8706b4c8628b519b2d1494}{evas\_object\_box\_layout\_set}}(}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ d.box,\ \mbox{\hyperlink{group__Evas__Object__Box__Group_ga02e09abf4c39068f6922f9077149c131}{evas\_object\_box\_layout\_homogeneous\_vertical}},\ NULL,\ NULL);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}Applying\ '\%s'\ layout\ on\ the\ box\(\backslash\)n"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}vertical\ homogeneous"{}});}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (strcmp(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}},\ \textcolor{stringliteral}{"{}5"{}})\ ==\ 0)}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Box__Group_gacabb47de0d8706b4c8628b519b2d1494}{evas\_object\_box\_layout\_set}}(}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ d.box,\ \mbox{\hyperlink{group__Evas__Object__Box__Group_ga2e519c420f94629ef313a009f68391bb}{evas\_object\_box\_layout\_homogeneous\_max\_size\_horizontal}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ NULL,\ NULL);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}Applying\ '\%s'\ layout\ on\ the\ box\(\backslash\)n"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}horizontal\ maximum\ size\ homogeneous"{}});}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (strcmp(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}},\ \textcolor{stringliteral}{"{}6"{}})\ ==\ 0)}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Box__Group_gacabb47de0d8706b4c8628b519b2d1494}{evas\_object\_box\_layout\_set}}(}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ d.box,\ \mbox{\hyperlink{group__Evas__Object__Box__Group_gaf3f0222bd27fc5e89efc9b317668d0e1}{evas\_object\_box\_layout\_homogeneous\_max\_size\_vertical}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ NULL,\ NULL);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}Applying\ '\%s'\ layout\ on\ the\ box\(\backslash\)n"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}vertical\ maximum\ size\ homogeneous"{}});}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (strcmp(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}},\ \textcolor{stringliteral}{"{}7"{}})\ ==\ 0)}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Box__Group_gacabb47de0d8706b4c8628b519b2d1494}{evas\_object\_box\_layout\_set}}(}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ d.box,\ \mbox{\hyperlink{group__Evas__Object__Box__Group_ga92c45845c149cc21fab4fcfd4e7839eb}{evas\_object\_box\_layout\_flow\_horizontal}},\ NULL,\ NULL);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}Applying\ '\%s'\ layout\ on\ the\ box\(\backslash\)n"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}horizontal\ flow"{}});}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (strcmp(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}},\ \textcolor{stringliteral}{"{}8"{}})\ ==\ 0)}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Box__Group_gacabb47de0d8706b4c8628b519b2d1494}{evas\_object\_box\_layout\_set}}(}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ d.box,\ \mbox{\hyperlink{group__Evas__Object__Box__Group_ga5e4ae5bcafc724706824418969faeb7f}{evas\_object\_box\_layout\_flow\_vertical}},\ NULL,\ NULL);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}Applying\ '\%s'\ layout\ on\ the\ box\(\backslash\)n"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}vertical\ flow"{}});}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (strcmp(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}},\ \textcolor{stringliteral}{"{}9"{}})\ ==\ 0)}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Box__Group_gacabb47de0d8706b4c8628b519b2d1494}{evas\_object\_box\_layout\_set}}(}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ d.box,\ \mbox{\hyperlink{group__Evas__Object__Box__Group_gabbf12730358c40b99a4152dbe104b35e}{evas\_object\_box\_layout\_stack}},\ NULL,\ NULL);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}Applying\ '\%s'\ layout\ on\ the\ box\(\backslash\)n"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}stack"{}});}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (strcmp(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}},\ \textcolor{stringliteral}{"{}0"{}})\ ==\ 0)}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Box__Group_gacabb47de0d8706b4c8628b519b2d1494}{evas\_object\_box\_layout\_set}}(d.box,\ \_custom\_layout,\ NULL,\ NULL);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}Applying\ '\%s'\ layout\ on\ the\ box\(\backslash\)n"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}CUSTOM"{}});}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\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{keyword}{static}\ \textcolor{keywordtype}{void}\ \textcolor{comment}{/*\ adjust\ canvas'\ contents\ on\ resizes\ */}}
\DoxyCodeLine{\_canvas\_resize\_cb(Ecore\_Evas\ *ee)}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{int}\ w,\ h;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Ecore__Evas__Group_ga931aadf4603731e73e8a84e4b14f1493}{ecore\_evas\_geometry\_get}}(ee,\ NULL,\ NULL,\ \&w,\ \&h);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gacad94595f83580c18908cb3b69b08d1a}{evas\_object\_resize}}(d.bg,\ w,\ h);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga335c8ee6eaeaac9710656af4f8b0db91}{evas\_object\_move}}(d.box,\ (w\ /\ 4),\ (h\ /\ 4));}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gacad94595f83580c18908cb3b69b08d1a}{evas\_object\_resize}}(d.box,\ (w\ /\ 2),\ (h\ /\ 2));}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga335c8ee6eaeaac9710656af4f8b0db91}{evas\_object\_move}}(d.border,\ (w\ /\ 4)\ -\/\ 2,\ (h\ /\ 4)\ -\/\ 2);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gacad94595f83580c18908cb3b69b08d1a}{evas\_object\_resize}}(d.border,\ (w\ /\ 2)\ +\ 4,\ (h\ /\ 2)\ +\ 4);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keywordtype}{int}}
\DoxyCodeLine{main(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}}\ *last,\ *o;}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{int}\ i;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{group__Ecore__Evas__Group_ga32ddbb6457033ad435a177eb0c4fe235}{ecore\_evas\_init}}())}
\DoxyCodeLine{\ \ \ \ \ \textcolor{keywordflow}{return}\ EXIT\_FAILURE;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{comment}{/*\ this\ will\ give\ you\ a\ window\ with\ an\ Evas\ canvas\ under\ the\ first}}
\DoxyCodeLine{\textcolor{comment}{\ \ \ \ *\ engine\ available\ */}}
\DoxyCodeLine{\ \ \ d.ee\ =\ \mbox{\hyperlink{group__Ecore__Evas__Group_gaaa770b6f2f1395f9eeb0e50e26c3f933}{ecore\_evas\_new}}(NULL,\ 0,\ 0,\ WIDTH,\ HEIGHT,\ NULL);}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (!d.ee)}
\DoxyCodeLine{\ \ \ \ \ \textcolor{keywordflow}{goto}\ panic;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Ecore__Evas__Group_ga3d478e975e2101b9b821ef24baf3dd9e}{ecore\_evas\_callback\_delete\_request\_set}}(d.ee,\ \_on\_delete);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Ecore__Evas__Group_gaac67f679c9027059a34519fbdea360df}{ecore\_evas\_callback\_resize\_set}}(d.ee,\ \_canvas\_resize\_cb);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Ecore__Evas__Group_ga4953047ff97d4f1b0d75a7d513d4f317}{ecore\_evas\_show}}(d.ee);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ d.evas\ =\ \mbox{\hyperlink{group__Ecore__Evas__Group_ga6f8d214cd55bc940d7cc62fecd8dbc06}{ecore\_evas\_get}}(d.ee);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ d.bg\ =\ \mbox{\hyperlink{group__Evas__Object__Rectangle_ga1b7a9d8e6ce240590c1734da5f3449d2}{evas\_object\_rectangle\_add}}(d.evas);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_gab751e9d24c16e74af6f7c08ea5b930c2}{evas\_object\_color\_set}}(d.bg,\ 255,\ 255,\ 255,\ 255);\ \textcolor{comment}{/*\ white\ bg\ */}}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(d.bg);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gac6d65f8896ab59780553676d0017c2ef}{evas\_object\_focus\_set}}(d.bg,\ \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Events_gac71a1038dad71da36f57b70c8ad10252}{evas\_object\_event\_callback\_add}}(}
\DoxyCodeLine{\ \ \ \ \ d.bg,\ \mbox{\hyperlink{Evas__Common_8h_ad64cde0da38a60e7cb7905b3ab216968a336b86bad4f145f84c155e4922335584}{EVAS\_CALLBACK\_KEY\_DOWN}},\ \_on\_keydown,\ NULL);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ d.box\ =\ \mbox{\hyperlink{group__Evas__Object__Box__Group_ga79c13db775cfad42ac5500dd2607bdc6}{evas\_object\_box\_add}}(d.evas);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(d.box);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{for}\ (i\ =\ 1;\ i\ <=\ 5;\ i++)}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ o\ =\ last\ =\ \mbox{\hyperlink{group__Evas__Object__Rectangle_ga1b7a9d8e6ce240590c1734da5f3449d2}{evas\_object\_rectangle\_add}}(d.evas);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gaf20fdb7dc524a95091d72d24cf6a05e8}{evas\_object\_size\_hint\_min\_set}}(o,\ 50,\ 50);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_gab751e9d24c16e74af6f7c08ea5b930c2}{evas\_object\_color\_set}}(}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ o,\ rand()\ \%\ 256,\ rand()\ \%\ 256,\ rand()\ \%\ 256,\ 255);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(o);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{group__Evas__Object__Box__Group_ga901a603e429bdf752f8c184b418070ae}{evas\_object\_box\_append}}(d.box,\ o))}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ fprintf(stderr,\ \textcolor{stringliteral}{"{}Error\ appending\ child\ object\ on\ the\ box!\(\backslash\)n"{}});}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{goto}\ error;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{comment}{/*\ this\ is\ a\ border\ around\ the\ box,\ container\ of\ the\ rectangles\ we}}
\DoxyCodeLine{\textcolor{comment}{\ \ \ \ *\ are\ going\ to\ experiment\ with.\ this\ way\ you\ can\ see\ how\ the}}
\DoxyCodeLine{\textcolor{comment}{\ \ \ \ *\ container\ relates\ to\ the\ children\ */}}
\DoxyCodeLine{\ \ \ d.border\ =\ \mbox{\hyperlink{group__Evas__Object__Image_gafb52be265f315186a28d43af2d559ec6}{evas\_object\_image\_filled\_add}}(d.evas);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Image_gac2e588476b16b04f85ca9a594c140c1d}{evas\_object\_image\_file\_set}}(d.border,\ border\_img\_path,\ NULL);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Image_ga063e5ad38b43897311bbdecfe8dc312d}{evas\_object\_image\_border\_set}}(d.border,\ 2,\ 2,\ 2,\ 2);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Image_ga5749943ce62e85ead67a1440960677fa}{evas\_object\_image\_border\_center\_fill\_set}}(d.border,\ \mbox{\hyperlink{group__Evas__Object__Image_gga9f789224285e646309b7dd81a2401910a2ad856ac6aab5e2659c3a584a37aec70}{EVAS\_BORDER\_FILL\_NONE}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(d.border);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ printf(\textcolor{stringliteral}{"{}\%s"{}},\ commands);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \_canvas\_resize\_cb(d.ee);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Ecore__Main__Loop__Group_gaf103b9f668bb3e4fed12e52c6180132d}{ecore\_main\_loop\_begin}}();}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Ecore__Evas__Group_gab8fa311077f749190c9b622f672b2214}{ecore\_evas\_shutdown}}();}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{return}\ 0;}
\DoxyCodeLine{}
\DoxyCodeLine{error:}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Ecore__Evas__Group_gab8fa311077f749190c9b622f672b2214}{ecore\_evas\_shutdown}}();}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{return}\ -\/1;}
\DoxyCodeLine{}
\DoxyCodeLine{panic:}
\DoxyCodeLine{\ \ \ fprintf(stderr,\ \textcolor{stringliteral}{"{}error:\ Requires\ at\ least\ one\ Evas\ engine\ built\ and\ linked"{}}}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\ to\ ecore-\/evas\ for\ this\ example\ to\ run\ properly.\(\backslash\)n"{}});}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{return}\ -\/2;}
\DoxyCodeLine{\}}
\DoxyCodeLine{}

\end{DoxyCodeInclude}
 