This example demonstrates how to connect input method framework and handle preedit and commit string from input method framework.

To input Chinese, Japanese, Korean and other complex languages, the editor should be connected with input method framework.

How to initialize and shutdown ecore imf module \begin{DoxyItemize}
\item \mbox{\hyperlink{group__Ecore__IMF__Lib__Group_gade7d780e03136d2799e6d212d188184a}{ecore\+\_\+imf\+\_\+init()}} should be called to initialize and load immodule. \item \mbox{\hyperlink{group__Ecore__IMF__Lib__Group_ga498318d0ef919461c2a84d68989bfa76}{ecore\+\_\+imf\+\_\+shutdown()}} is used for shutdowning and unloading immodule.\end{DoxyItemize}
How to create input context and register pre-\/edit and commit event handler

Each entry should have each input context to connect with input service framework. Key event is processed by input method engine. The result is notified to application through ECORE\+\_\+\+IMF\+\_\+\+CALLBACK\+\_\+\+PREEDIT\+\_\+\+CHANGED and ECORE\+\_\+\+IMF\+\_\+\+CALLBACK\+\_\+\+COMMIT event.

The full example follows.


\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#include <Ecore.h>}}
\DoxyCodeLine{\textcolor{preprocessor}{\#include <\mbox{\hyperlink{Ecore__Evas_8h}{Ecore\_Evas.h}}>}}
\DoxyCodeLine{\textcolor{preprocessor}{\#include <Ecore\_IMF.h>}}
\DoxyCodeLine{\textcolor{preprocessor}{\#include <Ecore\_IMF\_Evas.h>}}
\DoxyCodeLine{\textcolor{preprocessor}{\#include <Evas.h>}}
\DoxyCodeLine{\textcolor{preprocessor}{\#include <stdio.h>}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#define WIDTH 480}}
\DoxyCodeLine{\textcolor{preprocessor}{\#define HEIGHT 800}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{typedef} \textcolor{keyword}{struct }\_Entry Entry;}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{struct }\_Entry}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}}           *rect;}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}}           *txt\_obj;}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Textblock__Group_ga0936b029caf5493691f7fd523f8b885c}{Evas\_Textblock\_Style}}  *txt\_style;}
\DoxyCodeLine{   \mbox{\hyperlink{struct__Efl__Text__Cursor__Handle}{Evas\_Textblock\_Cursor}} *cursor;}
\DoxyCodeLine{   \mbox{\hyperlink{struct__Efl__Text__Cursor__Handle}{Evas\_Textblock\_Cursor}} *preedit\_start;}
\DoxyCodeLine{   \mbox{\hyperlink{struct__Efl__Text__Cursor__Handle}{Evas\_Textblock\_Cursor}} *preedit\_end;}
\DoxyCodeLine{   \mbox{\hyperlink{group__Ecore__IMF__Context__Group_gab990e052e8501815371d7289dfd4a017}{Ecore\_IMF\_Context}}     *imf\_context;}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}              have\_preedit : 1;}
\DoxyCodeLine{\};}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void} \_imf\_cursor\_info\_set(Entry *en);}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\mbox{\hyperlink{group__Elm__Gesture__Layer_gac99bfa54a39fbdd3e6ef1ed06abca820}{\_mouse\_down\_cb}}(\textcolor{keywordtype}{void} *data, \mbox{\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}} *e \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}}, \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}} *o \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}}, \textcolor{keywordtype}{void} *event\_info)}
\DoxyCodeLine{\{}
\DoxyCodeLine{   Entry *en = data;}
\DoxyCodeLine{   \mbox{\hyperlink{struct__Evas__Event__Mouse__Down}{Evas\_Event\_Mouse\_Down}} *ev = event\_info;}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (!en) \textcolor{keywordflow}{return};}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (en-\/>imf\_context)}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \mbox{\hyperlink{struct__Ecore__IMF__Event__Mouse__Down}{Ecore\_IMF\_Event\_Mouse\_Down}} ecore\_ev;}
\DoxyCodeLine{        \mbox{\hyperlink{group__Ecore__IMF__Evas__Group_gae2f41c890f7e9630197bf32a8278f9a0}{ecore\_imf\_evas\_event\_mouse\_down\_wrap}}(ev, \&ecore\_ev);}
\DoxyCodeLine{        \textcolor{keywordflow}{if} (\mbox{\hyperlink{group__Ecore__IMF__Context__Group_gacf389a792142af2dc14f660c70cde7ec}{ecore\_imf\_context\_filter\_event}}(en-\/>imf\_context,}
\DoxyCodeLine{                                           \mbox{\hyperlink{group__Ecore__IMF__Context__Group_gga9dcc60537ec7b124a90da72daba4f780ab7204eadb553c0444df98bab6579b0da}{ECORE\_IMF\_EVENT\_MOUSE\_DOWN}},}
\DoxyCodeLine{                                           (\mbox{\hyperlink{union__Ecore__IMF__Event}{Ecore\_IMF\_Event}} *)\&ecore\_ev))}
\DoxyCodeLine{          \textcolor{keywordflow}{return};}
\DoxyCodeLine{}
\DoxyCodeLine{        \textcolor{comment}{// ecore\_imf\_context\_reset should be called before calculating new cursor position}}
\DoxyCodeLine{        \mbox{\hyperlink{group__Ecore__IMF__Context__Group_ga853f78bd8ab1bcedbc56c32bbc2af9aa}{ecore\_imf\_context\_reset}}(en-\/>imf\_context);}
\DoxyCodeLine{     \}}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{// calculate new cursor position}}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_mouse\_up\_cb(\textcolor{keywordtype}{void} *data, \mbox{\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}} *e \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}}, \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}} *o \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}}, \textcolor{keywordtype}{void} *event\_info)}
\DoxyCodeLine{\{}
\DoxyCodeLine{   Entry *en = data;}
\DoxyCodeLine{   \mbox{\hyperlink{struct__Evas__Event__Mouse__Up}{Evas\_Event\_Mouse\_Up}} *ev = event\_info;}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (!en) \textcolor{keywordflow}{return};}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (ev-\/>event\_flags \& \mbox{\hyperlink{Evas__Common_8h_a89ffbc5f4d2796994c8b07ef95ef3d1aa2370cbd360270536042b7cfd8c7fcd83}{EVAS\_EVENT\_FLAG\_ON\_HOLD}})}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \_imf\_cursor\_info\_set(en);}
\DoxyCodeLine{        \textcolor{keywordflow}{return};}
\DoxyCodeLine{     \}}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (en-\/>imf\_context)}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \mbox{\hyperlink{struct__Ecore__IMF__Event__Mouse__Up}{Ecore\_IMF\_Event\_Mouse\_Up}} ecore\_ev;}
\DoxyCodeLine{        \mbox{\hyperlink{group__Ecore__IMF__Evas__Group_gaf20488b6add20938213d8c762e258a04}{ecore\_imf\_evas\_event\_mouse\_up\_wrap}}(ev, \&ecore\_ev);}
\DoxyCodeLine{        \textcolor{keywordflow}{if} (\mbox{\hyperlink{group__Ecore__IMF__Context__Group_gacf389a792142af2dc14f660c70cde7ec}{ecore\_imf\_context\_filter\_event}}(en-\/>imf\_context,}
\DoxyCodeLine{                                           \mbox{\hyperlink{group__Ecore__IMF__Context__Group_gga9dcc60537ec7b124a90da72daba4f780a39ecdd38e486c3f62a852587cf81b0bf}{ECORE\_IMF\_EVENT\_MOUSE\_UP}},}
\DoxyCodeLine{                                           (\mbox{\hyperlink{union__Ecore__IMF__Event}{Ecore\_IMF\_Event}} *)\&ecore\_ev))}
\DoxyCodeLine{          \textcolor{keywordflow}{return};}
\DoxyCodeLine{     \}}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (en-\/>rect)}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \textcolor{keywordflow}{if} (\mbox{\hyperlink{group__Evas__Object__Group_ga797d900504cf98d5f3c711b17ab5eaba}{evas\_object\_focus\_get}}(en-\/>rect))}
\DoxyCodeLine{          \{}
\DoxyCodeLine{             \textcolor{comment}{// notify cursor information}}
\DoxyCodeLine{             \_imf\_cursor\_info\_set(en);}
\DoxyCodeLine{          \}}
\DoxyCodeLine{        \textcolor{keywordflow}{else}}
\DoxyCodeLine{          \mbox{\hyperlink{group__Evas__Object__Group_ga4405e118e1fb762987af1269b6848db5}{evas\_object\_focus\_set}}(en-\/>rect, \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}
\DoxyCodeLine{     \}}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_entry\_focus\_in\_cb(\textcolor{keywordtype}{void} *data, \mbox{\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}} *e \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}}, \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}} *o \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}}, \textcolor{keywordtype}{void} *event\_info \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{   Entry *en = data;}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (!en) \textcolor{keywordflow}{return};}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (en-\/>imf\_context)}
\DoxyCodeLine{     \mbox{\hyperlink{group__Ecore__IMF__Context__Group_ga339824577964ce0f221cae1f4b43755d}{ecore\_imf\_context\_focus\_in}}(en-\/>imf\_context);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{// notify the cursor information}}
\DoxyCodeLine{   \_imf\_cursor\_info\_set(en);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_entry\_focus\_out\_cb(\textcolor{keywordtype}{void} *data, \mbox{\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}} *e \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}}, \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}} *o \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}}, \textcolor{keywordtype}{void} *event\_info \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{   Entry *en = data;}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (!en) \textcolor{keywordflow}{return};}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (en-\/>imf\_context)}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \textcolor{comment}{// ecore\_imf\_context\_reset should be called for flushing the preedit string in focus-\/out event handler}}
\DoxyCodeLine{        \mbox{\hyperlink{group__Ecore__IMF__Context__Group_ga853f78bd8ab1bcedbc56c32bbc2af9aa}{ecore\_imf\_context\_reset}}(en-\/>imf\_context);}
\DoxyCodeLine{        \mbox{\hyperlink{group__Ecore__IMF__Context__Group_gafee39309634c1663f7b8ea910c75bcbd}{ecore\_imf\_context\_focus\_out}}(en-\/>imf\_context);}
\DoxyCodeLine{     \}}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_canvas\_focus\_in\_cb(\textcolor{keywordtype}{void} *data \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}}, \mbox{\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}} *e, \textcolor{keywordtype}{void} *event\_info \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{   Entry *en;}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}} *obj = \mbox{\hyperlink{group__Evas__Canvas_gabeeab2a18e586a4195d85b6a0c50413a}{evas\_focus\_get}}(e);}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (!obj) \textcolor{keywordflow}{return};}
\DoxyCodeLine{}
\DoxyCodeLine{   en = \mbox{\hyperlink{group__Evas__Object__Group__Extras_gafbad43015793eda4ae50202c0ce0e652}{evas\_object\_data\_get}}(obj, \textcolor{stringliteral}{"{}Entry"{}});}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (en)}
\DoxyCodeLine{     \_entry\_focus\_in\_cb(en, NULL, NULL, NULL);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_canvas\_focus\_out\_cb(\textcolor{keywordtype}{void} *data \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}}, \mbox{\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}} *e, \textcolor{keywordtype}{void} *event\_info \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{   Entry *en;}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}} *obj = \mbox{\hyperlink{group__Evas__Canvas_gabeeab2a18e586a4195d85b6a0c50413a}{evas\_focus\_get}}(e);}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (!obj) \textcolor{keywordflow}{return};}
\DoxyCodeLine{}
\DoxyCodeLine{   en = \mbox{\hyperlink{group__Evas__Object__Group__Extras_gafbad43015793eda4ae50202c0ce0e652}{evas\_object\_data\_get}}(obj, \textcolor{stringliteral}{"{}Entry"{}});}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (en)}
\DoxyCodeLine{     \_entry\_focus\_out\_cb(en, NULL, NULL, NULL);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_imf\_cursor\_info\_set(Entry *en)}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \mbox{\hyperlink{Evas__Common_8h_a2453e92182bad3b0e0d84e5aff433b07}{Evas\_Coord}} x, y, w, h;}
\DoxyCodeLine{   \mbox{\hyperlink{Evas__Common_8h_a2453e92182bad3b0e0d84e5aff433b07}{Evas\_Coord}} cx, cy, cw, ch; \textcolor{comment}{// cursor geometry}}
\DoxyCodeLine{   \textcolor{keywordtype}{int} cursor\_pos; \textcolor{comment}{// cursor position in chars (Not bytes)}}
\DoxyCodeLine{   Evas\_BiDi\_Direction dir;}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (!en) \textcolor{keywordflow}{return};}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{// get cursor geometry}}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (en-\/>txt\_obj)}
\DoxyCodeLine{     \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga6f52fab1a96dc58c85ee481d84bac871}{evas\_object\_geometry\_get}}(en-\/>txt\_obj, \&x, \&y, \&w, \&h);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (en-\/>cursor \&\& en-\/>imf\_context)}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \mbox{\hyperlink{group__Evas__Object__Textblock__Group_gad25d397f7c5b988300cff3ae21748c9a}{evas\_textblock\_cursor\_geometry\_get}}(en-\/>cursor, \&cx, \&cy, \&cw, \&ch, \&dir, \mbox{\hyperlink{group__Evas__Object__Textblock__Group_ggaba40faa1b6a6dcd55193db1e3ca31476a12f34cc9432856994ebbb113c78b59f7}{EVAS\_TEXTBLOCK\_CURSOR\_BEFORE}});}
\DoxyCodeLine{}
\DoxyCodeLine{        \textcolor{comment}{// get cursor position}}
\DoxyCodeLine{        cursor\_pos = \mbox{\hyperlink{group__Evas__Object__Textblock__Group_ga26f34e45c5694208a640d1edbe1645c7}{evas\_textblock\_cursor\_pos\_get}}(en-\/>cursor);}
\DoxyCodeLine{}
\DoxyCodeLine{        \mbox{\hyperlink{group__Ecore__IMF__Context__Group_gaf66f299c16e705570b296d6f85670177}{ecore\_imf\_context\_cursor\_position\_set}}(en-\/>imf\_context, cursor\_pos);}
\DoxyCodeLine{        \mbox{\hyperlink{group__Ecore__IMF__Context__Group_ga8272537bac2b469bfb50bb39397c3a3f}{ecore\_imf\_context\_cursor\_location\_set}}(en-\/>imf\_context, x + cx, y + cy, cw, ch);}
\DoxyCodeLine{        \mbox{\hyperlink{group__Ecore__IMF__Context__Group_gae43b38407a28322748a44de22a122abd}{ecore\_imf\_context\_bidi\_direction\_set}}(en-\/>imf\_context, (\mbox{\hyperlink{group__Ecore__IMF__Context__Group_gab5bba399a46704b755971577b0e462d3}{Ecore\_IMF\_BiDi\_Direction}})dir);}
\DoxyCodeLine{     \}}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_preedit\_del(Entry *en)}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (!en || !en-\/>have\_preedit) \textcolor{keywordflow}{return};}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (!en-\/>preedit\_start || !en-\/>preedit\_end) \textcolor{keywordflow}{return};}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (!\mbox{\hyperlink{group__Evas__Object__Textblock__Group_gacc51709ebde1d12e3fc43d1235048791}{evas\_textblock\_cursor\_compare}}(en-\/>preedit\_start, en-\/>preedit\_end)) \textcolor{keywordflow}{return};}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{// delete the preedit characters}}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Textblock__Group_gad863c689181a25bbfd6cdc24f5452585}{evas\_textblock\_cursor\_range\_delete}}(en-\/>preedit\_start, en-\/>preedit\_end);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_preedit\_clear(Entry *en)}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (en-\/>preedit\_start)}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \mbox{\hyperlink{group__Evas__Object__Textblock__Group_ga601d0627d1eeddf9a0309ee9b8ccbdf8}{evas\_textblock\_cursor\_free}}(en-\/>preedit\_start);}
\DoxyCodeLine{        en-\/>preedit\_start = NULL;}
\DoxyCodeLine{     \}}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (en-\/>preedit\_end)}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \mbox{\hyperlink{group__Evas__Object__Textblock__Group_ga601d0627d1eeddf9a0309ee9b8ccbdf8}{evas\_textblock\_cursor\_free}}(en-\/>preedit\_end);}
\DoxyCodeLine{        en-\/>preedit\_end = NULL;}
\DoxyCodeLine{     \}}
\DoxyCodeLine{}
\DoxyCodeLine{   en-\/>have\_preedit = \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}};}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}}
\DoxyCodeLine{\_ecore\_imf\_retrieve\_surrounding\_cb(\textcolor{keywordtype}{void} *data, \mbox{\hyperlink{group__Ecore__IMF__Context__Group_gab990e052e8501815371d7289dfd4a017}{Ecore\_IMF\_Context}} *ctx \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}}, \textcolor{keywordtype}{char} **text, \textcolor{keywordtype}{int} *cursor\_pos)}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \textcolor{comment}{// This callback will be called when the Input Method Context module requests the surrounding context.}}
\DoxyCodeLine{   Entry *en = data;}
\DoxyCodeLine{   \textcolor{keyword}{const} \textcolor{keywordtype}{char} *str;}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (!en) \textcolor{keywordflow}{return} \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}};}
\DoxyCodeLine{}
\DoxyCodeLine{   str = \mbox{\hyperlink{group__Evas__Object__Textblock__Group_ga958d72110ffb13d78e63a4ca9981412c}{evas\_object\_textblock\_text\_markup\_get}}(en-\/>txt\_obj);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (text)}
\DoxyCodeLine{     *text = str ? strdup(str) : strdup(\textcolor{stringliteral}{"{}"{}});}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{// get the current position of cursor}}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (cursor\_pos \&\& en-\/>cursor)}
\DoxyCodeLine{     *cursor\_pos = \mbox{\hyperlink{group__Evas__Object__Textblock__Group_ga26f34e45c5694208a640d1edbe1645c7}{evas\_textblock\_cursor\_pos\_get}}(en-\/>cursor);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{return} \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}};}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_ecore\_imf\_event\_delete\_surrounding\_cb(\textcolor{keywordtype}{void} *data, \mbox{\hyperlink{group__Ecore__IMF__Context__Group_gab990e052e8501815371d7289dfd4a017}{Ecore\_IMF\_Context}} *ctx \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}}, \textcolor{keywordtype}{void} *event\_info)}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \textcolor{comment}{// called when the input method needs to delete all or part of the context surrounding the cursor}}
\DoxyCodeLine{   Entry *en = data;}
\DoxyCodeLine{   \mbox{\hyperlink{struct__Ecore__IMF__Event__Delete__Surrounding}{Ecore\_IMF\_Event\_Delete\_Surrounding}} *ev = event\_info;}
\DoxyCodeLine{   \mbox{\hyperlink{struct__Efl__Text__Cursor__Handle}{Evas\_Textblock\_Cursor}} *del\_start, *del\_end;}
\DoxyCodeLine{   \textcolor{keywordtype}{int} cursor\_pos;}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} ((!en) || (!ev) || (!en-\/>cursor)) \textcolor{keywordflow}{return};}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{// get the current cursor position}}
\DoxyCodeLine{   cursor\_pos = \mbox{\hyperlink{group__Evas__Object__Textblock__Group_ga26f34e45c5694208a640d1edbe1645c7}{evas\_textblock\_cursor\_pos\_get}}(en-\/>cursor);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{// start cursor position to be deleted}}
\DoxyCodeLine{   del\_start = \mbox{\hyperlink{group__Evas__Object__Textblock__Group_ga3689177b714bfd62242826525fcc0def}{evas\_object\_textblock\_cursor\_new}}(en-\/>txt\_obj);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Textblock__Group_gaa2be92d419712069399b4dfacada0125}{evas\_textblock\_cursor\_pos\_set}}(del\_start, cursor\_pos + ev-\/>offset);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{// end cursor position to be deleted}}
\DoxyCodeLine{   del\_end = \mbox{\hyperlink{group__Evas__Object__Textblock__Group_ga3689177b714bfd62242826525fcc0def}{evas\_object\_textblock\_cursor\_new}}(en-\/>txt\_obj);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Textblock__Group_gaa2be92d419712069399b4dfacada0125}{evas\_textblock\_cursor\_pos\_set}}(del\_end, cursor\_pos + ev-\/>offset + ev-\/>n\_chars);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{// implement function to delete character(s) from 'cursor\_pos+ev-\/>offset' cursor position to 'cursor\_pos + ev-\/>offset + ev-\/>n\_chars'}}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Textblock__Group_gad863c689181a25bbfd6cdc24f5452585}{evas\_textblock\_cursor\_range\_delete}}(del\_start, del\_end);}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Textblock__Group_ga601d0627d1eeddf9a0309ee9b8ccbdf8}{evas\_textblock\_cursor\_free}}(del\_start);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Textblock__Group_ga601d0627d1eeddf9a0309ee9b8ccbdf8}{evas\_textblock\_cursor\_free}}(del\_end);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_ecore\_imf\_event\_commit\_cb(\textcolor{keywordtype}{void} *data, \mbox{\hyperlink{group__Ecore__IMF__Context__Group_gab990e052e8501815371d7289dfd4a017}{Ecore\_IMF\_Context}} *ctx \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}}, \textcolor{keywordtype}{void} *event\_info)}
\DoxyCodeLine{\{}
\DoxyCodeLine{   Entry *en = data;}
\DoxyCodeLine{   \textcolor{keywordtype}{char} *commit\_str = (\textcolor{keywordtype}{char} *)event\_info;}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (!en) \textcolor{keywordflow}{return};}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{// delete preedit string}}
\DoxyCodeLine{   \_preedit\_del(en);}
\DoxyCodeLine{   \_preedit\_clear(en);}
\DoxyCodeLine{}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"{}commit string : \%s\(\backslash\)n"{}}, commit\_str);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{// insert the commit string in the editor}}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (en-\/>cursor \&\& commit\_str)}
\DoxyCodeLine{     \mbox{\hyperlink{group__Evas__Object__Textblock__Group_gaa97aaef2ad0653782c7ad1ca30bcb3cb}{evas\_object\_textblock\_text\_markup\_prepend}}(en-\/>cursor, commit\_str);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{// notify the cursor information}}
\DoxyCodeLine{   \_imf\_cursor\_info\_set(en);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{return};}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_ecore\_imf\_event\_preedit\_changed\_cb(\textcolor{keywordtype}{void} *data, \mbox{\hyperlink{group__Ecore__IMF__Context__Group_gab990e052e8501815371d7289dfd4a017}{Ecore\_IMF\_Context}} *ctx, \textcolor{keywordtype}{void} *event\_info \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \textcolor{comment}{// example how to get preedit string}}
\DoxyCodeLine{   Entry *en = data;}
\DoxyCodeLine{   \textcolor{keywordtype}{char} *preedit\_string;}
\DoxyCodeLine{   \textcolor{keywordtype}{int} cursor\_pos;}
\DoxyCodeLine{   \mbox{\hyperlink{struct__Eina__List}{Eina\_List}} *attrs = NULL;}
\DoxyCodeLine{   \mbox{\hyperlink{struct__Eina__List}{Eina\_List}} *l;}
\DoxyCodeLine{   \mbox{\hyperlink{struct__Ecore__IMF__Preedit__Attr}{Ecore\_IMF\_Preedit\_Attr}} *attr;}
\DoxyCodeLine{   \mbox{\hyperlink{group__Ecore__IMF__Context__Group_gab990e052e8501815371d7289dfd4a017}{Ecore\_IMF\_Context}} *imf\_context = ctx;}
\DoxyCodeLine{   \textcolor{keywordtype}{int} preedit\_start\_pos, preedit\_end\_pos;}
\DoxyCodeLine{   \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}} preedit\_end\_state = \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}};}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (!en || !en-\/>cursor) \textcolor{keywordflow}{return};}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{// get preedit string and attributes}}
\DoxyCodeLine{   \mbox{\hyperlink{group__Ecore__IMF__Context__Group_ga5e3fb2324a5f20cb761e19d4fbc9a9a5}{ecore\_imf\_context\_preedit\_string\_with\_attributes\_get}}(imf\_context, \&preedit\_string, \&attrs, \&cursor\_pos);}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"{}preedit string : \%s\(\backslash\)n"{}}, preedit\_string);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (!strcmp(preedit\_string, \textcolor{stringliteral}{"{}"{}}))}
\DoxyCodeLine{     preedit\_end\_state = \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}};}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{// delete preedit}}
\DoxyCodeLine{   \_preedit\_del(en);}
\DoxyCodeLine{}
\DoxyCodeLine{   preedit\_start\_pos = \mbox{\hyperlink{group__Evas__Object__Textblock__Group_ga26f34e45c5694208a640d1edbe1645c7}{evas\_textblock\_cursor\_pos\_get}}(en-\/>cursor);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{// insert preedit character(s)}}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (strlen(preedit\_string) > 0)}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \textcolor{keywordflow}{if} (attrs)}
\DoxyCodeLine{          \{}
\DoxyCodeLine{             \mbox{\hyperlink{group__Eina__List__Group_gac6efafc19f526d916cdb9757240a8773}{EINA\_LIST\_FOREACH}}(attrs, l, attr)}
\DoxyCodeLine{               \{}
\DoxyCodeLine{                  \textcolor{keywordflow}{if} (attr-\/>\mbox{\hyperlink{struct__Ecore__IMF__Preedit__Attr_ab43d4e86ad2d2fcc5bdc7b534ec2e933}{preedit\_type}} == \mbox{\hyperlink{group__Ecore__IMF__Context__Group_ggacd213f9a030646e4f50072426443849aa2c9d33fd5683078e23148cd923915ef6}{ECORE\_IMF\_PREEDIT\_TYPE\_SUB1}}) \textcolor{comment}{// style type}}
\DoxyCodeLine{                    \{}
\DoxyCodeLine{                       \textcolor{comment}{// apply appropriate style such as underline}}
\DoxyCodeLine{                    \}}
\DoxyCodeLine{                  \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (attr-\/>\mbox{\hyperlink{struct__Ecore__IMF__Preedit__Attr_ab43d4e86ad2d2fcc5bdc7b534ec2e933}{preedit\_type}} == \mbox{\hyperlink{group__Ecore__IMF__Context__Group_ggacd213f9a030646e4f50072426443849aa68ce0b7eb48488808a57096bd28e8723}{ECORE\_IMF\_PREEDIT\_TYPE\_SUB2}} || attr-\/>\mbox{\hyperlink{struct__Ecore__IMF__Preedit__Attr_ab43d4e86ad2d2fcc5bdc7b534ec2e933}{preedit\_type}} == \mbox{\hyperlink{group__Ecore__IMF__Context__Group_ggacd213f9a030646e4f50072426443849aaa95fced9f4039f6c3c8d340754d451f2}{ECORE\_IMF\_PREEDIT\_TYPE\_SUB3}})}
\DoxyCodeLine{                    \{}
\DoxyCodeLine{                       \textcolor{comment}{// apply appropriate style such as underline}}
\DoxyCodeLine{                    \}}
\DoxyCodeLine{               \}}
\DoxyCodeLine{}
\DoxyCodeLine{             \textcolor{comment}{// insert code to display preedit string in your editor}}
\DoxyCodeLine{             \mbox{\hyperlink{group__Evas__Object__Textblock__Group_gaa97aaef2ad0653782c7ad1ca30bcb3cb}{evas\_object\_textblock\_text\_markup\_prepend}}(en-\/>cursor, preedit\_string);}
\DoxyCodeLine{          \}}
\DoxyCodeLine{     \}}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (!preedit\_end\_state)}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \textcolor{comment}{// set preedit start cursor}}
\DoxyCodeLine{        \textcolor{keywordflow}{if} (!en-\/>preedit\_start)}
\DoxyCodeLine{          en-\/>preedit\_start = \mbox{\hyperlink{group__Evas__Object__Textblock__Group_ga3689177b714bfd62242826525fcc0def}{evas\_object\_textblock\_cursor\_new}}(en-\/>txt\_obj);}
\DoxyCodeLine{        \mbox{\hyperlink{group__Evas__Object__Textblock__Group_ga7fc4731e670d010ac17af02bd88bd9ef}{evas\_textblock\_cursor\_copy}}(en-\/>cursor, en-\/>preedit\_start);}
\DoxyCodeLine{}
\DoxyCodeLine{        \textcolor{comment}{// set preedit end cursor}}
\DoxyCodeLine{        \textcolor{keywordflow}{if} (!en-\/>preedit\_end)}
\DoxyCodeLine{          en-\/>preedit\_end = \mbox{\hyperlink{group__Evas__Object__Textblock__Group_ga3689177b714bfd62242826525fcc0def}{evas\_object\_textblock\_cursor\_new}}(en-\/>txt\_obj);}
\DoxyCodeLine{        \mbox{\hyperlink{group__Evas__Object__Textblock__Group_ga7fc4731e670d010ac17af02bd88bd9ef}{evas\_textblock\_cursor\_copy}}(en-\/>cursor, en-\/>preedit\_end);}
\DoxyCodeLine{}
\DoxyCodeLine{        preedit\_end\_pos = \mbox{\hyperlink{group__Evas__Object__Textblock__Group_ga26f34e45c5694208a640d1edbe1645c7}{evas\_textblock\_cursor\_pos\_get}}(en-\/>cursor);}
\DoxyCodeLine{}
\DoxyCodeLine{        \textcolor{keywordflow}{for} (i = 0; i < (preedit\_end\_pos -\/ preedit\_start\_pos); i++)}
\DoxyCodeLine{          \{}
\DoxyCodeLine{             \mbox{\hyperlink{group__Evas__Object__Textblock__Group_ga02b7a75dc3ca5518acbe795988fa44a9}{evas\_textblock\_cursor\_char\_prev}}(en-\/>preedit\_start);}
\DoxyCodeLine{          \}}
\DoxyCodeLine{}
\DoxyCodeLine{        en-\/>have\_preedit = \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}};}
\DoxyCodeLine{}
\DoxyCodeLine{        \textcolor{comment}{// set cursor position}}
\DoxyCodeLine{        \mbox{\hyperlink{group__Evas__Object__Textblock__Group_gaa2be92d419712069399b4dfacada0125}{evas\_textblock\_cursor\_pos\_set}}(en-\/>cursor, preedit\_start\_pos + cursor\_pos);}
\DoxyCodeLine{     \}}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{// notify the cursor information}}
\DoxyCodeLine{   \_imf\_cursor\_info\_set(en);}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__List__Group_gae27a2c686a0a11693f9b06957c9bba83}{EINA\_LIST\_FREE}}(attrs, attr)}
\DoxyCodeLine{     free(attr);}
\DoxyCodeLine{}
\DoxyCodeLine{   free(preedit\_string);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_key\_down\_cb(\textcolor{keywordtype}{void} *data, \mbox{\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}} *e \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}}, \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}} *o \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}}, \textcolor{keywordtype}{void} *event\_info)}
\DoxyCodeLine{\{}
\DoxyCodeLine{   Entry *en = data;}
\DoxyCodeLine{   \mbox{\hyperlink{struct__Evas__Event__Key__Down}{Evas\_Event\_Key\_Down}} *ev = event\_info;}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}} control, alt, shift;}
\DoxyCodeLine{   \textcolor{keywordflow}{if} ((!en) || (!ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}}) || (!en-\/>cursor)) \textcolor{keywordflow}{return};}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (en-\/>imf\_context)}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \mbox{\hyperlink{struct__Ecore__IMF__Event__Key__Down}{Ecore\_IMF\_Event\_Key\_Down}} ecore\_ev;}
\DoxyCodeLine{        \mbox{\hyperlink{group__Ecore__IMF__Evas__Group_gad6b3b7cbb61105c492be1d816b6bc899}{ecore\_imf\_evas\_event\_key\_down\_wrap}}(ev, \&ecore\_ev);}
\DoxyCodeLine{        \textcolor{keywordflow}{if} (\mbox{\hyperlink{group__Ecore__IMF__Context__Group_gacf389a792142af2dc14f660c70cde7ec}{ecore\_imf\_context\_filter\_event}}(en-\/>imf\_context,}
\DoxyCodeLine{                                           \mbox{\hyperlink{group__Ecore__IMF__Context__Group_gga9dcc60537ec7b124a90da72daba4f780afc7b57a1b56d6310705e8dfdc8a782d6}{ECORE\_IMF\_EVENT\_KEY\_DOWN}},}
\DoxyCodeLine{                                           (\mbox{\hyperlink{union__Ecore__IMF__Event}{Ecore\_IMF\_Event}} *)\&ecore\_ev))}
\DoxyCodeLine{          \textcolor{keywordflow}{return};}
\DoxyCodeLine{     \}}
\DoxyCodeLine{}
\DoxyCodeLine{   control = \mbox{\hyperlink{group__Evas__Keys_ga6cc24a5ea4b39b84c7a3e617de3db261}{evas\_key\_modifier\_is\_set}}(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a065e345f013dc4099eb180ce4833377f}{modifiers}}, \textcolor{stringliteral}{"{}Control"{}});}
\DoxyCodeLine{   alt = \mbox{\hyperlink{group__Evas__Keys_ga6cc24a5ea4b39b84c7a3e617de3db261}{evas\_key\_modifier\_is\_set}}(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a065e345f013dc4099eb180ce4833377f}{modifiers}}, \textcolor{stringliteral}{"{}Alt"{}});}
\DoxyCodeLine{   shift = \mbox{\hyperlink{group__Evas__Keys_ga6cc24a5ea4b39b84c7a3e617de3db261}{evas\_key\_modifier\_is\_set}}(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a065e345f013dc4099eb180ce4833377f}{modifiers}}, \textcolor{stringliteral}{"{}Shift"{}});}
\DoxyCodeLine{   (void)alt;}
\DoxyCodeLine{   (void)shift;}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (!strcmp(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}}, \textcolor{stringliteral}{"{}BackSpace"{}}))}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \textcolor{keywordflow}{if} (\mbox{\hyperlink{group__Evas__Object__Textblock__Group_ga02b7a75dc3ca5518acbe795988fa44a9}{evas\_textblock\_cursor\_char\_prev}}(en-\/>cursor))}
\DoxyCodeLine{          \{}
\DoxyCodeLine{             \mbox{\hyperlink{group__Evas__Object__Textblock__Group_ga89cb7b380acc84797b2ef8cb9ae22b09}{evas\_textblock\_cursor\_char\_delete}}(en-\/>cursor);}
\DoxyCodeLine{             \textcolor{comment}{// notify the cursor information}}
\DoxyCodeLine{             \_imf\_cursor\_info\_set(en);}
\DoxyCodeLine{          \}}
\DoxyCodeLine{         \textcolor{keywordflow}{return};}
\DoxyCodeLine{     \}}
\DoxyCodeLine{   \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (!strcmp(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}}, \textcolor{stringliteral}{"{}Delete"{}}) ||}
\DoxyCodeLine{            (!strcmp(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}}, \textcolor{stringliteral}{"{}KP\_Delete"{}}) \&\& !ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a1b64741ca0b90a5119463f320ebeea00}{string}}))}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \textcolor{comment}{// FILLME}}
\DoxyCodeLine{     \}}
\DoxyCodeLine{   \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((control) \&\& (!strcmp(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}}, \textcolor{stringliteral}{"{}v"{}})))}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \textcolor{comment}{// ctrl + v}}
\DoxyCodeLine{        \textcolor{comment}{// FILLME}}
\DoxyCodeLine{     \}}
\DoxyCodeLine{   \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((control) \&\& (!strcmp(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}}, \textcolor{stringliteral}{"{}a"{}})))}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \textcolor{comment}{// ctrl + a}}
\DoxyCodeLine{        \textcolor{comment}{// FILLME}}
\DoxyCodeLine{     \}}
\DoxyCodeLine{   \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((control) \&\& (!strcmp(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}}, \textcolor{stringliteral}{"{}A"{}})))}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \textcolor{comment}{// ctrl + A}}
\DoxyCodeLine{        \textcolor{comment}{// FILLME}}
\DoxyCodeLine{     \}}
\DoxyCodeLine{   \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((control) \&\& ((!strcmp(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}}, \textcolor{stringliteral}{"{}c"{}}) || (!strcmp(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}}, \textcolor{stringliteral}{"{}Insert"{}})))))}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \textcolor{comment}{// ctrl + c}}
\DoxyCodeLine{        \textcolor{comment}{// FILLME}}
\DoxyCodeLine{     \}}
\DoxyCodeLine{   \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((control) \&\& ((!strcmp(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}}, \textcolor{stringliteral}{"{}x"{}}) || (!strcmp(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}}, \textcolor{stringliteral}{"{}m"{}})))))}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \textcolor{comment}{// ctrl + x}}
\DoxyCodeLine{        \textcolor{comment}{// FILLME}}
\DoxyCodeLine{     \}}
\DoxyCodeLine{   \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((control) \&\& (!strcmp(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}}, \textcolor{stringliteral}{"{}z"{}})))}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \textcolor{comment}{// ctrl + z (undo)}}
\DoxyCodeLine{        \textcolor{comment}{// FILLME}}
\DoxyCodeLine{     \}}
\DoxyCodeLine{   \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((control) \&\& (!strcmp(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}}, \textcolor{stringliteral}{"{}y"{}})))}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \textcolor{comment}{// ctrl + y (redo)}}
\DoxyCodeLine{        \textcolor{comment}{// FILLME}}
\DoxyCodeLine{     \}}
\DoxyCodeLine{   \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((!strcmp(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}}, \textcolor{stringliteral}{"{}Return"{}})) || (!strcmp(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}}, \textcolor{stringliteral}{"{}KP\_Enter"{}})))}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \textcolor{comment}{// FILLME}}
\DoxyCodeLine{     \}}
\DoxyCodeLine{   \textcolor{keywordflow}{else}}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \textcolor{keywordflow}{if} (ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a1b64741ca0b90a5119463f320ebeea00}{string}})}
\DoxyCodeLine{          \{}
\DoxyCodeLine{             printf(\textcolor{stringliteral}{"{}key down string : \%s\(\backslash\)n"{}}, ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a1b64741ca0b90a5119463f320ebeea00}{string}});}
\DoxyCodeLine{             \mbox{\hyperlink{group__Evas__Object__Textblock__Group_gaa97aaef2ad0653782c7ad1ca30bcb3cb}{evas\_object\_textblock\_text\_markup\_prepend}}(en-\/>cursor, ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a1b64741ca0b90a5119463f320ebeea00}{string}});}
\DoxyCodeLine{          \}}
\DoxyCodeLine{     \}}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{// notify the cursor information}}
\DoxyCodeLine{   \_imf\_cursor\_info\_set(en);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_key\_up\_cb(\textcolor{keywordtype}{void} *data, \mbox{\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}} *e \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}}, \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}} *o \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}}, \textcolor{keywordtype}{void} *event\_info)}
\DoxyCodeLine{\{}
\DoxyCodeLine{   Entry *en = data;}
\DoxyCodeLine{   \mbox{\hyperlink{struct__Evas__Event__Key__Up}{Evas\_Event\_Key\_Up}} *ev = event\_info;}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (!en) \textcolor{keywordflow}{return};}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (en-\/>imf\_context)}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \mbox{\hyperlink{struct__Ecore__IMF__Event__Key__Up}{Ecore\_IMF\_Event\_Key\_Up}} ecore\_ev;}
\DoxyCodeLine{}
\DoxyCodeLine{        \mbox{\hyperlink{group__Ecore__IMF__Evas__Group_ga780bcd9093b281d92da4428cd721d239}{ecore\_imf\_evas\_event\_key\_up\_wrap}}(ev, \&ecore\_ev);}
\DoxyCodeLine{        \textcolor{keywordflow}{if} (\mbox{\hyperlink{group__Ecore__IMF__Context__Group_gacf389a792142af2dc14f660c70cde7ec}{ecore\_imf\_context\_filter\_event}}(en-\/>imf\_context,}
\DoxyCodeLine{                                           \mbox{\hyperlink{group__Ecore__IMF__Context__Group_gga9dcc60537ec7b124a90da72daba4f780a30b3d7d6b56fccb57ceaedb753eb170b}{ECORE\_IMF\_EVENT\_KEY\_UP}},}
\DoxyCodeLine{                                           (\mbox{\hyperlink{union__Ecore__IMF__Event}{Ecore\_IMF\_Event}} *)\&ecore\_ev))}
\DoxyCodeLine{          \textcolor{keywordflow}{return};}
\DoxyCodeLine{     \}}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{create\_input\_field(\mbox{\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}} *evas, Entry *en, \mbox{\hyperlink{Evas__Common_8h_a2453e92182bad3b0e0d84e5aff433b07}{Evas\_Coord}} x, \mbox{\hyperlink{Evas__Common_8h_a2453e92182bad3b0e0d84e5aff433b07}{Evas\_Coord}} y, \mbox{\hyperlink{Evas__Common_8h_a2453e92182bad3b0e0d84e5aff433b07}{Evas\_Coord}} w, \mbox{\hyperlink{Evas__Common_8h_a2453e92182bad3b0e0d84e5aff433b07}{Evas\_Coord}} h)}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (!en) \textcolor{keywordflow}{return};}
\DoxyCodeLine{}
\DoxyCodeLine{   en-\/>have\_preedit = \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}};}
\DoxyCodeLine{   en-\/>preedit\_start = NULL;}
\DoxyCodeLine{   en-\/>preedit\_end = NULL;}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{// create the background for text input field}}
\DoxyCodeLine{   en-\/>rect = \mbox{\hyperlink{group__Evas__Object__Rectangle_ga4d80fc32ad1cac28428cebd65d746751}{evas\_object\_rectangle\_add}}(evas);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_gae34bdcfd7f5100151f6ea8ef4a392949}{evas\_object\_color\_set}}(en-\/>rect, 150, 150, 150, 255); \textcolor{comment}{// gray color}}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga02da8091bbac768b8e86c7b74b2a94f9}{evas\_object\_move}}(en-\/>rect, x, y);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga21e8604c0e4a93e469bff4bd069e82b5}{evas\_object\_resize}}(en-\/>rect, w, h);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}}(en-\/>rect);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Extras_ga70134a7068c9bff4107a761abe0a2ad4}{evas\_object\_data\_set}}(en-\/>rect, \textcolor{stringliteral}{"{}Entry"{}}, en);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{// create text object for displaying text}}
\DoxyCodeLine{   en-\/>txt\_obj = \mbox{\hyperlink{group__Evas__Object__Textblock__Group_ga5059cda84291080e59bcc72ead81ca93}{evas\_object\_textblock\_add}}(evas);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_gae34bdcfd7f5100151f6ea8ef4a392949}{evas\_object\_color\_set}}(en-\/>txt\_obj, 0, 0, 0, 255);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga8bab997bfe68d4bcdf4ab2b4f4a41674}{evas\_object\_pass\_events\_set}}(en-\/>txt\_obj, \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga02da8091bbac768b8e86c7b74b2a94f9}{evas\_object\_move}}(en-\/>txt\_obj, x, y);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga21e8604c0e4a93e469bff4bd069e82b5}{evas\_object\_resize}}(en-\/>txt\_obj, w, h);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}}(en-\/>txt\_obj);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{// set style on textblock}}
\DoxyCodeLine{   \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *style\_buf =}
\DoxyCodeLine{      \textcolor{stringliteral}{"{}DEFAULT='font=Sans font\_size=30 color=\#000 text\_class=entry'"{}}}
\DoxyCodeLine{      \textcolor{stringliteral}{"{}newline='br'"{}}}
\DoxyCodeLine{      \textcolor{stringliteral}{"{}b='+ font=Sans:style=bold'"{}};}
\DoxyCodeLine{   en-\/>txt\_style = \mbox{\hyperlink{group__Evas__Object__Textblock__Group_ga5047d80b99150342ce3cd5518b474df8}{evas\_textblock\_style\_new}}();}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Textblock__Group_gaf536f7e63f652e36a125006e31cf5457}{evas\_textblock\_style\_set}}(en-\/>txt\_style, style\_buf);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Textblock__Group_ga14c222cd68f4c101dc9e52361c47c35e}{evas\_object\_textblock\_style\_set}}(en-\/>txt\_obj, en-\/>txt\_style);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{// create cursor}}
\DoxyCodeLine{   en-\/>cursor = \mbox{\hyperlink{group__Evas__Object__Textblock__Group_ga3689177b714bfd62242826525fcc0def}{evas\_object\_textblock\_cursor\_new}}(en-\/>txt\_obj);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{// create input context}}
\DoxyCodeLine{   \textcolor{keyword}{const} \textcolor{keywordtype}{char} *default\_id = \mbox{\hyperlink{group__Ecore__IMF__Context__Group_ga0e34ef45fc0ccb7157a8d7cf96b112ca}{ecore\_imf\_context\_default\_id\_get}}();}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (!default\_id)}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        fprintf(stderr, \textcolor{stringliteral}{"{}Can't create ecore\_imf\_context\(\backslash\)n"{}});}
\DoxyCodeLine{        \textcolor{keywordflow}{return};}
\DoxyCodeLine{     \}}
\DoxyCodeLine{}
\DoxyCodeLine{   en-\/>imf\_context = \mbox{\hyperlink{group__Ecore__IMF__Context__Group_gae2b65dd991c760ae7876ee7df637f68f}{ecore\_imf\_context\_add}}(default\_id);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Ecore__IMF__Context__Group_ga96d1d3c9ca63ef47d2e66bd9fae19a8c}{ecore\_imf\_context\_client\_canvas\_set}}(en-\/>imf\_context, evas);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{// register key event handler}}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Events_ga23be30ac5cdfb780f1ff82e9108ec26b}{evas\_object\_event\_callback\_add}}(en-\/>rect, \mbox{\hyperlink{Evas__Common_8h_ad64cde0da38a60e7cb7905b3ab216968a336b86bad4f145f84c155e4922335584}{EVAS\_CALLBACK\_KEY\_DOWN}}, \_key\_down\_cb, en);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Events_ga23be30ac5cdfb780f1ff82e9108ec26b}{evas\_object\_event\_callback\_add}}(en-\/>rect, \mbox{\hyperlink{Evas__Common_8h_ad64cde0da38a60e7cb7905b3ab216968ac436b50ad665089f8a24b0fb827cec5f}{EVAS\_CALLBACK\_KEY\_UP}}, \_key\_up\_cb, en);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{// register mouse event handler}}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Events_ga23be30ac5cdfb780f1ff82e9108ec26b}{evas\_object\_event\_callback\_add}}(en-\/>rect, \mbox{\hyperlink{Evas__Common_8h_ad64cde0da38a60e7cb7905b3ab216968a9fa52651ccf7e47cd3b7785fc4cf393f}{EVAS\_CALLBACK\_MOUSE\_DOWN}}, \mbox{\hyperlink{group__Elm__Gesture__Layer_gac99bfa54a39fbdd3e6ef1ed06abca820}{\_mouse\_down\_cb}}, en);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Events_ga23be30ac5cdfb780f1ff82e9108ec26b}{evas\_object\_event\_callback\_add}}(en-\/>rect, \mbox{\hyperlink{Evas__Common_8h_ad64cde0da38a60e7cb7905b3ab216968a8c1b22c99dd0231cd9ba1fecbffffac7}{EVAS\_CALLBACK\_MOUSE\_UP}}, \_mouse\_up\_cb, en);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{// register focus event handler}}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Events_ga23be30ac5cdfb780f1ff82e9108ec26b}{evas\_object\_event\_callback\_add}}(en-\/>rect, \mbox{\hyperlink{Evas__Common_8h_ad64cde0da38a60e7cb7905b3ab216968a819cf61e9d11012b7402338c2ccb7b97}{EVAS\_CALLBACK\_FOCUS\_IN}}, \_entry\_focus\_in\_cb, en);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Events_ga23be30ac5cdfb780f1ff82e9108ec26b}{evas\_object\_event\_callback\_add}}(en-\/>rect, \mbox{\hyperlink{Evas__Common_8h_ad64cde0da38a60e7cb7905b3ab216968ab26a0af7efaa8b77e996bd438accf8d3}{EVAS\_CALLBACK\_FOCUS\_OUT}}, \_entry\_focus\_out\_cb, en);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{// register retrieve surrounding callback}}
\DoxyCodeLine{   \mbox{\hyperlink{group__Ecore__IMF__Context__Group_gaf4da8dacae69d82559f808645b118df5}{ecore\_imf\_context\_retrieve\_surrounding\_callback\_set}}(en-\/>imf\_context, \_ecore\_imf\_retrieve\_surrounding\_cb, en);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{// register commit event callback}}
\DoxyCodeLine{   \mbox{\hyperlink{group__Ecore__IMF__Context__Group_ga7e0ef28b49fbdc54c4657d88a139d5f5}{ecore\_imf\_context\_event\_callback\_add}}(en-\/>imf\_context, \mbox{\hyperlink{group__Ecore__IMF__Context__Group_gga06aadd645f11ba5c8d00943aa327be5aa9d05d645b3c1edde3b959fee4cd87dec}{ECORE\_IMF\_CALLBACK\_COMMIT}}, \_ecore\_imf\_event\_commit\_cb, en);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{// register preedit changed event handler}}
\DoxyCodeLine{   \mbox{\hyperlink{group__Ecore__IMF__Context__Group_ga7e0ef28b49fbdc54c4657d88a139d5f5}{ecore\_imf\_context\_event\_callback\_add}}(en-\/>imf\_context, \mbox{\hyperlink{group__Ecore__IMF__Context__Group_gga06aadd645f11ba5c8d00943aa327be5aa9e354e49b61f3e67c4210cc85478975e}{ECORE\_IMF\_CALLBACK\_PREEDIT\_CHANGED}}, \_ecore\_imf\_event\_preedit\_changed\_cb, en);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{// register surrounding delete event callback}}
\DoxyCodeLine{   \mbox{\hyperlink{group__Ecore__IMF__Context__Group_ga7e0ef28b49fbdc54c4657d88a139d5f5}{ecore\_imf\_context\_event\_callback\_add}}(en-\/>imf\_context, \mbox{\hyperlink{group__Ecore__IMF__Context__Group_gga06aadd645f11ba5c8d00943aa327be5aa696bc156e7efd93c83128fc2e18bfeba}{ECORE\_IMF\_CALLBACK\_DELETE\_SURROUNDING}}, \_ecore\_imf\_event\_delete\_surrounding\_cb, en);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{delete\_input\_field(Entry *en)}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (!en) \textcolor{keywordflow}{return};}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (en-\/>rect)}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga7e7a625dab7a3890532aa13b43117076}{evas\_object\_del}}(en-\/>rect);}
\DoxyCodeLine{        en-\/>rect = NULL;}
\DoxyCodeLine{     \}}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (en-\/>cursor)}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \mbox{\hyperlink{group__Evas__Object__Textblock__Group_ga601d0627d1eeddf9a0309ee9b8ccbdf8}{evas\_textblock\_cursor\_free}}(en-\/>cursor);}
\DoxyCodeLine{        en-\/>cursor = NULL;}
\DoxyCodeLine{     \}}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (en-\/>preedit\_start)}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \mbox{\hyperlink{group__Evas__Object__Textblock__Group_ga601d0627d1eeddf9a0309ee9b8ccbdf8}{evas\_textblock\_cursor\_free}}(en-\/>preedit\_start);}
\DoxyCodeLine{        en-\/>preedit\_start = NULL;}
\DoxyCodeLine{     \}}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (en-\/>preedit\_end)}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \mbox{\hyperlink{group__Evas__Object__Textblock__Group_ga601d0627d1eeddf9a0309ee9b8ccbdf8}{evas\_textblock\_cursor\_free}}(en-\/>preedit\_end);}
\DoxyCodeLine{        en-\/>preedit\_end = NULL;}
\DoxyCodeLine{     \}}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (en-\/>txt\_obj)}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga7e7a625dab7a3890532aa13b43117076}{evas\_object\_del}}(en-\/>txt\_obj);}
\DoxyCodeLine{        en-\/>txt\_obj = NULL;}
\DoxyCodeLine{     \}}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (en-\/>txt\_style)}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \mbox{\hyperlink{group__Evas__Object__Textblock__Group_gafdc12ce69d5b4ccf1f8434d1555faee1}{evas\_textblock\_style\_free}}(en-\/>txt\_style);}
\DoxyCodeLine{        en-\/>txt\_style = NULL;}
\DoxyCodeLine{     \}}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (en-\/>imf\_context)}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \mbox{\hyperlink{group__Ecore__IMF__Context__Group_gaad34fcaedfc6ed098525d2c8928ec409}{ecore\_imf\_context\_del}}(en-\/>imf\_context);}
\DoxyCodeLine{        en-\/>imf\_context = NULL;}
\DoxyCodeLine{     \}}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keywordtype}{int}}
\DoxyCodeLine{main(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\{}
\DoxyCodeLine{   Ecore\_Evas *ee;}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}} *evas;}
\DoxyCodeLine{   Entry en1, en2;}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (!\mbox{\hyperlink{group__Ecore__Evas__Group_ga32ddbb6457033ad435a177eb0c4fe235}{ecore\_evas\_init}}())}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        fprintf(stderr, \textcolor{stringliteral}{"{}failed to call ecore\_evas\_init()\(\backslash\)n"{}});}
\DoxyCodeLine{        \textcolor{keywordflow}{return} EXIT\_FAILURE;}
\DoxyCodeLine{     \}}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Ecore__IMF__Lib__Group_gade7d780e03136d2799e6d212d188184a}{ecore\_imf\_init}}();}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{// create a new window, with size=WIDTHxHEIGHT and default engine}}
\DoxyCodeLine{   ee = \mbox{\hyperlink{group__Ecore__Evas__Group_gac7f2cdbcb79635c34317c1183dd04cb0}{ecore\_evas\_new}}(NULL, 0, 0, WIDTH, HEIGHT, NULL);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (!ee)}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        fprintf(stderr, \textcolor{stringliteral}{"{}failed to call ecore\_evas\_new\(\backslash\)n"{}});}
\DoxyCodeLine{        \textcolor{keywordflow}{return} EXIT\_FAILURE;}
\DoxyCodeLine{     \}}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Ecore__Evas__Group_ga4953047ff97d4f1b0d75a7d513d4f317}{ecore\_evas\_show}}(ee);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{// get the canvas off just-\/created window}}
\DoxyCodeLine{   evas = \mbox{\hyperlink{group__Ecore__Evas__Group_ga75a7cc694b6069e78df47dab0b0f2d20}{ecore\_evas\_get}}(ee);}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (!evas)}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        fprintf(stderr, \textcolor{stringliteral}{"{}failed to call ecore\_evas\_get\(\backslash\)n"{}});}
\DoxyCodeLine{        \textcolor{keywordflow}{return} EXIT\_FAILURE;}
\DoxyCodeLine{     \}}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{// create input field rectangle}}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}} *bg = \mbox{\hyperlink{group__Evas__Object__Rectangle_ga4d80fc32ad1cac28428cebd65d746751}{evas\_object\_rectangle\_add}}(evas);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga02da8091bbac768b8e86c7b74b2a94f9}{evas\_object\_move}}(bg, 0, 0);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga21e8604c0e4a93e469bff4bd069e82b5}{evas\_object\_resize}}(bg, WIDTH, HEIGHT);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_gae34bdcfd7f5100151f6ea8ef4a392949}{evas\_object\_color\_set}}(bg, 255, 255, 255, 255);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}}(bg);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{// register canvas focus in/out event handler}}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Canvas__Events_gaf236cc76039a654de4df734f8875ba1a}{evas\_event\_callback\_add}}(evas, \mbox{\hyperlink{Evas__Common_8h_ad64cde0da38a60e7cb7905b3ab216968ac3a1defaffac4dcb6fe9e568919c45d1}{EVAS\_CALLBACK\_CANVAS\_FOCUS\_IN}}, \_canvas\_focus\_in\_cb, NULL);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Canvas__Events_gaf236cc76039a654de4df734f8875ba1a}{evas\_event\_callback\_add}}(evas, \mbox{\hyperlink{Evas__Common_8h_ad64cde0da38a60e7cb7905b3ab216968a444e79ca91d910d500dc26f71cf0518f}{EVAS\_CALLBACK\_CANVAS\_FOCUS\_OUT}}, \_canvas\_focus\_out\_cb, NULL);}
\DoxyCodeLine{}
\DoxyCodeLine{   memset(\&en1, 0, \textcolor{keyword}{sizeof}(en1));}
\DoxyCodeLine{   memset(\&en2, 0, \textcolor{keyword}{sizeof}(en2));}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{// create input field 1}}
\DoxyCodeLine{   create\_input\_field(evas, \&en1, 40, 60, 400, 80);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{// create input field 2}}
\DoxyCodeLine{   create\_input\_field(evas, \&en2, 40, 180, 400, 80);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{// give focus to input field 1}}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga4405e118e1fb762987af1269b6848db5}{evas\_object\_focus\_set}}(en1.rect, \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Ecore__Main__Loop__Group_gaf103b9f668bb3e4fed12e52c6180132d}{ecore\_main\_loop\_begin}}(); \textcolor{comment}{// begin mainloop}}
\DoxyCodeLine{}
\DoxyCodeLine{   delete\_input\_field(\&en1); \textcolor{comment}{// delete input field 1}}
\DoxyCodeLine{   delete\_input\_field(\&en2); \textcolor{comment}{// delete input field 2}}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Canvas__Events_ga48b6d066830a1350bd5c8770070cd3f9}{evas\_event\_callback\_del\_full}}(evas, \mbox{\hyperlink{Evas__Common_8h_ad64cde0da38a60e7cb7905b3ab216968ac3a1defaffac4dcb6fe9e568919c45d1}{EVAS\_CALLBACK\_CANVAS\_FOCUS\_IN}}, \_canvas\_focus\_in\_cb, NULL);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Canvas__Events_ga48b6d066830a1350bd5c8770070cd3f9}{evas\_event\_callback\_del\_full}}(evas, \mbox{\hyperlink{Evas__Common_8h_ad64cde0da38a60e7cb7905b3ab216968a444e79ca91d910d500dc26f71cf0518f}{EVAS\_CALLBACK\_CANVAS\_FOCUS\_OUT}}, \_canvas\_focus\_out\_cb, NULL);}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Ecore__Evas__Group_gad3ec61f2aa03df4d3dbfd0d311e0c8dc}{ecore\_evas\_free}}(ee);}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Ecore__IMF__Lib__Group_ga498318d0ef919461c2a84d68989bfa76}{ecore\_imf\_shutdown}}();}
\DoxyCodeLine{   \mbox{\hyperlink{group__Ecore__Evas__Group_gab8fa311077f749190c9b622f672b2214}{ecore\_evas\_shutdown}}();}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\}}
\DoxyCodeLine{}

\end{DoxyCodeInclude}
 