In this code, we place a (vertical) box with two rectangles as child elements.

It has a command line interface with which to act on those rectangles\textquotesingle{} {\bfseries{size hints}}\+:  
\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\)tShift + a -\/ change alignment hints on top rectangle\(\backslash\)n"{}}}
\DoxyCodeLine{  \textcolor{stringliteral}{"{}\(\backslash\)tShift + m -\/ change min. size hint on top rectangle\(\backslash\)n"{}}}
\DoxyCodeLine{  \textcolor{stringliteral}{"{}\(\backslash\)tShift + n -\/ change max. size hint on top rectangle\(\backslash\)n"{}}}
\DoxyCodeLine{  \textcolor{stringliteral}{"{}\(\backslash\)tShift + p -\/ change padding hints on top rectangle\(\backslash\)n"{}}}
\DoxyCodeLine{  \textcolor{stringliteral}{"{}\(\backslash\)tShift + w -\/ change weight hints on top rectangle\(\backslash\)n\(\backslash\)n"{}}}
\DoxyCodeLine{  \textcolor{stringliteral}{"{}\(\backslash\)tControl + a -\/ change alignment hints on bottom rectangle\(\backslash\)n"{}}}
\DoxyCodeLine{  \textcolor{stringliteral}{"{}\(\backslash\)tControl + m -\/ change min. size hint on bottom rectangle\(\backslash\)n"{}}}
\DoxyCodeLine{  \textcolor{stringliteral}{"{}\(\backslash\)tControl + n -\/ change max. size hint on bottom rectangle\(\backslash\)n"{}}}
\DoxyCodeLine{  \textcolor{stringliteral}{"{}\(\backslash\)tControl + p -\/ change padding hints on bottom rectangle\(\backslash\)n"{}}}
\DoxyCodeLine{  \textcolor{stringliteral}{"{}\(\backslash\)tControl + w -\/ change weight hints on bottom rectangle\(\backslash\)n\(\backslash\)n"{}}}
\DoxyCodeLine{  \textcolor{stringliteral}{"{}\(\backslash\)ts -\/ print current hints information\(\backslash\)n"{}}}
\DoxyCodeLine{  \textcolor{stringliteral}{"{}\(\backslash\)th -\/ print help\(\backslash\)n"{}};}

\end{DoxyCodeInclude}
 That should be self explanatory. Change those values (possibly resizing the box, which will resize together with the example\textquotesingle{}s window) to get how size hints are honored by a container object, which in this case is the Evas box.

