In this example we'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'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();
   elm_shutdown();

   \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't need a virtual keyboard, as you can see on the following image\-:

 
\begin{DoxyImage}
\includegraphics{screenshots/conformant_example_01}
\caption{width=}
\end{DoxyImage}


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

If you don'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{DoxyImage}
\includegraphics{screenshots/conformant_example_02}
\caption{width=}
\end{DoxyImage}


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

So, let'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'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'll set the box as conformant'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} 