
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\textcolor{comment}{//Compile with:}}
\DoxyCodeLine{\textcolor{comment}{//gcc -\/g layout\_example\_02.c -\/o layout\_example\_02 `pkg-\/config -\/-\/cflags -\/-\/libs elementary`}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#include <Elementary.h>}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#define TABLE "example/table"}}
\DoxyCodeLine{\textcolor{preprocessor}{\#define BOX "example/box"}}
\DoxyCodeLine{\textcolor{preprocessor}{\#define TITLE "example/title"}}
\DoxyCodeLine{\textcolor{preprocessor}{\#define SWALLOW "example/custom"}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *images[] = \{ \textcolor{stringliteral}{"home"}, \textcolor{stringliteral}{"close"}, \textcolor{stringliteral}{"arrow\_up"}, \textcolor{stringliteral}{"arrow\_down"}, NULL \};}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{struct }\_App \{}
\DoxyCodeLine{     \textcolor{keywordtype}{int} current;}
\DoxyCodeLine{\};}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_signal\_cb(\textcolor{keywordtype}{void} *data, \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}} *o, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *emission, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *source \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \textcolor{keyword}{struct }\_App *app = data;}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}} *icon = \mbox{\hyperlink{group__Elm__General_ga32413f4d59d8232cd362a922a281abf1}{elm\_object\_part\_content\_get}}(o, \textcolor{stringliteral}{"elm.swallow.content"});}
\DoxyCodeLine{}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"signal received\(\backslash\)n"});}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (!strcmp(\textcolor{stringliteral}{"elm,action,back"}, emission))}
\DoxyCodeLine{     app-\/>current-\/-\/;}
\DoxyCodeLine{   \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (!strcmp(\textcolor{stringliteral}{"elm,action,next"}, emission))}
\DoxyCodeLine{     app-\/>current++;}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (app-\/>current < 0)}
\DoxyCodeLine{     app-\/>current = (\textcolor{keyword}{sizeof}(images) / \textcolor{keyword}{sizeof}(images[0])) -\/ 2;}
\DoxyCodeLine{   \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (images[app-\/>current] == NULL)}
\DoxyCodeLine{     app-\/>current = 0;}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Icon_gab764b4c6c90543f254c013eff6a6db66}{elm\_icon\_standard\_set}}(icon, images[app-\/>current]);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{EAPI\_MAIN \textcolor{keywordtype}{int}}
\DoxyCodeLine{elm\_main(\textcolor{keywordtype}{int} argc \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}}, \textcolor{keywordtype}{char} **argv \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}} *win, *layout, *icon;}
\DoxyCodeLine{   \textcolor{keyword}{struct }\_App app;}
\DoxyCodeLine{}
\DoxyCodeLine{   app.current = 0;}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__General_ga7a05f37fd3a019da5e26c5fc91fcd937}{elm\_policy\_set}}(\mbox{\hyperlink{group__Elm__General_ggaa16f3378ecdbf660fa378402e3c5a0a9a02fadb6faada04b19d0fa42c11a8d32a}{ELM\_POLICY\_QUIT}}, \mbox{\hyperlink{group__Elm__General_gga46af37e6ac2c406321060be827117196abbe0962d88ae12afe1a173da881f56cd}{ELM\_POLICY\_QUIT\_LAST\_WINDOW\_CLOSED}});}
\DoxyCodeLine{}
\DoxyCodeLine{   win = \mbox{\hyperlink{group__Elm__Win_gac75d7752662fab73d6420706ce5be996}{elm\_win\_util\_standard\_add}}(\textcolor{stringliteral}{"layout"}, \textcolor{stringliteral}{"Layout"});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Win_ga9a16a2f8c9fd5b6e9203ed9dcb53ea8b}{elm\_win\_autodel\_set}}(win, \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{// Adding layout and filling it with widgets}}
\DoxyCodeLine{   layout = \mbox{\hyperlink{group__Elm__Layout_gaca5aee4ad4d92c68f13d1080c70baf8b}{elm\_layout\_add}}(win);}
\DoxyCodeLine{   evas\_object\_size\_hint\_weight\_set(layout, \mbox{\hyperlink{Evas__Common_8h_aa47c85083d3dae0111c21ec49359306a}{EVAS\_HINT\_EXPAND}}, \mbox{\hyperlink{Evas__Common_8h_aa47c85083d3dae0111c21ec49359306a}{EVAS\_HINT\_EXPAND}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Win_ga505d6bd217e5ee01e82b548ec35986eb}{elm\_win\_resize\_object\_add}}(win, layout);}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (!\mbox{\hyperlink{group__Elm__Layout_ga8f28efed82872f5c57a61db5c81d4eb3}{elm\_layout\_theme\_set}}(}
\DoxyCodeLine{         layout, \textcolor{stringliteral}{"layout"}, \textcolor{stringliteral}{"application"}, \textcolor{stringliteral}{"content-\/back-\/next"}))}
\DoxyCodeLine{     fprintf(stderr, \textcolor{stringliteral}{"Failed to set layout"});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}}(layout);}
\DoxyCodeLine{}
\DoxyCodeLine{   icon = \mbox{\hyperlink{group__Elm__Icon_ga5739728c1209f90422cf65a778a16502}{elm\_icon\_add}}(win);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Icon_gab764b4c6c90543f254c013eff6a6db66}{elm\_icon\_standard\_set}}(icon, images[app.current]);}
\DoxyCodeLine{   evas\_object\_size\_hint\_weight\_set(layout, \mbox{\hyperlink{Evas__Common_8h_aa47c85083d3dae0111c21ec49359306a}{EVAS\_HINT\_EXPAND}}, \mbox{\hyperlink{Evas__Common_8h_aa47c85083d3dae0111c21ec49359306a}{EVAS\_HINT\_EXPAND}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__General_ga0531ec8867c72def7c780601764ca642}{elm\_object\_part\_content\_set}}(layout, \textcolor{stringliteral}{"elm.swallow.content"}, icon);}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__General_ga6f9574b798efcd454afdac6f2904f633}{elm\_object\_signal\_callback\_add}}(layout, \textcolor{stringliteral}{"elm,action,back"}, \textcolor{stringliteral}{"elm"}, \_signal\_cb, \&app);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__General_ga6f9574b798efcd454afdac6f2904f633}{elm\_object\_signal\_callback\_add}}(layout, \textcolor{stringliteral}{"elm,action,next"}, \textcolor{stringliteral}{"elm"}, \_signal\_cb, \&app);}
\DoxyCodeLine{}
\DoxyCodeLine{   evas\_object\_resize(win, 320, 320);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}}(win);}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__General_gadf2553f83e6b0b9c7fbe054019a664a1}{elm\_run}}();}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\}}
\DoxyCodeLine{\mbox{\hyperlink{group__Elm__General_ga50fe52d513f7e89c9c770afd76de7ad9}{ELM\_MAIN}}()}
\end{DoxyCodeInclude}
 