On this example, we show you how to deal with {\ttfamily Ecore\+\_\+\+Evas} window size hints, which are implemented {\bfseries per Evas engine}.

We start by defining an initial size for our window and, after creating it, adding a background white rectangle and a text object to it, to be used to display the current window\textquotesingle{}s sizes, at any given time\+:  
\begin{DoxyCodeInclude}
\textcolor{preprocessor}{#define WIDTH  (300)}
\textcolor{preprocessor}{#define HEIGHT (300)}

\end{DoxyCodeInclude}
  
\begin{DoxyCodeInclude}
   \textcolor{keywordflow}{if} (!\mbox{\hyperlink{group__Ecore__Evas__Group_ga32ddbb6457033ad435a177eb0c4fe235}{ecore\_evas\_init}}())
     \textcolor{keywordflow}{return} EXIT\_FAILURE;

   \textcolor{comment}{/* this will give you a window with an Evas canvas under the first}
\textcolor{comment}{    * engine available */}
   ee = \mbox{\hyperlink{group__Ecore__Evas__Group_gac7f2cdbcb79635c34317c1183dd04cb0}{ecore\_evas\_new}}(NULL, 0, 0, WIDTH, HEIGHT, NULL);
   \textcolor{keywordflow}{if} (!ee) \textcolor{keywordflow}{goto} \mbox{\hyperlink{namespaceefl_1_1eina_1_1log__level_a0eec9fe47d243634f680b56a7d768ec7}{error}};

   \mbox{\hyperlink{group__Ecore__Evas__Group_ga3d478e975e2101b9b821ef24baf3dd9e}{ecore\_evas\_callback\_delete\_request\_set}}(ee, \_on\_destroy);
   \mbox{\hyperlink{group__Ecore__Evas__Group_ga3b2832e0373bbafae2bb7143618535c1}{ecore\_evas\_title\_set}}(ee, \textcolor{stringliteral}{"Ecore\_Evas window sizes example"});
   \mbox{\hyperlink{group__Ecore__Evas__Group_gaac67f679c9027059a34519fbdea360df}{ecore\_evas\_callback\_resize\_set}}(ee, \_canvas\_resize\_cb);
   \mbox{\hyperlink{group__Ecore__Evas__Group_ga4953047ff97d4f1b0d75a7d513d4f317}{ecore\_evas\_show}}(ee);

   \mbox{\hyperlink{namespaceevas}{evas}} = \mbox{\hyperlink{group__Ecore__Evas__Group_ga75a7cc694b6069e78df47dab0b0f2d20}{ecore\_evas\_get}}(ee);

   bg = \mbox{\hyperlink{group__Evas__Object__Rectangle_ga4d80fc32ad1cac28428cebd65d746751}{evas\_object\_rectangle\_add}}(\mbox{\hyperlink{namespaceevas}{evas}});
   \mbox{\hyperlink{group__Evas__Object__Group__Basic_gae34bdcfd7f5100151f6ea8ef4a392949}{evas\_object\_color\_set}}(bg, 255, 255, 255, 255);  \textcolor{comment}{/* white bg */}
   evas\_object\_move(bg, 0, 0);  \textcolor{comment}{/* at canvas' origin */}
   evas\_object\_resize(bg, WIDTH, HEIGHT);  \textcolor{comment}{/* covers full canvas */}
   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}}(bg);

\end{DoxyCodeInclude}
  
\begin{DoxyCodeInclude}
   text = \mbox{\hyperlink{group__Evas__Object__Text_ga72224822cf1772ef16b1554f0a6205d5}{evas\_object\_text\_add}}(\mbox{\hyperlink{namespaceevas}{evas}});
   \mbox{\hyperlink{group__Evas__Object__Group__Basic_gae34bdcfd7f5100151f6ea8ef4a392949}{evas\_object\_color\_set}}(text, 0, 0, 0, 255);
   evas\_object\_resize(text, 150, 50);
   evas\_object\_text\_font\_set(text, \textcolor{stringliteral}{"Sans"}, 20);
   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}}(text);

   \_canvas\_resize\_cb(ee);
   printf(commands);
   \mbox{\hyperlink{group__Ecore__Main__Loop__Group_gaf103b9f668bb3e4fed12e52c6180132d}{ecore\_main\_loop\_begin}}();

\end{DoxyCodeInclude}
  
