\chapter{Evas text object example}
\hypertarget{Example_Evas_Text}{}\label{Example_Evas_Text}\index{Evas text object example@{Evas text object example}}
In this example, we illustrate how to use text objects in various manners.

We place, in the canvas, a text object along with a border image to delimit its geometry. After we instantiate the text object, we set lots of properties on it to the initial ones from a preset list, which has the following declaration\+:  
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\ \ \ \textcolor{comment}{/*\ init\ values\ one\ is\ going\ to\ cycle\ through\ while\ running\ this}}
\DoxyCodeLine{\textcolor{comment}{\ \ \ \ *\ example\ */}}
\DoxyCodeLine{\ \ \ \textcolor{keyword}{struct\ }text\_preset\_data\ init\_data\ =}
\DoxyCodeLine{\ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ .font\ =\ \{\textcolor{stringliteral}{"{}DejaVu"{}},\ \textcolor{stringliteral}{"{}Courier"{}},\ \textcolor{stringliteral}{"{}Utopia"{}}\},}
\DoxyCodeLine{\ \ \ \ \ \ .text\ =\ \{BLACK,\ WHITE,\ GREY,\ RED,\ GREEN,\ BLUE\},}
\DoxyCodeLine{\ \ \ \ \ \ .shadow\ =\ \{WHITE,\ BLUE,\ GREEN,\ RED\},}
\DoxyCodeLine{\ \ \ \ \ \ .outline\ =\ \{WHITE,\ RED,\ GREEN,\ BLUE\},}
\DoxyCodeLine{\ \ \ \ \ \ .glow\ =\ \{WHITE,\ BLUE,\ GREEN,\ RED\},}
\DoxyCodeLine{\ \ \ \ \ \ .glow2\ =\ \{WHITE,\ RED,\ BLUE,\ GREEN\}}
\DoxyCodeLine{\ \ \ \};}

\end{DoxyCodeInclude}
 Then, we set the text string itself, on it, with \doxylink{group__Evas__Object__Text__Group_ga1c9f3b5f76d5c2f020320d84a8197492}{evas\+\_\+object\+\_\+text\+\_\+text\+\_\+set()}. We set an explicit size of 30 points for our font, as you could see, what we check back with the getter \doxylink{group__Evas__Object__Text__Group_ga47dda261035bca211614f8fd62f68ed9}{evas\+\_\+object\+\_\+text\+\_\+font\+\_\+get()}.

