\hypertarget{eina_tiler_01_8c-example}{}\doxysection{eina\+\_\+tiler\+\_\+01.\+c}

\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\textcolor{comment}{//Compile\ with:}}
\DoxyCodeLine{\textcolor{comment}{//gcc\ eina\_tiler\_01.c\ -\/o\ eina\_tiler\_01\ `pkg-\/config\ -\/-\/cflags\ -\/-\/libs\ ecore-\/evas\ ecore\ evas\ eina`}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#include\ <\mbox{\hyperlink{Ecore__Evas_8h}{Ecore\_Evas.h}}>}}
\DoxyCodeLine{\textcolor{preprocessor}{\#include\ <Ecore.h>}}
\DoxyCodeLine{\textcolor{preprocessor}{\#include\ <Evas.h>}}
\DoxyCodeLine{\textcolor{preprocessor}{\#include\ <\mbox{\hyperlink{Eina_8h}{Eina.h}}>}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#define\ WINDOW\_PAD\ (20)}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \mbox{\hyperlink{group__Eina__Tiler__Group_gabcc29c8a2b66db646e0d6e4b1828954c}{Eina\_Tiler}}\ *tiler;}
\DoxyCodeLine{\textcolor{keyword}{static}\ \mbox{\hyperlink{struct__Eina__Rectangle}{Eina\_Rectangle}}\ *input\_rects;}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ input\_count;}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ input\_idx\ =\ 0,\ input\_color\_idx\ =\ 0,\ output\_color\_idx\ =\ 0;}
\DoxyCodeLine{\textcolor{keyword}{static}\ \mbox{\hyperlink{struct__Eina__List}{Eina\_List}}\ *output\_objs\ =\ NULL;}
\DoxyCodeLine{\textcolor{keyword}{static}\ \mbox{\hyperlink{Evas__Common_8h_a2453e92182bad3b0e0d84e5aff433b07}{Evas\_Coord}}\ maxw,\ maxh,\ winw,\ winh;}
\DoxyCodeLine{\textcolor{keyword}{static}\ \mbox{\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}}\ *evas;}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{struct\ }color\ \{}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{char}\ r,\ g,\ b;}
\DoxyCodeLine{\}\ colors[]\ =\ \{}
\DoxyCodeLine{\ \ \{255,\ 0,\ 0\},}
\DoxyCodeLine{\ \ \{0,\ 255,\ 0\},}
\DoxyCodeLine{\ \ \{0,\ 0,\ 255\},}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \{255,\ 128,\ 0\},}
\DoxyCodeLine{\ \ \{0,\ 255,\ 128\},}
\DoxyCodeLine{\ \ \{128,\ 0,\ 255\},}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \{255,\ 255,\ 0\},}
\DoxyCodeLine{\ \ \{0,\ 255,\ 255\},}
\DoxyCodeLine{\ \ \{255,\ 0,\ 255\},}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \{255,\ 0,\ 128\},}
\DoxyCodeLine{\ \ \{128,\ 255,\ 0\},}
\DoxyCodeLine{\ \ \{0,\ 128,\ 255\},}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \{128,\ 128,\ 0\},}
\DoxyCodeLine{\ \ \{0,\ 128,\ 128\},}
\DoxyCodeLine{\ \ \{128,\ 0,\ 128\},}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \{128,\ 0,\ 0\},}
\DoxyCodeLine{\ \ \{0,\ 128,\ 0\},}
\DoxyCodeLine{\ \ \{0,\ 0,\ 128\},}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \{255,\ 128,\ 0\},}
\DoxyCodeLine{\ \ \{0,\ 255,\ 128\},}
\DoxyCodeLine{\ \ \{128,\ 0,\ 255\},}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \{64,\ 64,\ 0\},}
\DoxyCodeLine{\ \ \{0,\ 64,\ 64\},}
\DoxyCodeLine{\ \ \{64,\ 0,\ 64\},}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \{128,\ 128,\ 0\},}
\DoxyCodeLine{\ \ \{0,\ 128,\ 128\},}
\DoxyCodeLine{\ \ \{128,\ 0,\ 128\},}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \{255,\ 0,\ 128\},}
\DoxyCodeLine{\ \ \{128,\ 255,\ 0\},}
\DoxyCodeLine{\ \ \{0,\ 128,\ 255\},}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \{128,\ 64,\ 0\},}
\DoxyCodeLine{\ \ \{0,\ 128,\ 64\},}
\DoxyCodeLine{\ \ \{64,\ 0,\ 128\},}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \{128,\ 0,\ 64\},}
\DoxyCodeLine{\ \ \{64,\ 128,\ 0\},}
\DoxyCodeLine{\ \ \{0,\ 64,\ 128\}}
\DoxyCodeLine{\};}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#define\ MAX\_COLORS\ (sizeof(colors)\ /\ sizeof(colors[0]))}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{add\_text(\textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *text,\ \textcolor{keywordtype}{int}\ x,\ \textcolor{keywordtype}{int}\ y,\ \textcolor{keywordtype}{int}\ w)}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}}\ *o\ =\ \mbox{\hyperlink{group__Evas__Object__Text__Group_gae4d422b8ccfeadf3e24c5349a78e530a}{evas\_object\_text\_add}}(evas);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_gab751e9d24c16e74af6f7c08ea5b930c2}{evas\_object\_color\_set}}(o,\ 0,\ 0,\ 0,\ 255);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga335c8ee6eaeaac9710656af4f8b0db91}{evas\_object\_move}}(o,\ x,\ y);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gacad94595f83580c18908cb3b69b08d1a}{evas\_object\_resize}}(o,\ w,\ WINDOW\_PAD);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Text__Group_gac5dd3bf469c8df9c4fe36d08c066f122}{evas\_object\_text\_font\_set}}(o,\ \textcolor{stringliteral}{"{}Sans"{}},\ 10);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Text__Group_ga1c9f3b5f76d5c2f020320d84a8197492}{evas\_object\_text\_text\_set}}(o,\ text);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(o);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{output\_rects\_reset(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}}\ *o;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eina__List__Group_gae27a2c686a0a11693f9b06957c9bba83}{EINA\_LIST\_FREE}}(output\_objs,\ o)}
\DoxyCodeLine{\ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga9217cf1d90690dbd1960db155d1c7476}{evas\_object\_del}}(o);}
\DoxyCodeLine{\ \ \ output\_color\_idx\ =\ 0;}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{add\_input\_rect(\textcolor{keyword}{const}\ \mbox{\hyperlink{struct__Eina__Rectangle}{Eina\_Rectangle}}\ *r)}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}}\ *o;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{Evas__Common_8h_a2453e92182bad3b0e0d84e5aff433b07}{Evas\_Coord}}\ bx,\ by;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ bx\ =\ WINDOW\_PAD;}
\DoxyCodeLine{\ \ \ by\ =\ WINDOW\_PAD;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ o\ =\ \mbox{\hyperlink{group__Evas__Object__Rectangle_ga1b7a9d8e6ce240590c1734da5f3449d2}{evas\_object\_rectangle\_add}}(evas);}
\DoxyCodeLine{\textcolor{preprocessor}{\#define\ C(comp)\ (((int)colors[input\_color\_idx].comp\ *\ 128)\ /\ 255)}}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_gab751e9d24c16e74af6f7c08ea5b930c2}{evas\_object\_color\_set}}(o,\ C(r),\ C(g),\ C(b),\ 128);}
\DoxyCodeLine{\textcolor{preprocessor}{\#undef\ C}}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga335c8ee6eaeaac9710656af4f8b0db91}{evas\_object\_move}}(o,\ r-\/>x\ +\ bx,\ r-\/>y\ +\ by);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gacad94595f83580c18908cb3b69b08d1a}{evas\_object\_resize}}(o,\ r-\/>w,\ r-\/>h);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(o);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ input\_color\_idx\ =\ (input\_color\_idx\ +\ 1)\ \%\ MAX\_COLORS;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ bx\ +=\ maxw\ +\ WINDOW\_PAD;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ o\ =\ \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}}(o,\ 32,\ 32,\ 32,\ 128);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga335c8ee6eaeaac9710656af4f8b0db91}{evas\_object\_move}}(o,\ r-\/>x\ +\ bx,\ r-\/>y\ +\ by);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gacad94595f83580c18908cb3b69b08d1a}{evas\_object\_resize}}(o,\ r-\/>w,\ 1);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga6f4b41c65c99eb5d53e207439eeffd76}{evas\_object\_layer\_set}}(o,\ \mbox{\hyperlink{Evas__Common_8h_a1456f5c97f03ebd786c49d4d1178e7a0}{EVAS\_LAYER\_MAX}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(o);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ o\ =\ \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}}(o,\ 32,\ 32,\ 32,\ 128);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga335c8ee6eaeaac9710656af4f8b0db91}{evas\_object\_move}}(o,\ r-\/>x\ +\ bx,\ r-\/>y\ +\ by);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gacad94595f83580c18908cb3b69b08d1a}{evas\_object\_resize}}(o,\ 1,\ r-\/>h);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga6f4b41c65c99eb5d53e207439eeffd76}{evas\_object\_layer\_set}}(o,\ \mbox{\hyperlink{Evas__Common_8h_a1456f5c97f03ebd786c49d4d1178e7a0}{EVAS\_LAYER\_MAX}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(o);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ o\ =\ \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}}(o,\ 32,\ 32,\ 32,\ 128);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga335c8ee6eaeaac9710656af4f8b0db91}{evas\_object\_move}}(o,\ r-\/>x\ +\ bx,\ r-\/>y\ +\ by\ +\ r-\/>h);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gacad94595f83580c18908cb3b69b08d1a}{evas\_object\_resize}}(o,\ r-\/>w,\ 1);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga6f4b41c65c99eb5d53e207439eeffd76}{evas\_object\_layer\_set}}(o,\ \mbox{\hyperlink{Evas__Common_8h_a1456f5c97f03ebd786c49d4d1178e7a0}{EVAS\_LAYER\_MAX}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(o);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ o\ =\ \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}}(o,\ 32,\ 32,\ 32,\ 128);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga335c8ee6eaeaac9710656af4f8b0db91}{evas\_object\_move}}(o,\ r-\/>x\ +\ bx\ +\ r-\/>w,\ r-\/>y\ +\ by);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gacad94595f83580c18908cb3b69b08d1a}{evas\_object\_resize}}(o,\ 1,\ r-\/>h);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga6f4b41c65c99eb5d53e207439eeffd76}{evas\_object\_layer\_set}}(o,\ \mbox{\hyperlink{Evas__Common_8h_a1456f5c97f03ebd786c49d4d1178e7a0}{EVAS\_LAYER\_MAX}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(o);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{add\_output\_rect(\textcolor{keyword}{const}\ \mbox{\hyperlink{struct__Eina__Rectangle}{Eina\_Rectangle}}\ *r)}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}}\ *o\ =\ \mbox{\hyperlink{group__Evas__Object__Rectangle_ga1b7a9d8e6ce240590c1734da5f3449d2}{evas\_object\_rectangle\_add}}(evas);}
\DoxyCodeLine{\textcolor{preprocessor}{\#define\ C(comp)\ (((int)colors[output\_color\_idx].comp\ *\ 128)\ /\ 255)}}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_gab751e9d24c16e74af6f7c08ea5b930c2}{evas\_object\_color\_set}}(o,\ C(r),\ C(g),\ C(b),\ 128);}
\DoxyCodeLine{\textcolor{preprocessor}{\#undef\ C}}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga335c8ee6eaeaac9710656af4f8b0db91}{evas\_object\_move}}(o,\ r-\/>x\ +\ maxw\ +\ 2\ *\ WINDOW\_PAD,\ r-\/>y\ +\ WINDOW\_PAD);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gacad94595f83580c18908cb3b69b08d1a}{evas\_object\_resize}}(o,\ r-\/>w,\ r-\/>h);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(o);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ output\_color\_idx\ =\ (output\_color\_idx\ +\ 1)\ \%\ MAX\_COLORS;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ output\_objs\ =\ \mbox{\hyperlink{group__Eina__List__Group_ga625698a383dda8fc0db245a1c7608c49}{eina\_list\_append}}(output\_objs,\ o);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}}
\DoxyCodeLine{process\_input(\textcolor{keywordtype}{void}\ *data\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{struct__Eina__Iterator}{Eina\_Iterator}}\ *itr;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{struct__Eina__Rectangle}{Eina\_Rectangle}}\ r,\ *r1;}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ out\ =\ 0;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (input\_idx\ ==\ input\_count)}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ add\_text(\textcolor{stringliteral}{"{}Done.\ Close\ the\ window\ to\ exit"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ WINDOW\_PAD,\ winh\ -\/\ WINDOW\_PAD,\ winw\ -\/\ 2\ *\ WINDOW\_PAD);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ output\_rects\_reset();}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ r\ =\ input\_rects[input\_idx];}
\DoxyCodeLine{\ \ \ printf(\textcolor{stringliteral}{"{}Iteration\ \#\%u:\ \%dx\%d\%+d\%+d\(\backslash\)n"{}},\ input\_idx,\ r.w,\ r.h,\ r.x,\ r.y);}
\DoxyCodeLine{\ \ \ input\_idx++;}
\DoxyCodeLine{\ \ \ add\_input\_rect(\&r);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eina__Tiler__Group_ga12c9f9b6720db9ad343d9f5b8a6d4d5c}{eina\_tiler\_rect\_add}}(tiler,\ \&r);}
\DoxyCodeLine{\ \ \ itr\ =\ \mbox{\hyperlink{group__Eina__Tiler__Group_ga6d30ecd288f61af33555a622782adfff}{eina\_tiler\_iterator\_new}}(tiler);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eina__Iterator__Group_gac7314580e18868ef229f5d2814562794}{EINA\_ITERATOR\_FOREACH}}(itr,\ r1)}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}\(\backslash\)tOutput\ \#\%u:\ \%dx\%d\%+d\%+d\(\backslash\)n"{}},\ out,\ r1-\/>\mbox{\hyperlink{struct__Eina__Rectangle_af6a92d51ec25ee3464c81297ffc3a330}{w}},\ r1-\/>\mbox{\hyperlink{struct__Eina__Rectangle_a7570ed17f58fc94be997414a86130074}{h}},\ r1-\/>\mbox{\hyperlink{struct__Eina__Rectangle_a8358c0791dcf476432687510ca4e5d5c}{x}},\ r1-\/>\mbox{\hyperlink{struct__Eina__Rectangle_ae74dc834fb71a1f4cd9e3fe11dec3940}{y}});}
\DoxyCodeLine{\ \ \ \ \ \ \ \ add\_output\_rect(r1);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ out++;}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eina__Iterator__Group_ga50da005e8d26c0a043d0d1c025bc9008}{eina\_iterator\_free}}(itr);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}};}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{usage(\textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *progname)}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ fprintf(stderr,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}Usage:\(\backslash\)n\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\(\backslash\)t\%s\ <rect1>\ ...\ <rectN>\(\backslash\)n\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}with\ rectangles\ being\ in\ the\ format:\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\(\backslash\)tWIDTHxHEIGHT<+-\/>X<+-\/>Y\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}examples:\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\(\backslash\)t100x100+10+10\ -\/\ width=100,\ height=100\ at\ x=10,\ y=10\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\(\backslash\)t150x50+5+6\ \ \ \ -\/\ width=150,\ height=50\ at\ x=5,\ y=6\(\backslash\)n"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ progname);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keywordtype}{int}}
\DoxyCodeLine{main(\textcolor{keywordtype}{int}\ argc,\ \textcolor{keywordtype}{char}\ *argv[])}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ Ecore\_Evas\ *ee;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}}\ *o;}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{int}\ i;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (argc\ <\ 2)}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ usage(argv[0]);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ -\/2;}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ input\_rects\ =\ calloc(argc\ -\/\ 1,\ \textcolor{keyword}{sizeof}(\mbox{\hyperlink{struct__Eina__Rectangle}{Eina\_Rectangle}}));}
\DoxyCodeLine{\ \ \ input\_count\ =\ 0;}
\DoxyCodeLine{\ \ \ maxw\ =\ 0;}
\DoxyCodeLine{\ \ \ maxh\ =\ 0;}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{for}\ (i\ =\ 1;\ i\ <\ argc;\ i++)}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{struct__Eina__Rectangle}{Eina\_Rectangle}}\ *r\ =\ input\_rects\ +\ input\_count;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordtype}{char}\ sx,\ sy;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (sscanf(argv[i],\ \textcolor{stringliteral}{"{}\%dx\%d\%c\%d\%c\%d"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \&(r-\/>w),\ \&(r-\/>h),\ \&sx,\ \&(r-\/>x),\ \&sy,\ \&(r-\/>y))\ ==\ 6)}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (sx\ ==\ \textcolor{charliteral}{'-\/'})\ r-\/>x\ *=\ -\/1;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (sy\ ==\ \textcolor{charliteral}{'-\/'})\ r-\/>y\ *=\ -\/1;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (maxw\ <\ r-\/>x\ +\ r-\/>w)\ maxw\ =\ r-\/>x\ +\ r-\/>w;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (maxh\ <\ r-\/>y\ +\ r-\/>h)\ maxh\ =\ r-\/>y\ +\ r-\/>h;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ input\_count++;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ fprintf(stderr,\ \textcolor{stringliteral}{"{}ERROR:\ invalid\ rectangle\ ignored:\ \%s\(\backslash\)n"{}},\ argv[i]);}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (input\_count\ ==\ 0)}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ fputs(\textcolor{stringliteral}{"{}ERROR:\ Could\ not\ find\ any\ valid\ rectangle.\ Exit!\(\backslash\)n"{}},\ stderr);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ usage(argv[0]);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ free(input\_rects);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ -\/3;}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ ((maxw\ ==\ 0)\ ||\ (maxh\ ==\ 0))}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ fputs(\textcolor{stringliteral}{"{}ERROR:\ All\ rectangles\ with\ size\ 0x0.\ Exit!\(\backslash\)n"{}},\ stderr);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ usage(argv[0]);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ free(input\_rects);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ -\/3;}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Ecore__Evas__Group_ga32ddbb6457033ad435a177eb0c4fe235}{ecore\_evas\_init}}();}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Ecore__Init__Group_ga77757609684a2c922dc5ec398274751b}{ecore\_init}}();}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Main__Group_gaa617071d85a52779e950e5b1d8c354e3}{evas\_init}}();}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eina__Main__Group_ga81b8137665b8a4d2cb38ca50017d4c74}{eina\_init}}();}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ winw\ =\ 2\ *\ maxw\ +\ 3\ *\ WINDOW\_PAD;}
\DoxyCodeLine{\ \ \ winh\ =\ maxh\ +\ 2\ *\ WINDOW\_PAD;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ ee\ =\ \mbox{\hyperlink{group__Ecore__Evas__Group_gaaa770b6f2f1395f9eeb0e50e26c3f933}{ecore\_evas\_new}}(NULL,\ 0,\ 0,\ winw,\ winh,\ NULL);}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (!ee)}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ fputs(\textcolor{stringliteral}{"{}ERROR:\ Could\ not\ create\ window.\ Check\ ecore-\/evas\ install.\(\backslash\)n"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ stderr);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{goto}\ end;}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ evas\ =\ \mbox{\hyperlink{group__Ecore__Evas__Group_ga6f8d214cd55bc940d7cc62fecd8dbc06}{ecore\_evas\_get}}(ee);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ o\ =\ \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}}(o,\ 255,\ 255,\ 255,\ 255);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gacad94595f83580c18908cb3b69b08d1a}{evas\_object\_resize}}(o,\ winw,\ winh);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(o);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ add\_text(\textcolor{stringliteral}{"{}Input"{}},\ WINDOW\_PAD,\ 0,\ maxw);}
\DoxyCodeLine{\ \ \ o\ =\ \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}}(o,\ 200,\ 200,\ 200,\ 255);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga335c8ee6eaeaac9710656af4f8b0db91}{evas\_object\_move}}(o,\ WINDOW\_PAD,\ WINDOW\_PAD);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gacad94595f83580c18908cb3b69b08d1a}{evas\_object\_resize}}(o,\ maxw,\ maxh);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(o);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ add\_text(\textcolor{stringliteral}{"{}Output"{}},\ maxw\ +\ 2\ *\ WINDOW\_PAD,\ 0,\ maxw);}
\DoxyCodeLine{\ \ \ o\ =\ \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}}(o,\ 200,\ 200,\ 200,\ 255);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga335c8ee6eaeaac9710656af4f8b0db91}{evas\_object\_move}}(o,\ maxw\ +\ 2\ *\ WINDOW\_PAD,\ WINDOW\_PAD);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gacad94595f83580c18908cb3b69b08d1a}{evas\_object\_resize}}(o,\ maxw,\ maxh);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(o);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ tiler\ =\ \mbox{\hyperlink{group__Eina__Tiler__Group_gaca78d2c4c69a919d1e8a9650c7e62ba0}{eina\_tiler\_new}}(maxw,\ maxh);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Ecore__Timer__Group_ga926423e464d7ef71105dd822d90e1187}{ecore\_timer\_add}}(2.0,\ process\_input,\ NULL);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Ecore__Evas__Group_ga4953047ff97d4f1b0d75a7d513d4f317}{ecore\_evas\_show}}(ee);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Ecore__Main__Loop__Group_gaf103b9f668bb3e4fed12e52c6180132d}{ecore\_main\_loop\_begin}}();}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eina__List__Group_ga82a1bfa543e21853f9ea3ff88dd1250b}{eina\_list\_free}}(output\_objs);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eina__Tiler__Group_ga888348853d29439724c8a6a8ec681eab}{eina\_tiler\_free}}(tiler);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Ecore__Evas__Group_gad3ec61f2aa03df4d3dbfd0d311e0c8dc}{ecore\_evas\_free}}(ee);}
\DoxyCodeLine{}
\DoxyCodeLine{\ end:}
\DoxyCodeLine{\ \ \ free(input\_rects);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eina__Main__Group_ga5bf35513199d5220341437c05696285d}{eina\_shutdown}}();}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Main__Group_gadb9d1c9f3fcff94cea89e12942c40919}{evas\_shutdown}}();}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Ecore__Init__Group_ga768298b932f18d7e7593a447493e5cde}{ecore\_shutdown}}();}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Ecore__Evas__Group_gab8fa311077f749190c9b622f672b2214}{ecore\_evas\_shutdown}}();}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{return}\ 0;}
\DoxyCodeLine{\}}

\end{DoxyCodeInclude}
 