Dear Jihoon, I agree that evas should have a function like that, which in turn should be used by edje + elementary to "implement" their own. It's actually in my TODO (on the bottom though) to fix all the mkup<->text conversion functions in efl, which are just duplicated all around and unify them in one place. The biggest problem with that, is that this conversion can be different depending if there's a textblock or not, and also can be different between different textblocks. For example, consider the following text: "foo<tom-tag>bar" without an object specific function, <tom-tag> will be translated to "", but if I define tom-tag to be, for example: "font_size=50 \n" (in the textblock style), the text version should become "foo\nbar".
So this subject is pretty tricky and thus we should provide both APIs, but yeah, I agree with Jihoon, we should not have so many duplications, and because of the reasons I explained above, we should have at least one implementation in Evas (and I actually think both of them should be there, with minimum code duplication as possible). -- Tom. On Tue, 2010-12-21 at 09:50 +0900, Jihoon Kim wrote: > I think this function should be located in evas layer. > There are lots of API related to markup in evas_object_textblock, but there > is no way to convert markup to utf8 in evas layer. > Raster and Tom, what is your opinion? > > -----Original Message----- > From: Daniel Juyung Seo [mailto:seojuyu...@gmail.com] > Sent: Tuesday, December 21, 2010 12:35 AM > To: enlightenment-devel@lists.sourceforge.net > Cc: enlightenment-...@lists.sourceforge.net > Subject: Re: [E-devel] E SVN: raster trunk/TMP/st/elementary/src/lib > > Good! > Finally we have elm_util.c! > > > +char *_elm_util_mkup_to_text(const char *mkup); > > +char *_elm_util_text_to_mkup(const char *text); > > How about opening above two functions to EAPI? > Applications still need to use elm_entry_markup_to_utf8(const char *s) > instead of _elm_util_mkup_to_text(const char *mkup) for markup-to-text > converting regardless of not using entry. > > And the name "mkup" is not that clearer than "markup". > > Thanks. > Daniel Juyung Seo (SeoZ) > > > On Mon, Dec 20, 2010 at 3:05 PM, Enlightenment SVN > <no-re...@enlightenment.org> wrote: > > Log: > > move mkup to/from text calls to elm_util.c in preparation for some > > patches. > > > > > > > > Author: raster > > Date: 2010-12-19 22:05:09 -0800 (Sun, 19 Dec 2010) > > New Revision: 55649 > > Trac: http://trac.enlightenment.org/e/changeset/55649 > > > > Added: > > trunk/TMP/st/elementary/src/lib/elm_util.c > > Modified: > > trunk/TMP/st/elementary/src/lib/Makefile.am > trunk/TMP/st/elementary/src/lib/elm_priv.h > > > > Modified: trunk/TMP/st/elementary/src/lib/Makefile.am > > =================================================================== > > --- trunk/TMP/st/elementary/src/lib/Makefile.am 2010-12-20 06:02:53 UTC > (rev 55648) > > +++ trunk/TMP/st/elementary/src/lib/Makefile.am 2010-12-20 06:05:09 UTC > (rev 55649) > > @@ -38,6 +38,7 @@ > > elm_priv.h \ > > \ > > elm_main.c \ > > +elm_util.c \ > > elm_theme.c \ > > elm_module.c \ > > elm_store.c \ > > > > Modified: trunk/TMP/st/elementary/src/lib/elm_priv.h > > =================================================================== > > --- trunk/TMP/st/elementary/src/lib/elm_priv.h 2010-12-20 06:02:53 UTC > (rev 55648) > > +++ trunk/TMP/st/elementary/src/lib/elm_priv.h 2010-12-20 06:05:09 UTC > (rev 55649) > > @@ -190,6 +190,9 @@ > > > > Evas_Object *_elm_scroller_edje_object_get(Evas_Object *obj); > > > > +char *_elm_util_mkup_to_text(const char *mkup); > > +char *_elm_util_text_to_mkup(const char *text); > > + > > extern char *_elm_appname; > > extern Elm_Config *_elm_config; > > extern const char *_elm_data_dir; > > > > > > > ---------------------------------------------------------------------------- > -- > > Lotusphere 2011 > > Register now for Lotusphere 2011 and learn how > > to connect the dots, take your collaborative environment > > to the next level, and enter the era of Social Business. > > http://p.sf.net/sfu/lotusphere-d2d > > _______________________________________________ > > enlightenment-svn mailing list > > enlightenment-...@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/enlightenment-svn > > > > ---------------------------------------------------------------------------- > -- > Lotusphere 2011 > Register now for Lotusphere 2011 and learn how > to connect the dots, take your collaborative environment > to the next level, and enter the era of Social Business. > http://p.sf.net/sfu/lotusphere-d2d > _______________________________________________ > enlightenment-devel mailing list > enlightenment-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > ------------------------------------------------------------------------------ Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel