\hypertarget{inwin_example_8c-example}{}\doxysection{inwin\+\_\+example.\+c}

\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\textcolor{comment}{/*}}
\DoxyCodeLine{\textcolor{comment}{ * gcc -\/o inwin\_example inwin\_example.c `pkg-\/config -\/-\/cflags -\/-\/libs elementary`}}
\DoxyCodeLine{\textcolor{comment}{ */}}
\DoxyCodeLine{\textcolor{preprocessor}{\#include <Elementary.h>}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}} *inwin = NULL;}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *styles[] = \{}
\DoxyCodeLine{     \textcolor{stringliteral}{"{}default"{}},}
\DoxyCodeLine{     \textcolor{stringliteral}{"{}minimal"{}},}
\DoxyCodeLine{     \textcolor{stringliteral}{"{}minimal\_vertical"{}}}
\DoxyCodeLine{\};}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{int} current\_style = 0;}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_inwin\_hide(\textcolor{keywordtype}{void} *data \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}}, \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}} *obj, \textcolor{keywordtype}{void} *event \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (inwin)}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \mbox{\hyperlink{group__Evas__Object__Group__Basic_gacc307a0d7bfc9df151fd9ec75808c587}{evas\_object\_hide}}(inwin);}
\DoxyCodeLine{        \textcolor{keywordflow}{return};}
\DoxyCodeLine{     \}}
\DoxyCodeLine{   elm\_object\_text\_set(obj, \textcolor{stringliteral}{"{}No inwin!"{}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__General_ga6849a57df3316eabad5bec443bf87597}{elm\_object\_disabled\_set}}(obj, \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_inwin\_destroy(\textcolor{keywordtype}{void} *data \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}}, \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}} *obj, \textcolor{keywordtype}{void} *event \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (inwin)}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga7e7a625dab7a3890532aa13b43117076}{evas\_object\_del}}(inwin);}
\DoxyCodeLine{        inwin = NULL;}
\DoxyCodeLine{        \textcolor{keywordflow}{return};}
\DoxyCodeLine{     \}}
\DoxyCodeLine{   elm\_object\_text\_set(obj, \textcolor{stringliteral}{"{}No inwin!"{}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__General_ga6849a57df3316eabad5bec443bf87597}{elm\_object\_disabled\_set}}(obj, \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_btn\_click\_cb(\textcolor{keywordtype}{void} *data \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}}, \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}} *obj, \textcolor{keywordtype}{void} *event \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}} *o, *parent;}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (inwin)}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \mbox{\hyperlink{group__Elm__Inwin__Group_ga4a9563c589ae3ab597e0caefb5f7477e}{elm\_win\_inwin\_activate}}(inwin);}
\DoxyCodeLine{        \textcolor{keywordflow}{return};}
\DoxyCodeLine{     \}}
\DoxyCodeLine{}
\DoxyCodeLine{   parent = \mbox{\hyperlink{group__Elm__WidgetNavigation_gaecc9a5039788037aa345d5c6a3c8bff8}{elm\_object\_top\_widget\_get}}(obj);}
\DoxyCodeLine{   inwin = \mbox{\hyperlink{group__Elm__Inwin__Group_gaf99e0cf10681793f3ae153723de0156b}{elm\_win\_inwin\_add}}(parent);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Styles_ga7fc2d1f9ba723470da7a05799c49f7fe}{elm\_object\_style\_set}}(inwin, styles[current\_style]);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}}(inwin);}
\DoxyCodeLine{}
\DoxyCodeLine{   current\_style = (current\_style + 1) \% 3;}
\DoxyCodeLine{}
\DoxyCodeLine{   o = \mbox{\hyperlink{group__Elm__Box__Group_ga3d0998b60ada633bacfa8869a921cfd7}{elm\_box\_add}}(parent);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga2af897b00f32bebf08705929276386f5}{evas\_object\_size\_hint\_weight\_set}}(o, \mbox{\hyperlink{Evas__Common_8h_aa47c85083d3dae0111c21ec49359306a}{EVAS\_HINT\_EXPAND}}, \mbox{\hyperlink{Evas__Common_8h_aa47c85083d3dae0111c21ec49359306a}{EVAS\_HINT\_EXPAND}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga44b67b368e5cda723129c2852bd81ead}{evas\_object\_size\_hint\_align\_set}}(o, \mbox{\hyperlink{Evas__Common_8h_aecbac710f36d52911fc34dcdaf8e729c}{EVAS\_HINT\_FILL}}, \mbox{\hyperlink{Evas__Common_8h_aecbac710f36d52911fc34dcdaf8e729c}{EVAS\_HINT\_FILL}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Inwin__Group_gaeb4bd299e4d9b4dc040ac29e1b1d6b1e}{elm\_win\_inwin\_content\_set}}(inwin, o);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}}(o);}
\DoxyCodeLine{}
\DoxyCodeLine{   o = \mbox{\hyperlink{group__Elm__Label__Group_ga01e161a300e3ee6f7a13a44505724e03}{elm\_label\_add}}(parent);}
\DoxyCodeLine{   elm\_object\_text\_set(o, \textcolor{stringliteral}{"{}Click on the first button to hide the Inwin.<ps>"{}}}
\DoxyCodeLine{                       \textcolor{stringliteral}{"{}Second to destroy it<ps>"{}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}}(o);}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Box__Group_ga66a10dd861578521af2ab7b8c2ca65c5}{elm\_box\_pack\_end}}(\mbox{\hyperlink{group__Elm__Inwin__Group_gadb45fb65aa0b076116e02d0e2b34346c}{elm\_win\_inwin\_content\_get}}(inwin), o);}
\DoxyCodeLine{}
\DoxyCodeLine{   o = \mbox{\hyperlink{group__Elm__Button_ga0021b9d86d822367035843ed18bc6ea9}{elm\_button\_add}}(parent);}
\DoxyCodeLine{   elm\_object\_text\_set(o, \textcolor{stringliteral}{"{}Hide"{}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}}(o);}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Smart__Object__Group_ga18a8b179f94d21b2b09e19db11741061}{evas\_object\_smart\_callback\_add}}(o, \textcolor{stringliteral}{"{}clicked"{}}, \_inwin\_hide, NULL);}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Box__Group_ga66a10dd861578521af2ab7b8c2ca65c5}{elm\_box\_pack\_end}}(\mbox{\hyperlink{group__Elm__Inwin__Group_gadb45fb65aa0b076116e02d0e2b34346c}{elm\_win\_inwin\_content\_get}}(inwin), o);}
\DoxyCodeLine{}
\DoxyCodeLine{   o = \mbox{\hyperlink{group__Elm__Button_ga0021b9d86d822367035843ed18bc6ea9}{elm\_button\_add}}(parent);}
\DoxyCodeLine{   elm\_object\_text\_set(o, \textcolor{stringliteral}{"{}Destroy"{}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}}(o);}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Smart__Object__Group_ga18a8b179f94d21b2b09e19db11741061}{evas\_object\_smart\_callback\_add}}(o, \textcolor{stringliteral}{"{}clicked"{}}, \_inwin\_destroy, NULL);}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Box__Group_ga66a10dd861578521af2ab7b8c2ca65c5}{elm\_box\_pack\_end}}(\mbox{\hyperlink{group__Elm__Inwin__Group_gadb45fb65aa0b076116e02d0e2b34346c}{elm\_win\_inwin\_content\_get}}(inwin), o);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_win\_del\_cb(\textcolor{keywordtype}{void} *data \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}}, \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}} *obj, \textcolor{keywordtype}{void} *event \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (inwin)}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}} *hover, *o = \mbox{\hyperlink{group__Elm__Inwin__Group_ga4df7cab00fe961526b4558e26f25faeb}{elm\_win\_inwin\_content\_unset}}(inwin);}
\DoxyCodeLine{        \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga7e7a625dab7a3890532aa13b43117076}{evas\_object\_del}}(inwin);}
\DoxyCodeLine{        inwin = NULL;}
\DoxyCodeLine{        hover = \mbox{\hyperlink{group__Elm__Hover_ga89c2eecb8d6e8ff12f70c2f3c74212f3}{elm\_hover\_add}}(obj);}
\DoxyCodeLine{        elm\_hover\_target\_set(hover, obj);}
\DoxyCodeLine{        \mbox{\hyperlink{group__Elm__General_ga0531ec8867c72def7c780601764ca642}{elm\_object\_part\_content\_set}}(hover, \textcolor{stringliteral}{"{}middle"{}}, o);}
\DoxyCodeLine{        \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}}(hover);}
\DoxyCodeLine{        \textcolor{keywordflow}{return};}
\DoxyCodeLine{     \}}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga7e7a625dab7a3890532aa13b43117076}{evas\_object\_del}}(obj);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}}
\DoxyCodeLine{\_screenshot\_hack\_cb(\textcolor{keywordtype}{void} *data)}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \_btn\_click\_cb(NULL, data, NULL);}
\DoxyCodeLine{   \textcolor{keywordflow}{return} \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}};}
\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, *box, *o;}
\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__Group_gac75d7752662fab73d6420706ce5be996}{elm\_win\_util\_standard\_add}}(\textcolor{stringliteral}{"{}inwin-\/example"{}}, \textcolor{stringliteral}{"{}Inwin Example"{}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Win__Group_ga9a16a2f8c9fd5b6e9203ed9dcb53ea8b}{elm\_win\_autodel\_set}}(win, \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Smart__Object__Group_ga18a8b179f94d21b2b09e19db11741061}{evas\_object\_smart\_callback\_add}}(win, \textcolor{stringliteral}{"{}delete,request"{}}, \_win\_del\_cb, NULL);}
\DoxyCodeLine{}
\DoxyCodeLine{   box = \mbox{\hyperlink{group__Elm__Box__Group_ga3d0998b60ada633bacfa8869a921cfd7}{elm\_box\_add}}(win);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga2af897b00f32bebf08705929276386f5}{evas\_object\_size\_hint\_weight\_set}}(box, \mbox{\hyperlink{Evas__Common_8h_aa47c85083d3dae0111c21ec49359306a}{EVAS\_HINT\_EXPAND}}, \mbox{\hyperlink{Evas__Common_8h_aa47c85083d3dae0111c21ec49359306a}{EVAS\_HINT\_EXPAND}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Win__Group_ga505d6bd217e5ee01e82b548ec35986eb}{elm\_win\_resize\_object\_add}}(win, box);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}}(box);}
\DoxyCodeLine{}
\DoxyCodeLine{   o = \mbox{\hyperlink{group__Elm__Button_ga0021b9d86d822367035843ed18bc6ea9}{elm\_button\_add}}(win);}
\DoxyCodeLine{   elm\_object\_text\_set(o, \textcolor{stringliteral}{"{}Inwin!"{}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga2af897b00f32bebf08705929276386f5}{evas\_object\_size\_hint\_weight\_set}}(o, \mbox{\hyperlink{Evas__Common_8h_aa47c85083d3dae0111c21ec49359306a}{EVAS\_HINT\_EXPAND}}, \mbox{\hyperlink{Evas__Common_8h_aa47c85083d3dae0111c21ec49359306a}{EVAS\_HINT\_EXPAND}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga44b67b368e5cda723129c2852bd81ead}{evas\_object\_size\_hint\_align\_set}}(o, 0.0, 0.0);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Box__Group_ga66a10dd861578521af2ab7b8c2ca65c5}{elm\_box\_pack\_end}}(box, o);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}}(o);}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Smart__Object__Group_ga18a8b179f94d21b2b09e19db11741061}{evas\_object\_smart\_callback\_add}}(o, \textcolor{stringliteral}{"{}clicked"{}}, \_btn\_click\_cb, NULL);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (\mbox{\hyperlink{group__Eina__String__Group_gae95f831abd514af9e7f537fe4df4d103}{eina\_streq}}(getenv(\textcolor{stringliteral}{"{}ELM\_ENGINE"{}}), \textcolor{stringliteral}{"{}shot"{}}))}
\DoxyCodeLine{     \mbox{\hyperlink{group__Ecore__Timer__Group_ga7b9cb9d24ecebfdbb957436e2e669402}{ecore\_timer\_add}}(0.1, \_screenshot\_hack\_cb, o);}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga21e8604c0e4a93e469bff4bd069e82b5}{evas\_object\_resize}}(win, 400, 400);}
\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}
 