\begin{DoxyCodeInclude}
\textcolor{comment}{/* to inform current window's size */}
\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_canvas\_resize\_cb(Ecore\_Evas *ee\_)
\{
   \textcolor{keywordtype}{int} w, h;
   \textcolor{keywordtype}{char} buf[1024];

   \mbox{\hyperlink{group__Ecore__Evas__Group_ga931aadf4603731e73e8a84e4b14f1493}{ecore\_evas\_geometry\_get}}(ee\_, NULL, NULL, &w, &h);
   snprintf(buf, \textcolor{keyword}{sizeof}(buf), \textcolor{stringliteral}{"%d x %d"}, w, h);
   evas\_object\_text\_text\_set(text, buf);
   evas\_object\_move(text, (w - 150) / 2, (h - 50) / 2);

   evas\_object\_resize(bg, w, h);
\}

\end{DoxyCodeInclude}


The program has a command line interface, responding to the following keys\+:  
\begin{DoxyCodeInclude}
\textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} commands[] = \(\backslash\)
  \textcolor{stringliteral}{"commands are:\(\backslash\)n"}
  \textcolor{stringliteral}{"\(\backslash\)tm - impose a minumum size to the window\(\backslash\)n"}
  \textcolor{stringliteral}{"\(\backslash\)tx - impose a maximum size to the window\(\backslash\)n"}
  \textcolor{stringliteral}{"\(\backslash\)tb - impose a base size to the window\(\backslash\)n"}
  \textcolor{stringliteral}{"\(\backslash\)ts - impose a step size (different than 1 px) to the window\(\backslash\)n"}
  \textcolor{stringliteral}{"\(\backslash\)tg - get the screen geometry\(\backslash\)n"}
  \textcolor{stringliteral}{"\(\backslash\)th - print help\(\backslash\)n"};

\end{DoxyCodeInclude}


Use the {\ttfamily \textquotesingle{}m\textquotesingle{}} key to impose a minimum size of half the initial ones on our window. Test it by trying to resize it to smaller sizes than that\+:  
\begin{DoxyCodeInclude}
   \textcolor{keywordflow}{if} (strcmp(ev->\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}}, \textcolor{stringliteral}{"m"}) == 0) \textcolor{comment}{/* impose a minimum size on the window */}
     \{
        min\_set = !min\_set;

        \textcolor{keywordflow}{if} (min\_set)
          \{
             \mbox{\hyperlink{group__Ecore__Evas__Group_ga63abcee3b625bd6410fe8eb46b2a5d9c}{ecore\_evas\_size\_min\_set}}(ee, WIDTH / 2, HEIGHT / 2);
             printf(\textcolor{stringliteral}{"Imposing a minimum size of %d x %d\(\backslash\)n"},
                     WIDTH / 2, HEIGHT / 2);
          \}
        \textcolor{keywordflow}{else}
          \{
             \mbox{\hyperlink{group__Ecore__Evas__Group_ga63abcee3b625bd6410fe8eb46b2a5d9c}{ecore\_evas\_size\_min\_set}}(ee, 0, 0);
             printf(\textcolor{stringliteral}{"Taking off minimum size restriction from the"}
                             \textcolor{stringliteral}{" window\(\backslash\)n"});
          \}
        \textcolor{keywordflow}{return};
     \}

\end{DoxyCodeInclude}


The {\ttfamily \textquotesingle{}x\textquotesingle{}} key will, in turn, set a maximum size on our window -- to two times our initial size. Test it by trying to resize the window to bigger sizes than that\+:  
\begin{DoxyCodeInclude}
   \textcolor{keywordflow}{if} (strcmp(ev->\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}}, \textcolor{stringliteral}{"x"}) == 0) \textcolor{comment}{/* impose a maximum size on the window */}
     \{
        max\_set = !max\_set;

        \textcolor{keywordflow}{if} (max\_set)
          \{
             \mbox{\hyperlink{group__Ecore__Evas__Group_gac9ad3e25ab3f2bea8be726d24df62902}{ecore\_evas\_size\_max\_set}}(ee, WIDTH * 2, HEIGHT * 2);
             printf(\textcolor{stringliteral}{"Imposing a maximum size of %d x %d\(\backslash\)n"},
                     WIDTH * 2, HEIGHT * 2);
          \}
        \textcolor{keywordflow}{else}
          \{
             \mbox{\hyperlink{group__Ecore__Evas__Group_gac9ad3e25ab3f2bea8be726d24df62902}{ecore\_evas\_size\_max\_set}}(ee, 0, 0);
             printf(\textcolor{stringliteral}{"Taking off maximum size restriction from the"}
                             \textcolor{stringliteral}{" window\(\backslash\)n"});
          \}
        \textcolor{keywordflow}{return};
     \}