Look at how it translates to code\+:  
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\ \ \ d.text\ =\ \mbox{\hyperlink{group__Evas__Object__Text__Group_gae4d422b8ccfeadf3e24c5349a78e530a}{evas\_object\_text\_add}}(d.evas);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Text__Group_ga719ef25d2e21ae5ee4506f30956ec99d}{evas\_object\_text\_style\_set}}(d.text,\ \mbox{\hyperlink{group__Evas__Object__Text__Group_gga6b48c195b58fbe30ca8180e7451ad817aa5945efaa70038ced50fad08c4c8b543}{EVAS\_TEXT\_STYLE\_PLAIN}});}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{comment}{/*\ let\ the\ pre-\/set\ things\ be\ enforced\ */}}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_gab751e9d24c16e74af6f7c08ea5b930c2}{evas\_object\_color\_set}}(}
\DoxyCodeLine{\ \ \ \ \ d.text,\ d.t\_data.text\_ptr-\/>r,\ d.t\_data.text\_ptr-\/>g,}
\DoxyCodeLine{\ \ \ \ \ d.t\_data.text\_ptr-\/>b,\ d.t\_data.text\_ptr-\/>a);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Text__Group_gaefdb6c5032c7539d78c331b98fdd87ea}{evas\_object\_text\_glow\_color\_set}}(}
\DoxyCodeLine{\ \ \ \ \ d.text,\ d.t\_data.glow\_ptr-\/>r,\ d.t\_data.glow\_ptr-\/>g,}
\DoxyCodeLine{\ \ \ \ \ d.t\_data.glow\_ptr-\/>b,\ d.t\_data.glow\_ptr-\/>a);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Text__Group_ga961743d6a6ea23dff75fe8cbf839563f}{evas\_object\_text\_glow2\_color\_set}}(}
\DoxyCodeLine{\ \ \ \ \ d.text,\ d.t\_data.glow2\_ptr-\/>r,\ d.t\_data.glow2\_ptr-\/>g,}
\DoxyCodeLine{\ \ \ \ \ d.t\_data.glow2\_ptr-\/>b,\ d.t\_data.glow2\_ptr-\/>a);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Text__Group_ga0f72682bf087866b8c9e3a3968c81134}{evas\_object\_text\_outline\_color\_set}}(}
\DoxyCodeLine{\ \ \ \ \ d.text,\ d.t\_data.outline\_ptr-\/>r,\ d.t\_data.outline\_ptr-\/>g,}
\DoxyCodeLine{\ \ \ \ \ d.t\_data.outline\_ptr-\/>b,\ d.t\_data.outline\_ptr-\/>a);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Text__Group_ga7e42b07f03236bd8ead006ae1b42be68}{evas\_object\_text\_shadow\_color\_set}}(}
\DoxyCodeLine{\ \ \ \ \ d.text,\ d.t\_data.shadow\_ptr-\/>r,\ d.t\_data.shadow\_ptr-\/>g,}
\DoxyCodeLine{\ \ \ \ \ d.t\_data.shadow\_ptr-\/>b,\ d.t\_data.shadow\_ptr-\/>a);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Text__Group_gac5dd3bf469c8df9c4fe36d08c066f122}{evas\_object\_text\_font\_set}}(d.text,\ *d.t\_data.font\_ptr,\ 30);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Text__Group_ga1c9f3b5f76d5c2f020320d84a8197492}{evas\_object\_text\_text\_set}}(d.text,\ \textcolor{stringliteral}{"{}sample\ text"{}});}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gacad94595f83580c18908cb3b69b08d1a}{evas\_object\_resize}}(d.text,\ (3\ *\ WIDTH)\ /\ 4,\ HEIGHT\ /\ 4);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga335c8ee6eaeaac9710656af4f8b0db91}{evas\_object\_move}}(d.text,\ WIDTH\ /\ 8,\ (3\ *\ HEIGHT)\ /\ 8);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(d.text);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Text__Group_ga47dda261035bca211614f8fd62f68ed9}{evas\_object\_text\_font\_get}}(d.text,\ \&font,\ \&size);}
\DoxyCodeLine{\ \ \ printf(\textcolor{stringliteral}{"{}Adding\ text\ object\ with\ font\ \%s,\ size\ \%d\(\backslash\)n"{}},\ font,\ size);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{comment}{/*\ this\ is\ a\ border\ around\ the\ text\ object\ above,\ here\ just\ to}}
\DoxyCodeLine{\textcolor{comment}{\ \ \ \ *\ emphasize\ its\ geometry\ */}}
\DoxyCodeLine{\ \ \ d.border\ =\ \mbox{\hyperlink{group__Evas__Object__Image_gafb52be265f315186a28d43af2d559ec6}{evas\_object\_image\_filled\_add}}(d.evas);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Image_gac2e588476b16b04f85ca9a594c140c1d}{evas\_object\_image\_file\_set}}(d.border,\ border\_img\_path,\ NULL);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Image_ga063e5ad38b43897311bbdecfe8dc312d}{evas\_object\_image\_border\_set}}(d.border,\ 3,\ 3,\ 3,\ 3);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Image_ga5749943ce62e85ead67a1440960677fa}{evas\_object\_image\_border\_center\_fill\_set}}(d.border,\ \mbox{\hyperlink{group__Evas__Object__Image_gga9f789224285e646309b7dd81a2401910a2ad856ac6aab5e2659c3a584a37aec70}{EVAS\_BORDER\_FILL\_NONE}});}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gacad94595f83580c18908cb3b69b08d1a}{evas\_object\_resize}}(d.border,\ ((3\ *\ WIDTH)\ /\ 4)\ +\ 3,\ (HEIGHT\ /\ 4)\ +\ 3);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga335c8ee6eaeaac9710656af4f8b0db91}{evas\_object\_move}}(d.border,\ (WIDTH\ /\ 8)\ -\/\ 3,\ ((3\ *\ HEIGHT)\ /\ 8)\ -\/\ 3);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(d.border);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ printf(\textcolor{stringliteral}{"{}\%s"{}},\ commands);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Ecore__Main__Loop__Group_gaf103b9f668bb3e4fed12e52c6180132d}{ecore\_main\_loop\_begin}}();}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Ecore__Evas__Group_gad3ec61f2aa03df4d3dbfd0d311e0c8dc}{ecore\_evas\_free}}(d.ee);}
\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"{}}}

\end{DoxyCodeInclude}
 Like in other Evas examples, one interacts with it by means of key commands\+:  
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *commands\ =\ \(\backslash\)}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}commands\ are:\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)tt\ -\/\ change\ text's\ current\ style\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)tz\ -\/\ change\ text's\ font\ size\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)tf\ -\/\ change\ text's\ font\ family\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)tb\ -\/\ change\ text's\ base\ color\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)ts\ -\/\ change\ text's\ \(\backslash\)'shadow\(\backslash\)'\ color\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)to\ -\/\ change\ text's\ \(\backslash\)'outline\(\backslash\)'\ color\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)tw\ -\/\ change\ text's\ \(\backslash\)'glow\(\backslash\)'\ color\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)tg\ -\/\ change\ text's\ \(\backslash\)'glow\ 2\(\backslash\)'\ color\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)th\ -\/\ print\ help\(\backslash\)n"{}};}

\end{DoxyCodeInclude}
 Use the \textquotesingle{}t\textquotesingle{} key to exercise the \doxylink{group__Evas__Object__Text__Group_ga719ef25d2e21ae5ee4506f30956ec99d}{evas\+\_\+object\+\_\+text\+\_\+style\+\_\+set()} function on the text -- it will cycle through all styles on \doxylink{group__Evas__Object__Text__Group_ga6b48c195b58fbe30ca8180e7451ad817}{Evas\+\_\+\+Text\+\_\+\+Style\+\_\+\+Type} (note we start on \doxylink{group__Evas__Object__Text__Group_gga6b48c195b58fbe30ca8180e7451ad817aa5945efaa70038ced50fad08c4c8b543}{EVAS\+\_\+\+TEXT\+\_\+\+STYLE\+\_\+\+PLAIN}, thus with no effects on it) and, with other keys, you\textquotesingle{}ll be able to set properties applicable to individual styles on the text object.

The \textquotesingle{}z\textquotesingle{} key will change the text\textquotesingle{}s {\bfseries{size}}, keeping the font family for it. Use \textquotesingle{}f\textquotesingle{} to change the font, keeping the last size set. There are three font families the example will cycle through\+:

The \textquotesingle{}b\textquotesingle{} command shows us that \doxylink{group__Evas__Object__Group__Basic_gab751e9d24c16e74af6f7c08ea5b930c2}{evas\+\_\+object\+\_\+color\+\_\+set()}, on a given text object, will change the text\textquotesingle{}s {\bfseries{base}} color. Experiment with it, which will cycle through the colors in the {\ttfamily .text} list in {\ttfamily init\+\_\+data}.

The \textquotesingle{}s\textquotesingle{}, \textquotesingle{}o\textquotesingle{}, \textquotesingle{}w\textquotesingle{} and \textquotesingle{}g\textquotesingle{} keys will make the text object to cycle to the preset values on colors for shadow, outline, glow and \textquotesingle{}glow 2\textquotesingle{} effects, respectively. Naturally, they will only take effect on the text styles which resemble them.

The full 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\ <stdio.h>}}
\DoxyCodeLine{\textcolor{preprocessor}{\#include\ <errno.h>}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#define\ WIDTH\ \ (320)}}
\DoxyCodeLine{\textcolor{preprocessor}{\#define\ HEIGHT\ (240)}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#define\ GREY\ \{190,\ 190,\ 190,\ 255\}}}
\DoxyCodeLine{\textcolor{preprocessor}{\#define\ BLACK\ \{0,\ 0,\ 0,\ 255\}}}
\DoxyCodeLine{\textcolor{preprocessor}{\#define\ WHITE\ \{255,\ 255,\ 255,\ 255\}}}
\DoxyCodeLine{\textcolor{preprocessor}{\#define\ RED\ \ \ \{255,\ 0,\ 0,\ 255\}}}
\DoxyCodeLine{\textcolor{preprocessor}{\#define\ GREEN\ \{0,\ 255,\ 0,\ 255\}}}
\DoxyCodeLine{\textcolor{preprocessor}{\#define\ BLUE\ \ \{0,\ 0,\ 255,\ 255\}}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#define\ POINTER\_CYCLE(\_ptr,\ \_array)\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{\textcolor{preprocessor}{\ \ do\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{\textcolor{preprocessor}{\ \ \ \ \{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{\textcolor{preprocessor}{\ \ \ \ \ \ \ if\ ((unsigned\ int)(((unsigned\ char\ *)(\_ptr))\ -\/\ ((unsigned\ char\ *)(\_array)))\ >=\ \(\backslash\)}}
\DoxyCodeLine{\textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ sizeof(\_array))\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{\textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \_ptr\ =\ \_array;\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{\textcolor{preprocessor}{\ \ \ \ \}\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{\textcolor{preprocessor}{\ \ while(0)}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *commands\ =\ \(\backslash\)}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}commands\ are:\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)tt\ -\/\ change\ text's\ current\ style\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)tz\ -\/\ change\ text's\ font\ size\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)tf\ -\/\ change\ text's\ font\ family\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)tb\ -\/\ change\ text's\ base\ color\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)ts\ -\/\ change\ text's\ \(\backslash\)'shadow\(\backslash\)'\ color\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)to\ -\/\ change\ text's\ \(\backslash\)'outline\(\backslash\)'\ color\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)tw\ -\/\ change\ text's\ \(\backslash\)'glow\(\backslash\)'\ color\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \textcolor{stringliteral}{"{}\(\backslash\)tg\ -\/\ change\ text's\ \(\backslash\)'glow\ 2\(\backslash\)'\ color\(\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\ \textcolor{stringliteral}{"{}/red.png"{}};}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{struct\ }color\_tuple}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{int}\ r,\ g,\ b,\ a;}
\DoxyCodeLine{\};}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{struct\ }text\_preset\_data}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ \ \ \ \ \ \ \ **font\_ptr;}
\DoxyCodeLine{\ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ \ \ \ \ \ \ \ \ *font[3];}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keyword}{struct\ }color\_tuple\ *text\_ptr;}
\DoxyCodeLine{\ \ \ \textcolor{keyword}{struct\ }color\_tuple\ \ text[6];}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keyword}{struct\ }color\_tuple\ *shadow\_ptr;}
\DoxyCodeLine{\ \ \ \textcolor{keyword}{struct\ }color\_tuple\ \ shadow[4];}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keyword}{struct\ }color\_tuple\ *outline\_ptr;}
\DoxyCodeLine{\ \ \ \textcolor{keyword}{struct\ }color\_tuple\ \ outline[4];}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keyword}{struct\ }color\_tuple\ *glow\_ptr;}
\DoxyCodeLine{\ \ \ \textcolor{keyword}{struct\ }color\_tuple\ \ glow[4];}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keyword}{struct\ }color\_tuple\ *glow2\_ptr;}
\DoxyCodeLine{\ \ \ \textcolor{keyword}{struct\ }color\_tuple\ \ glow2[4];}
\DoxyCodeLine{\};}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{struct\ }test\_data}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ Ecore\_Evas\ \ \ \ \ \ \ \ \ \ \ \ \ *ee;}
\DoxyCodeLine{\ \ \ Evas\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *evas;}
\DoxyCodeLine{\ \ \ \textcolor{keyword}{struct\ }text\_preset\_data\ t\_data;}
\DoxyCodeLine{\ \ \ Evas\_Object\ \ \ \ \ \ \ \ \ \ \ \ *text,\ *bg,\ *border;}
\DoxyCodeLine{\};}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keyword}{struct\ }test\_data\ d\ =\ \{0\};}
\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{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_gacad94595f83580c18908cb3b69b08d1a}{evas\_object\_resize}}(d.bg,\ w,\ h);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *}
\DoxyCodeLine{\_text\_style\_type\_to\_str(\mbox{\hyperlink{group__Evas__Object__Text__Group_ga6b48c195b58fbe30ca8180e7451ad817}{Evas\_Text\_Style\_Type}}\ mode)}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{switch}\ (mode)}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \textcolor{keywordflow}{case}\ \mbox{\hyperlink{group__Evas__Object__Text__Group_gga6b48c195b58fbe30ca8180e7451ad817aa5945efaa70038ced50fad08c4c8b543}{EVAS\_TEXT\_STYLE\_PLAIN}}:}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}plain"{}};}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \textcolor{keywordflow}{case}\ \mbox{\hyperlink{group__Evas__Object__Text__Group_gga6b48c195b58fbe30ca8180e7451ad817ad8982ee65d30fbf666261fd1990c4a6f}{EVAS\_TEXT\_STYLE\_SHADOW}}:}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}shadow"{}};}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \textcolor{keywordflow}{case}\ \mbox{\hyperlink{group__Evas__Object__Text__Group_gga6b48c195b58fbe30ca8180e7451ad817a66399bfe91951039c91ebdee89639d86}{EVAS\_TEXT\_STYLE\_OUTLINE}}:}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}outline"{}};}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \textcolor{keywordflow}{case}\ \mbox{\hyperlink{group__Evas__Object__Text__Group_gga6b48c195b58fbe30ca8180e7451ad817a370e3941067f77326acb76fb174e0d93}{EVAS\_TEXT\_STYLE\_SOFT\_OUTLINE}}:}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}soft\ outline"{}};}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \textcolor{keywordflow}{case}\ \mbox{\hyperlink{group__Evas__Object__Text__Group_gga6b48c195b58fbe30ca8180e7451ad817ad42b9d71564c7983f28e9524bafff6d2}{EVAS\_TEXT\_STYLE\_GLOW}}:}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}glow"{}};}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \textcolor{keywordflow}{case}\ \mbox{\hyperlink{group__Evas__Object__Text__Group_gga6b48c195b58fbe30ca8180e7451ad817a41d98859fcb308553d839efb2589bb90}{EVAS\_TEXT\_STYLE\_OUTLINE\_SHADOW}}:}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}outline\ shadow"{}};}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \textcolor{keywordflow}{case}\ \mbox{\hyperlink{group__Evas__Object__Text__Group_gga6b48c195b58fbe30ca8180e7451ad817a392c2d181f5d12df34c8d8c8d8977d8c}{EVAS\_TEXT\_STYLE\_FAR\_SHADOW}}:}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}far\ shadow"{}};}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \textcolor{keywordflow}{case}\ \mbox{\hyperlink{group__Evas__Object__Text__Group_gga6b48c195b58fbe30ca8180e7451ad817a7583f30324e938dbcf2d5089de09a5a0}{EVAS\_TEXT\_STYLE\_OUTLINE\_SOFT\_SHADOW}}:}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}outline\ soft\ shadow"{}};}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \textcolor{keywordflow}{case}\ \mbox{\hyperlink{group__Evas__Object__Text__Group_gga6b48c195b58fbe30ca8180e7451ad817a5675086aa98175b86803dc515972737f}{EVAS\_TEXT\_STYLE\_SOFT\_SHADOW}}:}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}soft\ shadow"{}};}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \textcolor{keywordflow}{case}\ \mbox{\hyperlink{group__Evas__Object__Text__Group_gga6b48c195b58fbe30ca8180e7451ad817a7ef1a030ee4fe4ee7782528e6ffb38b1}{EVAS\_TEXT\_STYLE\_FAR\_SOFT\_SHADOW}}:}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}far\ soft\ shadow"{}};}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}invalid"{}};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_on\_keydown(\textcolor{keywordtype}{void}\ \ \ \ \ \ \ \ *data\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ Evas\ \ \ \ \ \ \ \ *evas\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ 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{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (strcmp(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}},\ \textcolor{stringliteral}{"{}h"{}})\ ==\ 0)\ \textcolor{comment}{/*\ print\ help\ */}}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}\%s"{}},\ commands);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (strcmp(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}},\ \textcolor{stringliteral}{"{}t"{}})\ ==\ 0)\ \textcolor{comment}{/*\ change\ text's\ current\ style\ */}}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Text__Group_ga6b48c195b58fbe30ca8180e7451ad817}{Evas\_Text\_Style\_Type}}\ type\ =\ \mbox{\hyperlink{group__Evas__Object__Text__Group_gafad5a755a1fcef860ddfb8b7eea19242}{evas\_object\_text\_style\_get}}(d.text);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ type\ =\ (type\ +\ 1)\ \%\ 10;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Text__Group_ga719ef25d2e21ae5ee4506f30956ec99d}{evas\_object\_text\_style\_set}}(d.text,\ type);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}Changing\ text's\ style\ to\ \(\backslash\)'\%s\(\backslash\)'\(\backslash\)n"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \_text\_style\_type\_to\_str(type));}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (strcmp(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}},\ \textcolor{stringliteral}{"{}f"{}})\ ==\ 0)\ \textcolor{comment}{/*\ change\ text's\ font\ */}}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ sz;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ (d.t\_data.font\_ptr)++;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Text__Group_ga47dda261035bca211614f8fd62f68ed9}{evas\_object\_text\_font\_get}}(d.text,\ NULL,\ \&sz);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ POINTER\_CYCLE(d.t\_data.font\_ptr,\ d.t\_data.font);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Text__Group_gac5dd3bf469c8df9c4fe36d08c066f122}{evas\_object\_text\_font\_set}}(d.text,\ *d.t\_data.font\_ptr,\ sz);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}Changing\ text's\ font\ to\ \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *d.t\_data.font\_ptr);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (strcmp(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}},\ \textcolor{stringliteral}{"{}b"{}})\ ==\ 0)\ \textcolor{comment}{/*\ change\ text's\ base\ color\ */}}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ (d.t\_data.text\_ptr)++;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ POINTER\_CYCLE(d.t\_data.text\_ptr,\ d.t\_data.text);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_gab751e9d24c16e74af6f7c08ea5b930c2}{evas\_object\_color\_set}}(}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ d.text,\ d.t\_data.text\_ptr-\/>r,\ d.t\_data.text\_ptr-\/>g,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ d.t\_data.text\_ptr-\/>b,\ d.t\_data.text\_ptr-\/>a);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}Changing\ base\ color\ for\ text\ to\ (\%d,\ \%d,\ \%d,\ \%d)\(\backslash\)n"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ d.t\_data.text\_ptr-\/>r,\ d.t\_data.text\_ptr-\/>g,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ d.t\_data.text\_ptr-\/>b,\ d.t\_data.text\_ptr-\/>a);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (strcmp(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}},\ \textcolor{stringliteral}{"{}g"{}})\ ==\ 0)\ \textcolor{comment}{/*\ change\ text's\ glow\ 2\ color\ */}}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ (d.t\_data.glow2\_ptr)++;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ POINTER\_CYCLE(d.t\_data.glow2\_ptr,\ d.t\_data.glow2);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Text__Group_ga961743d6a6ea23dff75fe8cbf839563f}{evas\_object\_text\_glow2\_color\_set}}(}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ d.text,\ d.t\_data.glow2\_ptr-\/>r,\ d.t\_data.glow2\_ptr-\/>g,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ d.t\_data.glow2\_ptr-\/>b,\ d.t\_data.glow2\_ptr-\/>a);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}Changing\ glow\ 2\ color\ for\ text\ to\ (\%d,\ \%d,\ \%d,\ \%d)\(\backslash\)n"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ d.t\_data.glow2\_ptr-\/>r,\ d.t\_data.glow2\_ptr-\/>g,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ d.t\_data.glow2\_ptr-\/>b,\ d.t\_data.glow2\_ptr-\/>a);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (strcmp(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}},\ \textcolor{stringliteral}{"{}w"{}})\ ==\ 0)\ \textcolor{comment}{/*\ change\ text's\ glow\ color\ */}}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ (d.t\_data.glow\_ptr)++;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ POINTER\_CYCLE(d.t\_data.glow\_ptr,\ d.t\_data.glow);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Text__Group_gaefdb6c5032c7539d78c331b98fdd87ea}{evas\_object\_text\_glow\_color\_set}}(}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ d.text,\ d.t\_data.glow\_ptr-\/>r,\ d.t\_data.glow\_ptr-\/>g,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ d.t\_data.glow\_ptr-\/>b,\ d.t\_data.glow\_ptr-\/>a);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}Changing\ glow\ color\ for\ text\ to\ (\%d,\ \%d,\ \%d,\ \%d)\(\backslash\)n"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ d.t\_data.glow\_ptr-\/>r,\ d.t\_data.glow\_ptr-\/>g,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ d.t\_data.glow\_ptr-\/>b,\ d.t\_data.glow\_ptr-\/>a);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (strcmp(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}},\ \textcolor{stringliteral}{"{}o"{}})\ ==\ 0)\ \textcolor{comment}{/*\ change\ text's\ outline\ color\ */}}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ (d.t\_data.outline\_ptr)++;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ POINTER\_CYCLE(d.t\_data.outline\_ptr,\ d.t\_data.outline);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Text__Group_ga0f72682bf087866b8c9e3a3968c81134}{evas\_object\_text\_outline\_color\_set}}(}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ d.text,\ d.t\_data.outline\_ptr-\/>r,\ d.t\_data.outline\_ptr-\/>g,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ d.t\_data.outline\_ptr-\/>b,\ d.t\_data.outline\_ptr-\/>a);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}Changing\ outline\ color\ for\ text\ to\ (\%d,\ \%d,\ \%d,\ \%d)\(\backslash\)n"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ d.t\_data.outline\_ptr-\/>r,\ d.t\_data.outline\_ptr-\/>g,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ d.t\_data.outline\_ptr-\/>b,\ d.t\_data.outline\_ptr-\/>a);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (strcmp(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}},\ \textcolor{stringliteral}{"{}s"{}})\ ==\ 0)\ \textcolor{comment}{/*\ change\ text's\ shadow\ color\ */}}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ (d.t\_data.shadow\_ptr)++;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ POINTER\_CYCLE(d.t\_data.shadow\_ptr,\ d.t\_data.shadow);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Text__Group_ga7e42b07f03236bd8ead006ae1b42be68}{evas\_object\_text\_shadow\_color\_set}}(}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ d.text,\ d.t\_data.shadow\_ptr-\/>r,\ d.t\_data.shadow\_ptr-\/>g,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ d.t\_data.shadow\_ptr-\/>b,\ d.t\_data.shadow\_ptr-\/>a);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}Changing\ shadow\ color\ for\ text\ to\ (\%d,\ \%d,\ \%d,\ \%d)\(\backslash\)n"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ d.t\_data.shadow\_ptr-\/>r,\ d.t\_data.shadow\_ptr-\/>g,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ d.t\_data.shadow\_ptr-\/>b,\ d.t\_data.shadow\_ptr-\/>a);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (strcmp(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}},\ \textcolor{stringliteral}{"{}z"{}})\ ==\ 0)\ \textcolor{comment}{/*\ change\ text's\ font\ size\ */}}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *font;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ size;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Text__Group_ga47dda261035bca211614f8fd62f68ed9}{evas\_object\_text\_font\_get}}(d.text,\ \&font,\ \&size);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ size\ =\ (size\ +\ 10)\ \%\ 50;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!size)\ size\ =\ 10;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Text__Group_gac5dd3bf469c8df9c4fe36d08c066f122}{evas\_object\_text\_font\_set}}(d.text,\ font,\ size);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}Changing\ text's\ font\ size\ to\ \%d\(\backslash\)n"{}},\ size);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keywordtype}{int}}
\DoxyCodeLine{main(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{int}\ size;}
\DoxyCodeLine{\ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *font;}
\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\ }text\_preset\_data\ init\_data\ =}
\DoxyCodeLine{\ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ .font\ =\ \{\textcolor{stringliteral}{"{}DejaVu"{}},\ \textcolor{stringliteral}{"{}Courier"{}},\ \textcolor{stringliteral}{"{}Utopia"{}}\},}
\DoxyCodeLine{\ \ \ \ \ \ .text\ =\ \{BLACK,\ WHITE,\ GREY,\ RED,\ GREEN,\ BLUE\},}
\DoxyCodeLine{\ \ \ \ \ \ .shadow\ =\ \{WHITE,\ BLUE,\ GREEN,\ RED\},}
\DoxyCodeLine{\ \ \ \ \ \ .outline\ =\ \{WHITE,\ RED,\ GREEN,\ BLUE\},}
\DoxyCodeLine{\ \ \ \ \ \ .glow\ =\ \{WHITE,\ BLUE,\ GREEN,\ RED\},}
\DoxyCodeLine{\ \ \ \ \ \ .glow2\ =\ \{WHITE,\ RED,\ BLUE,\ GREEN\}}
\DoxyCodeLine{\ \ \ \};}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ d.t\_data\ =\ init\_data;}
\DoxyCodeLine{\ \ \ d.t\_data.font\_ptr\ =\ d.t\_data.font;}
\DoxyCodeLine{\ \ \ d.t\_data.text\_ptr\ =\ d.t\_data.text;}
\DoxyCodeLine{\ \ \ d.t\_data.glow\_ptr\ =\ d.t\_data.glow;}
\DoxyCodeLine{\ \ \ d.t\_data.glow2\_ptr\ =\ d.t\_data.glow2;}
\DoxyCodeLine{\ \ \ d.t\_data.outline\_ptr\ =\ d.t\_data.outline;}
\DoxyCodeLine{\ \ \ d.t\_data.shadow\_ptr\ =\ d.t\_data.shadow;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{comment}{/*\ this\ will\ give\ you\ a\ window\ with\ an\ Evas\ canvas\ under\ the\ first}}
\DoxyCodeLine{\textcolor{comment}{\ \ \ \ *\ engine\ available\ */}}
\DoxyCodeLine{\ \ \ d.ee\ =\ \mbox{\hyperlink{group__Ecore__Evas__Group_gaaa770b6f2f1395f9eeb0e50e26c3f933}{ecore\_evas\_new}}(NULL,\ 10,\ 10,\ 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.evas\ =\ \mbox{\hyperlink{group__Ecore__Evas__Group_ga6f8d214cd55bc940d7cc62fecd8dbc06}{ecore\_evas\_get}}(d.ee);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ d.bg\ =\ \mbox{\hyperlink{group__Evas__Object__Rectangle_ga1b7a9d8e6ce240590c1734da5f3449d2}{evas\_object\_rectangle\_add}}(d.evas);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_gab751e9d24c16e74af6f7c08ea5b930c2}{evas\_object\_color\_set}}(d.bg,\ 255,\ 255,\ 255,\ 255);\ \textcolor{comment}{/*\ white\ bg\ */}}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga335c8ee6eaeaac9710656af4f8b0db91}{evas\_object\_move}}(d.bg,\ 0,\ 0);\ \textcolor{comment}{/*\ at\ canvas'\ origin\ */}}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gacad94595f83580c18908cb3b69b08d1a}{evas\_object\_resize}}(d.bg,\ WIDTH,\ HEIGHT);\ \textcolor{comment}{/*\ covers\ full\ canvas\ */}}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(d.bg);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gac6d65f8896ab59780553676d0017c2ef}{evas\_object\_focus\_set}}(d.bg,\ \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Events_gac71a1038dad71da36f57b70c8ad10252}{evas\_object\_event\_callback\_add}}(}
\DoxyCodeLine{\ \ \ \ \ d.bg,\ \mbox{\hyperlink{Evas__Common_8h_ad64cde0da38a60e7cb7905b3ab216968a336b86bad4f145f84c155e4922335584}{EVAS\_CALLBACK\_KEY\_DOWN}},\ \_on\_keydown,\ NULL);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ d.text\ =\ \mbox{\hyperlink{group__Evas__Object__Text__Group_gae4d422b8ccfeadf3e24c5349a78e530a}{evas\_object\_text\_add}}(d.evas);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Text__Group_ga719ef25d2e21ae5ee4506f30956ec99d}{evas\_object\_text\_style\_set}}(d.text,\ \mbox{\hyperlink{group__Evas__Object__Text__Group_gga6b48c195b58fbe30ca8180e7451ad817aa5945efaa70038ced50fad08c4c8b543}{EVAS\_TEXT\_STYLE\_PLAIN}});}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{comment}{/*\ let\ the\ pre-\/set\ things\ be\ enforced\ */}}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_gab751e9d24c16e74af6f7c08ea5b930c2}{evas\_object\_color\_set}}(}
\DoxyCodeLine{\ \ \ \ \ d.text,\ d.t\_data.text\_ptr-\/>r,\ d.t\_data.text\_ptr-\/>g,}
\DoxyCodeLine{\ \ \ \ \ d.t\_data.text\_ptr-\/>b,\ d.t\_data.text\_ptr-\/>a);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Text__Group_gaefdb6c5032c7539d78c331b98fdd87ea}{evas\_object\_text\_glow\_color\_set}}(}
\DoxyCodeLine{\ \ \ \ \ d.text,\ d.t\_data.glow\_ptr-\/>r,\ d.t\_data.glow\_ptr-\/>g,}
\DoxyCodeLine{\ \ \ \ \ d.t\_data.glow\_ptr-\/>b,\ d.t\_data.glow\_ptr-\/>a);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Text__Group_ga961743d6a6ea23dff75fe8cbf839563f}{evas\_object\_text\_glow2\_color\_set}}(}
\DoxyCodeLine{\ \ \ \ \ d.text,\ d.t\_data.glow2\_ptr-\/>r,\ d.t\_data.glow2\_ptr-\/>g,}
\DoxyCodeLine{\ \ \ \ \ d.t\_data.glow2\_ptr-\/>b,\ d.t\_data.glow2\_ptr-\/>a);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Text__Group_ga0f72682bf087866b8c9e3a3968c81134}{evas\_object\_text\_outline\_color\_set}}(}
\DoxyCodeLine{\ \ \ \ \ d.text,\ d.t\_data.outline\_ptr-\/>r,\ d.t\_data.outline\_ptr-\/>g,}
\DoxyCodeLine{\ \ \ \ \ d.t\_data.outline\_ptr-\/>b,\ d.t\_data.outline\_ptr-\/>a);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Text__Group_ga7e42b07f03236bd8ead006ae1b42be68}{evas\_object\_text\_shadow\_color\_set}}(}
\DoxyCodeLine{\ \ \ \ \ d.text,\ d.t\_data.shadow\_ptr-\/>r,\ d.t\_data.shadow\_ptr-\/>g,}
\DoxyCodeLine{\ \ \ \ \ d.t\_data.shadow\_ptr-\/>b,\ d.t\_data.shadow\_ptr-\/>a);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Text__Group_gac5dd3bf469c8df9c4fe36d08c066f122}{evas\_object\_text\_font\_set}}(d.text,\ *d.t\_data.font\_ptr,\ 30);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Text__Group_ga1c9f3b5f76d5c2f020320d84a8197492}{evas\_object\_text\_text\_set}}(d.text,\ \textcolor{stringliteral}{"{}sample\ text"{}});}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gacad94595f83580c18908cb3b69b08d1a}{evas\_object\_resize}}(d.text,\ (3\ *\ WIDTH)\ /\ 4,\ HEIGHT\ /\ 4);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga335c8ee6eaeaac9710656af4f8b0db91}{evas\_object\_move}}(d.text,\ WIDTH\ /\ 8,\ (3\ *\ HEIGHT)\ /\ 8);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(d.text);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Text__Group_ga47dda261035bca211614f8fd62f68ed9}{evas\_object\_text\_font\_get}}(d.text,\ \&font,\ \&size);}
\DoxyCodeLine{\ \ \ printf(\textcolor{stringliteral}{"{}Adding\ text\ object\ with\ font\ \%s,\ size\ \%d\(\backslash\)n"{}},\ font,\ size);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{comment}{/*\ this\ is\ a\ border\ around\ the\ text\ object\ above,\ here\ just\ to}}
\DoxyCodeLine{\textcolor{comment}{\ \ \ \ *\ emphasize\ its\ geometry\ */}}
\DoxyCodeLine{\ \ \ d.border\ =\ \mbox{\hyperlink{group__Evas__Object__Image_gafb52be265f315186a28d43af2d559ec6}{evas\_object\_image\_filled\_add}}(d.evas);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Image_gac2e588476b16b04f85ca9a594c140c1d}{evas\_object\_image\_file\_set}}(d.border,\ border\_img\_path,\ NULL);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Image_ga063e5ad38b43897311bbdecfe8dc312d}{evas\_object\_image\_border\_set}}(d.border,\ 3,\ 3,\ 3,\ 3);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Image_ga5749943ce62e85ead67a1440960677fa}{evas\_object\_image\_border\_center\_fill\_set}}(d.border,\ \mbox{\hyperlink{group__Evas__Object__Image_gga9f789224285e646309b7dd81a2401910a2ad856ac6aab5e2659c3a584a37aec70}{EVAS\_BORDER\_FILL\_NONE}});}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gacad94595f83580c18908cb3b69b08d1a}{evas\_object\_resize}}(d.border,\ ((3\ *\ WIDTH)\ /\ 4)\ +\ 3,\ (HEIGHT\ /\ 4)\ +\ 3);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga335c8ee6eaeaac9710656af4f8b0db91}{evas\_object\_move}}(d.border,\ (WIDTH\ /\ 8)\ -\/\ 3,\ ((3\ *\ HEIGHT)\ /\ 8)\ -\/\ 3);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(d.border);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ printf(\textcolor{stringliteral}{"{}\%s"{}},\ commands);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Ecore__Main__Loop__Group_gaf103b9f668bb3e4fed12e52c6180132d}{ecore\_main\_loop\_begin}}();}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Ecore__Evas__Group_gad3ec61f2aa03df4d3dbfd0d311e0c8dc}{ecore\_evas\_free}}(d.ee);}
\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{\ \ \ \mbox{\hyperlink{group__Ecore__Evas__Group_gab8fa311077f749190c9b622f672b2214}{ecore\_evas\_shutdown}}();}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{return}\ -\/1;}
\DoxyCodeLine{\}}

\end{DoxyCodeInclude}
 