In this example we\textquotesingle{}ll explain how to create applications to work with illume, considering space required for virtual keyboards, indicator and softkeys.

Illume is a module for Enlightenment that modifies the user interface to work cleanly and nicely on a mobile device. It has support for virtual keyboard, among other nice features.

Let\textquotesingle{}s start creating a very simple window with a vertical box with multi-\/line entry between two buttons. This entry will expand filling all space on window not used by buttons.

 
\begin{DoxyCodeInclude}{0}
\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, *btn, *bx, *en;}
\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_ga23d9d1ffa0a65a1a1dd482d570db1ba0}{elm\_win\_util\_standard\_add}}(\textcolor{stringliteral}{"{}conformant"{}}, \textcolor{stringliteral}{"{}Conformant 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{   bx = \mbox{\hyperlink{group__Elm__Box__Group_ga49ec615c90bf8bead2158d5ffab2e445}{elm\_box\_add}}(win);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga9379629ad8ad2860aa786d838a4a106a}{evas\_object\_size\_hint\_weight\_set}}(bx, \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, bx);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(bx);}
\DoxyCodeLine{}
\DoxyCodeLine{   btn = \mbox{\hyperlink{group__Elm__Button_gaf5caf46d74c4e122a18da323935d25e4}{elm\_button\_add}}(win);}
\DoxyCodeLine{   elm\_object\_text\_set(btn, \textcolor{stringliteral}{"{}Test Conformant"{}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga9379629ad8ad2860aa786d838a4a106a}{evas\_object\_size\_hint\_weight\_set}}(btn, \mbox{\hyperlink{Evas__Common_8h_aa47c85083d3dae0111c21ec49359306a}{EVAS\_HINT\_EXPAND}}, 0);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_gaaf1d3e26e36b316977336066b6f56632}{evas\_object\_size\_hint\_align\_set}}(btn, \mbox{\hyperlink{Evas__Common_8h_aecbac710f36d52911fc34dcdaf8e729c}{EVAS\_HINT\_FILL}}, 0);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Box__Group_ga66a10dd861578521af2ab7b8c2ca65c5}{elm\_box\_pack\_end}}(bx, btn);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(btn);}
\DoxyCodeLine{}
\DoxyCodeLine{   en = \mbox{\hyperlink{group__Elm__Entry__Group_gafb201886fc4ee715d229ad2fddfe2ee7}{elm\_entry\_add}}(win);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Entry__Group_ga5eeb0097491a8a5e9413427ba27199d4}{elm\_entry\_scrollable\_set}}(en, \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}
\DoxyCodeLine{   elm\_object\_text\_set(en,}
\DoxyCodeLine{                       \textcolor{stringliteral}{"{}This is a multi-\/line entry at the bottom<br>"{}}}
\DoxyCodeLine{                       \textcolor{stringliteral}{"{}This can contain more than 1 line of text and be "{}}}
\DoxyCodeLine{                       \textcolor{stringliteral}{"{}scrolled around to allow for entering of lots of "{}}}
\DoxyCodeLine{                       \textcolor{stringliteral}{"{}content. It is also to test to see that autoscroll "{}}}
\DoxyCodeLine{                       \textcolor{stringliteral}{"{}moves to the right part of a larger multi-\/line "{}}}
\DoxyCodeLine{                       \textcolor{stringliteral}{"{}text entry that is inside of a scroller than can be "{}}}
\DoxyCodeLine{                       \textcolor{stringliteral}{"{}scrolled around, thus changing the expected position "{}}}
\DoxyCodeLine{                       \textcolor{stringliteral}{"{}as well as cursor changes updating auto-\/scroll when "{}}}
\DoxyCodeLine{                       \textcolor{stringliteral}{"{}it is enabled."{}});}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga9379629ad8ad2860aa786d838a4a106a}{evas\_object\_size\_hint\_weight\_set}}(en, \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_gaaf1d3e26e36b316977336066b6f56632}{evas\_object\_size\_hint\_align\_set}}(en, \mbox{\hyperlink{Evas__Common_8h_aecbac710f36d52911fc34dcdaf8e729c}{EVAS\_HINT\_FILL}}, \mbox{\hyperlink{Evas__Common_8h_aecbac710f36d52911fc34dcdaf8e729c}{EVAS\_HINT\_FILL}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(en);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Box__Group_ga66a10dd861578521af2ab7b8c2ca65c5}{elm\_box\_pack\_end}}(bx, en);}
\DoxyCodeLine{}
\DoxyCodeLine{   btn = \mbox{\hyperlink{group__Elm__Button_gaf5caf46d74c4e122a18da323935d25e4}{elm\_button\_add}}(win);}
\DoxyCodeLine{   elm\_object\_text\_set(btn, \textcolor{stringliteral}{"{}Test Conformant"{}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga9379629ad8ad2860aa786d838a4a106a}{evas\_object\_size\_hint\_weight\_set}}(btn, \mbox{\hyperlink{Evas__Common_8h_aa47c85083d3dae0111c21ec49359306a}{EVAS\_HINT\_EXPAND}}, 0);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_gaaf1d3e26e36b316977336066b6f56632}{evas\_object\_size\_hint\_align\_set}}(btn, \mbox{\hyperlink{Evas__Common_8h_aecbac710f36d52911fc34dcdaf8e729c}{EVAS\_HINT\_FILL}}, 0);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Box__Group_ga66a10dd861578521af2ab7b8c2ca65c5}{elm\_box\_pack\_end}}(bx, btn);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(btn);}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_gacad94595f83580c18908cb3b69b08d1a}{evas\_object\_resize}}(win, 240, 480);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(win);}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__General_gadf2553f83e6b0b9c7fbe054019a664a1}{elm\_run}}();}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\}}

\end{DoxyCodeInclude}
 For information about how to create windows, boxes, buttons or entries, look for documentation for these widgets.

It will looks fine when you don\textquotesingle{}t need a virtual keyboard, as you can see on the following image\+:

 
\begin{DoxyImageNoCaption}
  \mbox{\includegraphics[width=\textwidth]{screenshots/conformant_example_01}}
\end{DoxyImageNoCaption}


But if you call a virtual keyboard, the window will resize, changing widgets size and position. All the content will shrink.

If you don\textquotesingle{}t want such behaviour, you will need a conformant to account for space taken up by the indicator, virtual keyboard and softkey.

In this case, using the conformant in a proper way, you will have a window like the following\+:

 
\begin{DoxyImageNoCaption}
  \mbox{\includegraphics[width=\textwidth]{screenshots/conformant_example_02}}
\end{DoxyImageNoCaption}


As you can see, it guess the space that will be required by the keyboard, indicator and softkey bars.

So, let\textquotesingle{}s study each step required to transform our initial example on the second one.

First of all, we need to set the window as an illume conformant window\+:  
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Win__Group_ga4ce488efe34399e0a6e9f3f0e4661153}{elm\_win\_conformant\_set}}(win, \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}

\end{DoxyCodeInclude}
 Next, we\textquotesingle{}ll add a conformant widget, and set it to resize with the window, instead of the box. 
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{   conform = \mbox{\hyperlink{group__Elm__Conformant_ga23b343d6c6f69d34586b8b6dd55bb610}{elm\_conformant\_add}}(win);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga9379629ad8ad2860aa786d838a4a106a}{evas\_object\_size\_hint\_weight\_set}}(conform, \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, conform);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(conform);}

\end{DoxyCodeInclude}
 Finally, we\textquotesingle{}ll set the box as conformant\textquotesingle{}s content, just like this\+: 
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{   elm\_object\_content\_set(conform, bx);}

\end{DoxyCodeInclude}
 Compare both examples code\+: \mbox{\hyperlink{conformant_example_01_8c-example}{conformant\+\_\+example\+\_\+01.c}} \mbox{\hyperlink{conformant_example_02_8c-example}{conformant\+\_\+example\+\_\+02.c}} 