More on this smart object can be found on \mbox{\hyperlink{Example_Evas_Box}{Evas box example}}. The full code for this 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 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{\textcolor{preprocessor}{\#include <stdlib.h>}}
\DoxyCodeLine{\textcolor{preprocessor}{\#include <stdio.h>}}
\DoxyCodeLine{\textcolor{preprocessor}{\#include <string.h>}}
\DoxyCodeLine{\textcolor{preprocessor}{\#include "{}evas-\/common.h"{}}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#define WIDTH  320}}
\DoxyCodeLine{\textcolor{preprocessor}{\#define HEIGHT 480}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} commands[] = \(\backslash\)}
\DoxyCodeLine{  \textcolor{stringliteral}{"{}commands are:\(\backslash\)n"{}}}
\DoxyCodeLine{  \textcolor{stringliteral}{"{}\(\backslash\)tShift + a -\/ change alignment hints on top rectangle\(\backslash\)n"{}}}
\DoxyCodeLine{  \textcolor{stringliteral}{"{}\(\backslash\)tShift + m -\/ change min. size hint on top rectangle\(\backslash\)n"{}}}
\DoxyCodeLine{  \textcolor{stringliteral}{"{}\(\backslash\)tShift + n -\/ change max. size hint on top rectangle\(\backslash\)n"{}}}
\DoxyCodeLine{  \textcolor{stringliteral}{"{}\(\backslash\)tShift + p -\/ change padding hints on top rectangle\(\backslash\)n"{}}}
\DoxyCodeLine{  \textcolor{stringliteral}{"{}\(\backslash\)tShift + w -\/ change weight hints on top rectangle\(\backslash\)n\(\backslash\)n"{}}}
\DoxyCodeLine{  \textcolor{stringliteral}{"{}\(\backslash\)tControl + a -\/ change alignment hints on bottom rectangle\(\backslash\)n"{}}}
\DoxyCodeLine{  \textcolor{stringliteral}{"{}\(\backslash\)tControl + m -\/ change min. size hint on bottom rectangle\(\backslash\)n"{}}}
\DoxyCodeLine{  \textcolor{stringliteral}{"{}\(\backslash\)tControl + n -\/ change max. size hint on bottom rectangle\(\backslash\)n"{}}}
\DoxyCodeLine{  \textcolor{stringliteral}{"{}\(\backslash\)tControl + p -\/ change padding hints on bottom rectangle\(\backslash\)n"{}}}
\DoxyCodeLine{  \textcolor{stringliteral}{"{}\(\backslash\)tControl + w -\/ change weight hints on bottom rectangle\(\backslash\)n\(\backslash\)n"{}}}
\DoxyCodeLine{  \textcolor{stringliteral}{"{}\(\backslash\)ts -\/ print current hints information\(\backslash\)n"{}}}
\DoxyCodeLine{  \textcolor{stringliteral}{"{}\(\backslash\)th -\/ print help\(\backslash\)n"{}};}
\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}{struct }coord\_tuple}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \mbox{\hyperlink{Evas__Common_8h_a2453e92182bad3b0e0d84e5aff433b07}{Evas\_Coord}} w, h;}
\DoxyCodeLine{\};}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{struct }weight\_tuple}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \textcolor{keywordtype}{double} x, y;}
\DoxyCodeLine{\};}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{struct }padding\_tuple}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \mbox{\hyperlink{Evas__Common_8h_a2453e92182bad3b0e0d84e5aff433b07}{Evas\_Coord}} l, r, t, b;}
\DoxyCodeLine{\};}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{struct }rect\_data}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \textcolor{keyword}{struct }coord\_tuple   *min\_ptr;}
\DoxyCodeLine{   \textcolor{keyword}{struct }coord\_tuple    min[4];}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keyword}{struct }coord\_tuple   *max\_ptr;}
\DoxyCodeLine{   \textcolor{keyword}{struct }coord\_tuple    max[4];}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keyword}{struct }weight\_tuple  *align\_ptr;}
\DoxyCodeLine{   \textcolor{keyword}{struct }weight\_tuple   align[3];}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keyword}{struct }weight\_tuple  *weight\_ptr;}
\DoxyCodeLine{   \textcolor{keyword}{struct }weight\_tuple   weight[3];}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keyword}{struct }padding\_tuple *padding\_ptr;}
\DoxyCodeLine{   \textcolor{keyword}{struct }padding\_tuple  padding[3];}
\DoxyCodeLine{\};}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{struct }test\_data}
\DoxyCodeLine{\{}
\DoxyCodeLine{   Ecore\_Evas      *ee;}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}}            *canvas;}
\DoxyCodeLine{   \textcolor{keyword}{struct }rect\_data t\_data, b\_data;}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}}     *bg, *box, *t\_rect, *b\_rect, *border;}
\DoxyCodeLine{\};}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keyword}{struct }test\_data d = \{0\};}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{/* Keep the example's window size in sync with the background image's size */}}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\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{   \mbox{\hyperlink{group__Evas__Object__Group_ga21e8604c0e4a93e469bff4bd069e82b5}{evas\_object\_resize}}(d.bg, w, h);}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga02da8091bbac768b8e86c7b74b2a94f9}{evas\_object\_move}}(d.box, (w / 4), (h / 4));}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga21e8604c0e4a93e469bff4bd069e82b5}{evas\_object\_resize}}(d.box, (w / 2), (h / 2));}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga02da8091bbac768b8e86c7b74b2a94f9}{evas\_object\_move}}(d.border, (w / 4) -\/ 3, (h / 4) -\/ 3);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga21e8604c0e4a93e469bff4bd069e82b5}{evas\_object\_resize}}(d.border, (w / 2) + 6, (h / 2) + 6);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_print\_rect\_stats(\mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}} *rect)}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \mbox{\hyperlink{Evas__Common_8h_a2453e92182bad3b0e0d84e5aff433b07}{Evas\_Coord}} w, h, l, r, t, b;}
\DoxyCodeLine{   \mbox{\hyperlink{struct__Eina__Size2D}{Eina\_Size2D}} cmin;}
\DoxyCodeLine{   \textcolor{keywordtype}{double} x, y;}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_gabb27bb867c664d47d648963db7f97d14}{evas\_object\_size\_hint\_align\_get}}(rect, \&x, \&y);}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"{}\(\backslash\)talign hints: h(\%f), v(\%f)\(\backslash\)n"{}},}
\DoxyCodeLine{          x, y);}
\DoxyCodeLine{}
\DoxyCodeLine{   cmin = efl\_gfx\_hint\_size\_combined\_min\_get(rect);}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"{}\(\backslash\)tmin. size hints: h(\%d), v(\%d)\(\backslash\)n"{}},}
\DoxyCodeLine{          cmin.w, cmin.h);}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga9bf9ef18f79bf7316748f4c4405280d6}{evas\_object\_size\_hint\_max\_get}}(rect, \&w, \&h);}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"{}\(\backslash\)tmax. size hints: h(\%d), v(\%d)\(\backslash\)n"{}},}
\DoxyCodeLine{          w, h);}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_gafbd60238617892ceafc6be5b4372b191}{evas\_object\_size\_hint\_padding\_get}}(rect, \&l, \&r, \&t, \&b);}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"{}\(\backslash\)tpadding hints: l(\%d), r(\%d), t(\%d), b(\%d)\(\backslash\)n"{}},}
\DoxyCodeLine{          l, r, t, b);}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga4102899b5b7d54018f59b6c2712ac432}{evas\_object\_size\_hint\_weight\_get}}(rect, \&x, \&y);}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"{}\(\backslash\)tweight hints: h(\%f), v(\%f)\(\backslash\)n"{}},}
\DoxyCodeLine{          x, y);}
\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}{struct }rect\_data *r\_data = NULL;}
\DoxyCodeLine{   \textcolor{keyword}{const} Evas\_Modifier *mods;}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}} *rect = NULL;}
\DoxyCodeLine{   \textcolor{keyword}{const} \textcolor{keywordtype}{char} *name = NULL;}
\DoxyCodeLine{}
\DoxyCodeLine{   mods = \mbox{\hyperlink{group__Evas__Canvas_gaad42bb4caa43c1cfef4096f6ac2b99ec}{evas\_key\_modifier\_get}}(evas);}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (\mbox{\hyperlink{group__Evas__Keys_ga6cc24a5ea4b39b84c7a3e617de3db261}{evas\_key\_modifier\_is\_set}}(mods, \textcolor{stringliteral}{"{}Shift"{}}))}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        rect = d.t\_rect;}
\DoxyCodeLine{        r\_data = \&d.t\_data;}
\DoxyCodeLine{        name = \textcolor{stringliteral}{"{}top"{}};}
\DoxyCodeLine{     \}}
\DoxyCodeLine{   \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{group__Evas__Keys_ga6cc24a5ea4b39b84c7a3e617de3db261}{evas\_key\_modifier\_is\_set}}(mods, \textcolor{stringliteral}{"{}Control"{}}))}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        rect = d.b\_rect;}
\DoxyCodeLine{        r\_data = \&d.b\_data;}
\DoxyCodeLine{        name = \textcolor{stringliteral}{"{}bottom"{}};}
\DoxyCodeLine{     \}}
\DoxyCodeLine{   \textcolor{keywordflow}{else} \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}{/* get aspect status of the}}
\DoxyCodeLine{\textcolor{comment}{                                            * rectangles WRT size}}
\DoxyCodeLine{\textcolor{comment}{                                            * hints */}}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        printf(\textcolor{stringliteral}{"{}Top rectangle:\(\backslash\)n"{}});}
\DoxyCodeLine{        \_print\_rect\_stats(d.t\_rect);}
\DoxyCodeLine{}
\DoxyCodeLine{        printf(\textcolor{stringliteral}{"{}\(\backslash\)nBottom rectangle:\(\backslash\)n"{}});}
\DoxyCodeLine{        \_print\_rect\_stats(d.b\_rect);}
\DoxyCodeLine{}
\DoxyCodeLine{        \textcolor{keywordflow}{return};}
\DoxyCodeLine{     \}}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (!rect) \textcolor{keywordflow}{return};}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (strcmp(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}}, \textcolor{stringliteral}{"{}a"{}}) == 0) \textcolor{comment}{/* alignment hints */}}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        (r\_data-\/>align\_ptr)++;}
\DoxyCodeLine{}
\DoxyCodeLine{        \textcolor{keywordflow}{if} ((\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int})}
\DoxyCodeLine{            (((\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} *)(r\_data-\/>align\_ptr)) -\/ ((\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} *)(r\_data-\/>align))) >=}
\DoxyCodeLine{            \textcolor{keyword}{sizeof}(r\_data-\/>align))}
\DoxyCodeLine{          r\_data-\/>align\_ptr = r\_data-\/>align;}
\DoxyCodeLine{}
\DoxyCodeLine{        \mbox{\hyperlink{group__Evas__Object__Group_ga44b67b368e5cda723129c2852bd81ead}{evas\_object\_size\_hint\_align\_set}}(}
\DoxyCodeLine{          rect, r\_data-\/>align\_ptr-\/>x, r\_data-\/>align\_ptr-\/>y);}
\DoxyCodeLine{}
\DoxyCodeLine{        printf(\textcolor{stringliteral}{"{}Changing align hints for \%s rect. to (\%f, \%f)\(\backslash\)n"{}},}
\DoxyCodeLine{               name, r\_data-\/>align\_ptr-\/>x, r\_data-\/>align\_ptr-\/>y);}
\DoxyCodeLine{        \textcolor{keywordflow}{return};}
\DoxyCodeLine{     \}}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (strcmp(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}}, \textcolor{stringliteral}{"{}m"{}}) == 0) \textcolor{comment}{/* min. size hints */}}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        (r\_data-\/>min\_ptr)++;}
\DoxyCodeLine{}
\DoxyCodeLine{        \textcolor{keywordflow}{if} ((\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int})}
\DoxyCodeLine{            (((\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} *)(r\_data-\/>min\_ptr)) -\/ ((\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} *)(r\_data-\/>min))) >=}
\DoxyCodeLine{            \textcolor{keyword}{sizeof}(r\_data-\/>min))}
\DoxyCodeLine{          r\_data-\/>min\_ptr = r\_data-\/>min;}
\DoxyCodeLine{}
\DoxyCodeLine{        \mbox{\hyperlink{group__Evas__Object__Group_ga3014f5c9dfbdc6c7af41a27826e50e57}{evas\_object\_size\_hint\_min\_set}}(}
\DoxyCodeLine{          rect, r\_data-\/>min\_ptr-\/>w, r\_data-\/>min\_ptr-\/>h);}
\DoxyCodeLine{}
\DoxyCodeLine{        printf(\textcolor{stringliteral}{"{}Changing min. size hints for \%s rect. to (\%d, \%d)\(\backslash\)n"{}},}
\DoxyCodeLine{               name, r\_data-\/>min\_ptr-\/>w, r\_data-\/>min\_ptr-\/>h);}
\DoxyCodeLine{        \textcolor{keywordflow}{return};}
\DoxyCodeLine{     \}}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (strcmp(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}}, \textcolor{stringliteral}{"{}n"{}}) == 0) \textcolor{comment}{/* max. size hints */}}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        (r\_data-\/>max\_ptr)++;}
\DoxyCodeLine{}
\DoxyCodeLine{        \textcolor{keywordflow}{if} ((\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int})}
\DoxyCodeLine{            (((\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} *)(r\_data-\/>max\_ptr)) -\/ ((\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} *)(r\_data-\/>max))) >=}
\DoxyCodeLine{            \textcolor{keyword}{sizeof}(r\_data-\/>max))}
\DoxyCodeLine{          r\_data-\/>max\_ptr = r\_data-\/>max;}
\DoxyCodeLine{}
\DoxyCodeLine{        \mbox{\hyperlink{group__Evas__Object__Group_ga69aec74e9d28688f27c4f491c4ac8ecb}{evas\_object\_size\_hint\_max\_set}}(}
\DoxyCodeLine{          rect, r\_data-\/>max\_ptr-\/>w, r\_data-\/>max\_ptr-\/>h);}
\DoxyCodeLine{}
\DoxyCodeLine{        printf(\textcolor{stringliteral}{"{}Changing max. size hints for \%s rect. to (\%d, \%d)\(\backslash\)n"{}},}
\DoxyCodeLine{               name, r\_data-\/>max\_ptr-\/>w, r\_data-\/>max\_ptr-\/>h);}
\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) \textcolor{comment}{/* padding size hints */}}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        (r\_data-\/>padding\_ptr)++;}
\DoxyCodeLine{}
\DoxyCodeLine{        \textcolor{keywordflow}{if} ((\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int})}
\DoxyCodeLine{            (((\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} *)(r\_data-\/>padding\_ptr)) -\/ ((\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} *)(r\_data-\/>padding))) >=}
\DoxyCodeLine{            \textcolor{keyword}{sizeof}(r\_data-\/>padding))}
\DoxyCodeLine{          r\_data-\/>padding\_ptr = r\_data-\/>padding;}
\DoxyCodeLine{}
\DoxyCodeLine{        \mbox{\hyperlink{group__Evas__Object__Group_ga532372779637796d1bb5c6f43367eb1a}{evas\_object\_size\_hint\_padding\_set}}(}
\DoxyCodeLine{          rect, r\_data-\/>padding\_ptr-\/>l, r\_data-\/>padding\_ptr-\/>r,}
\DoxyCodeLine{          r\_data-\/>padding\_ptr-\/>t, r\_data-\/>padding\_ptr-\/>b);}
\DoxyCodeLine{}
\DoxyCodeLine{        printf(\textcolor{stringliteral}{"{}Changing padding size hints for \%s rect. to (\%d, \%d, \%d, \%d)\(\backslash\)n"{}},}
\DoxyCodeLine{               name, r\_data-\/>padding\_ptr-\/>l, r\_data-\/>padding\_ptr-\/>r,}
\DoxyCodeLine{               r\_data-\/>padding\_ptr-\/>t, r\_data-\/>padding\_ptr-\/>b);}
\DoxyCodeLine{        \textcolor{keywordflow}{return};}
\DoxyCodeLine{     \}}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{/* experiment with weights here. keep in mind that, for the box}}
\DoxyCodeLine{\textcolor{comment}{    * object, only if all the children have non zero weights this hint}}
\DoxyCodeLine{\textcolor{comment}{    * will have an effect */}}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (strcmp(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}}, \textcolor{stringliteral}{"{}w"{}}) == 0) \textcolor{comment}{/* weight hints */}}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        (r\_data-\/>weight\_ptr)++;}
\DoxyCodeLine{}
\DoxyCodeLine{        \textcolor{keywordflow}{if} ((\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int})}
\DoxyCodeLine{            (((\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} *)(r\_data-\/>weight\_ptr)) -\/ ((\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} *)(r\_data-\/>weight))) >=}
\DoxyCodeLine{            \textcolor{keyword}{sizeof}(r\_data-\/>weight))}
\DoxyCodeLine{          r\_data-\/>weight\_ptr = r\_data-\/>weight;}
\DoxyCodeLine{}
\DoxyCodeLine{        \mbox{\hyperlink{group__Evas__Object__Group_ga2af897b00f32bebf08705929276386f5}{evas\_object\_size\_hint\_weight\_set}}(}
\DoxyCodeLine{          rect, r\_data-\/>weight\_ptr-\/>x, r\_data-\/>weight\_ptr-\/>y);}
\DoxyCodeLine{}
\DoxyCodeLine{        printf(\textcolor{stringliteral}{"{}Changing weight hints for \%s rect. to (\%f, \%f)\(\backslash\)n"{}},}
\DoxyCodeLine{               name, r\_data-\/>weight\_ptr-\/>x, r\_data-\/>weight\_ptr-\/>y);}
\DoxyCodeLine{        \textcolor{keywordflow}{return};}
\DoxyCodeLine{     \}}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_on\_destroy(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}{void})}
\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}{/* init values one is going to cycle through while running this}}
\DoxyCodeLine{\textcolor{comment}{    * example */}}
\DoxyCodeLine{   \textcolor{keyword}{struct }rect\_data init\_data = \(\backslash\)}
\DoxyCodeLine{   \{}
\DoxyCodeLine{      .min = \{\{0, 0\}, \{30, 30\}, \{100, 70\}, \{200, 200\}\},}
\DoxyCodeLine{      .max = \{\{0, 0\}, \{100, 100\}, \{100, 70\}, \{300, 300\}\},}
\DoxyCodeLine{      .align = \{\{0.0, 0.0\}, \{0.5, 0.5\}, \{1.0, 0.5\}\},}
\DoxyCodeLine{      .weight = \{\{0.0, 0.0\}, \{3, 6\}, \{10, 100\}\},}
\DoxyCodeLine{      .padding = \{\{0, 0, 0, 0\}, \{3, 6, 9, 12\}, \{10, 20, 0, 30\}\}}
\DoxyCodeLine{   \};}
\DoxyCodeLine{}
\DoxyCodeLine{   d.t\_data = init\_data;}
\DoxyCodeLine{}
\DoxyCodeLine{   d.t\_data.min\_ptr = d.t\_data.min + 1;}
\DoxyCodeLine{   d.t\_data.max\_ptr = d.t\_data.max + 1;}
\DoxyCodeLine{   d.t\_data.align\_ptr = d.t\_data.align;}
\DoxyCodeLine{   d.t\_data.weight\_ptr = d.t\_data.weight;}
\DoxyCodeLine{   d.t\_data.padding\_ptr = d.t\_data.padding;}
\DoxyCodeLine{}
\DoxyCodeLine{   d.b\_data = init\_data;}
\DoxyCodeLine{}
\DoxyCodeLine{   d.b\_data.min\_ptr = d.b\_data.min + 1;}
\DoxyCodeLine{   d.b\_data.max\_ptr = d.b\_data.max + 1;}
\DoxyCodeLine{   d.b\_data.align\_ptr = d.b\_data.align;}
\DoxyCodeLine{   d.b\_data.weight\_ptr = d.b\_data.weight;}
\DoxyCodeLine{   d.b\_data.padding\_ptr = d.b\_data.padding;}
\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_gac7f2cdbcb79635c34317c1183dd04cb0}{ecore\_evas\_new}}(NULL, 0, 0, WIDTH, HEIGHT, NULL);}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (!d.ee)}
\DoxyCodeLine{     \textcolor{keywordflow}{goto} error;}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Ecore__Evas__Group_ga3680b5c89157167318192157a5d24ec4}{ecore\_evas\_callback\_destroy\_set}}(d.ee, \_on\_destroy);}
\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{   \textcolor{comment}{/* the canvas pointer, de facto */}}
\DoxyCodeLine{   d.canvas = \mbox{\hyperlink{group__Ecore__Evas__Group_ga75a7cc694b6069e78df47dab0b0f2d20}{ecore\_evas\_get}}(d.ee);}
\DoxyCodeLine{}
\DoxyCodeLine{   d.bg = \mbox{\hyperlink{group__Evas__Object__Rectangle_ga4d80fc32ad1cac28428cebd65d746751}{evas\_object\_rectangle\_add}}(d.canvas);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_gae34bdcfd7f5100151f6ea8ef4a392949}{evas\_object\_color\_set}}(d.bg, 255, 255, 255, 255); \textcolor{comment}{/* white bg */}}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga02da8091bbac768b8e86c7b74b2a94f9}{evas\_object\_move}}(d.bg, 0, 0); \textcolor{comment}{/* at canvas' origin */}}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga21e8604c0e4a93e469bff4bd069e82b5}{evas\_object\_resize}}(d.bg, WIDTH, HEIGHT); \textcolor{comment}{/* covers full canvas */}}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}}(d.bg);}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga4405e118e1fb762987af1269b6848db5}{evas\_object\_focus\_set}}(d.bg, \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Events_ga23be30ac5cdfb780f1ff82e9108ec26b}{evas\_object\_event\_callback\_add}}(}
\DoxyCodeLine{     d.bg, \mbox{\hyperlink{Evas__Common_8h_ad64cde0da38a60e7cb7905b3ab216968a336b86bad4f145f84c155e4922335584}{EVAS\_CALLBACK\_KEY\_DOWN}}, \_on\_keydown, NULL);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{/* Evas box with vertical layout */}}
\DoxyCodeLine{   d.box = \mbox{\hyperlink{group__Evas__Object__Box__Group_gad413687e53adcbb70ced91d4a4218b45}{evas\_object\_box\_add}}(d.canvas);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Box__Group_ga1208fa9c5229f69d65a72d9364a72bb0}{evas\_object\_box\_layout\_set}}(}
\DoxyCodeLine{     d.box, \mbox{\hyperlink{group__Evas__Object__Box__Group_ga13a820d1cdb6c8c7ce09242972250382}{evas\_object\_box\_layout\_vertical}}, NULL, NULL);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}}(d.box);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{/* this is a border around the box, container of the rectangles we}}
\DoxyCodeLine{\textcolor{comment}{    * are going to experiment with (changing some size hints). this}}
\DoxyCodeLine{\textcolor{comment}{    * way you can see how the container relates to the children */}}
\DoxyCodeLine{   d.border = \mbox{\hyperlink{group__Evas__Object__Image_ga0e8cb83d31d02bf583c75925b7cd14d7}{evas\_object\_image\_filled\_add}}(d.canvas);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Image_gac27fd0ceabe5f56607b7a86d71577df1}{evas\_object\_image\_file\_set}}(d.border, border\_img\_path, NULL);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Image_gace5efad74de9f87cd996b2a34b3ea591}{evas\_object\_image\_border\_set}}(d.border, 3, 3, 3, 3);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Image_ga1f134668dedc8ad855c3af28fd2df8f6}{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_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}}(d.border);}
\DoxyCodeLine{}
\DoxyCodeLine{   d.t\_rect = \mbox{\hyperlink{group__Evas__Object__Rectangle_ga4d80fc32ad1cac28428cebd65d746751}{evas\_object\_rectangle\_add}}(d.canvas);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_gae34bdcfd7f5100151f6ea8ef4a392949}{evas\_object\_color\_set}}(d.t\_rect, 0, 0, 255, 255);}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga3014f5c9dfbdc6c7af41a27826e50e57}{evas\_object\_size\_hint\_min\_set}}(}
\DoxyCodeLine{          d.t\_rect, d.t\_data.min\_ptr-\/>w, d.t\_data.min\_ptr-\/>h);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}}(d.t\_rect);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Box__Group_ga556d509a9c1547fb601d84292353ad20}{evas\_object\_box\_append}}(d.box, d.t\_rect);}
\DoxyCodeLine{}
\DoxyCodeLine{   d.b\_rect = \mbox{\hyperlink{group__Evas__Object__Rectangle_ga4d80fc32ad1cac28428cebd65d746751}{evas\_object\_rectangle\_add}}(d.canvas);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_gae34bdcfd7f5100151f6ea8ef4a392949}{evas\_object\_color\_set}}(d.b\_rect, 0, 255, 0, 255);}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga3014f5c9dfbdc6c7af41a27826e50e57}{evas\_object\_size\_hint\_min\_set}}(}
\DoxyCodeLine{          d.b\_rect, d.b\_data.min\_ptr-\/>w, d.b\_data.min\_ptr-\/>h);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}}(d.b\_rect);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Box__Group_ga556d509a9c1547fb601d84292353ad20}{evas\_object\_box\_append}}(d.box, d.b\_rect);}
\DoxyCodeLine{}
\DoxyCodeLine{   \_canvas\_resize\_cb(d.ee);}
\DoxyCodeLine{}
\DoxyCodeLine{   printf(commands);}
\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{   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} -\/1;}
\DoxyCodeLine{\}}

\end{DoxyCodeInclude}
 