\end{DoxyCodeInclude}


Window base sizes will override any minimum sizes set, so try it with the {\ttfamily \textquotesingle{}b\textquotesingle{}} key. It will set a base size of two times the initial one\+:  
\begin{DoxyCodeInclude}
   \textcolor{keywordflow}{if} (strcmp(ev->\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}}, \textcolor{stringliteral}{"b"}) == 0) \textcolor{comment}{/* impose a base size on the window */}
     \{
        base\_set = !base\_set;

        \textcolor{keywordflow}{if} (base\_set)
          \{
             \mbox{\hyperlink{group__Ecore__Evas__Group_ga540886b523486b791729d5d3f62f9fce}{ecore\_evas\_size\_base\_set}}(ee, WIDTH * 2, HEIGHT * 2);
             printf(\textcolor{stringliteral}{"Imposing a base size of %d x %d\(\backslash\)n"},
                     WIDTH * 2, HEIGHT * 2);
          \}
        \textcolor{keywordflow}{else}
          \{
             \mbox{\hyperlink{group__Ecore__Evas__Group_ga540886b523486b791729d5d3f62f9fce}{ecore\_evas\_size\_base\_set}}(ee, 0, 0);
             printf(\textcolor{stringliteral}{"Taking off base size restriction from the"}
                             \textcolor{stringliteral}{" window\(\backslash\)n"});
          \}
        \textcolor{keywordflow}{return};
     \}

\end{DoxyCodeInclude}


Finally, there\textquotesingle{}s a key to impose a \char`\"{}step size\char`\"{} on our window, of 40 pixels. With than on ({\ttfamily \textquotesingle{}s\textquotesingle{}} key), you\textquotesingle{}ll see the window will always be bound to {\bfseries multiples} of that size, for dimensions on both axis\+: 
\begin{DoxyCodeInclude}
   \textcolor{keywordflow}{if} (strcmp(ev->\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}}, \textcolor{stringliteral}{"s"}) == 0) \textcolor{comment}{/* impose a step size on the window */}
     \{
        step\_set = !step\_set;

        \textcolor{keywordflow}{if} (step\_set)
          \{
             \mbox{\hyperlink{group__Ecore__Evas__Group_gab794b84a4f53e7fc36d5e87882185dc5}{ecore\_evas\_size\_step\_set}}(ee, 40, 40);
             printf(\textcolor{stringliteral}{"Imposing a step size of %d x %d\(\backslash\)n"}, 40, 40);
          \}
        \textcolor{keywordflow}{else}
          \{
             \mbox{\hyperlink{group__Ecore__Evas__Group_gab794b84a4f53e7fc36d5e87882185dc5}{ecore\_evas\_size\_step\_set}}(ee, 0, 0);
             printf(\textcolor{stringliteral}{"Taking off step size restriction from the"}
                             \textcolor{stringliteral}{" window\(\backslash\)n"});
          \}
        \textcolor{keywordflow}{return};
     \}

\end{DoxyCodeInclude}


The full example follows.


\begin{DoxyCodeInclude}

\textcolor{preprocessor}{#ifdef HAVE\_CONFIG\_H}

\textcolor{preprocessor}{#include "config.h"}
\textcolor{preprocessor}{#else}
\textcolor{preprocessor}{#define EINA\_UNUSED}
\textcolor{preprocessor}{#endif}

\textcolor{preprocessor}{#include <Ecore.h>}
\textcolor{preprocessor}{#include <\mbox{\hyperlink{Ecore__Evas_8h}{Ecore\_Evas.h}}>}

\textcolor{preprocessor}{#define WIDTH  (300)}
\textcolor{preprocessor}{#define HEIGHT (300)}

\textcolor{keyword}{static} Ecore\_Evas *ee;
\textcolor{keyword}{static} \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}} *text, *bg;
\textcolor{keyword}{static} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}} min\_set = \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}};
\textcolor{keyword}{static} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}} max\_set = \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}};
\textcolor{keyword}{static} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}} base\_set = \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}};
\textcolor{keyword}{static} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}} step\_set = \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}};

\textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} commands[] = \(\backslash\)
  \textcolor{stringliteral}{"commands are:\(\backslash\)n"}
  \textcolor{stringliteral}{"\(\backslash\)tm - impose a minumum size to the window\(\backslash\)n"}
  \textcolor{stringliteral}{"\(\backslash\)tx - impose a maximum size to the window\(\backslash\)n"}
  \textcolor{stringliteral}{"\(\backslash\)tb - impose a base size to the window\(\backslash\)n"}
  \textcolor{stringliteral}{"\(\backslash\)ts - impose a step size (different than 1 px) to the window\(\backslash\)n"}
  \textcolor{stringliteral}{"\(\backslash\)tg - get the screen geometry\(\backslash\)n"}
  \textcolor{stringliteral}{"\(\backslash\)th - print help\(\backslash\)n"};

\textcolor{comment}{/* to inform current window's size */}
\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_canvas\_resize\_cb(Ecore\_Evas *ee\_)
\{
   \textcolor{keywordtype}{int} w, h;
   \textcolor{keywordtype}{char} buf[1024];

   \mbox{\hyperlink{group__Ecore__Evas__Group_ga931aadf4603731e73e8a84e4b14f1493}{ecore\_evas\_geometry\_get}}(ee\_, NULL, NULL, &w, &h);
   snprintf(buf, \textcolor{keyword}{sizeof}(buf), \textcolor{stringliteral}{"%d x %d"}, w, h);
   evas\_object\_text\_text\_set(text, buf);
   evas\_object\_move(text, (w - 150) / 2, (h - 50) / 2);

   evas\_object\_resize(bg, w, h);
\}

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_on\_destroy(Ecore\_Evas *ee\_ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})
\{
   \mbox{\hyperlink{group__Ecore__Main__Loop__Group_ga95cf8e97dff0716433c2c5474d606a98}{ecore\_main\_loop\_quit}}();
\}

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_on\_keydown(\textcolor{keywordtype}{void} *data \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}},
            \mbox{\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}} *\mbox{\hyperlink{namespaceevas}{evas}} \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}},
            \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}} *o \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}},
            \textcolor{keywordtype}{void} *einfo)
\{
   \mbox{\hyperlink{struct__Evas__Event__Key__Down}{Evas\_Event\_Key\_Down}} *ev = einfo;

   \textcolor{keywordflow}{if} (strcmp(ev->\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}}, \textcolor{stringliteral}{"h"}) == 0) \textcolor{comment}{/* print help */}
     \{
        printf(commands);
        \textcolor{keywordflow}{return};
     \}

   \textcolor{keywordflow}{if} (strcmp(ev->\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}}, \textcolor{stringliteral}{"m"}) == 0) \textcolor{comment}{/* impose a minimum size on the window */}
     \{
        min\_set = !min\_set;

        \textcolor{keywordflow}{if} (min\_set)
          \{
             \mbox{\hyperlink{group__Ecore__Evas__Group_ga63abcee3b625bd6410fe8eb46b2a5d9c}{ecore\_evas\_size\_min\_set}}(ee, WIDTH / 2, HEIGHT / 2);
             printf(\textcolor{stringliteral}{"Imposing a minimum size of %d x %d\(\backslash\)n"},
                     WIDTH / 2, HEIGHT / 2);
          \}
        \textcolor{keywordflow}{else}
          \{
             \mbox{\hyperlink{group__Ecore__Evas__Group_ga63abcee3b625bd6410fe8eb46b2a5d9c}{ecore\_evas\_size\_min\_set}}(ee, 0, 0);
             printf(\textcolor{stringliteral}{"Taking off minimum size restriction from the"}
                             \textcolor{stringliteral}{" window\(\backslash\)n"});
          \}
        \textcolor{keywordflow}{return};
     \}

   \textcolor{keywordflow}{if} (strcmp(ev->\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}}, \textcolor{stringliteral}{"x"}) == 0) \textcolor{comment}{/* impose a maximum size on the window */}
     \{
        max\_set = !max\_set;

        \textcolor{keywordflow}{if} (max\_set)
          \{
             \mbox{\hyperlink{group__Ecore__Evas__Group_gac9ad3e25ab3f2bea8be726d24df62902}{ecore\_evas\_size\_max\_set}}(ee, WIDTH * 2, HEIGHT * 2);
             printf(\textcolor{stringliteral}{"Imposing a maximum size of %d x %d\(\backslash\)n"},
                     WIDTH * 2, HEIGHT * 2);
          \}
        \textcolor{keywordflow}{else}
          \{
             \mbox{\hyperlink{group__Ecore__Evas__Group_gac9ad3e25ab3f2bea8be726d24df62902}{ecore\_evas\_size\_max\_set}}(ee, 0, 0);
             printf(\textcolor{stringliteral}{"Taking off maximum size restriction from the"}
                             \textcolor{stringliteral}{" window\(\backslash\)n"});
          \}
        \textcolor{keywordflow}{return};
     \}

   \textcolor{keywordflow}{if} (strcmp(ev->\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}}, \textcolor{stringliteral}{"b"}) == 0) \textcolor{comment}{/* impose a base size on the window */}
     \{
        base\_set = !base\_set;

        \textcolor{keywordflow}{if} (base\_set)
          \{
             \mbox{\hyperlink{group__Ecore__Evas__Group_ga540886b523486b791729d5d3f62f9fce}{ecore\_evas\_size\_base\_set}}(ee, WIDTH * 2, HEIGHT * 2);
             printf(\textcolor{stringliteral}{"Imposing a base size of %d x %d\(\backslash\)n"},
                     WIDTH * 2, HEIGHT * 2);
          \}
        \textcolor{keywordflow}{else}
          \{
             \mbox{\hyperlink{group__Ecore__Evas__Group_ga540886b523486b791729d5d3f62f9fce}{ecore\_evas\_size\_base\_set}}(ee, 0, 0);
             printf(\textcolor{stringliteral}{"Taking off base size restriction from the"}
                             \textcolor{stringliteral}{" window\(\backslash\)n"});
          \}
        \textcolor{keywordflow}{return};
     \}

   \textcolor{keywordflow}{if} (strcmp(ev->\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}}, \textcolor{stringliteral}{"s"}) == 0) \textcolor{comment}{/* impose a step size on the window */}
     \{
        step\_set = !step\_set;

        \textcolor{keywordflow}{if} (step\_set)
          \{
             \mbox{\hyperlink{group__Ecore__Evas__Group_gab794b84a4f53e7fc36d5e87882185dc5}{ecore\_evas\_size\_step\_set}}(ee, 40, 40);
             printf(\textcolor{stringliteral}{"Imposing a step size of %d x %d\(\backslash\)n"}, 40, 40);
          \}
        \textcolor{keywordflow}{else}
          \{
             \mbox{\hyperlink{group__Ecore__Evas__Group_gab794b84a4f53e7fc36d5e87882185dc5}{ecore\_evas\_size\_step\_set}}(ee, 0, 0);
             printf(\textcolor{stringliteral}{"Taking off step size restriction from the"}
                             \textcolor{stringliteral}{" window\(\backslash\)n"});
          \}
        \textcolor{keywordflow}{return};
     \}

   \textcolor{keywordflow}{if} (strcmp(ev->\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}}, \textcolor{stringliteral}{"g"}) == 0) \textcolor{comment}{/* get screen geometry */}
     \{
        \textcolor{keywordtype}{int} x, y, w, h;
        \mbox{\hyperlink{group__Ecore__Evas__Group_gad537a5714784cb0ca1d62878a522642f}{ecore\_evas\_screen\_geometry\_get}}(ee, &x, &y, &w, &h);
        printf(\textcolor{stringliteral}{"screen geometry: %d,%d, %dx%d\(\backslash\)n"}, x, y, w, h);
        \textcolor{keywordflow}{return};
     \}
\}

\textcolor{keywordtype}{int}
main(\textcolor{keywordtype}{void})
\{
   \mbox{\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}} *\mbox{\hyperlink{namespaceevas}{evas}};

   \textcolor{keywordflow}{if} (!\mbox{\hyperlink{group__Ecore__Evas__Group_ga32ddbb6457033ad435a177eb0c4fe235}{ecore\_evas\_init}}())
     \textcolor{keywordflow}{return} EXIT\_FAILURE;

   \textcolor{comment}{/* this will give you a window with an Evas canvas under the first}
\textcolor{comment}{    * engine available */}
   ee = \mbox{\hyperlink{group__Ecore__Evas__Group_gac7f2cdbcb79635c34317c1183dd04cb0}{ecore\_evas\_new}}(NULL, 0, 0, WIDTH, HEIGHT, NULL);
   \textcolor{keywordflow}{if} (!ee) \textcolor{keywordflow}{goto} \mbox{\hyperlink{namespaceefl_1_1eina_1_1log__level_a0eec9fe47d243634f680b56a7d768ec7}{error}};

   \mbox{\hyperlink{group__Ecore__Evas__Group_ga3d478e975e2101b9b821ef24baf3dd9e}{ecore\_evas\_callback\_delete\_request\_set}}(ee, \_on\_destroy);
   \mbox{\hyperlink{group__Ecore__Evas__Group_ga3b2832e0373bbafae2bb7143618535c1}{ecore\_evas\_title\_set}}(ee, \textcolor{stringliteral}{"Ecore\_Evas window sizes example"});
   \mbox{\hyperlink{group__Ecore__Evas__Group_gaac67f679c9027059a34519fbdea360df}{ecore\_evas\_callback\_resize\_set}}(ee, \_canvas\_resize\_cb);
   \mbox{\hyperlink{group__Ecore__Evas__Group_ga4953047ff97d4f1b0d75a7d513d4f317}{ecore\_evas\_show}}(ee);

   \mbox{\hyperlink{namespaceevas}{evas}} = \mbox{\hyperlink{group__Ecore__Evas__Group_ga75a7cc694b6069e78df47dab0b0f2d20}{ecore\_evas\_get}}(ee);

   bg = \mbox{\hyperlink{group__Evas__Object__Rectangle_ga4d80fc32ad1cac28428cebd65d746751}{evas\_object\_rectangle\_add}}(\mbox{\hyperlink{namespaceevas}{evas}});
   \mbox{\hyperlink{group__Evas__Object__Group__Basic_gae34bdcfd7f5100151f6ea8ef4a392949}{evas\_object\_color\_set}}(bg, 255, 255, 255, 255);  \textcolor{comment}{/* white bg */}
   evas\_object\_move(bg, 0, 0);  \textcolor{comment}{/* at canvas' origin */}
   evas\_object\_resize(bg, WIDTH, HEIGHT);  \textcolor{comment}{/* covers full canvas */}
   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}}(bg);

   evas\_object\_focus\_set(bg, \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});
   \mbox{\hyperlink{group__Evas__Object__Group__Events_ga23be30ac5cdfb780f1ff82e9108ec26b}{evas\_object\_event\_callback\_add}}(
     bg, \mbox{\hyperlink{Evas__Common_8h_ad64cde0da38a60e7cb7905b3ab216968a336b86bad4f145f84c155e4922335584}{EVAS\_CALLBACK\_KEY\_DOWN}}, \_on\_keydown, NULL);

   text = \mbox{\hyperlink{group__Evas__Object__Text_ga72224822cf1772ef16b1554f0a6205d5}{evas\_object\_text\_add}}(\mbox{\hyperlink{namespaceevas}{evas}});
   \mbox{\hyperlink{group__Evas__Object__Group__Basic_gae34bdcfd7f5100151f6ea8ef4a392949}{evas\_object\_color\_set}}(text, 0, 0, 0, 255);
   evas\_object\_resize(text, 150, 50);
   evas\_object\_text\_font\_set(text, \textcolor{stringliteral}{"Sans"}, 20);
   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}}(text);

   \_canvas\_resize\_cb(ee);
   printf(commands);
   \mbox{\hyperlink{group__Ecore__Main__Loop__Group_gaf103b9f668bb3e4fed12e52c6180132d}{ecore\_main\_loop\_begin}}();

   \mbox{\hyperlink{group__Ecore__Evas__Group_gad3ec61f2aa03df4d3dbfd0d311e0c8dc}{ecore\_evas\_free}}(ee);
   \mbox{\hyperlink{group__Ecore__Evas__Group_gab8fa311077f749190c9b622f672b2214}{ecore\_evas\_shutdown}}();

   \textcolor{keywordflow}{return} 0;

\mbox{\hyperlink{namespaceefl_1_1eina_1_1log__level_a0eec9fe47d243634f680b56a7d768ec7}{error}}:
   fprintf(stderr, \textcolor{stringliteral}{"You got to have at least one Evas engine built"}
                   \textcolor{stringliteral}{" and linked up to ecore-evas for this example to run"}
                   \textcolor{stringliteral}{" properly.\(\backslash\)n"});
   \mbox{\hyperlink{group__Ecore__Evas__Group_gab8fa311077f749190c9b622f672b2214}{ecore\_evas\_shutdown}}();
   \textcolor{keywordflow}{return} -1;
\}

\end{DoxyCodeInclude}
 