On Thu, Feb 23, 2012 at 7:25 AM, Vincent Torri <[email protected]> wrote:
> On Thu, Feb 23, 2012 at 7:15 AM, Enlightenment SVN
> <[email protected]> wrote:
>> Log:
>> Add edje_object_part_text_imf_context_get API
>> This API can be used to get the input method context in entry.
>>
>>
>> Author: jihoon
>> Date: 2012-02-22 22:15:12 -0800 (Wed, 22 Feb 2012)
>> New Revision: 68306
>> Trac: http://trac.enlightenment.org/e/changeset/68306
>>
>> Modified:
>> trunk/edje/src/lib/Edje.h trunk/edje/src/lib/edje_entry.c
>> trunk/edje/src/lib/edje_private.h trunk/edje/src/lib/edje_util.c
>>
>> Modified: trunk/edje/src/lib/Edje.h
>> ===================================================================
>> --- trunk/edje/src/lib/Edje.h 2012-02-23 06:13:00 UTC (rev 68305)
>> +++ trunk/edje/src/lib/Edje.h 2012-02-23 06:15:12 UTC (rev 68306)
>> @@ -452,6 +452,10 @@
>> # undef EAPI
>> #endif
>>
>> +#ifdef HAVE_ECORE_IMF
>
> NOOOOO ! NEVER use configure defined macro in public header files !!!
>
> Hence he function edje_object_part_text_imf_context_get() below must
> be always defined. In case there is no ecore_imf, it should just
> return NULL
or make ecore_imf a hard dependency of edje
Vincent
> and you have forgotten @since in the doc
>
> Vincent
>
>> +#include <Ecore_IMF.h>
>> +#endif
>> +
>> #ifdef _WIN32
>> # ifdef EFL_EDJE_BUILD
>> # ifdef DLL_EXPORT
>> @@ -2869,9 +2873,21 @@
>> */
>> EAPI void edje_object_part_text_imf_context_reset
>> (const Evas_Object *obj, const char *part);
>>
>> +#ifdef HAVE_ECORE_IMF
>> /**
>> + * @brief Get the input method context in entry.
>> + *
>> + * @param obj A valid Evas_Object handle
>> + * @param part The part name
>> + *
>> + * @return The input method context in entry
>> + */
>> +EAPI Ecore_IMF_Context *edje_object_part_text_imf_context_get
>> (const Evas_Object *obj, const char *part);
>> +#endif
>> +
>> +/**
>> * @brief Set the layout of the input panel.
>> - *
>> + *
>> * The layout of the input panel or virtual keyboard can make it easier or
>> * harder to enter content. This allows you to hint what kind of input you
>> * are expecting to enter and thus have the input panel automatically
>>
>> Modified: trunk/edje/src/lib/edje_entry.c
>> ===================================================================
>> --- trunk/edje/src/lib/edje_entry.c 2012-02-23 06:13:00 UTC (rev 68305)
>> +++ trunk/edje/src/lib/edje_entry.c 2012-02-23 06:15:12 UTC (rev 68306)
>> @@ -2553,6 +2553,17 @@
>> }
>> }
>>
>> +#ifdef HAVE_ECORE_IMF
>> +Ecore_IMF_Context *
>> +_edje_entry_imf_context_get(Edje_Real_Part *rp)
>> +{
>> + Entry *en = rp->entry_data;
>> + if (!en) return NULL;
>> +
>> + return en->imf_context;
>> +}
>> +#endif
>> +
>> void
>> _edje_entry_autocapital_type_set(Edje_Real_Part *rp,
>> Edje_Text_Autocapital_Type autocapital_type)
>> {
>>
>> Modified: trunk/edje/src/lib/edje_private.h
>> ===================================================================
>> --- trunk/edje/src/lib/edje_private.h 2012-02-23 06:13:00 UTC (rev 68305)
>> +++ trunk/edje/src/lib/edje_private.h 2012-02-23 06:15:12 UTC (rev 68306)
>> @@ -1940,7 +1940,9 @@
>> void _edje_entry_select_allow_set(Edje_Real_Part *rp, Eina_Bool allow);
>> Eina_Bool _edje_entry_select_allow_get(const Edje_Real_Part *rp);
>> void _edje_entry_select_abort(Edje_Real_Part *rp);
>> -
>> +#ifdef HAVE_ECORE_IMF
>> +Ecore_IMF_Context *_edje_entry_imf_context_get(Edje_Real_Part *rp);
>> +#endif
>> Eina_Bool _edje_entry_cursor_next(Edje_Real_Part *rp, Edje_Cursor cur);
>> Eina_Bool _edje_entry_cursor_prev(Edje_Real_Part *rp, Edje_Cursor cur);
>> Eina_Bool _edje_entry_cursor_up(Edje_Real_Part *rp, Edje_Cursor cur);
>>
>> Modified: trunk/edje/src/lib/edje_util.c
>> ===================================================================
>> --- trunk/edje/src/lib/edje_util.c 2012-02-23 06:13:00 UTC (rev 68305)
>> +++ trunk/edje/src/lib/edje_util.c 2012-02-23 06:15:12 UTC (rev 68306)
>> @@ -1527,6 +1527,26 @@
>> _edje_entry_select_extend(rp);
>> }
>>
>> +#ifdef HAVE_ECORE_IMF
>> +EAPI Ecore_IMF_Context *
>> +edje_object_part_text_imf_context_get(const Evas_Object *obj, const char
>> *part)
>> +{
>> + Edje *ed;
>> + Edje_Real_Part *rp;
>> +
>> + ed = _edje_fetch(obj);
>> + if ((!ed) || (!part)) return NULL;
>> +
>> + rp = _edje_real_part_recursive_get(ed, (char *)part);
>> + if (!rp) return NULL;
>> +
>> + if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
>> + return _edje_entry_imf_context_get(rp);
>> + else
>> + return NULL;
>> +}
>> +#endif
>> +
>> EAPI Eina_Bool
>> edje_object_part_text_cursor_next(Evas_Object *obj, const char *part,
>> Edje_Cursor cur)
>> {
>>
>>
>> ------------------------------------------------------------------------------
>> Virtualization & Cloud Management Using Capacity Planning
>> Cloud computing makes use of virtualization - but cloud computing
>> also focuses on allowing computing to be delivered as a service.
>> http://www.accelacomm.com/jaw/sfnl/114/51521223/
>> _______________________________________________
>> enlightenment-svn mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/enlightenment-svn
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel