\hypertarget{edje-color-class_8c-example}{}\doxysection{edje-\/color-\/class.\+c}

\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 EINA\_UNUSED}}
\DoxyCodeLine{\textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#ifndef PACKAGE\_DATA\_DIR}}
\DoxyCodeLine{\textcolor{preprocessor}{\#define PACKAGE\_DATA\_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 <\mbox{\hyperlink{Edje_8h}{Edje.h}}>}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#define WIDTH  (400)}}
\DoxyCodeLine{\textcolor{preprocessor}{\#define HEIGHT (400)}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{typedef} \textcolor{keywordtype}{int} color[4];           \textcolor{comment}{/* rgba */}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} Ecore\_Evas *ee1, *ee2;}
\DoxyCodeLine{\textcolor{keyword}{static} \mbox{\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}} *evas1, *evas2;}
\DoxyCodeLine{\textcolor{keyword}{static} \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}} *bg1, *edje\_obj1, *bg2, *edje\_obj2;}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *selected\_class;}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} color colors\_init\_data[] =}
\DoxyCodeLine{  \{\{255, 0, 0, 255\},            \textcolor{comment}{/* red */}}
\DoxyCodeLine{   \{0, 255, 0, 255\},            \textcolor{comment}{/* green */}}
\DoxyCodeLine{   \{0, 0, 255, 255\},            \textcolor{comment}{/* blue */}}
\DoxyCodeLine{   \{0, 0, 0, 255\},              \textcolor{comment}{/* black */}}
\DoxyCodeLine{   \{255, 255, 255, 255\},        \textcolor{comment}{/* white */}}
\DoxyCodeLine{   \{128, 128, 128, 255\},        \textcolor{comment}{/* gray */}}
\DoxyCodeLine{   \{255, 255, 0, 255\},          \textcolor{comment}{/* yellow */}}
\DoxyCodeLine{   \{255, 0, 255, 255\}           \textcolor{comment}{/* pink */}}
\DoxyCodeLine{  \};}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{char} *color\_names[] =}
\DoxyCodeLine{  \{\textcolor{stringliteral}{"{}red"{}}, \textcolor{stringliteral}{"{}green"{}}, \textcolor{stringliteral}{"{}blue"{}}, \textcolor{stringliteral}{"{}black"{}}, \textcolor{stringliteral}{"{}white"{}},}
\DoxyCodeLine{   \textcolor{stringliteral}{"{}gray"{}}, \textcolor{stringliteral}{"{}yellow"{}}, \textcolor{stringliteral}{"{}pink"{}}\};}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}}
\DoxyCodeLine{\_get\_color\_from\_name(\textcolor{keyword}{const} \textcolor{keywordtype}{char} *n, color *c)}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{   \textcolor{keywordflow}{for} (i = 0; i < 8; i++)}
\DoxyCodeLine{     \textcolor{keywordflow}{if} (!strcmp(n, color\_names[i]))}
\DoxyCodeLine{       \{}
\DoxyCodeLine{          (*c)[0] = (colors\_init\_data[i])[0];}
\DoxyCodeLine{          (*c)[1] = (colors\_init\_data[i])[1];}
\DoxyCodeLine{          (*c)[2] = (colors\_init\_data[i])[2];}
\DoxyCodeLine{          (*c)[3] = (colors\_init\_data[i])[3];}
\DoxyCodeLine{          \textcolor{keywordflow}{return} \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}};}
\DoxyCodeLine{       \}}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{return} \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}};}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_color\_classes\_print(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \mbox{\hyperlink{struct__Eina__List}{Eina\_List}} *classes;}
\DoxyCodeLine{   \textcolor{keywordtype}{char} *class\_name;}
\DoxyCodeLine{}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"{}Getting the color classes\(\backslash\)n\(\backslash\)n"{}});}
\DoxyCodeLine{   classes = \mbox{\hyperlink{group__Edje__Object__Color__Class_gaf38d72501616d019a5743d75bfc5f81c}{edje\_color\_class\_list}}();}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__List__Group_gae27a2c686a0a11693f9b06957c9bba83}{EINA\_LIST\_FREE}}(classes, class\_name)}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \textcolor{keywordtype}{int} r1, r2, r3, g1, g2, g3, b1, b2, b3,}
\DoxyCodeLine{          a1, a2, a3;}
\DoxyCodeLine{}
\DoxyCodeLine{        printf(\textcolor{stringliteral}{"{}\(\backslash\)ncolor class: \%s\(\backslash\)n"{}}, class\_name);}
\DoxyCodeLine{        \textcolor{keywordflow}{if} (!\mbox{\hyperlink{group__Edje__Object__Color__Class_gaf4e14706bc9766011ca60862f057d56e}{edje\_color\_class\_get}}(class\_name, \&r1, \&g1, \&b1, \&a1,}
\DoxyCodeLine{                                  \&r2, \&g2, \&b2, \&a2, \&r3, \&g3, \&b3, \&a3))}
\DoxyCodeLine{          fprintf(stderr, \textcolor{stringliteral}{"{}Cannot get the color class\(\backslash\)n"{}});}
\DoxyCodeLine{        \textcolor{keywordflow}{else}}
\DoxyCodeLine{          \{}
\DoxyCodeLine{}
\DoxyCodeLine{             printf(\textcolor{stringliteral}{"{}Object color r: \%d g: \%d b: \%d a: \%d\(\backslash\)n"{}},}
\DoxyCodeLine{                     r1, g1, b1, a1);}
\DoxyCodeLine{             printf(\textcolor{stringliteral}{"{}Text outline color r: \%d g: \%d b: \%d a: \%d\(\backslash\)n"{}},}
\DoxyCodeLine{                     r2, g2, b2, a2);}
\DoxyCodeLine{             printf(\textcolor{stringliteral}{"{}Text shadow color r: \%d g: \%d b: \%d a: \%d\(\backslash\)n"{}},}
\DoxyCodeLine{                     r3, g3, b3, a3);}
\DoxyCodeLine{          \}}
\DoxyCodeLine{        free(class\_name);}
\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{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_on\_mouse\_down(\textcolor{keywordtype}{void} *data \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}}, \mbox{\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}} *e \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}}, \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}} *obj, \textcolor{keywordtype}{void} *event\_info)}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \mbox{\hyperlink{struct__Evas__Event__Mouse__Down}{Evas\_Event\_Mouse\_Down}} *ev = event\_info;}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (ev-\/>\mbox{\hyperlink{struct__Evas__Event__Mouse__Down_a0ab02808721d6c55fc642ecbb37d5ff9}{button}} == 1)}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \textcolor{keywordflow}{if} (obj == edje\_obj1)}
\DoxyCodeLine{          \mbox{\hyperlink{group__Edje__Object__Color__Class_ga0d30416497554e3f50c893de5c0cccad}{edje\_color\_class\_del}}(selected\_class);}
\DoxyCodeLine{        \textcolor{keywordflow}{else}}
\DoxyCodeLine{          \mbox{\hyperlink{group__Edje__Object__Color__Class_ga88a517de928e71069ef64316bde6b392}{edje\_object\_color\_class\_del}}(edje\_obj2, selected\_class);}
\DoxyCodeLine{     \}}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{/* here just to keep our example's window size}}
\DoxyCodeLine{\textcolor{comment}{ * in synchrony. */}}
\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{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (\_ee == ee1)}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \mbox{\hyperlink{group__Evas__Object__Group_gacad94595f83580c18908cb3b69b08d1a}{evas\_object\_resize}}(bg1, w, h);}
\DoxyCodeLine{        \mbox{\hyperlink{group__Evas__Object__Group_gacad94595f83580c18908cb3b69b08d1a}{evas\_object\_resize}}(edje\_obj1, w, h);}
\DoxyCodeLine{     \}}
\DoxyCodeLine{   \textcolor{keywordflow}{else}}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \mbox{\hyperlink{group__Evas__Object__Group_gacad94595f83580c18908cb3b69b08d1a}{evas\_object\_resize}}(bg2, w, h);}
\DoxyCodeLine{        \mbox{\hyperlink{group__Evas__Object__Group_gacad94595f83580c18908cb3b69b08d1a}{evas\_object\_resize}}(edje\_obj2, w, h);}
\DoxyCodeLine{     \}}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_color\_class\_callback\_delete(\textcolor{keywordtype}{void} *data, \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}} *obj \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}},}
\DoxyCodeLine{                             \textcolor{keyword}{const} \textcolor{keywordtype}{char} *emission, \textcolor{keywordtype}{void} *source \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (!strcmp(data, \textcolor{stringliteral}{"{}process"{}}))}
\DoxyCodeLine{     printf(\textcolor{stringliteral}{"{}Color class: \%s deleted on process level\(\backslash\)n"{}}, emission);}
\DoxyCodeLine{   \textcolor{keywordflow}{else}}
\DoxyCodeLine{     printf(\textcolor{stringliteral}{"{}Color class: \%s deleted on object level\(\backslash\)n"{}}, emission);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\_create\_windows(\textcolor{keyword}{const} \textcolor{keywordtype}{char} *edje\_file\_path)}
\DoxyCodeLine{\{}
\DoxyCodeLine{  \textcolor{comment}{/* this will give you a window with an Evas canvas under the first}}
\DoxyCodeLine{\textcolor{comment}{    * engine available */}}
\DoxyCodeLine{   ee1 = \mbox{\hyperlink{group__Ecore__Evas__Group_gaaa770b6f2f1395f9eeb0e50e26c3f933}{ecore\_evas\_new}}(NULL, 0, 0, WIDTH, HEIGHT, NULL);}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (!ee1)}
\DoxyCodeLine{     \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{   ee2 = \mbox{\hyperlink{group__Ecore__Evas__Group_gaaa770b6f2f1395f9eeb0e50e26c3f933}{ecore\_evas\_new}}(NULL, 0, 0, WIDTH, HEIGHT, NULL);}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (!ee2)}
\DoxyCodeLine{     \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Ecore__Evas__Group_ga3680b5c89157167318192157a5d24ec4}{ecore\_evas\_callback\_destroy\_set}}(ee1, \_on\_destroy);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Ecore__Evas__Group_gaac67f679c9027059a34519fbdea360df}{ecore\_evas\_callback\_resize\_set}}(ee1, \_canvas\_resize\_cb);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Ecore__Evas__Group_ga3b2832e0373bbafae2bb7143618535c1}{ecore\_evas\_title\_set}}(ee1, \textcolor{stringliteral}{"{}Edje Color Class Example"{}});}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Ecore__Evas__Group_ga3680b5c89157167318192157a5d24ec4}{ecore\_evas\_callback\_destroy\_set}}(ee2, \_on\_destroy);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Ecore__Evas__Group_gaac67f679c9027059a34519fbdea360df}{ecore\_evas\_callback\_resize\_set}}(ee2, \_canvas\_resize\_cb);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Ecore__Evas__Group_ga3b2832e0373bbafae2bb7143618535c1}{ecore\_evas\_title\_set}}(ee2, \textcolor{stringliteral}{"{}Edje Object Color Class Example"{}});}
\DoxyCodeLine{}
\DoxyCodeLine{   evas1 = \mbox{\hyperlink{group__Ecore__Evas__Group_ga6f8d214cd55bc940d7cc62fecd8dbc06}{ecore\_evas\_get}}(ee1);}
\DoxyCodeLine{   evas2 = \mbox{\hyperlink{group__Ecore__Evas__Group_ga6f8d214cd55bc940d7cc62fecd8dbc06}{ecore\_evas\_get}}(ee2);}
\DoxyCodeLine{}
\DoxyCodeLine{   bg1 = \mbox{\hyperlink{group__Evas__Object__Rectangle_ga1b7a9d8e6ce240590c1734da5f3449d2}{evas\_object\_rectangle\_add}}(evas1);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_gab751e9d24c16e74af6f7c08ea5b930c2}{evas\_object\_color\_set}}(bg1, 255, 255, 255, 255); \textcolor{comment}{/* white bg */}}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga335c8ee6eaeaac9710656af4f8b0db91}{evas\_object\_move}}(bg1, 0, 0);                    \textcolor{comment}{/* at canvas' origin */}}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_gacad94595f83580c18908cb3b69b08d1a}{evas\_object\_resize}}(bg1, WIDTH, HEIGHT);         \textcolor{comment}{/* covers full canvas */}}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(bg1);}
\DoxyCodeLine{}
\DoxyCodeLine{   bg2 = \mbox{\hyperlink{group__Evas__Object__Rectangle_ga1b7a9d8e6ce240590c1734da5f3449d2}{evas\_object\_rectangle\_add}}(evas2);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_gab751e9d24c16e74af6f7c08ea5b930c2}{evas\_object\_color\_set}}(bg2, 255, 255, 255, 255); \textcolor{comment}{/* white bg */}}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga335c8ee6eaeaac9710656af4f8b0db91}{evas\_object\_move}}(bg2, 0, 0);                    \textcolor{comment}{/* at canvas' origin */}}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_gacad94595f83580c18908cb3b69b08d1a}{evas\_object\_resize}}(bg2, WIDTH, HEIGHT);         \textcolor{comment}{/* covers full canvas */}}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(bg2);}
\DoxyCodeLine{}
\DoxyCodeLine{   edje\_obj1 = \mbox{\hyperlink{group__Edje__Object__Group_ga5548cef32568746f40df9bd0be339bea}{edje\_object\_add}}(evas1);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Events_gac71a1038dad71da36f57b70c8ad10252}{evas\_object\_event\_callback\_add}}(edje\_obj1, \mbox{\hyperlink{Evas__Common_8h_ad64cde0da38a60e7cb7905b3ab216968a9fa52651ccf7e47cd3b7785fc4cf393f}{EVAS\_CALLBACK\_MOUSE\_DOWN}},}
\DoxyCodeLine{                                  \_on\_mouse\_down, NULL);}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Edje__Object__Group_gaec1edd24b5bd8e82823759a8dddc1996}{edje\_object\_file\_set}}(edje\_obj1, edje\_file\_path, \textcolor{stringliteral}{"{}example\_color\_class"{}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga335c8ee6eaeaac9710656af4f8b0db91}{evas\_object\_move}}(edje\_obj1, 0, 0); \textcolor{comment}{/* at canvas' origin */}}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_gacad94595f83580c18908cb3b69b08d1a}{evas\_object\_resize}}(edje\_obj1, WIDTH, HEIGHT);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Edje__Object__Part_gafd2241781aedc44a0f4cdc63bb029784}{edje\_object\_part\_text\_set}}(edje\_obj1, \textcolor{stringliteral}{"{}part\_four"{}}, \textcolor{stringliteral}{"{}EDJE EXAMPLE"{}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Edje__Object__Group_gab7a1542309f1ffdc76c07f280842d4b1}{edje\_object\_signal\_callback\_add}}(edje\_obj1, \textcolor{stringliteral}{"{}color\_class,del"{}}, \textcolor{stringliteral}{"{}*"{}},}
\DoxyCodeLine{                                   (Edje\_Signal\_Cb) \_color\_class\_callback\_delete,}
\DoxyCodeLine{                                   \textcolor{stringliteral}{"{}process"{}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(edje\_obj1);}
\DoxyCodeLine{}
\DoxyCodeLine{   edje\_obj2 = \mbox{\hyperlink{group__Edje__Object__Group_ga5548cef32568746f40df9bd0be339bea}{edje\_object\_add}}(evas2);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Events_gac71a1038dad71da36f57b70c8ad10252}{evas\_object\_event\_callback\_add}}(edje\_obj2, \mbox{\hyperlink{Evas__Common_8h_ad64cde0da38a60e7cb7905b3ab216968a9fa52651ccf7e47cd3b7785fc4cf393f}{EVAS\_CALLBACK\_MOUSE\_DOWN}},}
\DoxyCodeLine{                                  \_on\_mouse\_down, NULL);}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Edje__Object__Group_gaec1edd24b5bd8e82823759a8dddc1996}{edje\_object\_file\_set}}(edje\_obj2, edje\_file\_path, \textcolor{stringliteral}{"{}example\_color\_class"{}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga335c8ee6eaeaac9710656af4f8b0db91}{evas\_object\_move}}(edje\_obj2, 0, 0); \textcolor{comment}{/* at canvas' origin */}}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_gacad94595f83580c18908cb3b69b08d1a}{evas\_object\_resize}}(edje\_obj2, WIDTH, HEIGHT);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Edje__Object__Part_gafd2241781aedc44a0f4cdc63bb029784}{edje\_object\_part\_text\_set}}(edje\_obj2, \textcolor{stringliteral}{"{}part\_four"{}}, \textcolor{stringliteral}{"{}EDJE OBJECT EXAMPLE"{}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Edje__Object__Group_gab7a1542309f1ffdc76c07f280842d4b1}{edje\_object\_signal\_callback\_add}}(edje\_obj2, \textcolor{stringliteral}{"{}color\_class,del"{}}, \textcolor{stringliteral}{"{}*"{}},}
\DoxyCodeLine{                                   (Edje\_Signal\_Cb) \_color\_class\_callback\_delete,}
\DoxyCodeLine{                                   \textcolor{stringliteral}{"{}object"{}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(edje\_obj2);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{return} 1;}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keywordtype}{int}}
\DoxyCodeLine{main(\textcolor{keywordtype}{int} argc, \textcolor{keywordtype}{char} *argv[])}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \textcolor{keyword}{const} \textcolor{keywordtype}{char}  *edje\_file = PACKAGE\_DATA\_DIR\textcolor{stringliteral}{"{}/color-\/class.edj"{}};}
\DoxyCodeLine{   color        c1, c2, c3;}
\DoxyCodeLine{   \textcolor{keywordtype}{int}          i;}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (argc != 5)}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        fprintf(stderr, \textcolor{stringliteral}{"{}You have to use: \%s color\_class\_name color1, color2,"{}} \(\backslash\)}
\DoxyCodeLine{                \textcolor{stringliteral}{"{}color3\(\backslash\)n"{}}, argv[0]);}
\DoxyCodeLine{        fprintf(stderr, \textcolor{stringliteral}{"{}Available colors:\(\backslash\)n"{}});}
\DoxyCodeLine{        \textcolor{keywordflow}{for} (i = 0; i < 8; i++)}
\DoxyCodeLine{          fprintf(stderr, \textcolor{stringliteral}{"{}\%s\(\backslash\)n"{}}, color\_names[i]);}
\DoxyCodeLine{}
\DoxyCodeLine{        \textcolor{keywordflow}{return} EXIT\_FAILURE;}
\DoxyCodeLine{     \}}
\DoxyCodeLine{}
\DoxyCodeLine{   selected\_class = argv[1];}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (!(\_get\_color\_from\_name(argv[2], \&c1) \&\&}
\DoxyCodeLine{         \_get\_color\_from\_name(argv[3], \&c2) \&\&}
\DoxyCodeLine{         \_get\_color\_from\_name(argv[4], \&c3)))}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        fprintf(stderr, \textcolor{stringliteral}{"{}Color not available!\(\backslash\)n"{}});}
\DoxyCodeLine{        \textcolor{keywordflow}{return} EXIT\_FAILURE;}
\DoxyCodeLine{     \}}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (!\mbox{\hyperlink{group__Ecore__Evas__Group_ga32ddbb6457033ad435a177eb0c4fe235}{ecore\_evas\_init}}())}
\DoxyCodeLine{     \textcolor{keywordflow}{return} EXIT\_FAILURE;}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (!\mbox{\hyperlink{group__Edje__General__Group_ga1c9c6594f38023c29fbfb2d0c8c675db}{edje\_init}}())}
\DoxyCodeLine{     \textcolor{keywordflow}{goto} shutdown\_ecore\_evas;}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (!\_create\_windows(edje\_file)) \textcolor{keywordflow}{goto} shutdown\_edje;}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Edje__Object__Color__Class_ga684435de625bdbb996e405e3eaaa54ad}{edje\_color\_class\_set}}(argv[1],                     \textcolor{comment}{/* class name   */}}
\DoxyCodeLine{                        c1[0], c1[1], c1[2], c1[3],  \textcolor{comment}{/* Object color */}}
\DoxyCodeLine{                        c2[0], c2[1], c2[2], c2[3],  \textcolor{comment}{/* Text outline */}}
\DoxyCodeLine{                        c3[0], c3[1], c3[2], c3[3]); \textcolor{comment}{/* Text shadow  */}}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{/* Setting an arbitrary value just to see the difference between */}}
\DoxyCodeLine{   \textcolor{comment}{/* process level and object level */}}
\DoxyCodeLine{   \mbox{\hyperlink{group__Edje__Object__Color__Class_ga2361689c9d0655fcbfe522038b057874}{edje\_object\_color\_class\_set}}(edje\_obj2, argv[1], \textcolor{comment}{/* class name   */}}
\DoxyCodeLine{                               128, 180, 77, 255,  \textcolor{comment}{/* Object color */}}
\DoxyCodeLine{                               200, 22, 86, 255,   \textcolor{comment}{/* Text outline */}}
\DoxyCodeLine{                               39, 90, 187, 255);  \textcolor{comment}{/* Text shadow  */}}
\DoxyCodeLine{}
\DoxyCodeLine{   \_color\_classes\_print();}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Ecore__Evas__Group_ga4953047ff97d4f1b0d75a7d513d4f317}{ecore\_evas\_show}}(ee1);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Ecore__Evas__Group_ga4953047ff97d4f1b0d75a7d513d4f317}{ecore\_evas\_show}}(ee2);}
\DoxyCodeLine{}
\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}}(ee1);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Ecore__Evas__Group_gab8fa311077f749190c9b622f672b2214}{ecore\_evas\_shutdown}}();}
\DoxyCodeLine{   \mbox{\hyperlink{group__Edje__General__Group_ga01041f6702f2d81bf10c3e41899805cb}{edje\_shutdown}}();}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{return} EXIT\_SUCCESS;}
\DoxyCodeLine{}
\DoxyCodeLine{ shutdown\_edje:}
\DoxyCodeLine{   \mbox{\hyperlink{group__Edje__General__Group_ga01041f6702f2d81bf10c3e41899805cb}{edje\_shutdown}}();}
\DoxyCodeLine{ shutdown\_ecore\_evas:}
\DoxyCodeLine{   \mbox{\hyperlink{group__Ecore__Evas__Group_gab8fa311077f749190c9b622f672b2214}{ecore\_evas\_shutdown}}();}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{return} EXIT\_FAILURE;}
\DoxyCodeLine{\}}

\end{DoxyCodeInclude}
 