Hi,

According to your comments, I've revised patch and I'd like to request a
review prior to applying in svn.

I referred to elm_ethumb_ethumb_client_get() API. It also returns void *
for avoiding to use "configure defined macro"

How do you think about this revised patch?

On Thursday, February 23, 2012, Vincent Torri wrote:

> On Thu, Feb 23, 2012 at 7:48 AM, Jihoon Kim <[email protected]<javascript:;>>
> wrote:
> > I got it.
> > I've reverted.
> >
> > I will send patch in this e-mail thread for reviewing again.
>
> also, if you add a function, at least, update ChangeLog, and better
> update also NEWS
>
> Vincent
>
> >
> > On Thursday, February 23, 2012, Vincent Torri wrote:
> >
> >> On Thu, Feb 23, 2012 at 7:32 AM, David Seikel 
> >> <[email protected]<javascript:;>
> <javascript:;>>
> >> wrote:
> >> > On Thu, 23 Feb 2012 07:27:52 +0100 Vincent Torri
> >> > <[email protected] <javascript:;> <javascript:;>> wrote:
> >> >
> >> >> On Thu, Feb 23, 2012 at 7:25 AM, Vincent Torri
> >> >> <[email protected] <javascript:;> <javascript:;>> wrote:
> >> >> > On Thu, Feb 23, 2012 at 7:15 AM, Enlightenment SVN
> >> >> > <[email protected] <javascript:;> <javascript:;>> 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
> >> >
> >> > NOOOOO, then my embedded project that uses edje but has no need for
> IMF
> >> > gets a bit more bloated.
> >>
> >> then the returned value of the added function must be changed, as it
> >> returns an Ecore_IMF_Context pointer
> >>
> >> Imho, that commit must be reverted until something better is proposed
> >>
> >> Vincent
> >>
> >>
> >>
> ------------------------------------------------------------------------------
> >> 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] <javascript:;> <javascript:;>
> >> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> >>
> >
> ------------------------------------------------------------------------------
> > 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] <javascript:;>
> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
>
> ------------------------------------------------------------------------------
> 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] <javascript:;>
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
Index: src/lib/edje_private.h
===================================================================
--- src/lib/edje_private.h	(revision 68372)
+++ src/lib/edje_private.h	(working copy)
@@ -1940,7 +1940,7 @@ void _edje_entry_cursor_geometry_get(Edje_Real_Par
 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);
-
+void *_edje_entry_imf_context_get(Edje_Real_Part *rp);
 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);
Index: src/lib/edje_util.c
===================================================================
--- src/lib/edje_util.c	(revision 68372)
+++ src/lib/edje_util.c	(working copy)
@@ -1527,6 +1527,24 @@ edje_object_part_text_select_extend(const Evas_Obj
      _edje_entry_select_extend(rp);
 }
 
+EAPI void *
+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;
+}
+
 EAPI Eina_Bool
 edje_object_part_text_cursor_next(Evas_Object *obj, const char *part, Edje_Cursor cur)
 {
Index: src/lib/Edje.h
===================================================================
--- src/lib/Edje.h	(revision 68372)
+++ src/lib/Edje.h	(working copy)
@@ -2874,6 +2874,17 @@ EAPI int              edje_object_part_text_cursor
 EAPI void             edje_object_part_text_imf_context_reset           (const Evas_Object *obj, const char *part);
 
 /**
+ * @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
+ * @since 1.2.0
+ */
+EAPI void              *edje_object_part_text_imf_context_get           (const Evas_Object *obj, const char *part);
+
+/**
  * @brief Set the layout of the input panel.
  *
  * The layout of the input panel or virtual keyboard can make it easier or
Index: src/lib/edje_entry.c
===================================================================
--- src/lib/edje_entry.c	(revision 68372)
+++ src/lib/edje_entry.c	(working copy)
@@ -2553,6 +2553,19 @@ _edje_entry_select_abort(Edje_Real_Part *rp)
      }
 }
 
+void *
+_edje_entry_imf_context_get(Edje_Real_Part *rp)
+{
+   Entry *en = rp->entry_data;
+   if (!en) return NULL;
+
+#ifdef HAVE_ECORE_IMF
+   return en->imf_context;
+#else
+   return NULL;
+#endif
+}
+
 void
 _edje_entry_autocapital_type_set(Edje_Real_Part *rp, Edje_Text_Autocapital_Type autocapital_type)
 {
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 68372)
+++ ChangeLog	(working copy)
@@ -360,3 +360,7 @@
 
         * Change API names from edje_object_markup_filter_callback_{add,del,del_full}.
         to edje_object_text_markup_filter_callback_{add,del,del_full}.
+
+2012-02-24  Jihoon Kim
+
+	* add edje_object_part_text_imf_context_get for getting Ecore_IMF_Context handle in edje text object
------------------------------------------------------------------------------
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

Reply via email to