\hypertarget{evas-box_8c-example}{\section{evas-\/box.\+c}
}

\begin{DoxyCodeInclude}

\textcolor{preprocessor}{#ifdef HAVE\_CONFIG\_H}
\textcolor{preprocessor}{#include "config.h"}
\textcolor{preprocessor}{#else}
\textcolor{preprocessor}{#define PACKAGE\_EXAMPLES\_DIR "."}
\textcolor{preprocessor}{#endif}

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

\textcolor{preprocessor}{#include <stdlib.h>}
\textcolor{preprocessor}{#include <stdio.h>}
\textcolor{preprocessor}{#include <string.h>}

\textcolor{preprocessor}{#define WIDTH  (640)}
\textcolor{preprocessor}{#define HEIGHT (480)}

\textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *border\_img\_path = PACKAGE\_EXAMPLES\_DIR \textcolor{stringliteral}{"/red.png"};

\textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *commands = \(\backslash\)
  \textcolor{stringliteral}{"commands are:\(\backslash\)n"}
  \textcolor{stringliteral}{"\(\backslash\)ta - change the box's alignment values\(\backslash\)n"}
  \textcolor{stringliteral}{"\(\backslash\)tp - change the box's padding values\(\backslash\)n"}
  \textcolor{stringliteral}{"\(\backslash\)t1 - change the box's layout to horizontal\(\backslash\)n"}
  \textcolor{stringliteral}{"\(\backslash\)t2 - change the box's layout to vertical\(\backslash\)n"}
  \textcolor{stringliteral}{"\(\backslash\)t3 - change the box's layout to horizontal homogeneous\(\backslash\)n"}
  \textcolor{stringliteral}{"\(\backslash\)t4 - change the box's layout to vertical homogeneous\(\backslash\)n"}
  \textcolor{stringliteral}{"\(\backslash\)t5 - change the box's layout to horizontal maximum size homogeneous\(\backslash\)n"}
  \textcolor{stringliteral}{"\(\backslash\)t6 - change the box's layout to vertical maximum size homogeneous\(\backslash\)n"}
  \textcolor{stringliteral}{"\(\backslash\)t7 - change the box's layout to horizontal flow\(\backslash\)n"}
  \textcolor{stringliteral}{"\(\backslash\)t8 - change the box's layout to vertical flow\(\backslash\)n"}
  \textcolor{stringliteral}{"\(\backslash\)t9 - change the box's layout to stack\(\backslash\)n"}
  \textcolor{stringliteral}{"\(\backslash\)t0 - change the box's layout to a custom-made one\(\backslash\)n"}
  \textcolor{stringliteral}{"\(\backslash\)tCtrl + NUMBER - insert a new child object at that position in the box\(\backslash\)n"}
  \textcolor{stringliteral}{"\(\backslash\)tShift + NUMBER - remove the child object at that position in the box\(\backslash\)n"}
  \textcolor{stringliteral}{"\(\backslash\)th - print help\(\backslash\)n"};

\textcolor{keyword}{struct }exemple\_data
\{
   Ecore\_Evas  *ee;
   \hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}        *\hyperlink{namespaceevas}{evas};
   \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *bg, *box, *border;
\};

\textcolor{keyword}{static} \textcolor{keyword}{struct }exemple\_data d;

\textcolor{keyword}{static} \textcolor{keywordtype}{void} \textcolor{comment}{/* custom 'diagonal' layout */}
\_custom\_layout(\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}          *o,
               \hyperlink{struct__Evas__Object__Box__Data}{Evas\_Object\_Box\_Data} *p,
               \textcolor{keywordtype}{void}                 *data EINA\_UNUSED)
\{
   \textcolor{keywordtype}{int} x, y, w, h;
   \textcolor{keywordtype}{int} xx, yy, ww, hh;
   \textcolor{keywordtype}{int} count;
   \hyperlink{struct__Eina__List}{Eina\_List} *l;
   \hyperlink{struct__Evas__Object__Box__Option}{Evas\_Object\_Box\_Option} *opt;

   \hyperlink{group__Evas__Object__Group__Basic_ga6f52fab1a96dc58c85ee481d84bac871}{evas\_object\_geometry\_get}(o, &x, &y, &w, &h);
   count = \hyperlink{group__Eina__List__Group_ga301729054a498a2df09a5f1dd760697e}{eina\_list\_count}(p->children);
   ww = w / (count ? : 1);
   hh = h / (count ? : 1);
   \textcolor{keywordflow}{if} (ww < 1) ww = 1;
   \textcolor{keywordflow}{if} (hh < 1) hh = 1;

   xx = x;
   yy = y;
   \hyperlink{group__Eina__List__Group_gad02f746a08ee0b12b7ed66d4bc0d71d8}{EINA\_LIST\_FOREACH}(p->children, l, opt)
     \{
        evas\_object\_move(opt->\hyperlink{struct__Evas__Object__Box__Option_af01dd3e815a84ac6c7cbfbd3a6dbc148}{obj}, xx, yy);
        xx += ww;
        yy += hh;
     \}
\}

\textcolor{keyword}{static} \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} * \textcolor{comment}{/* new rectangle to be put in the box */}
\_new\_rectangle\_add(\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas} *e)
\{
   \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *o;

   o = \hyperlink{group__Evas__Object__Rectangle_ga4d80fc32ad1cac28428cebd65d746751}{evas\_object\_rectangle\_add}(e);
   evas\_object\_resize(o, 10, 10);
   \hyperlink{group__Evas__Object__Group__Basic_gae34bdcfd7f5100151f6ea8ef4a392949}{evas\_object\_color\_set}(o, 0, 255, 0, 255);
   \hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}(o);

   \textcolor{keywordflow}{return} o;
\}

\textcolor{comment}{/* use the following commands to interact with this example - 'h' is}
\textcolor{comment}{ * the key for help */}
\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_on\_keydown(\textcolor{keywordtype}{void}        *data EINA\_UNUSED,
            \hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}        *\hyperlink{namespaceevas}{evas} EINA\_UNUSED,
            \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *o EINA\_UNUSED,
            \textcolor{keywordtype}{void}        *einfo)
\{
   \hyperlink{struct__Evas__Event__Key__Down}{Evas\_Event\_Key\_Down} *ev = einfo;
   \textcolor{keyword}{const} \hyperlink{Evas__Common_8h_a198d0b10861c1da456004688d3443e96}{Evas\_Modifier} *mods = evas\_key\_modifier\_get(\hyperlink{namespaceevas}{evas});

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

   \textcolor{keywordflow}{if} (\hyperlink{group__Evas__Keys_ga6cc24a5ea4b39b84c7a3e617de3db261}{evas\_key\_modifier\_is\_set}(mods, \textcolor{stringliteral}{"Shift"}))
     \{
        \textcolor{keywordtype}{int} pos;
        \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool} ret;
        \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *obj;
        \hyperlink{struct__Eina__List}{Eina\_List} *children;

        pos = atoi(ev->\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key});
        children = \hyperlink{group__Evas__Object__Box_ga245f7f1824ec1033c6b1d0c2312fed9e}{evas\_object\_box\_children\_get}(d.box);

        obj = \hyperlink{group__Eina__List__Group_ga4bd18d6ffc9920cd904bb7769f2fad8e}{eina\_list\_nth}(children, pos);
        \textcolor{keywordflow}{if} (!obj) \textcolor{keywordflow}{goto} list\_free;

        ret = evas\_object\_box\_remove\_at(d.box, pos);
        \textcolor{keywordflow}{if} (ret) \hyperlink{group__Evas__Object__Group__Basic_ga7e7a625dab7a3890532aa13b43117076}{evas\_object\_del}(obj);

list\_free:
        \hyperlink{group__Eina__List__Group_ga608bd2fbf06293a1b794648990703ab4}{eina\_list\_free}(children);
        \textcolor{keywordflow}{return};
     \}

   \textcolor{keywordflow}{if} (\hyperlink{group__Evas__Keys_ga6cc24a5ea4b39b84c7a3e617de3db261}{evas\_key\_modifier\_is\_set}(mods, \textcolor{stringliteral}{"Control"}))
     \{
        \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *o\_;
        \textcolor{keywordtype}{int} pos;
        pos = atoi(ev->\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key});
        o\_ = \_new\_rectangle\_add(d.evas);
        \textcolor{keywordflow}{if} (!evas\_object\_box\_insert\_at(d.box, o\_, pos))
          evas\_object\_box\_append(d.box, o\_);
        \textcolor{keywordflow}{return};
     \}

   \textcolor{keywordflow}{if} (strcmp(ev->\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}, \textcolor{stringliteral}{"a"}) == 0)
     \{
        \textcolor{keywordtype}{double} h, v;

        evas\_object\_box\_align\_get(d.box, &h, &v);

        \textcolor{keywordflow}{if} (h == 0.5)
          h = v = 1.0;
        \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (h == 1.0)
          h = v = -1.0;
        \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (h == -1.0)
          h = v = 0.0;
        \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (h == 0.0)
          h = v = 0.5;

        evas\_object\_box\_align\_set(d.box, h, v);

        fprintf(stdout, \textcolor{stringliteral}{"Applying new alignment values (%.1f, %.1f)"}
                        \textcolor{stringliteral}{" on the box\(\backslash\)n"}, h, v);
        \textcolor{keywordflow}{return};
     \}

   \textcolor{keywordflow}{if} (strcmp(ev->\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}, \textcolor{stringliteral}{"p"}) == 0)
     \{
        \textcolor{keywordtype}{int} h, v;

        evas\_object\_box\_padding\_get(d.box, &h, &v);

        \textcolor{keywordflow}{if} (h == 0)
          h = v = 50;
        \textcolor{keywordflow}{else}
          h = v = 0;

        evas\_object\_box\_padding\_set(d.box, h, v);

        fprintf(stdout, \textcolor{stringliteral}{"Applying new padding values (%d, %d)"}
                        \textcolor{stringliteral}{" on the box\(\backslash\)n"}, h, v);
        \textcolor{keywordflow}{return};
     \}

   \textcolor{keywordflow}{if} (strcmp(ev->\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}, \textcolor{stringliteral}{"1"}) == 0)
     \{
        evas\_object\_box\_layout\_set(
          d.box, evas\_object\_box\_layout\_horizontal, NULL, NULL);

        fprintf(stdout, \textcolor{stringliteral}{"Applying '%s' layout on the box\(\backslash\)n"}, \textcolor{stringliteral}{"horizontal"});
        \textcolor{keywordflow}{return};
     \}

   \textcolor{keywordflow}{if} (strcmp(ev->\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}, \textcolor{stringliteral}{"2"}) == 0)
     \{
        evas\_object\_box\_layout\_set(
          d.box, evas\_object\_box\_layout\_vertical, NULL, NULL);

        fprintf(stdout, \textcolor{stringliteral}{"Applying '%s' layout on the box\(\backslash\)n"}, \textcolor{stringliteral}{"vertical"});
        \textcolor{keywordflow}{return};
     \}

   \textcolor{keywordflow}{if} (strcmp(ev->\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}, \textcolor{stringliteral}{"3"}) == 0)
     \{
        evas\_object\_box\_layout\_set(
          d.box, evas\_object\_box\_layout\_homogeneous\_horizontal, NULL,
          NULL);

        fprintf(stdout, \textcolor{stringliteral}{"Applying '%s' layout on the box\(\backslash\)n"},
                \textcolor{stringliteral}{"horizontal homogeneous"});
        \textcolor{keywordflow}{return};
     \}

   \textcolor{keywordflow}{if} (strcmp(ev->\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}, \textcolor{stringliteral}{"4"}) == 0)
     \{
        evas\_object\_box\_layout\_set(
          d.box, evas\_object\_box\_layout\_homogeneous\_vertical, NULL, NULL);

        fprintf(stdout, \textcolor{stringliteral}{"Applying '%s' layout on the box\(\backslash\)n"},
                \textcolor{stringliteral}{"vertical homogeneous"});
        \textcolor{keywordflow}{return};
     \}

   \textcolor{keywordflow}{if} (strcmp(ev->\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}, \textcolor{stringliteral}{"5"}) == 0)
     \{
        evas\_object\_box\_layout\_set(
          d.box, evas\_object\_box\_layout\_homogeneous\_max\_size\_horizontal,
          NULL, NULL);

        fprintf(stdout, \textcolor{stringliteral}{"Applying '%s' layout on the box\(\backslash\)n"},
                \textcolor{stringliteral}{"horizontal maximum size homogeneous"});
        \textcolor{keywordflow}{return};
     \}

   \textcolor{keywordflow}{if} (strcmp(ev->\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}, \textcolor{stringliteral}{"6"}) == 0)
     \{
        evas\_object\_box\_layout\_set(
          d.box, evas\_object\_box\_layout\_homogeneous\_max\_size\_vertical,
          NULL, NULL);

        fprintf(stdout, \textcolor{stringliteral}{"Applying '%s' layout on the box\(\backslash\)n"},
                \textcolor{stringliteral}{"vertical maximum size homogeneous"});
        \textcolor{keywordflow}{return};
     \}

   \textcolor{keywordflow}{if} (strcmp(ev->\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}, \textcolor{stringliteral}{"7"}) == 0)
     \{
        evas\_object\_box\_layout\_set(
          d.box, evas\_object\_box\_layout\_flow\_horizontal, NULL, NULL);

        fprintf(stdout, \textcolor{stringliteral}{"Applying '%s' layout on the box\(\backslash\)n"}, \textcolor{stringliteral}{"horizontal flow"});
        \textcolor{keywordflow}{return};
     \}

   \textcolor{keywordflow}{if} (strcmp(ev->\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}, \textcolor{stringliteral}{"8"}) == 0)
     \{
        evas\_object\_box\_layout\_set(
          d.box, evas\_object\_box\_layout\_flow\_vertical, NULL, NULL);

        fprintf(stdout, \textcolor{stringliteral}{"Applying '%s' layout on the box\(\backslash\)n"}, \textcolor{stringliteral}{"vertical flow"});
        \textcolor{keywordflow}{return};
     \}

   \textcolor{keywordflow}{if} (strcmp(ev->\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}, \textcolor{stringliteral}{"9"}) == 0)
     \{
        evas\_object\_box\_layout\_set(
          d.box, evas\_object\_box\_layout\_stack, NULL, NULL);

        fprintf(stdout, \textcolor{stringliteral}{"Applying '%s' layout on the box\(\backslash\)n"}, \textcolor{stringliteral}{"stack"});
        \textcolor{keywordflow}{return};
     \}

   \textcolor{keywordflow}{if} (strcmp(ev->\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}, \textcolor{stringliteral}{"0"}) == 0)
     \{
        evas\_object\_box\_layout\_set(d.box, \_custom\_layout, NULL, NULL);

        fprintf(stdout, \textcolor{stringliteral}{"Applying '%s' layout on the box\(\backslash\)n"}, \textcolor{stringliteral}{"CUSTOM"});
        \textcolor{keywordflow}{return};
     \}
\}

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

\textcolor{keyword}{static} \textcolor{keywordtype}{void} \textcolor{comment}{/* adjust canvas' contents on resizes */}
\_canvas\_resize\_cb(Ecore\_Evas *ee)
\{
   \textcolor{keywordtype}{int} w, h;

   \hyperlink{group__Ecore__Evas__Group_ga931aadf4603731e73e8a84e4b14f1493}{ecore\_evas\_geometry\_get}(ee, NULL, NULL, &w, &h);

   evas\_object\_resize(d.bg, w, h);

   evas\_object\_move(d.box, (w / 4), (h / 4));
   evas\_object\_resize(d.box, (w / 2), (h / 2));

   evas\_object\_move(d.border, (w / 4) - 2, (h / 4) - 2);
   evas\_object\_resize(d.border, (w / 2) + 4, (h / 2) + 4);
\}

\textcolor{keywordtype}{int}
main(\textcolor{keywordtype}{void})
\{
   \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *last, *o;
   \textcolor{keywordtype}{int} i;

   srand(time(NULL));

   \textcolor{keywordflow}{if} (!\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 */}
   d.ee = \hyperlink{group__Ecore__Evas__Group_gac7f2cdbcb79635c34317c1183dd04cb0}{ecore\_evas\_new}(NULL, 0, 0, WIDTH, HEIGHT, NULL);
   \textcolor{keywordflow}{if} (!d.ee)
     \textcolor{keywordflow}{goto} panic;

   \hyperlink{group__Ecore__Evas__Group_ga3d478e975e2101b9b821ef24baf3dd9e}{ecore\_evas\_callback\_delete\_request\_set}(d.ee, \_on\_delete);
   \hyperlink{group__Ecore__Evas__Group_gaac67f679c9027059a34519fbdea360df}{ecore\_evas\_callback\_resize\_set}(d.ee, \_canvas\_resize\_cb);
   \hyperlink{group__Ecore__Evas__Group_ga4953047ff97d4f1b0d75a7d513d4f317}{ecore\_evas\_show}(d.ee);

   d.evas = \hyperlink{group__Ecore__Evas__Group_ga75a7cc694b6069e78df47dab0b0f2d20}{ecore\_evas\_get}(d.ee);

   d.bg = \hyperlink{group__Evas__Object__Rectangle_ga4d80fc32ad1cac28428cebd65d746751}{evas\_object\_rectangle\_add}(d.evas);
   \hyperlink{group__Evas__Object__Group__Basic_gae34bdcfd7f5100151f6ea8ef4a392949}{evas\_object\_color\_set}(d.bg, 255, 255, 255, 255); \textcolor{comment}{/* white bg */}
   \hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}(d.bg);

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

   d.box = \hyperlink{group__Evas__Object__Box_gad413687e53adcbb70ced91d4a4218b45}{evas\_object\_box\_add}(d.evas);
   \hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}(d.box);

   \textcolor{keywordflow}{for} (i = 1; i <= 5; i++)
     \{
        o = last = \hyperlink{group__Evas__Object__Rectangle_ga4d80fc32ad1cac28428cebd65d746751}{evas\_object\_rectangle\_add}(d.evas);
        evas\_object\_size\_hint\_min\_set(o, 50, 50);
        \hyperlink{group__Evas__Object__Group__Basic_gae34bdcfd7f5100151f6ea8ef4a392949}{evas\_object\_color\_set}(
          o, rand() % 256, rand() % 256, rand() % 256, 255);
        \hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}(o);

        \textcolor{keywordflow}{if} (!evas\_object\_box\_append(d.box, o))
          \{
             fprintf(stderr, \textcolor{stringliteral}{"Error appending child object on the box!\(\backslash\)n"});
             \textcolor{keywordflow}{goto} \hyperlink{namespaceefl_1_1eina_1_1log__level_a0eec9fe47d243634f680b56a7d768ec7}{error};
          \}
     \}

   \textcolor{comment}{/* this is a border around the box, container of the rectangles we}
\textcolor{comment}{    * are going to experiment with. this way you can see how the}
\textcolor{comment}{    * container relates to the children */}
   d.border = \hyperlink{group__Evas__Object__Image_ga0e8cb83d31d02bf583c75925b7cd14d7}{evas\_object\_image\_filled\_add}(d.evas);
   \hyperlink{group__Evas__Object__Image_gac27fd0ceabe5f56607b7a86d71577df1}{evas\_object\_image\_file\_set}(d.border, border\_img\_path, NULL);
   evas\_object\_image\_border\_set(d.border, 2, 2, 2, 2);
   evas\_object\_image\_border\_center\_fill\_set(d.border, \hyperlink{Evas__Common_8h_a4a05f0fd82f51c6b330e349457cdc7e2a2ad856ac6aab5e2659c3a584a37aec70}{EVAS\_BORDER\_FILL\_NONE});
   \hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}(d.border);

   fprintf(stdout, \textcolor{stringliteral}{"%s"}, commands);

   \_canvas\_resize\_cb(d.ee);
   \hyperlink{group__Ecore__Main__Loop__Group_gaf103b9f668bb3e4fed12e52c6180132d}{ecore\_main\_loop\_begin}();
   \hyperlink{group__Ecore__Evas__Group_gab8fa311077f749190c9b622f672b2214}{ecore\_evas\_shutdown}();
   \textcolor{keywordflow}{return} 0;

\hyperlink{namespaceefl_1_1eina_1_1log__level_a0eec9fe47d243634f680b56a7d768ec7}{error}:
   \hyperlink{group__Ecore__Evas__Group_gab8fa311077f749190c9b622f672b2214}{ecore\_evas\_shutdown}();
   \textcolor{keywordflow}{return} -1;

panic:
   fprintf(stderr, \textcolor{stringliteral}{"You got to have at least one evas engine built and linked"}
                   \textcolor{stringliteral}{" up to ecore-evas for this example to run properly.\(\backslash\)n"});
   \textcolor{keywordflow}{return} -2;
\}

\end{DoxyCodeInclude}
 