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}
elm\_main(\textcolor{keywordtype}{int} argc, \textcolor{keywordtype}{char} **argv)
\{
   Evas\_Object *win, *btn, *bx, *en;

   elm_policy_set(ELM\_POLICY\_QUIT, ELM\_POLICY\_QUIT\_LAST\_WINDOW\_CLOSED);

   win = elm_win_util_standard_add(\textcolor{stringliteral}{"conformant"}, \textcolor{stringliteral}{"Conformant Example"});
   elm\_win\_autodel\_set(win, EINA\_TRUE);

   bx = elm_box_add(win);
   evas\_object\_size\_hint\_weight\_set(bx, EVAS\_HINT\_EXPAND, EVAS\_HINT\_EXPAND);
   elm\_win\_resize\_object\_add(win, bx);
   evas\_object\_show(bx);

   btn = elm_button_add(win);
   elm\_object\_text\_set(btn, \textcolor{stringliteral}{"Test Conformant"});
   evas\_object\_size\_hint\_weight\_set(btn, EVAS\_HINT\_EXPAND, 0);
   evas\_object\_size\_hint\_align\_set(btn, EVAS\_HINT\_FILL, 0);
   elm\_box\_pack\_end(bx, btn);
   evas\_object\_show(btn);

   en = elm_entry_add(win);
   elm\_entry\_scrollable\_set(en, EINA\_TRUE);
   elm\_object\_text\_set(en,
                       \textcolor{stringliteral}{"This is a multi-line entry at the bottom<br>"}
                       \textcolor{stringliteral}{"This can contain more than 1 line of text and be "}
                       \textcolor{stringliteral}{"scrolled around to allow for entering of lots of "}
                       \textcolor{stringliteral}{"content. It is also to test to see that autoscroll "}
                       \textcolor{stringliteral}{"moves to the right part of a larger multi-line "}
                       \textcolor{stringliteral}{"text entry that is inside of a scroller than can be "}
                       \textcolor{stringliteral}{"scrolled around, thus changing the expected position "}
                       \textcolor{stringliteral}{"as well as cursor changes updating auto-scroll when "}
                       \textcolor{stringliteral}{"it is enabled."});

   evas\_object\_size\_hint\_weight\_set(en, EVAS\_HINT\_EXPAND, EVAS\_HINT\_EXPAND);
   evas\_object\_size\_hint\_align\_set(en, EVAS\_HINT\_FILL, EVAS\_HINT\_FILL);
   evas\_object\_show(en);
   elm\_box\_pack\_end(bx, en);

   btn = elm_button_add(win);
   elm\_object\_text\_set(btn, \textcolor{stringliteral}{"Test Conformant"});
   evas\_object\_size\_hint\_weight\_set(btn, EVAS\_HINT\_EXPAND, 0);
   evas\_object\_size\_hint\_align\_set(btn, EVAS\_HINT\_FILL, 0);
   elm\_box\_pack\_end(bx, btn);
   evas\_object\_show(btn);

   evas\_object\_resize(win, 240, 480);
   evas\_object\_show(win);

   elm_run();

   \textcolor{keywordflow}{return} 0;
\}

\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}
   elm\_win\_conformant\_set(win, 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}
   conform = elm_conformant_add(win);
   evas\_object\_size\_hint\_weight\_set(conform, EVAS\_HINT\_EXPAND, EVAS\_HINT\_EXPAND);
   elm\_win\_resize\_object\_add(win, conform);
   evas\_object\_show(conform);

\end{DoxyCodeInclude}


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

\end{DoxyCodeInclude}


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