[EGIT] [core/efl] master 02/02: edje entry: fill content info when text is deleted by imf event

2017-09-29 Thread Youngbok Shin
raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=d7a2993d4766ee2fe65705a243372a6987dd0d2c

commit d7a2993d4766ee2fe65705a243372a6987dd0d2c
Author: Youngbok Shin <youngb.s...@samsung.com>
Date:   Fri Sep 29 15:29:31 2017 +0900

edje entry: fill content info when text is deleted by imf event

Summary:
There was missing info when text is deleted by 
_edje_entry_imf_event_delete_surrounding_cb().
@fix

Test Plan: N/A

Reviewers: kimcinoo, raster, cedric, jpeg, herdsman

Differential Revision: https://phab.enlightenment.org/D5240
---
 src/lib/edje/edje_entry.c | 13 ++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/src/lib/edje/edje_entry.c b/src/lib/edje/edje_entry.c
index 36a713262d..5f7fb7437b 100644
--- a/src/lib/edje/edje_entry.c
+++ b/src/lib/edje/edje_entry.c
@@ -4921,6 +4921,7 @@ _edje_entry_imf_event_delete_surrounding_cb(void *data, 
Ecore_IMF_Context *ctx E
Edje_Entry_Change_Info *info;
int cursor_pos;
int start, end;
+   char *tmp;
 
rp = _edje_entry_imf_default_focused_rp_get(ed);
if ((!rp)) return;
@@ -4945,9 +4946,6 @@ _edje_entry_imf_event_delete_surrounding_cb(void *data, 
Ecore_IMF_Context *ctx E
end = evas_textblock_cursor_pos_get(del_end);
if (start == end) goto end;
 
-   evas_textblock_cursor_range_delete(del_start, del_end);
-   _anchors_get(en->cursor, rp->object, en);
-   _anchors_update_check(ed, rp);
info = calloc(1, sizeof(*info));
if  (!info)
  {
@@ -4957,6 +4955,15 @@ _edje_entry_imf_event_delete_surrounding_cb(void *data, 
Ecore_IMF_Context *ctx E
info->insert = EINA_FALSE;
info->change.del.start = start;
info->change.del.end = end;
+
+   tmp = evas_textblock_cursor_range_text_get(del_start, del_end, 
EVAS_TEXTBLOCK_TEXT_MARKUP);
+   info->change.del.content = eina_stringshare_add(tmp);
+   if (tmp) free(tmp);
+
+   evas_textblock_cursor_range_delete(del_start, del_end);
+   _anchors_get(en->cursor, rp->object, en);
+   _anchors_update_check(ed, rp);
+
_edje_emit(ed, "entry,changed", en->rp->part->name);
_edje_emit_full(ed, "entry,changed,user", en->rp->part->name, info,
_free_entry_change_info);

-- 




[EGIT] [core/efl] master 01/02: evas font: check returned value of FcPatternGet function

2017-09-29 Thread Youngbok Shin
raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=26b58098bc442c0e6129bb706bab3d50f592531e

commit 26b58098bc442c0e6129bb706bab3d50f592531e
Author: Youngbok Shin <youngb.s...@samsung.com>
Date:   Fri Sep 29 15:16:21 2017 +0900

evas font: check returned value of FcPatternGet function

Summary:
Evas should add font when only FcPatternGet function gives matched result.
@fix

Test Plan: N/A

Reviewers: raster, cedric, herdsman, jpeg

Differential Revision: https://phab.enlightenment.org/D5236
---
 src/lib/evas/canvas/evas_font_dir.c | 15 ---
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/src/lib/evas/canvas/evas_font_dir.c 
b/src/lib/evas/canvas/evas_font_dir.c
index 6514b0ffd4..e120f682d6 100644
--- a/src/lib/evas/canvas/evas_font_dir.c
+++ b/src/lib/evas/canvas/evas_font_dir.c
@@ -244,14 +244,15 @@ _evas_load_fontconfig(Evas_Font_Set *font, Evas *eo_evas, 
FcFontSet *set, int si
/* Do loading for all in family */
for (i = 0; i < set->nfont; i++)
  {
-   FcValue filename;
+FcValue filename;
 
-   FcPatternGet(set->fonts[i], FC_FILE, 0, );
-
-   if (font)
- evas->engine.func->font_add(_evas_engine_context(evas), font, (char 
*)filename.u.s, size, wanted_rend, bitmap_scalable);
-   else
- font = evas->engine.func->font_load(_evas_engine_context(evas), (char 
*)filename.u.s, size, wanted_rend, bitmap_scalable);
+if (FcPatternGet(set->fonts[i], FC_FILE, 0, ) == 
FcResultMatch)
+  {
+ if (font)
+   evas->engine.func->font_add(_evas_engine_context(evas), font, 
(char *)filename.u.s, size, wanted_rend, bitmap_scalable);
+ else
+   font = evas->engine.func->font_load(_evas_engine_context(evas), 
(char *)filename.u.s, size, wanted_rend, bitmap_scalable);
+  }
  }
 
return font;

-- 




[EGIT] [core/efl] master 01/01: evas textblock: use main font's ascent/descent as minimum value

2017-09-26 Thread Youngbok Shin
herdsman pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=42ac2136b014255369755157e3e4c20d24639662

commit 42ac2136b014255369755157e3e4c20d24639662
Author: Youngbok Shin <youngb.s...@samsung.com>
Date:   Tue Sep 26 14:33:10 2017 +0300

evas textblock: use main font's ascent/descent as minimum value

Summary:
The patch will adjust ascent/descent with considering main font's 
ascent/descent
as minimum value. Actually, this patch re-apply D5217 with resolving 
linegap issue
on the _layout_format_ascent_descent_adjust() function.
@fix

Test Plan: Put a text which will load smaller font. And put a text which 
will load primary font.

Reviewers: raster, cedric, herdsman, jpeg

Differential Revision: https://phab.enlightenment.org/D5227
---
 src/lib/evas/canvas/evas_object_textblock.c | 15 +--
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_textblock.c 
b/src/lib/evas/canvas/evas_object_textblock.c
index 60d2ff0545..eabc0b18bc 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -3032,16 +3032,19 @@ 
_layout_item_ascent_descent_adjust(Evas_Object_Protected_Data *obj,
   }
  }
 
-   if (fi)
+   if (fmt)
  {
-asc = evas_common_font_instance_ascent_get(fi);
-desc = evas_common_font_instance_descent_get(fi);
+asc = ENFN->font_ascent_get(ENC, fmt->font.font);
+desc = ENFN->font_descent_get(ENC, fmt->font.font);
  }
 
-   else if (fmt)
+   if (fi)
  {
-asc = ENFN->font_ascent_get(ENC, fmt->font.font);
-desc = ENFN->font_descent_get(ENC, fmt->font.font);
+int fi_asc = evas_common_font_instance_ascent_get(fi);
+int fi_desc = evas_common_font_instance_descent_get(fi);
+
+if (fi_asc > asc) asc = fi_asc;
+if (fi_desc > desc) desc = fi_desc;
  }
 
if (fmt) _layout_format_ascent_descent_adjust(obj, , , fmt);

-- 




[EGIT] [core/efl] master 01/02: evas: Add scale feature for embedded bitmap fonts.

2017-09-25 Thread Youngbok Shin
raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=17504106501cec1a0a85eb380c5dea7e0ca3729c

commit 17504106501cec1a0a85eb380c5dea7e0ca3729c
Author: Youngbok Shin <youngb.s...@samsung.com>
Date:   Mon Sep 25 18:34:22 2017 +0900

evas: Add scale feature for embedded bitmap fonts.

Summary:
When evas selects a strike of embedded bitmap font,
calculate ratio and use it for scaling embedded bitmap.
@feature

Reviewers: jpeg, tasn, woohyun, raster, herdsman

Reviewed By: raster

Subscribers: charlesmilette, Francesco149, cedric

Differential Revision: https://phab.enlightenment.org/D2713
---
 src/lib/efl/interfaces/efl_text_font.eo| 24 ++
 src/lib/evas/canvas/efl_canvas_text.eo |  1 +
 src/lib/evas/canvas/evas_font_dir.c| 43 +-
 src/lib/evas/canvas/evas_object_text.c | 91 +
 src/lib/evas/canvas/evas_object_textblock.c| 24 +-
 src/lib/evas/canvas/evas_object_textgrid.c | 92 ++
 src/lib/evas/canvas/evas_text.eo   |  3 +-
 src/lib/evas/canvas/evas_textgrid.eo   |  3 +-
 src/lib/evas/common/evas_draw.h|  2 +-
 src/lib/evas/common/evas_draw_main.c   |  2 +-
 src/lib/evas/common/evas_font.h| 22 +++---
 src/lib/evas/common/evas_font_compress.c   | 11 ++-
 src/lib/evas/common/evas_font_draw.c   | 60 +-
 src/lib/evas/common/evas_font_load.c   | 75 --
 src/lib/evas/common/evas_font_main.c   | 53 +
 src/lib/evas/include/evas_common_private.h |  5 +-
 src/lib/evas/include/evas_private.h| 10 +--
 .../evas/engines/gl_common/evas_gl_common.h|  2 +-
 src/modules/evas/engines/gl_common/evas_gl_font.c  | 34 
 .../evas/engines/software_generic/evas_engine.c| 19 +++--
 20 files changed, 395 insertions(+), 181 deletions(-)

diff --git a/src/lib/efl/interfaces/efl_text_font.eo 
b/src/lib/efl/interfaces/efl_text_font.eo
index b43c522c2a..b68e142b6f 100644
--- a/src/lib/efl/interfaces/efl_text_font.eo
+++ b/src/lib/efl/interfaces/efl_text_font.eo
@@ -37,6 +37,18 @@ enum Efl.Text.Font.Slant {
 italic, [[Italic font slant]]
 }
 
+/* FIXME: It needs to support "normal" option for non-color bitmap font.
+   For supporting "normal" option, S/W glyph drawing engine should be updated.
+ */
+enum Efl.Text.Font.Bitmap_Scalable {
+   [[Scalable of bitmap fonts
+
+ @since 1.21
+   ]]
+   none = 0, [[Disable scalable feature for bitmap fonts.]]
+   color = (1 << 0), [[Enable scalable feature for color bitmap fonts.]]
+}
+
 interface Efl.Text.Font {
[[Font settings of the text
 
@@ -114,5 +126,17 @@ interface Efl.Text.Font {
 lang: string; [[Language]]
  }
   }
+
+  @property font_bitmap_scalable {
+   [[The bitmap fonts have fixed size glyphs for several available 
sizes.
+ Basically, it is not scalable. But, it needs to be scalable for 
some use cases.
+ (ex. colorful emoji fonts)
+
+ Default is $Efl.Text.Font.Bitmap_Scalable.none\.
+   ]]
+   values {
+  scalable: Efl.Text.Font.Bitmap_Scalable; [[Scalable]]
+   }
+  }
}
 }
diff --git a/src/lib/evas/canvas/efl_canvas_text.eo 
b/src/lib/evas/canvas/efl_canvas_text.eo
index d18c9bf93f..22b8e9dd0d 100644
--- a/src/lib/evas/canvas/efl_canvas_text.eo
+++ b/src/lib/evas/canvas/efl_canvas_text.eo
@@ -282,6 +282,7 @@ Efl.Text.Font, Efl.Text.Style, Efl.Text.Format, 
Efl.Text.Cursor, Efl.Text.Annota
   Efl.Text.Font.font_weight { get; set; }
   Efl.Text.Font.font_slant { get; set; }
   Efl.Text.Font.font_width { get; set; }
+  Efl.Text.Font.font_bitmap_scalable { get; set; }
   Efl.Text.Style.normal_color { get; set; }
   Efl.Text.Style.backing_type { get; set; }
   Efl.Text.Style.backing_color { get; set; }
diff --git a/src/lib/evas/canvas/evas_font_dir.c 
b/src/lib/evas/canvas/evas_font_dir.c
index 80e37fad08..6514b0ffd4 100644
--- a/src/lib/evas/canvas/evas_font_dir.c
+++ b/src/lib/evas/canvas/evas_font_dir.c
@@ -32,6 +32,7 @@ struct _Fndat
Evas_Font_Set   *font;
int  ref;
Font_Rend_Flags  wanted_rend;
+   Efl_Text_Font_Bitmap_Scalable bitmap_scalable;
 
 #ifdef HAVE_FONTCONFIG
FcFontSet *set;
@@ -235,7 +236,7 @@ evas_font_free(Evas *eo_evas, void *font)
 #ifdef HAVE_FONTCONFIG
 static Evas_Font_Set *
 _evas_load_fontconfig(Evas_Font_Set *font, Evas *eo_evas, FcFontSet *set, int 
size,
-  Font_Rend_Flags wanted_rend)
+  Font_Rend_Flags wanted_rend, Efl_Text_Font_Bitmap_Scalable 
bitmap_scalable)
 {
Evas_Public_Data *evas = efl_data_scope_get(eo_evas, EVAS_CANVAS_CLASS);
int i;
@@ -248,9 +249,9 @@ _evas_load_fontconfig(Evas_Font_Set *font, Eva

[EGIT] [core/efl] master 02/02: evas textblock: use primary font's size as minimum size of a line

2017-09-25 Thread Youngbok Shin
raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=4d4401f3a60024a0762393c3984065b73927eb86

commit 4d4401f3a60024a0762393c3984065b73927eb86
Author: Youngbok Shin <youngb.s...@samsung.com>
Date:   Mon Sep 25 18:35:23 2017 +0900

evas textblock: use primary font's size as minimum size of a line

Summary:
Textblock uses ascent, descent from primary font when there is no text.
If a text is set which need other font, Textblock uses ascent, descent from
actually loaded font. If loaded font has smaller size, text cursor and text
looks jerky in elm_entry. At least, primary font's size should be respected
as minimum size of a line for avoiding this issue.
In addition, the patch will allow negative line gap values.
@fix

Test Plan:
Put your hamburger() in Ecrire. And put an english character.
(Put a text which will load smaller font. And put a text which will load 
primary font.)

Reviewers: raster, cedric, herdsman, jpeg, woohyun

Reviewed By: raster

Differential Revision: https://phab.enlightenment.org/D5217
---
 src/lib/evas/canvas/evas_object_textblock.c | 54 -
 1 file changed, 23 insertions(+), 31 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_textblock.c 
b/src/lib/evas/canvas/evas_object_textblock.c
index c804522f21..d371ab00a9 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -2937,8 +2937,8 @@ 
_layout_format_ascent_descent_adjust(Evas_Object_Protected_Data *obj,
   }
 descent += fmt->linegap * obj->cur->scale;
 descent += ((ascent + descent) * fmt->linerelgap);
-if (*maxascent < ascent) *maxascent = ascent;
-if (*maxdescent < descent) *maxdescent = descent;
+*maxascent = ascent;
+*maxdescent = descent;
 if (fmt->linefill > 0.0)
   {
  int dh;
@@ -2974,18 +2974,13 @@ 
_layout_item_max_ascent_descent_calc(Evas_Object_Protected_Data *obj,
  {
 Evas_Coord asc = 0;
 
+*maxascent = ENFN->font_max_ascent_get(ENC, it->format->font.font);
+
 if (fi)
-  {
- asc = evas_common_font_instance_max_ascent_get(fi);
-  }
-else
-  {
- asc = ENFN->font_max_ascent_get(ENC,
-   it->format->font.font);
-  }
+  asc = evas_common_font_instance_max_ascent_get(fi);
 
 if (asc > *maxascent)
-   *maxascent = asc;
+  *maxascent = asc;
  }
 
if ((position == TEXTBLOCK_POSITION_END) ||
@@ -2994,18 +2989,13 @@ 
_layout_item_max_ascent_descent_calc(Evas_Object_Protected_Data *obj,
 /* Calculate max descent. */
 Evas_Coord desc = 0;
 
+*maxdescent = ENFN->font_max_descent_get(ENC, it->format->font.font);
+
 if (fi)
-  {
- desc = evas_common_font_instance_max_descent_get(fi);
-  }
-else
-  {
- desc = ENFN->font_max_descent_get(ENC,
-   it->format->font.font);
-  }
+  desc = evas_common_font_instance_max_descent_get(fi);
 
 if (desc > *maxdescent)
-   *maxdescent = desc;
+  *maxdescent = desc;
  }
 }
 
@@ -3042,23 +3032,25 @@ 
_layout_item_ascent_descent_adjust(Evas_Object_Protected_Data *obj,
   }
  }
 
+   if (fmt)
+ {
+asc = ENFN->font_ascent_get(ENC, fmt->font.font);
+desc = ENFN->font_descent_get(ENC, fmt->font.font);
+
+if (asc > *ascent) *ascent = asc;
+if (desc > *descent) *descent = desc;
+ }
+
if (fi)
  {
 asc = evas_common_font_instance_ascent_get(fi);
 desc = evas_common_font_instance_descent_get(fi);
+
+if (asc > *ascent) *ascent = asc;
+if (desc > *descent) *descent = desc;
  }
-   else
- {
-if (fmt)
-  {
- asc = ENFN->font_ascent_get(ENC, fmt->font.font);
- desc = ENFN->font_descent_get(ENC, fmt->font.font);
-  }
- }
-   if (fmt) _layout_format_ascent_descent_adjust(obj, , , fmt);
 
-   if (asc > *ascent) *ascent = asc;
-   if (desc > *descent) *descent = desc;
+   if (fmt) _layout_format_ascent_descent_adjust(obj, ascent, descent, fmt);
 }
 
 /**

-- 




[EGIT] [core/efl] master 02/02: evas textblock: support ZWJ, ZWNJ, LRM, RLM in escaped form

2017-09-11 Thread Youngbok Shin
herdsman pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=8dbbf5c8b75348d9144bff94bfde2554a43dd709

commit 8dbbf5c8b75348d9144bff94bfde2554a43dd709
Author: Youngbok Shin <youngb.s...@samsung.com>
Date:   Mon Sep 11 08:53:04 2017 +0300

evas textblock: support ZWJ, ZWNJ, LRM, RLM in escaped form

Summary:
The patch supports the following escaped string from Evas Textblock.
These unicodes are frequently used.
ZWNJ U+200C - 
ZWJ  U+200D - 
LRM  U+200E - 
RLM  U+200F - 
@feature

Test Plan: N/A

Reviewers: raster, cedric, herdsman, jpeg, woohyun

Differential Revision: https://phab.enlightenment.org/D5173
---
 src/lib/evas/canvas/evas_object_textblock.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/src/lib/evas/canvas/evas_object_textblock.c 
b/src/lib/evas/canvas/evas_object_textblock.c
index 79048e848e..11937fab0c 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -1241,6 +1241,10 @@ static const char escape_strings[] =
 "\0"   "\xe2\x80\xa0\0"
 "\0"   "\xe2\x80\xa1\0"
 "\0" "\xe2\x80\xa2\0"
+"\0" "\xe2\x80\x8c\0"
+"\0"  "\xe2\x80\x8d\0"
+"\0"  "\xe2\x80\x8e\0"
+"\0"  "\xe2\x80\x8f\0"
 ;
 
 /**

-- 




[EGIT] [core/efl] master 01/02: evas: don't search other fonts only for INHERITED script unicodes

2017-09-11 Thread Youngbok Shin
herdsman pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=7a1075500aec849310e796c191aabff0b31f7c68

commit 7a1075500aec849310e796c191aabff0b31f7c68
Author: Youngbok Shin <youngb.s...@samsung.com>
Date:   Mon Sep 11 08:52:03 2017 +0300

evas: don't search other fonts only for INHERITED script unicodes

Summary:
INHERITED script unicodes are only meaningful when it comes
after the previous unicode from same font.
Even if there is no glyph for the INHERTED script unicode from current font,
don't search other font for loading the unicdoe as first unicode
of next item. It will be meaningless.
@fix

Test Plan:
Check the following Emoji sequence with an emoji font
which does not have variation selector glyphs.
{ 0x1F3F3, 0xFE0F, 0x200D, 0x1F308 }

Reviewers: raster, cedric, herdsman, jpeg, woohyun

Reviewed By: herdsman

Differential Revision: https://phab.enlightenment.org/D5156
---
 src/lib/evas/common/evas_font_query.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/src/lib/evas/common/evas_font_query.c 
b/src/lib/evas/common/evas_font_query.c
index 081f9a5e54..8fe82dacbb 100644
--- a/src/lib/evas/common/evas_font_query.c
+++ b/src/lib/evas/common/evas_font_query.c
@@ -77,6 +77,12 @@ evas_common_font_query_run_font_end_get(RGBA_Font *fn, 
RGBA_Font_Int **script_fi
   * the meanwhile. */
  if (*itr <= 0x1F)
 continue;
+
+ /* Skip searching font for INHERITED script unicodes.
+  * It is meaningful when only it comes after other unicodes from 
same font. */
+ if (evas_common_language_char_script_get(*itr) == 
EVAS_SCRIPT_INHERITED)
+continue;
+
  /* Break if either it's not in the font, or if it is in the
   * script's font. */
  if (!evas_common_get_char_index(fi, *itr))

-- 




[EGIT] [core/efl] efl-1.20 01/01: evas: proceed glyph iterator to handle next index properly

2017-09-04 Thread Youngbok Shin
herdsman pushed a commit to branch efl-1.20.

http://git.enlightenment.org/core/efl.git/commit/?id=d24c0431dd474bdcfc46502f35c6c895b7fc855b

commit d24c0431dd474bdcfc46502f35c6c895b7fc855b
Author: Youngbok Shin <youngb.s...@samsung.com>
Date:   Mon Sep 4 10:18:05 2017 +0300

evas: proceed glyph iterator to handle next index properly

Summary:
When harfbuzz is enabled, _content_create_ot() function will be used
for shaping. If evas_common_font_int_cache_glyph_get() failed in some 
reason,
it never proceed gl_itr until the end.
It can cause weird rendering result. Because, all of gl_itr after the 
failure
can't have proper x_bear, y_bear and width.
@fix

Test Plan: N/A

Reviewers: raster, cedric, herdsman, jpeg

Differential Revision: https://phab.enlightenment.org/D5154
---
 src/lib/evas/common/evas_text_utils.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/lib/evas/common/evas_text_utils.c 
b/src/lib/evas/common/evas_text_utils.c
index 9223c6e50b..5c00c7fb54 100644
--- a/src/lib/evas/common/evas_text_utils.c
+++ b/src/lib/evas/common/evas_text_utils.c
@@ -352,7 +352,7 @@ _content_create_ot(RGBA_Font_Int *fi, const Eina_Unicode 
*text,
evas_common_font_ot_populate_text_props(text, text_props, len, mode, lang);
 
gl_itr = text_props->info->glyph;
-   for (char_index = 0 ; char_index < text_props->len ; char_index++)
+   for (char_index = 0 ; char_index < text_props->len ; char_index++, gl_itr++)
  {
 FT_UInt idx;
 RGBA_Font_Glyph *fg;
@@ -406,7 +406,6 @@ _content_create_ot(RGBA_Font_Int *fi, const Eina_Unicode 
*text,
 gl_itr->pen_after += adjust_x;
 
 fi = text_props->font_instance;
-gl_itr++;
  }
 }
 #else

-- 




[EGIT] [core/efl] master 01/01: evas: proceed glyph iterator to handle next index properly

2017-09-04 Thread Youngbok Shin
herdsman pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=bf1c0e2657259ab6d6c7ac44408bc46429c9d1c9

commit bf1c0e2657259ab6d6c7ac44408bc46429c9d1c9
Author: Youngbok Shin <youngb.s...@samsung.com>
Date:   Mon Sep 4 10:18:05 2017 +0300

evas: proceed glyph iterator to handle next index properly

Summary:
When harfbuzz is enabled, _content_create_ot() function will be used
for shaping. If evas_common_font_int_cache_glyph_get() failed in some 
reason,
it never proceed gl_itr until the end.
It can cause weird rendering result. Because, all of gl_itr after the 
failure
can't have proper x_bear, y_bear and width.
@fix

Test Plan: N/A

Reviewers: raster, cedric, herdsman, jpeg

Differential Revision: https://phab.enlightenment.org/D5154
---
 src/lib/evas/common/evas_text_utils.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/lib/evas/common/evas_text_utils.c 
b/src/lib/evas/common/evas_text_utils.c
index 9223c6e50b..5c00c7fb54 100644
--- a/src/lib/evas/common/evas_text_utils.c
+++ b/src/lib/evas/common/evas_text_utils.c
@@ -352,7 +352,7 @@ _content_create_ot(RGBA_Font_Int *fi, const Eina_Unicode 
*text,
evas_common_font_ot_populate_text_props(text, text_props, len, mode, lang);
 
gl_itr = text_props->info->glyph;
-   for (char_index = 0 ; char_index < text_props->len ; char_index++)
+   for (char_index = 0 ; char_index < text_props->len ; char_index++, gl_itr++)
  {
 FT_UInt idx;
 RGBA_Font_Glyph *fg;
@@ -406,7 +406,6 @@ _content_create_ot(RGBA_Font_Int *fi, const Eina_Unicode 
*text,
 gl_itr->pen_after += adjust_x;
 
 fi = text_props->font_instance;
-gl_itr++;
  }
 }
 #else

-- 




[EGIT] [core/efl] master 01/01: evas font: do floating point division for calculating more accurately

2017-08-30 Thread Youngbok Shin
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=2b9a2692e8e2f3ed60fdf1e111ea5ffe1dfe0dcf

commit 2b9a2692e8e2f3ed60fdf1e111ea5ffe1dfe0dcf
Author: Youngbok Shin <youngb.s...@samsung.com>
Date:   Wed Aug 30 11:40:26 2017 -0700

evas font: do floating point division for calculating more accurately

Summary:
Assigning a result of integral division to a double type variable is
not useful for next division calculation. For more accurate calculation,
it needs to be casted to double before doing division.
It does not fix some bugs. It was reported by a code quality advisor.

Test Plan: N/A

Reviewers: raster, cedric, jpeg, herdsman, eunue

Reviewed By: cedric

Differential Revision: https://phab.enlightenment.org/D5069

Signed-off-by: Cedric Bail <ced...@osg.samsung.com>
---
 src/lib/evas/common/evas_font_query.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/evas/common/evas_font_query.c 
b/src/lib/evas/common/evas_font_query.c
index c52486b3cb..081f9a5e54 100644
--- a/src/lib/evas/common/evas_font_query.c
+++ b/src/lib/evas/common/evas_font_query.c
@@ -755,13 +755,13 @@ evas_common_font_query_char_at_coords(RGBA_Font *fn, 
const Evas_Text_Props *text
 if (text_props->bidi_dir == EVAS_BIDI_DIRECTION_LTR)
   {
  double part;
- part = cluster_adv / items;
+ part = (double) cluster_adv / items;
  item_pos = (int) ((x - cluster_start) / part);
   }
 else
   {
  double part;
- part = cluster_adv / items;
+ part = (double) cluster_adv / items;
  item_pos = items - ((int) ((x - cluster_start) / part)) - 1;
   }
 

-- 




[EGIT] [core/efl] master 01/01: edje: give proper width to entry's cursor according to its theme

2017-07-12 Thread Youngbok Shin
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=e81be3a664737dd5743552578e832656e9c5b87e

commit e81be3a664737dd5743552578e832656e9c5b87e
Author: Youngbok Shin <youngb.s...@samsung.com>
Date:   Wed Jul 12 18:37:50 2017 +0900

edje: give proper width to entry's cursor according to its theme

Summary:
evas_object_textblock_cursor_geometry_get() always return 0 as cursor's 
width
for BEFORE type cursor. It casued different cursor width when cursor_fg2 
was shown.
The cursor_fg and cursor_fg2 must have same width according to its min 
width.

Also, the patch will enclose code for cursor_fg2 by cursor_fg code.
It is used when only there is cursor_fg.
@fix

Test Plan:
1. Give bigger width to entry's cursor by changing its theme.
2. See the width cursor_fg, cursor_fg2 when there is [LTR text + RTL text].

Reviewers: raster, herdsman, cedric, jpeg

Subscribers: stefan_schmidt

Differential Revision: https://phab.enlightenment.org/D4798
---
 src/lib/edje/edje_entry.c | 57 ---
 1 file changed, 34 insertions(+), 23 deletions(-)

diff --git a/src/lib/edje/edje_entry.c b/src/lib/edje/edje_entry.c
index 8dcc2af1ec..2b3d6449fb 100644
--- a/src/lib/edje/edje_entry.c
+++ b/src/lib/edje/edje_entry.c
@@ -2966,18 +2966,18 @@ _edje_entry_real_part_init(Edje *ed, Edje_Real_Part *rp)
 evas_object_clip_set(en->cursor_fg, evas_object_clip_get(rp->object));
 evas_object_pass_events_set(en->cursor_fg, EINA_TRUE);
 _edje_subobj_register(ed, en->cursor_fg);
- }
-   /* A proxy to the main cursor. */
-   if (rp->part->cursor_mode == EDJE_ENTRY_CURSOR_MODE_BEFORE)
- {
-en->cursor_fg2 = evas_object_image_add(ed->base->evas);
-evas_object_image_source_set(en->cursor_fg2, en->cursor_fg);
-evas_object_image_fill_set(en->cursor_fg2, 0, 0, 1, 1);
-evas_object_smart_member_add(en->cursor_fg2, ed->obj);
-evas_object_stack_above(en->cursor_fg2, rp->object);
-evas_object_clip_set(en->cursor_fg2, evas_object_clip_get(rp->object));
-evas_object_pass_events_set(en->cursor_fg2, EINA_TRUE);
-_edje_subobj_register(en->ed, en->cursor_fg2);
+
+/* A proxy to the main cursor. */
+if (rp->part->cursor_mode == EDJE_ENTRY_CURSOR_MODE_BEFORE)
+  {
+ en->cursor_fg2 = edje_object_add(ed->base->evas);
+ edje_object_file_set(en->cursor_fg2, ed->path, rp->part->source4);
+ evas_object_smart_member_add(en->cursor_fg2, ed->obj);
+ evas_object_stack_above(en->cursor_fg2, rp->object);
+ evas_object_clip_set(en->cursor_fg2, 
evas_object_clip_get(rp->object));
+ evas_object_pass_events_set(en->cursor_fg2, EINA_TRUE);
+ _edje_subobj_register(ed, en->cursor_fg2);
+  }
  }
 
evas_object_textblock_legacy_newline_set(rp->object, EINA_TRUE);
@@ -3152,27 +3152,38 @@ _edje_entry_real_part_configure(Edje *ed, 
Edje_Real_Part *rp)
 if (hh < 1) hh = 1;
 if (en->cursor_bg)
   {
+ int bg_w = ww;
+
+ if (rp->part->cursor_mode == EDJE_ENTRY_CURSOR_MODE_BEFORE)
+   edje_object_size_min_restricted_calc(en->cursor_bg, _w, 
NULL, ww, 0);
+
  evas_object_move(en->cursor_bg, x + xx, y + yy);
- evas_object_resize(en->cursor_bg, ww, hh);
+ evas_object_resize(en->cursor_bg, bg_w, hh);
   }
 if (en->cursor_fg)
   {
+ int fg_w = ww;
+
+ if (rp->part->cursor_mode == EDJE_ENTRY_CURSOR_MODE_BEFORE)
+   edje_object_size_min_restricted_calc(en->cursor_fg, _w, 
NULL, ww, 0);
+
  evas_object_move(en->cursor_fg, x + xx, y + yy);
- evas_object_resize(en->cursor_fg, ww, hh);
-  }
-if (en->cursor_fg2)
-  {
+
  if (bidi_cursor)
{
-  evas_object_image_fill_set(en->cursor_fg2, 0, 0, ww, hh / 2);
-  evas_object_move(en->cursor_fg2, x + xx2, y + yy2 + (hh / 
2));
-  evas_object_resize(en->cursor_fg, ww, hh / 2);
-  evas_object_resize(en->cursor_fg2, ww, hh / 2);
-  evas_object_show(en->cursor_fg2);
+  if (en->cursor_fg2)
+{
+   evas_object_move(en->cursor_fg2, x + xx2, y + yy2 + (hh 
/ 2));
+   evas_object_resize(en->cursor_fg, fg_w, hh / 2);
+   evas_object_resize(en->cursor_fg2, fg_w, hh / 2);
+   evas_object_show(en->cursor_fg2);
+}
}
  else

[EGIT] [core/efl] master 01/02: evas font: append global font path when Evas initializes Fontconfig

2017-07-11 Thread Youngbok Shin
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=5e5e408e581ea234ef4d5e2dca5c4cbded1a0497

commit 5e5e408e581ea234ef4d5e2dca5c4cbded1a0497
Author: Youngbok Shin <youngb.s...@samsung.com>
Date:   Tue Jul 11 15:46:03 2017 +0900

evas font: append global font path when Evas initializes Fontconfig

Summary:
If there are appended font pathes before initializing Fontconfig,
Evas must care the font pathes after initializing Fontconfig.
@fix

Test Plan:
1. Call evas_font_path_global_append() with a private font path
   before adding any Evas Object.
2. Add a Evas Textblock object which uses a font from the private font path.
3. See the font is not loaded properly without the patch.

Reviewers: raster, cedric, herdsman, jpeg, woohyun

Differential Revision: https://phab.enlightenment.org/D4867
---
 src/lib/evas/canvas/evas_font_dir.c | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/lib/evas/canvas/evas_font_dir.c 
b/src/lib/evas/canvas/evas_font_dir.c
index 2f4c8598ba..361e0fdb79 100644
--- a/src/lib/evas/canvas/evas_font_dir.c
+++ b/src/lib/evas/canvas/evas_font_dir.c
@@ -61,7 +61,15 @@ evas_font_init(void)
 {
 #ifdef HAVE_FONTCONFIG
if (!fc_config)
- fc_config = FcInitLoadConfigAndFonts();
+ {
+Eina_List *l;
+char *path;
+
+fc_config = FcInitLoadConfigAndFonts();
+
+EINA_LIST_FOREACH(global_font_path, l, path)
+   FcConfigAppFontAddDir(fc_config, (const FcChar8 *) path);
+ }
 #endif
 }
 

-- 




[EGIT] [core/efl] master 01/01: edje: support legacy Textblock calculation logic for 1.18 edje file

2017-07-03 Thread Youngbok Shin
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=0735f6aa612476a9f126747269cb3761b9e9aeba

commit 0735f6aa612476a9f126747269cb3761b9e9aeba
Author: Youngbok Shin <youngb.s...@samsung.com>
Date:   Tue Jul 4 13:53:59 2017 +0900

edje: support legacy Textblock calculation logic for 1.18 edje file

Summary:
From EFL 1.19, Edje Textblock calculation logic was fixed according to
Edje documents. But, it broke old edje files which ignored text.min
option for minimum width. Even if the old edje files were wrong,
we need to support them as discussed from T5548.

Also, this patch will change default efl_version to 1.18 from 1.19.
So, without efl_version property, edje file will run on the legacy logic.

Fixes T5548

Test Plan: Turn on/off presentation mode in Enlightenment.

Reviewers: herdsman, cedric, jpeg, zmike, raster

Subscribers: stefan_schmidt

Maniphest Tasks: T5548

Differential Revision: https://phab.enlightenment.org/D4967

Adjusted by @jpeg
---
 src/bin/edje/edje_cc.c  |   6 +-
 src/bin/edje/edje_cc_handlers.c |   6 +
 src/bin/edje/edje_cc_out.c  |  12 +
 src/lib/edje/edje_cache.c   |   2 +-
 src/lib/edje/edje_calc.c| 655 +++-
 src/lib/edje/edje_private.h |   1 +
 src/lib/edje/edje_util.c| 113 +--
 7 files changed, 496 insertions(+), 299 deletions(-)

diff --git a/src/bin/edje/edje_cc.c b/src/bin/edje/edje_cc.c
index 9c0ce0187b..64c1e6df18 100644
--- a/src/bin/edje/edje_cc.c
+++ b/src/bin/edje/edje_cc.c
@@ -402,11 +402,11 @@ main(int argc, char **argv)
 * which was used for developing a edje file.
 * It is useful if Edje(or other EFL libs) need to keep
 * backward compatibility.
-* efl_version was added just after EFL 1.19.
-* Thus, 1.19 will be default.
+* efl_version was added to fix backward compatibility issue caused from 
EFL 1.19.
+* Thus, 1.18 will be default.
 */
edje_file->efl_version.major = 1;
-   edje_file->efl_version.minor = 19;
+   edje_file->efl_version.minor = 18;
edje_file->base_scale = FROM_INT(1);
 
source_edd();
diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c
index 8908ec69c8..415f778280 100644
--- a/src/bin/edje/edje_cc_handlers.c
+++ b/src/bin/edje/edje_cc_handlers.c
@@ -11134,6 +11134,9 @@ 
st_collections_group_parts_part_description_text_min(void)
 
ed->text.min_x = parse_bool(0);
ed->text.min_y = parse_bool(1);
+
+   if (current_part->type == EDJE_PART_TYPE_TEXTBLOCK)
+ edje_file->has_textblock_min_max = EINA_TRUE;
 }
 
 /**
@@ -11168,6 +11171,9 @@ 
st_collections_group_parts_part_description_text_max(void)
 
ed->text.max_x = parse_bool(0);
ed->text.max_y = parse_bool(1);
+
+   if (current_part->type == EDJE_PART_TYPE_TEXTBLOCK)
+ edje_file->has_textblock_min_max = EINA_TRUE;
 }
 
 /**
diff --git a/src/bin/edje/edje_cc_out.c b/src/bin/edje/edje_cc_out.c
index 367b266e78..08465b5269 100644
--- a/src/bin/edje/edje_cc_out.c
+++ b/src/bin/edje/edje_cc_out.c
@@ -2672,6 +2672,18 @@ data_write(void)
exit(-1);
  }
 
+   if ((edje_file->efl_version.major <= 1) && (edje_file->efl_version.minor <= 
18)
+   && edje_file->has_textblock_min_max)
+ {
+WRN("This EDC file was designed for EFL 1.18. Until 1.19, EFL used an "
+"invalid calculation mechanism for textblock parts, where the 
value "
+"of text min/max was not properly taken into account. You might "
+"want to consider adding \"efl_version: %d %d;\" in your EDC "
+"\"collections\" block, and then check the sizing for all 
textblock "
+"parts that specify text min/max values.",
+EFL_VERSION_MAJOR, EFL_VERSION_MINOR);
+ }
+
check_groups(ef);
 
ecore_thread_max_set(ecore_thread_max_get() * 2);
diff --git a/src/lib/edje/edje_cache.c b/src/lib/edje/edje_cache.c
index 7607156c32..22414df4e9 100644
--- a/src/lib/edje/edje_cache.c
+++ b/src/lib/edje/edje_cache.c
@@ -358,7 +358,7 @@ _edje_file_open(const Eina_File *f, int *error_ret, time_t 
mtime, Eina_Bool coll
if ((edf->efl_version.major == 0) && (edf->efl_version.minor == 0))
  {
 edf->efl_version.major = 1;
-edf->efl_version.minor = 19;
+edf->efl_version.minor = 18;
  }
 
edf->path = eina_stringshare_add(eina_file_filename_get(f));
diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c
index 47e918cdcc..fdae32a975 100644
--- a/src/lib/edje/edje_calc.c
+++ b/src/lib/edje/edje_calc.c
@@ -1467,6 +1467,369 @@ 
_edje_part_recalc_single_textblock_scale_range_adjust(Edje_Part_Description_Text
return scale;
 }
 
+/*
+ * Legacy function for min/max c

[EGIT] [core/efl] master 01/04: evas: fix version info for evas_language_direction_get

2017-06-19 Thread Youngbok Shin
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=12787d6665a93cad999103aeaa214b787d2c4541

commit 12787d6665a93cad999103aeaa214b787d2c4541
Author: Youngbok Shin <youngb.s...@samsung.com>
Date:   Mon Jun 19 13:47:40 2017 -0700

evas: fix version info for evas_language_direction_get

Summary:
The patch was created for EFL 1.18. But, it was merged for EFL 1.20.
@fix

Test Plan: N/A

Reviewers: herdsman, jpeg, cedric

Differential Revision: https://phab.enlightenment.org/D4968

Signed-off-by: Cedric BAIL <ced...@osg.samsung.com>
---
 src/lib/evas/Evas_Common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/evas/Evas_Common.h b/src/lib/evas/Evas_Common.h
index 4051f4f33a..090992646b 100644
--- a/src/lib/evas/Evas_Common.h
+++ b/src/lib/evas/Evas_Common.h
@@ -3224,7 +3224,7 @@ EAPI int  evas_string_char_len_get(const char *str) 
EINA_WARN_UNUSED_RESULT EINA
  * Get language direction.
  *
  * @ingroup Evas_Utils
- * @since 1.18
+ * @since 1.20
  */
 EAPI Evas_BiDi_Direction evas_language_direction_get(void);
 

-- 




[EGIT] [core/efl] master 01/01: evas textblock: add align=locale option to respect locale's direction

2017-06-15 Thread Youngbok Shin
herdsman pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=cbea6e438698c27755754049d35158336ca6daeb

commit cbea6e438698c27755754049d35158336ca6daeb
Author: Youngbok Shin <youngb.s...@samsung.com>
Date:   Tue Jun 13 13:15:12 2017 +0300

evas textblock: add align=locale option to respect locale's direction

Summary:
There are many requests to add a new feature for handling horizontal align
according to current locale. For example, in RTL locale setting,
users want to see right aligned text for every list's item.
Even if some of list's items only contain LTR characters!
It is useful for the needs.
@feature

Test Plan: N/A

Reviewers: herdsman, tasn, woohyun, raster, cedric

Reviewed By: herdsman, raster

Subscribers: z-wony, jpeg

Differential Revision: https://phab.enlightenment.org/D4664
---
 src/lib/evas/Evas_Common.h |  8 +
 src/lib/evas/canvas/evas_main.c|  6 
 src/lib/evas/canvas/evas_object_textblock.c| 36 +++---
 src/lib/evas/common/language/evas_language_utils.c | 19 
 src/lib/evas/common/language/evas_language_utils.h |  3 ++
 5 files changed, 67 insertions(+), 5 deletions(-)

diff --git a/src/lib/evas/Evas_Common.h b/src/lib/evas/Evas_Common.h
index 80e36587e5..4051f4f33a 100644
--- a/src/lib/evas/Evas_Common.h
+++ b/src/lib/evas/Evas_Common.h
@@ -3221,6 +3221,14 @@ EAPI int  evas_string_char_prev_get(const char *str, int 
pos, int *decoded) EINA
 EAPI int  evas_string_char_len_get(const char *str) EINA_WARN_UNUSED_RESULT 
EINA_ARG_NONNULL(1);
 
 /**
+ * Get language direction.
+ *
+ * @ingroup Evas_Utils
+ * @since 1.18
+ */
+EAPI Evas_BiDi_Direction evas_language_direction_get(void);
+
+/**
  * Reinitialize language from the environment.
  *
  * The locale can change while a process is running. This call tells evas to
diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c
index 964b8ccbb3..ea3e5daa4e 100644
--- a/src/lib/evas/canvas/evas_main.c
+++ b/src/lib/evas/canvas/evas_main.c
@@ -820,6 +820,12 @@ evas_ector_get(Evas_Public_Data *e, void *output)
return NULL;
 }
 
+EAPI Evas_BiDi_Direction
+evas_language_direction_get(void)
+{
+   return evas_common_language_direction_get();
+}
+
 EAPI void
 evas_language_reinit(void)
 {
diff --git a/src/lib/evas/canvas/evas_object_textblock.c 
b/src/lib/evas/canvas/evas_object_textblock.c
index 6476c48b02..05ebba9e4c 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -421,6 +421,13 @@ typedef enum _Evas_Textblock_Item_Type
EVAS_TEXTBLOCK_ITEM_FORMAT,
 } Evas_Textblock_Item_Type;
 
+typedef enum _Evas_Textblock_Align_Auto
+{
+   EVAS_TEXTBLOCK_ALIGN_AUTO_NONE,
+   EVAS_TEXTBLOCK_ALIGN_AUTO_NORMAL,
+   EVAS_TEXTBLOCK_ALIGN_AUTO_LOCALE
+} Evas_Textblock_Align_Auto;
+
 struct _Evas_Object_Textblock_Item
 {
EINA_INLIST;
@@ -538,7 +545,7 @@ struct _Evas_Object_Textblock_Format
Eina_Boolstrikethrough : 1;  /**< EINA_TRUE if text should be 
stricked off, else EINA_FALSE */
Eina_Boolbacking : 1;  /**< EINA_TRUE if enable background 
color, else EINA_FALSE */
Eina_Boolpassword : 1;  /**< EINA_TRUE if the text is password, 
else EINA_FALSE */
-   Eina_Boolhalign_auto : 1;  /**< EINA_TRUE if auto horizontal 
align, else EINA_FALSE */
+   Evas_Textblock_Align_Auto halign_auto : 2;  /**< Auto horizontal align mode 
*/
 };
 
 struct _Efl_Canvas_Text_Style
@@ -1928,6 +1935,7 @@ _format_command(Evas_Object *eo_obj, 
Evas_Object_Textblock_Format *fmt, const ch
  * Sets the horizontal alignment of the text. The value can either be
  * a number, a percentage or one of several presets:
  * @li "auto" - Respects LTR/RTL settings
+ * @li "locale" - Respects locale(language) direction settings
  * @li "center" - Centers the text in the line
  * @li "middle" - Alias for "center"
  * @li "left" - Puts the text at the left of the line
@@ -1942,7 +1950,11 @@ _format_command(Evas_Object *eo_obj, 
Evas_Object_Textblock_Format *fmt, const ch
  */
 if (len == 4 && !strcmp(param, "auto"))
   {
- fmt->halign_auto = EINA_TRUE;
+ fmt->halign_auto = EVAS_TEXTBLOCK_ALIGN_AUTO_NORMAL;
+  }
+if (len == 6 && !strcmp(param, "locale"))
+  {
+ fmt->halign_auto = EVAS_TEXTBLOCK_ALIGN_AUTO_LOCALE;
   }
 else
   {
@@ -1982,7 +1994,7 @@ _format_command(Evas_Object *eo_obj, 
Evas_Object_Textblock_Format *fmt, const ch
   if (fmt->halign < 0.0) fmt->halign = 0.0;
   else if (fmt->halign > 1.0) fmt-

[EGIT] [core/efl] master 01/03: edje: add efl_version property

2017-06-14 Thread Youngbok Shin
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=638ee888d9a503e40d18689ac534efdedad9c738

commit 638ee888d9a503e40d18689ac534efdedad9c738
Author: Youngbok Shin <youngb.s...@samsung.com>
Date:   Wed Jun 14 14:24:04 2017 -0700

edje: add efl_version property

Summary:
efl_version will be used to figure out which version of EFL lib
is used to develop a edje file.
If there is no property of efl_version, it will be 1.19 as default.
This feature is needed to fix T5548.

Example:
  efl_version: 1 20

@feature

Test Plan: N/A

Reviewers: cedric, jpeg, herdsman, zmike, raster

Reviewed By: cedric

Maniphest Tasks: T5548

Differential Revision: https://phab.enlightenment.org/D4961

Signed-off-by: Cedric BAIL <ced...@osg.samsung.com>
---
 src/bin/edje/edje_cc.c  |  9 +
 src/bin/edje/edje_cc_handlers.c | 25 +
 src/lib/edje/edje_cache.c   |  7 +++
 src/lib/edje/edje_convert.c |  2 ++
 src/lib/edje/edje_data.c|  2 ++
 src/lib/edje/edje_private.h |  5 +
 6 files changed, 50 insertions(+)

diff --git a/src/bin/edje/edje_cc.c b/src/bin/edje/edje_cc.c
index 63a62b117c..9c0ce0187b 100644
--- a/src/bin/edje/edje_cc.c
+++ b/src/bin/edje/edje_cc.c
@@ -398,6 +398,15 @@ main(int argc, char **argv)
* does not load nicely as a NULL or 0 value
* and needs a special fallback initialization
*/
+   /* efl_version is used for specify efl's version
+* which was used for developing a edje file.
+* It is useful if Edje(or other EFL libs) need to keep
+* backward compatibility.
+* efl_version was added just after EFL 1.19.
+* Thus, 1.19 will be default.
+*/
+   edje_file->efl_version.major = 1;
+   edje_file->efl_version.minor = 19;
edje_file->base_scale = FROM_INT(1);
 
source_edd();
diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c
index 765e0a6da0..8908ec69c8 100644
--- a/src/bin/edje/edje_cc_handlers.c
+++ b/src/bin/edje/edje_cc_handlers.c
@@ -199,6 +199,7 @@ static void _program_free(Edje_Program *pr);
 
 static void check_has_anchors(void);
 
+static void st_efl_version(void);
 static void st_externals_external(void);
 
 static void st_images_image(void);
@@ -695,6 +696,7 @@ static void _handle_vector_image(void);
 
 New_Statement_Handler statement_handlers[] =
 {
+ {"efl_version", st_efl_version},
  {"externals.external", st_externals_external},
  IMAGE_STATEMENTS("")
  FONT_STYLE_CC_STATEMENTS("")
@@ -2141,6 +2143,29 @@ _edje_program_copy(Edje_Program *ep, Edje_Program *ep2)
 
 /** @edcsection{toplevel,Top-Level blocks} */
 
+/** @edcsubsection{toplevel_efl_version,
+ * Efl_version} */
+
+/**
+@page edcref
+
+@property
+efl_version
+@parameters
+[major] [minor]
+@effect
+Used to show which version of EFL is used for developing a edje file.
+@endproperty
+ */
+static void
+st_efl_version(void)
+{
+   check_arg_count(2);
+
+   edje_file->efl_version.major = parse_int(0);
+   edje_file->efl_version.minor = parse_int(1);
+}
+
 /** @edcsubsection{toplevel_externals,
  * Externals} */
 
diff --git a/src/lib/edje/edje_cache.c b/src/lib/edje/edje_cache.c
index c38e9433eb..7607156c32 100644
--- a/src/lib/edje/edje_cache.c
+++ b/src/lib/edje/edje_cache.c
@@ -354,6 +354,13 @@ _edje_file_open(const Eina_File *f, int *error_ret, time_t 
mtime, Eina_Bool coll
 WRN("The base_scale can not be a 0.0. It is changed the default 
value(1.0)");
  }
 
+   /* Set default efl_version if there is no version information */
+   if ((edf->efl_version.major == 0) && (edf->efl_version.minor == 0))
+ {
+edf->efl_version.major = 1;
+edf->efl_version.minor = 19;
+ }
+
edf->path = eina_stringshare_add(eina_file_filename_get(f));
edf->references = 1;
 
diff --git a/src/lib/edje/edje_convert.c b/src/lib/edje/edje_convert.c
index c8f0f1bda1..8a904aa29b 100644
--- a/src/lib/edje/edje_convert.c
+++ b/src/lib/edje/edje_convert.c
@@ -216,6 +216,8 @@ _edje_file_convert(Eet_File *file, Old_Edje_File *oedf)
edf->size_classes = oedf->size_classes;
edf->version = oedf->version;
edf->feature_ver = oedf->feature_ver;
+   edf->efl_version.major = oedf->efl_version.major;
+   edf->efl_version.minor = oedf->efl_version.minor;
edf->compiler = oedf->compiler;
 
edf->dangling = EINA_FALSE;
diff --git a/src/lib/edje/edje_data.c b/src/lib/edje/edje_data.c
index 5e3ffe5bb4..a11fd07df6 100644
--- a/src/lib/edje/edje_data.c
+++ b/src/lib/edje/edje_data.c
@@ -1034,6 +1034,8 @@ _edje_edd_init(void)
EET_DATA_DESCRIPTOR_ADD_BASIC(_edj

[EGIT] [core/efl] master 01/01: edje text: add a missing return macro

2017-06-12 Thread Youngbok Shin
herdsman pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=e312a97ef3c36344e45655ecc7ad3ddaeb4ce31e

commit e312a97ef3c36344e45655ecc7ad3ddaeb4ce31e
Author: Youngbok Shin <youngb.s...@samsung.com>
Date:   Mon Jun 12 16:33:00 2017 +0300

edje text: add a missing return macro

Summary:
RETURN_* macro does unref before exiting functions.
Must be called after using PROXY_DATA_GET macro.
@fix

Test Plan:
1. Run terminology
2. Open Setting
3. Check error messages when you change something from Setting.

Reviewers: herdsman, raster

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4956
---
 src/lib/edje/edje_part_text.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lib/edje/edje_part_text.c b/src/lib/edje/edje_part_text.c
index 67ed591d85..c5ee06e37c 100644
--- a/src/lib/edje/edje_part_text.c
+++ b/src/lib/edje/edje_part_text.c
@@ -12,6 +12,7 @@ _efl_canvas_layout_internal_text_efl_text_text_set(Eo *obj,
 {
PROXY_DATA_GET(obj, pd);
_edje_efl_text_set(obj, pd->ed, pd->part, text);
+   RETURN_VOID;
 }
 
 EOLIAN static const char *

-- 




[EGIT] [core/efl] master 01/01: evas textblock: fix evas test suite build errors

2017-06-12 Thread Youngbok Shin
herdsman pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=f29dfe278967f1d112317b666ef69e9da9a81aa6

commit f29dfe278967f1d112317b666ef69e9da9a81aa6
Author: Youngbok Shin <youngb.s...@samsung.com>
Date:   Mon Jun 12 16:31:04 2017 +0300

evas textblock: fix evas test suite build errors

Summary:
Fix build errors caused by recent patches for Text cursor.
@fix

Test Plan: run "make check"

Reviewers: herdsman, jpeg, raster

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D4957
---
 src/tests/evas/evas_test_textblock.c | 72 ++--
 1 file changed, 36 insertions(+), 36 deletions(-)

diff --git a/src/tests/evas/evas_test_textblock.c 
b/src/tests/evas/evas_test_textblock.c
index 00b7863cc9..196ef2fb2a 100644
--- a/src/tests/evas/evas_test_textblock.c
+++ b/src/tests/evas/evas_test_textblock.c
@@ -4166,7 +4166,7 @@ _test_check_annotation(Evas_Object *tb,
evas_textblock_cursor_pos_set(end, end_pos);
 
Eina_Iterator *it =
-  efl_canvas_text_range_annotations_get(tb, start, end);
+  efl_text_range_annotations_get(tb, start, end);
 
evas_textblock_cursor_free(start);
evas_textblock_cursor_free(end);
@@ -4174,7 +4174,7 @@ _test_check_annotation(Evas_Object *tb,
size_t i = 0;
EINA_ITERATOR_FOREACH(it, an)
  {
-const char *fmt = efl_canvas_text_annotation_get(tb,
+const char *fmt = efl_text_annotation_get(tb,
   an);
 ck_assert_msg((i < len),
   "No formats to check but current annotation is: %s\n", fmt);
@@ -4214,27 +4214,27 @@ START_TEST(evas_textblock_annotation)
/* Check some trivial cases */
evas_textblock_cursor_pos_set(start, 0);
evas_textblock_cursor_pos_set(end, 3);
-   ck_assert(!efl_canvas_text_annotation_insert(tb, start, end, NULL));
+   ck_assert(!efl_text_annotation_insert(tb, start, end, NULL));
evas_textblock_cursor_pos_set(start, 0);
evas_textblock_cursor_pos_set(end, 3);
-   ck_assert(!efl_canvas_text_annotation_insert(tb, start, end, ""));
+   ck_assert(!efl_text_annotation_insert(tb, start, end, ""));
evas_textblock_cursor_pos_set(start, 1);
evas_textblock_cursor_pos_set(end, 0);
-   ck_assert(!efl_canvas_text_annotation_insert(tb, start, end, "color=#fff"));
+   ck_assert(!efl_text_annotation_insert(tb, start, end, "color=#fff"));
 
/* Insert and check correct positions */
_test_check_annotation(tb, 0, 10, _COMP_PARAMS());
 
evas_textblock_cursor_pos_set(start, 0);
evas_textblock_cursor_pos_set(end, 3);
-   efl_canvas_text_annotation_insert(tb, start, end, "font_weight=bold");
+   efl_text_annotation_insert(tb, start, end, "font_weight=bold");
_test_check_annotation(tb, 0, 2, _COMP_PARAMS("font_weight=bold"));
_test_check_annotation(tb, 0, 2, _COMP_PARAMS("font_weight=bold"));
_test_check_annotation(tb, 4, 10, _COMP_PARAMS());
 
evas_textblock_cursor_pos_set(start, 50);
evas_textblock_cursor_pos_set(end, 60);
-   efl_canvas_text_annotation_insert(tb, start, end, "color=#0ff");
+   efl_text_annotation_insert(tb, start, end, "color=#0ff");
_test_check_annotation(tb, 0, 49, _COMP_PARAMS("font_weight=bold"));
_test_check_annotation(tb, 0, 50, _COMP_PARAMS("font_weight=bold", 
"color=#0ff"));
_test_check_annotation(tb, 0, 55, _COMP_PARAMS("font_weight=bold", 
"color=#0ff"));
@@ -4249,7 +4249,7 @@ START_TEST(evas_textblock_annotation)
efl_text_set(tb, "hello");
evas_textblock_cursor_pos_set(start, 0);
evas_textblock_cursor_pos_set(end, 2);
-   an = efl_canvas_text_annotation_insert(tb, start, end, "color=#fff");
+   an = efl_text_annotation_insert(tb, start, end, "color=#fff");
_test_check_annotation(tb, 2, 3, _COMP_PARAMS());
evas_textblock_cursor_pos_set(cur, 0);
evas_textblock_cursor_text_append(cur, "a");
@@ -4257,22 +4257,22 @@ START_TEST(evas_textblock_annotation)
_test_check_annotation(tb, 3, 4, _COMP_PARAMS());
 
/* Replace annotations's format */
-   efl_canvas_text_annotation_set(tb, an, "font_size=14");
+   efl_text_annotation_set(tb, an, "font_size=14");
_test_check_annotation(tb, 2, 3, _COMP_PARAMS("font_size=14"));
_test_check_annotation(tb, 3, 4, _COMP_PARAMS());
 
efl_text_set(tb, "hello world");
evas_textblock_cursor_pos_set(start, 0);
evas_textblock_cursor_pos_set(end, 2);
-   an = efl_canvas_text_annotation_insert(tb, start, end, "color=#fff");
+   an = efl_text_annotation_insert(tb, start, end, "color=#fff");
evas_textblock_cursor_pos_set(start, 2);
evas_textblock_cursor_pos_set(end, 3);
-   an2 = efl_canvas_text_annotation_insert(tb, start, end, &qu

[EGIT] [core/efl] master 01/01: elementary entry: update focus state when editable state is changed

2017-06-08 Thread Youngbok Shin
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=22ed5794307eaf9a2b280adc6a1c7377fefd74ac

commit 22ed5794307eaf9a2b280adc6a1c7377fefd74ac
Author: Youngbok Shin <youngb.s...@samsung.com>
Date:   Fri Jun 9 14:19:57 2017 +0900

elementary entry: update focus state when editable state is changed

Summary:
To recieve keyboard events, the entry_edje should have Evas focus.
But, if a non editable Entry widget takes focus, it can't recieve
keyboard events even if it becomes editable after taking focus.
So, elm_entry_editable_set() function should update Entry's focus state.
@fix

Test Plan:
The code of elementary_test - entry is modified to test this issue.
Please, check the issue with the following steps.

1. Run "elementary_test entry"
2. Click "Unfocus" button to make entry to "unfocused" state.
3. Click "Edit" button to make entry to non-editable mode.
4. Click "Focus" button to make entry to "focused" state.
5. Click "Edit" button to make entry to editable mode.
6. See a cursor is blinking in entry.
   => But, you can't edit text without this patch.

Reviewers: raster, herdsman, cedric, jpeg, woohyun

Differential Revision: https://phab.enlightenment.org/D4858
---
 src/bin/elementary/test_entry.c | 46 +
 src/lib/elementary/elm_entry.c  | 15 +-
 2 files changed, 56 insertions(+), 5 deletions(-)

diff --git a/src/bin/elementary/test_entry.c b/src/bin/elementary/test_entry.c
index 77e2fa88a1..9b2275f9d8 100644
--- a/src/bin/elementary/test_entry.c
+++ b/src/bin/elementary/test_entry.c
@@ -86,6 +86,20 @@ my_entry_bt_7(void *data, Evas_Object *obj EINA_UNUSED, void 
*event_info EINA_UN
 }
 
 static void
+my_entry_bt_8(void *data, Evas_Object *obj EINA_UNUSED, void *event_info 
EINA_UNUSED)
+{
+   Evas_Object *en = data;
+   elm_object_focus_set(en, EINA_TRUE);
+}
+
+static void
+my_entry_bt_9(void *data, Evas_Object *obj EINA_UNUSED, void *event_info 
EINA_UNUSED)
+{
+   Evas_Object *en = data;
+   elm_object_focus_set(en, EINA_FALSE);
+}
+
+static void
 changed_cb1(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
 {
Evas_Object *ck = data;
@@ -114,6 +128,18 @@ entry_changed_cb(void *data, Evas_Object *obj EINA_UNUSED, 
void *event_info EINA

 }
 
+static void
+entry_focused_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void 
*event_info EINA_UNUSED)
+{
+   printf("Entry 'focused' callback called\n");
+}
+
+static void
+entry_unfocused_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void 
*event_info EINA_UNUSED)
+{
+   printf("Entry 'unfocused' callback called\n");
+}
+
 void
 test_entry(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void 
*event_info EINA_UNUSED)
 {
@@ -166,6 +192,8 @@ test_entry(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_inf
evas_object_size_hint_align_set(en, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_smart_callback_add(en, "changed", entry_changed_cb, "changed");
evas_object_smart_callback_add(en, "changed,user", entry_changed_cb, 
"changed,user");
+   evas_object_smart_callback_add(en, "focused", entry_focused_cb, NULL);
+   evas_object_smart_callback_add(en, "unfocused", entry_unfocused_cb, NULL);
elm_box_pack_end(bx, en);
evas_object_show(en);
elm_object_focus_set(en, EINA_TRUE);
@@ -238,6 +266,24 @@ test_entry(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_inf
elm_object_focus_allow_set(bt, EINA_FALSE);
evas_object_show(bt);
 
+   bt = elm_button_add(win);
+   elm_object_text_set(bt, "Focus");
+   evas_object_smart_callback_add(bt, "clicked", my_entry_bt_8, en);
+   evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
+   evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
+   elm_box_pack_end(bx2, bt);
+   elm_object_focus_allow_set(bt, EINA_FALSE);
+   evas_object_show(bt);
+
+   bt = elm_button_add(win);
+   elm_object_text_set(bt, "Unfocus");
+   evas_object_smart_callback_add(bt, "clicked", my_entry_bt_9, en);
+   evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
+   evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
+   elm_box_pack_end(bx2, bt);
+   elm_object_focus_allow_set(bt, EINA_FALSE);
+   evas_object_show(bt);
+
bx3 = elm_box_add(win);
elm_box_horizontal_set(bx3, EINA_TRUE);
evas_object_size_hint_weight_set(bx3, EVAS_HINT_EXPAND, 0.0);
diff --git a/src/lib/elementary/elm_entry.c b/src/lib/elementary/elm_entry.c
index e5f9eec798..c10bf580c6 100644
--- a/src/lib/elementary/elm_entry.c
+++ b/src/lib/elementary/elm_entry.c
@@ -1228,19 +1228,17 @@ _return_key_enabled_check(Evas_Object *obj)
elm_entr

[EGIT] [core/efl] master 01/01: evas textblock: fix dereferenced memory after free issue for ellipsis

2017-05-11 Thread Youngbok Shin
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=f97920816d3e54fe0815d9d03777bbf747d54787

commit f97920816d3e54fe0815d9d03777bbf747d54787
Author: Youngbok Shin <youngb.s...@samsung.com>
Date:   Fri May 12 14:17:30 2017 +0900

evas textblock: fix dereferenced memory after free issue for ellipsis

Summary:
_layout_ellipsis_item_new() function deallocates "ellip_ti" and
allocates memory for new one. The local "ellip_ti" pointer should be
updated.
@fix

Test Plan: N/A

Reviewers: raster, cedric, herdsman, jpeg, woohyun

Differential Revision: https://phab.enlightenment.org/D4854
---
 src/lib/evas/canvas/evas_object_textblock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/evas/canvas/evas_object_textblock.c 
b/src/lib/evas/canvas/evas_object_textblock.c
index 0555008..0a53730 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -5309,7 +5309,7 @@ _layout_par_ellipsis_items(Ctxt *c, double ellip)
 off += it->adv;
  }
c->o->ellip_prev_it = i;
-   if (it) _layout_ellipsis_item_new(c, it);
+   if (it) ellip_ti = _layout_ellipsis_item_new(c, it);
 
 
pos = (it && it->type == EVAS_TEXTBLOCK_ITEM_TEXT) ?

-- 




[EGIT] [core/efl] master 01/01: evas: round glyph's advance before adding it to pen_x

2017-04-24 Thread Youngbok Shin
herdsman pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=caed13d3fc5d0e4bc7a92da2c77cf1447e8a0d8d

commit caed13d3fc5d0e4bc7a92da2c77cf1447e8a0d8d
Author: Youngbok Shin <youngb.s...@samsung.com>
Date:   Sun Apr 23 09:22:42 2017 +0300

evas: round glyph's advance before adding it to pen_x

Summary:
Rounding the sum of glyph's advance could cause inconsistency of
each glyph's positions. When Evas enables Harfbuzz library,
Each glyph's position has to be handled by only nearby glyphs.
But, currently, totally unrelated glyph's advacne could change
other glyphs positions.

ex) 1. "connect."
2. "Tap here to connect."

You can see different gap between "c" and "o" of word "connect".
It should be same even if there was a different text before the word 
"connect".
@fix

Test Plan: N/A

Reviewers: raster, herdsman, jpeg

Reviewed By: raster

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D4782
---
 src/lib/evas/common/evas_font_ot.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/evas/common/evas_font_ot.c 
b/src/lib/evas/common/evas_font_ot.c
index 2ba9d17..230abd6 100644
--- a/src/lib/evas/common/evas_font_ot.c
+++ b/src/lib/evas/common/evas_font_ot.c
@@ -321,8 +321,8 @@ evas_common_font_ot_populate_text_props(const Eina_Unicode 
*text,
 gl_itr->index = infos->codepoint;
 adv = positions->x_advance;
 
-pen_x += adv;
-gl_itr->pen_after = EVAS_FONT_ROUND_26_6_TO_INT(pen_x);
+pen_x += EVAS_FONT_ROUND_26_6_TO_INT(adv);
+gl_itr->pen_after = pen_x;
 
 ot_itr++;
 gl_itr++;

-- 




[EGIT] [core/efl] master 01/01: evas: give width offset when Evas tries to find ellipsis position

2017-04-10 Thread Youngbok Shin
raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=1ab87367d8f1c0f416a65c4a43d96bb2f3683052

commit 1ab87367d8f1c0f416a65c4a43d96bb2f3683052
Author: Youngbok Shin <youngb.s...@samsung.com>
Date:   Mon Apr 10 12:15:19 2017 +0900

evas: give width offset when Evas tries to find ellipsis position

Summary:
If the last item before ellipsis item has bigger width than its advance,
evas_common_font_query_last_up_to_pos() function can find wrong ellipsis 
position.
When Evas finds a position for non last item, Evas must care about 
additionally
available space for glyph's width of the given x position.

ex) the last item's glyph before ellipsis item has a tail to draw above the 
ellipsis item.

@fix

Test Plan:
Test case will added as comment.
(Becasue of font license problem.)

Reviewers: herdsman, raster, jpeg, woohyun

Subscribers: cedric, Blackmole

Differential Revision: https://phab.enlightenment.org/D4727
---
 src/lib/evas/canvas/evas_object_text.c |  8 
 src/lib/evas/canvas/evas_object_textblock.c| 24 +++---
 src/lib/evas/common/evas_font.h|  2 +-
 src/lib/evas/common/evas_font_query.c  | 12 +--
 src/lib/evas/include/evas_private.h|  2 +-
 .../evas/engines/software_generic/evas_engine.c|  4 ++--
 6 files changed, 30 insertions(+), 22 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_text.c 
b/src/lib/evas/canvas/evas_object_text.c
index c91e9d2..6e6f510 100644
--- a/src/lib/evas/canvas/evas_object_text.c
+++ b/src/lib/evas/canvas/evas_object_text.c
@@ -309,7 +309,7 @@ _evas_object_text_last_up_to_pos(const Evas_Object *eo_obj,
 o->font,
 >text_props,
 cx - x,
-cy);
+cy, 0);
   break;
}
  x += it->adv;
@@ -327,7 +327,7 @@ _evas_object_text_last_up_to_pos(const Evas_Object *eo_obj,
 o->font,
 >text_props,
 cx - it->x,
-cy);
+cy, 0);
}
   }
  }
@@ -893,7 +893,7 @@ _evas_object_text_layout(Evas_Object *eo_obj, 
Evas_Text_Data *o, Eina_Unicode *t
 o->font,
 >text_props,
 ellipsis_coord - (advance + l + r),
-0);
+0, start_ellip_it->w);
   if (cut >= 0)
 {
start_ellip_it->text_pos = itr->text_pos;
@@ -948,7 +948,7 @@ _evas_object_text_layout(Evas_Object *eo_obj, 
Evas_Text_Data *o, Eina_Unicode *t
   o->font,
   >text_props,
   ellip_frame - (advance + l + 
r),
-  0);
+  0, end_ellip_it->w);
   if (cut >= 0)
 {
end_ellip_it->text_pos = itr->text_pos + cut;
diff --git a/src/lib/evas/canvas/evas_object_textblock.c 
b/src/lib/evas/canvas/evas_object_textblock.c
index db58b62..4de5938 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -3922,7 +3922,7 @@ _layout_text_item_new(Ctxt *c EINA_UNUSED, 
Evas_Object_Textblock_Format *fmt)
  */
 static int
 _layout_text_cutoff_get(Ctxt *c, Evas_Object_Textblock_Format *fmt,
-  const Evas_Object_Textblock_Text_Item *ti)
+  const Evas_Object_Textblock_Text_Item *ti, int width_offset)
 {
if (fmt->font.font)
  {
@@ -3933,7 +3933,7 @@ _layout_text_cutoff_get(Ctxt *c, 
Evas_Object_Textblock_Format *fmt,
   x = 0;
 Evas_Object_Protected_Data *obj = efl_data_scope_get(c->obj, 
EFL_CANVAS_OBJECT_CLASS);
 return ENFN->font_last_up_to_pos(ENDT, fmt->font.font,
-  >text_props, x, 0);
+  >text_props, x, 0, width_offset);
  }
return -1;
 }
@@ -4706,7 +4706,7 @@ _layout_get_charwrap(Ctxt *c, 
Evas_Object_Textblock_Format *fmt,
 if (it->type == EVAS_TEXTBLOCK_ITEM_FORMAT)
wrap = 0;
 else
-   wrap = _layout_text_cutoff_get(c, fmt, _ITEM_TEXT(it));
+   wrap = _layout_text_cutoff_get(c, fmt, _ITEM_TEXT(it), 0);
 
 if (wrap < 0)
return -1;
@@ -4767,13 +4767,13 @@ _layout_get_hyphenationwrap(Ctxt *c, 
Evas_Object_Textblock_Format *fmt,
  Evas_Coord cw;
 
  /* Get cutoff */
- swrap = _layout_text_cutoff_get(c, fmt, _ITEM_TEXT(it));
+ swrap = _layout_t

[EGIT] [core/efl] master 01/01: evas textblock: fix top/bottom valign tag reversed issue

2017-04-04 Thread Youngbok Shin
raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=5da69d7ac9b1ca5084a605dd5373ada9f17328ea

commit 5da69d7ac9b1ca5084a605dd5373ada9f17328ea
Author: Youngbok Shin <youngb.s...@samsung.com>
Date:   Tue Apr 4 18:36:41 2017 +0900

evas textblock: fix top/bottom valign tag reversed issue

Summary:
valign tag is for handling vertical align according to line's height and
text's height. But, it worked in a line which has only one font and
one font size, too. And the result was abnormal depending its font.
The line's height is [ascent + descent]. But, Textblock uses max ascent and
items's height(could be used max ascent + max descent according to its 
position)
when Textblock calculates item's yoff.
So, If Textblock calculate yoff based on line's height,
it should use only ascent and descent instead of max ascent and max descent.
@fix

Test Plan: Will attached in comment section.

Reviewers: raster, herdsman, jpeg, woohyun

Reviewed By: raster

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D4760
---
 src/lib/evas/canvas/evas_object_textblock.c | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_textblock.c 
b/src/lib/evas/canvas/evas_object_textblock.c
index 306b66a..db58b62 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -13206,10 +13206,14 @@ evas_object_textblock_render(Evas_Object *eo_obj 
EINA_UNUSED,
 Evas_Object_Textblock_Text_Item *titr = \
   (Evas_Object_Textblock_Text_Item *)itr; \
 int ascent = 0; \
+int descent = 0; \
 if (titr->text_props.font_instance) \
-  ascent = 
evas_common_font_instance_max_ascent_get(titr->text_props.font_instance); \
+  { \
+ ascent = 
evas_common_font_instance_ascent_get(titr->text_props.font_instance); \
+ descent = 
evas_common_font_instance_descent_get(titr->text_props.font_instance); \
+  } \
 yoff = ascent + \
-  (itr->format->valign * (ln->h - itr->h)); \
+  (itr->format->valign * (ln->h - (ascent + 
descent))); \
  } \
else yoff = itr->format->valign * (ln->h - itr->h); \
 } \

-- 




[EGIT] [core/efl] master 02/02: evas: clean up GL images for emojis when GL context is free'd

2017-03-08 Thread Youngbok Shin
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=f83ce20e1c72c3a645553feeea640e0c4b69e6c1

commit f83ce20e1c72c3a645553feeea640e0c4b69e6c1
Author: Youngbok Shin <youngb.s...@samsung.com>
Date:   Wed Mar 8 19:33:15 2017 +0900

evas: clean up GL images for emojis when GL context is free'd

If GL context is free'd before processing font shutdown,
textures for emoji glyph's GL images will be free'd without clean
up its GL images. It causes eina mempool infinite loop issue when
emoji's GL images are free'd in shutdown process.

So, the patch will make a list for emoji's GL images in context and
clean up them when the context is free'd. Just like font textures in
context.

@fix

Differential Revision: https://phab.enlightenment.org/D4695

Signed-off-by: Jean-Philippe Andre <jp.an...@samsung.com>
---
 src/lib/evas/common/evas_draw.h|  4 +--
 src/lib/evas/common/evas_draw_main.c   |  6 ++--
 src/lib/evas/common/evas_font_draw.c   | 10 +++---
 src/lib/evas/include/evas_common_private.h |  4 +--
 .../evas/engines/gl_common/evas_gl_common.h|  8 +++--
 .../evas/engines/gl_common/evas_gl_context.c   |  3 ++
 src/modules/evas/engines/gl_common/evas_gl_font.c  | 41 ++
 src/modules/evas/engines/gl_common/evas_gl_image.c | 34 +-
 src/modules/evas/engines/gl_generic/evas_engine.c  |  6 ++--
 9 files changed, 71 insertions(+), 45 deletions(-)

diff --git a/src/lib/evas/common/evas_draw.h b/src/lib/evas/common/evas_draw.h
index 6323e8d..28b7c94 100644
--- a/src/lib/evas/common/evas_draw.h
+++ b/src/lib/evas/common/evas_draw.h
@@ -12,9 +12,9 @@ EAPI void   evas_common_draw_context_font_ext_set 
   (RGBA_D
   void 
*(*gl_new)  (void *data, RGBA_Font_Glyph *fg),
   void 
 (*gl_free) (void *ext_dat),
   void 
 (*gl_draw) (void *data, void *dest, void *context, RGBA_Font_Glyph *fg, int x, 
int y),
-  void 
*(*gl_image_new_from_data) (void *gc, unsigned int w, unsigned int h, DATA32 
*image_data, int alpha, Evas_Colorspace cspace),
+  void 
*(*gl_image_new) (void *gc, RGBA_Font_Glyph *fg, int alpha, Evas_Colorspace 
cspace),
   void 
 (*gl_image_free) (void *image),
-  void 
 (*gl_image_draw) (void *gc, void *im, int sx, int sy, int sw, int sh, int dx, 
int dy, int dw, int dh, int smooth));
+  void 
 (*gl_image_draw) (void *gc, void *im, int dx, int dy, int dw, int dh, int 
smooth));
 EAPI void   evas_common_draw_context_clip_clip   
(RGBA_Draw_Context *dc, int x, int y, int w, int h);
 EAPI void   evas_common_draw_context_set_clip
(RGBA_Draw_Context *dc, int x, int y, int w, int h);
 EAPI void   evas_common_draw_context_unset_clip  
(RGBA_Draw_Context *dc);
diff --git a/src/lib/evas/common/evas_draw_main.c 
b/src/lib/evas/common/evas_draw_main.c
index d7c26c7..d6b0a89 100644
--- a/src/lib/evas/common/evas_draw_main.c
+++ b/src/lib/evas/common/evas_draw_main.c
@@ -216,15 +216,15 @@ evas_common_draw_context_font_ext_set(RGBA_Draw_Context 
*dc,
   void *(*gl_new)  (void *data, 
RGBA_Font_Glyph *fg),
   void  (*gl_free) (void *ext_dat),
   void  (*gl_draw) (void *data, void 
*dest, void *context, RGBA_Font_Glyph *fg, int x, int y),
-  void *(*gl_image_new_from_data) (void 
*gc, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, 
Evas_Colorspace cspace),
+  void *(*gl_image_new) (void *gc, 
RGBA_Font_Glyph *fg, int alpha, Evas_Colorspace cspace),
   void  (*gl_image_free) (void *image),
-  void  (*gl_image_draw) (void *gc, void 
*im, int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh, int 
smooth))
+  void  (*gl_image_draw) (void *gc, void 
*im, int dx, int dy, int dw, int dh, int smooth))
 {
dc->font_ext.data = data;
dc->font_ext.func.gl_new = gl_new;
dc->font_ext.func.gl_free = gl_free;
dc->font_ext.func.gl_draw = gl_draw;
-   dc->font_ext.func.gl_image_new_from_data = gl_image_new_from_data;
+   dc->font_ext.fu

[EGIT] [core/efl] master 01/01: naviframe: keep unfocusable state of item before finishing item push/pop

2017-03-08 Thread Youngbok Shin
jaehyun pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=a7b501d94764f3cd183fcfb92fe201ab8f954dc2

commit a7b501d94764f3cd183fcfb92fe201ab8f954dc2
Author: Youngbok Shin <youngb.s...@samsung.com>
Date:   Wed Mar 8 14:15:56 2017 +0900

naviframe: keep unfocusable state of item before finishing item push/pop

If item pop was started without focus at a naviframe object
and the naviframe object got focus before finising item pop,
the naviframe object could give focus to its first object of prev item.
It could ruin focus orders and failed to restore previous focused
object in the item.
To keep consistency of focus policy, same logic will be applied to
item push scenario.
@fix

Change-Id: Ia74bdce3620bd59622ef32a0cedf5fbd84815400
---
 src/lib/elementary/elc_naviframe.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/elementary/elc_naviframe.c 
b/src/lib/elementary/elc_naviframe.c
index 9bdd867..fb9f988 100644
--- a/src/lib/elementary/elc_naviframe.c
+++ b/src/lib/elementary/elc_naviframe.c
@@ -1166,6 +1166,7 @@ _on_item_show_finished(void *data,
 
elm_object_signal_emit(VIEW(it), "elm,state,visible", "elm");
 
+   elm_widget_tree_unfocusable_set(VIEW(it), EINA_FALSE);
_prev_page_focus_recover(it);
 
if (sd->freeze_events)
@@ -1589,7 +1590,7 @@ _item_push_helper(Elm_Naviframe_Item_Data *item)
  {
 Elm_Naviframe_Op *nfo = calloc(1, sizeof (Elm_Naviframe_Op));
 
-elm_widget_tree_unfocusable_set(VIEW(item), EINA_FALSE);
+elm_widget_tree_unfocusable_set(VIEW(item), EINA_TRUE);
 elm_widget_tree_unfocusable_set(VIEW(top_item), EINA_TRUE);
 
 if (sd->freeze_events)
@@ -1806,7 +1807,6 @@ _elm_naviframe_item_pop(Eo *obj, Elm_Naviframe_Data *sd)
 Elm_Naviframe_Op *nfo = calloc(1, sizeof (Elm_Naviframe_Op));
 
 elm_widget_tree_unfocusable_set(VIEW(it), EINA_TRUE);
-elm_widget_tree_unfocusable_set(VIEW(prev_it), EINA_FALSE);
 
 if (sd->freeze_events)
   {

-- 




[EGIT] [core/efl] master 01/02: evas textblock: keep previous size when the calculation is skipped

2017-02-13 Thread Youngbok Shin
raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=c39855a8ac6f86c2dd8b1856ed70f85e0e521f3e

commit c39855a8ac6f86c2dd8b1856ed70f85e0e521f3e
Author: Youngbok Shin <youngb.s...@samsung.com>
Date:   Tue Feb 14 16:16:26 2017 +0900

evas textblock: keep previous size when the calculation is skipped

Summary:
When a size calculation is skipped because of some reasons,
Evas Textblock should keep same size with the previous size.
@fix

Test Plan: N/A

Reviewers: raster, herdsman, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4659
---
 src/lib/evas/canvas/evas_object_textblock.c | 30 -
 1 file changed, 25 insertions(+), 5 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_textblock.c 
b/src/lib/evas/canvas/evas_object_textblock.c
index 2d2af2c..fc0f5cc 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -5415,8 +5415,16 @@ _layout_par(Ctxt *c)
 
  /* After this par we are no longer at the beginning, as there
   * must be some text in the par. */
- if (c->position == TEXTBLOCK_POSITION_START)
-c->position = TEXTBLOCK_POSITION_ELSE;
+ if (!EINA_INLIST_GET(c->par)->next)
+   {
+  c->position = (c->position == TEXTBLOCK_POSITION_START) ?
+ TEXTBLOCK_POSITION_SINGLE : TEXTBLOCK_POSITION_END;
+   }
+ else
+   {
+  if (c->position == TEXTBLOCK_POSITION_START)
+ c->position = TEXTBLOCK_POSITION_ELSE;
+   }
 
  return 0;
   }
@@ -5486,6 +5494,12 @@ _layout_par(Ctxt *c)
 
Eina_Bool item_preadv = EINA_FALSE;
Evas_Textblock_Obstacle *obs = NULL;
+
+   /* Initialize wmax by 0.
+  It means the width calculation will be processed.
+  So, it does not need to use previous calculated width. */
+   if (c->wmax == -1) c->wmax = 0;
+
for (i = c->par->logical_items ; i ; )
  {
 Evas_Coord prevdescent = 0, prevascent = 0;
@@ -6244,7 +6258,7 @@ _layout(const Evas_Object *eo_obj, int w, int h, int 
*w_ret, int *h_ret)
c->x = c->y = 0;
c->w = w;
c->h = h;
-   c->wmax = c->hmax = 0;
+   c->wmax = c->hmax = -1;
c->ascent = c->descent = 0;
c->maxascent = c->maxdescent = 0;
c->marginl = c->marginr = 0;
@@ -6426,8 +6440,14 @@ _relayout(const Evas_Object *eo_obj)
 {
Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, 
EFL_CANVAS_OBJECT_CLASS);
Efl_Canvas_Text_Data *o = efl_data_scope_get(eo_obj, MY_CLASS);
-   _layout(eo_obj, obj->cur->geometry.w, obj->cur->geometry.h,
- >formatted.w, >formatted.h);
+   Evas_Coord fw, fh;
+
+   _layout(eo_obj, obj->cur->geometry.w, obj->cur->geometry.h, , );
+
+   /* If formatted width/height from _layout() is -1,
+  It means the size calculation was skipped. */
+   if (fw >= 0) o->formatted.w = fw;
+   if (fh >= 0) o->formatted.h = fh;
o->formatted.valid = 1;
o->formatted.oneline_h = 0;
o->last_w = obj->cur->geometry.w;

-- 




[EGIT] [core/efl] master 02/02: Edje calc: Fix textblock size calculation logic

2017-02-13 Thread Youngbok Shin
raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=a6fff5bc1e5e30a946e435369bcbaa406dd5d5ba

commit a6fff5bc1e5e30a946e435369bcbaa406dd5d5ba
Author: Youngbok Shin <youngb.s...@samsung.com>
Date:   Tue Feb 14 16:16:45 2017 +0900

Edje calc: Fix textblock size calculation logic

Summary:
In singleline textblock, using "text.min: 1 0" and min, max width,
Edje allows to use expandable text with ellipsis. It shows ellipsis
when only text's width reach the max width.
But, Edje couldn't support same feature on multiline textblock.
Edje dose not use max height or text.max properly if ellipsis is enabled.
This feature is very useful to make a layout with dynamically aligned text.
@fix

Reviewers: cedric, tasn, woohyun, raster, herdsman

Subscribers: z-wony, eagleeye, jpeg

Differential Revision: https://phab.enlightenment.org/D3595
---
 data/elementary/themes/edc/elm/label.edc |  19 +-
 src/lib/edje/edje_calc.c | 305 +++
 src/lib/edje/edje_util.c |  69 ++-
 src/lib/elementary/elm_label.c   |  38 ++--
 4 files changed, 329 insertions(+), 102 deletions(-)

diff --git a/data/elementary/themes/edc/elm/label.edc 
b/data/elementary/themes/edc/elm/label.edc
index b1e273b..99227d8 100644
--- a/data/elementary/themes/edc/elm/label.edc
+++ b/data/elementary/themes/edc/elm/label.edc
@@ -25,9 +25,26 @@ group { name: "elm/label/base/default";
 rel2.relative: 1.0 1.0;
 text {
style: "label_style";
-   min: 0 1;
+   min: 1 1;
 }
  }
+ description { state: "horizontal_fixed" 0.0;
+inherit: "default" 0.0;
+fixed: 1 0;
+text.min: 0 1;
+ }
+  }
+   }
+   programs {
+  program { name: "horizontal_expandable";
+ signal: "elm,state,horizontal,expandable"; source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "elm.text";
+  }
+  program { name: "horizontal_fixed";
+ signal: "elm,state,horizontal,fixed"; source: "elm";
+ action: STATE_SET "horizontal_fixed" 0.0;
+ target: "elm.text";
   }
}
 }
diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c
index 320fbff..d52069d 100644
--- a/src/lib/edje/edje_calc.c
+++ b/src/lib/edje/edje_calc.c
@@ -1445,9 +1445,17 @@ _edje_part_recalc_single_textblock(FLOAT_T sc,
int *minw, int *minh,
int *maxw, int *maxh)
 {
+   int min_calc_w = 0, min_calc_h = 0;
+
if ((ep->type != EDJE_RP_TYPE_TEXT) ||
(!ep->typedata.text))
  return;
+
+   /* min_calc_* values need to save calculated minumum size
+* for maximum size calculation */
+   if (minw) min_calc_w = *minw;
+   if (minh) min_calc_h = *minh;
+
if (chosen_desc)
  {
 Evas_Coord tw, th, ins_l, ins_r, ins_t, ins_b;
@@ -1592,56 +1600,277 @@ _edje_part_recalc_single_textblock(FLOAT_T sc,
}
  if ((chosen_desc->text.min_x) || (chosen_desc->text.min_y))
{
-  int mw = 0, mh = 0;
+  evas_object_textblock_style_insets_get(ep->object, _l,
+ _r, _t, 
_b);
 
   tw = th = 0;
   if (!chosen_desc->text.min_x)
 {
-   efl_gfx_size_set(ep->object, TO_INT(params->eval.w), 
TO_INT(params->eval.h));
-   efl_canvas_text_size_formatted_get(ep->object, , 
);
+   /* text.min: 0 1
+* text.max: X X */
+   int temp_h = TO_INT(params->eval.h);
+   int temp_w = TO_INT(params->eval.w);
+
+   if (min_calc_w > temp_w)
+ temp_w = min_calc_w;
+   if ((!chosen_desc->text.max_x) &&
+   maxw && (*maxw > -1) && (*maxw < temp_w))
+ temp_w = *maxw;
+
+   if (chosen_desc->text.max_y)
+ {
+/* text.min: 0 1
+ * text.max: X 1 */
+temp_h = INT_MAX / 1;
+ }
+   else if (maxh && (*maxh > TO_INT(params->eval.h)))
+ {
+/* text.min: 0 1
+ * text.max: X 0
+ * And there is a limit for height. */
+temp_h = *maxh;
+ }
+
+   

[EGIT] [core/efl] master 01/01: elementary conformant: clear internal pointer if holded object is deleted

2017-01-21 Thread Youngbok Shin
raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=ca075ce21f9c267aa7186b96a6e4dc51d36c1206

commit ca075ce21f9c267aa7186b96a6e4dc51d36c1206
Author: Youngbok Shin <youngb.s...@samsung.com>
Date:   Sun Jan 22 11:03:14 2017 +0900

elementary conformant: clear internal pointer if holded object is deleted

Summary:
Set sd->scroller as NULL when the scroller object is deleted.
It prevents error logs when elm_conform tries to delete resize callback
function from deleted object.
@fix

Test Plan: N/A

Reviewers: raster, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4519
---
 src/lib/elementary/elm_conform.c | 24 
 1 file changed, 20 insertions(+), 4 deletions(-)

diff --git a/src/lib/elementary/elm_conform.c b/src/lib/elementary/elm_conform.c
index ac1e6f4..0ca7c86 100644
--- a/src/lib/elementary/elm_conform.c
+++ b/src/lib/elementary/elm_conform.c
@@ -693,6 +693,15 @@ _on_content_resize(void *data,
sd->show_region_job = ecore_job_add(_show_region_job, data);
 }
 
+static void
+_on_top_scroller_del(void *data, const Efl_Event *event)
+{
+   ELM_CONFORMANT_DATA_GET(data, sd);
+
+   if (event->object == sd->scroller)
+ sd->scroller = NULL;
+}
+
 #endif
 
 #ifdef HAVE_ELEMENTARY_X
@@ -721,13 +730,20 @@ _autoscroll_objects_update(void *data)
if (top_scroller != sd->scroller)
  {
 if (sd->scroller)
-  evas_object_event_callback_del
-(sd->scroller, EVAS_CALLBACK_RESIZE, _on_content_resize);
+  {
+ evas_object_event_callback_del_full
+(sd->scroller, EVAS_CALLBACK_RESIZE, _on_content_resize, data);
+ efl_event_callback_del(sd->scroller, EFL_EVENT_DEL, 
_on_top_scroller_del, data);
+  }
+
 sd->scroller = top_scroller;
 
 if (sd->scroller)
-  evas_object_event_callback_add
-(sd->scroller, EVAS_CALLBACK_RESIZE, _on_content_resize, data);
+  {
+ evas_object_event_callback_add
+(sd->scroller, EVAS_CALLBACK_RESIZE, _on_content_resize, data);
+ efl_event_callback_add(sd->scroller, EFL_EVENT_DEL, 
_on_top_scroller_del, data);
+  }
  }
 }
 

-- 




[EGIT] [core/efl] master 01/01: evas font: revise evas_font_init/reinit functions

2017-01-21 Thread Youngbok Shin
raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=65be73c58f91a768c7f7228e3e83863e90a92ade

commit 65be73c58f91a768c7f7228e3e83863e90a92ade
Author: Youngbok Shin <youngb.s...@samsung.com>
Date:   Sat Jan 21 19:00:46 2017 +0900

evas font: revise evas_font_init/reinit functions

Summary:
The static flag in evas_font_init() was not useful.
It could be replaced by checking address of "fc_config".
FcInitReinitialize() function was not necessary to reload
configure and font files in Evas. It would be meaningful
when only Evas use Fontconfig's function without own "fc_config".
To reload "fc_config", calling FcInitLoadConfigAndFonts() is enough.
And there is no need to load "fc_config" from evas_font_reinit()
when "fc_config" is not prepared.

Test Plan: N/A

Reviewers: herdsman, raster, tasn, cedric, woohyun

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D4612
---
 src/lib/evas/canvas/evas_font_dir.c | 20 +---
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/src/lib/evas/canvas/evas_font_dir.c 
b/src/lib/evas/canvas/evas_font_dir.c
index 8d36049..682f80f 100644
--- a/src/lib/evas/canvas/evas_font_dir.c
+++ b/src/lib/evas/canvas/evas_font_dir.c
@@ -59,12 +59,9 @@ static FcConfig *fc_config = NULL;
 static void
 evas_font_init(void)
 {
-   static Eina_Bool fc_init = EINA_FALSE;
-   if (fc_init)
-  return;
-   fc_init = EINA_TRUE;
 #ifdef HAVE_FONTCONFIG
-   fc_config = FcInitLoadConfigAndFonts();
+   if (!fc_config)
+ fc_config = FcInitLoadConfigAndFonts();
 #endif
 }
 
@@ -1531,12 +1528,13 @@ evas_font_reinit(void)
Eina_List *l;
char *path;
 
-   if (fc_config) FcConfigDestroy(fc_config);
-
-   FcInitReinitialize();
-   fc_config = FcInitLoadConfigAndFonts();
+   if (fc_config)
+ {
+FcConfigDestroy(fc_config);
+fc_config = FcInitLoadConfigAndFonts();
 
-   EINA_LIST_FOREACH(global_font_path, l, path)
-  FcConfigAppFontAddDir(fc_config, (const FcChar8 *) path);
+EINA_LIST_FOREACH(global_font_path, l, path)
+   FcConfigAppFontAddDir(fc_config, (const FcChar8 *) path);
+ }
 #endif
 }

-- 




[EGIT] [core/efl] master 01/01: Edje: remove a unreachable code from edje_text.c

2016-12-07 Thread Youngbok Shin
hermet pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=835c8d1b77ac100cb92876fb447879427c484428

commit 835c8d1b77ac100cb92876fb447879427c484428
Author: Youngbok Shin <youngb.s...@samsung.com>
Date:   Thu Dec 8 13:31:04 2016 +0900

Edje: remove a unreachable code from edje_text.c

Summary:
If "text" is NULL, it is set as empty string in the above code.
So, the removed line is unreachable.

Test Plan: N/A

Reviewers: raster, cedric, herdsman, woohyun, jpeg, Hermet

Reviewed By: Hermet

Differential Revision: https://phab.enlightenment.org/D4462
---
 src/lib/edje/edje_text.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/lib/edje/edje_text.c b/src/lib/edje/edje_text.c
index 517cdab..33b83f4 100644
--- a/src/lib/edje/edje_text.c
+++ b/src/lib/edje/edje_text.c
@@ -297,7 +297,6 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
_edje_calc_params_need_type_text(params);
if (params->type.text->size)
  size = params->type.text->size;
-   if (!text) text = "";
 
if ((text == ep->typedata.text->cache.in_str)
|| (text && ep->typedata.text->cache.in_str && 
!strcmp(ep->typedata.text->cache.in_str, text)))

-- 




[EGIT] [core/efl] master 01/01: edje entry: fix crash issue due to improper callback handling

2016-11-28 Thread Youngbok Shin
woohyun pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=29ec0aa1946ac6ea494c5afb79f9b4d650f24c5e

commit 29ec0aa1946ac6ea494c5afb79f9b4d650f24c5e
Author: Youngbok Shin <youngb.s...@samsung.com>
Date:   Tue Nov 29 14:39:01 2016 +0900

edje entry: fix crash issue due to improper callback handling

Summary:
If there were multiple elm_entry objects and some of them were deleted,
the callback function would cause crash problem.
The callback function only for specific data should be deleted when
a entry object is deleted.
@fix

Test Plan: N/A

Reviewers: raster, cedric, herdsman, woohyun, subodh6129

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D4435
---
 src/lib/edje/edje_entry.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/edje/edje_entry.c b/src/lib/edje/edje_entry.c
index 495843a..0d85a5b 100644
--- a/src/lib/edje/edje_entry.c
+++ b/src/lib/edje/edje_entry.c
@@ -3037,7 +3037,7 @@ _edje_entry_real_part_shutdown(Edje *ed, Edje_Real_Part 
*rp)
 en->pw_timer = NULL;
  }
 
-   evas_event_callback_del(ed->base->evas, 
EVAS_CALLBACK_CANVAS_VIEWPORT_RESIZE, _canvas_viewport_resize_cb);
+   evas_event_callback_del_full(ed->base->evas, 
EVAS_CALLBACK_CANVAS_VIEWPORT_RESIZE, _canvas_viewport_resize_cb, rp);
 
 #ifdef HAVE_ECORE_IMF
if (rp->part->entry_mode >= EDJE_ENTRY_EDIT_MODE_EDITABLE)

-- 




[EGIT] [core/efl] master 02/04: elementary entry: keep style user when new theme is applied

2016-11-01 Thread Youngbok Shin
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=ab9f0ae3ca3f97f550f33947da6e49ac256076ca

commit ab9f0ae3ca3f97f550f33947da6e49ac256076ca
Author: Youngbok Shin <youngb.s...@samsung.com>
Date:   Tue Nov 1 10:54:16 2016 -0700

elementary entry: keep style user when new theme is applied

Summary:
The style user should be kept when entry's mode is changed.
@fix

Test Plan:
1. Run "elementary_test -to "entry style user"
2. Click "Singleline Mode" toggle
3. See the result

Reviewers: raster, tasn, herdsman, cedric

Reviewed By: cedric

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D4366

Signed-off-by: Cedric BAIL <ced...@osg.samsung.com>
---
 src/bin/elementary/test_entry.c | 19 ++-
 src/lib/elementary/elm_entry.c  |  5 +
 2 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/src/bin/elementary/test_entry.c b/src/bin/elementary/test_entry.c
index edcdd44..b8a7e62 100644
--- a/src/bin/elementary/test_entry.c
+++ b/src/bin/elementary/test_entry.c
@@ -1024,6 +1024,14 @@ static char *user_style =
"ul='+ underline=on underline_color=#AAA'";
 
 static void
+ent_tg_singleline_mode_state_changed_cb(void *data, Evas_Object *obj, void 
*event_info EINA_UNUSED)
+{
+   Evas_Object *en = data;
+
+   elm_entry_single_line_set(en, elm_check_state_get(obj));
+}
+
+static void
 ent_bt_style_user_peek(void *data, Evas_Object *obj EINA_UNUSED, void 
*event_info EINA_UNUSED)
 {
Evas_Object *en = data;
@@ -1053,7 +1061,7 @@ ent_bt_style_user_push(void *data, Evas_Object *obj 
EINA_UNUSED, void *event_inf
 void
 test_entry_style_user(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, 
void *event_info EINA_UNUSED)
 {
-   Evas_Object *win, *bx, *hbx, *en, *bt, *bt2;
+   Evas_Object *win, *bx, *hbx, *en, *bt, *bt2, *tg;
 
win = elm_win_util_standard_add("entry-user-style", "Entry User Style");
elm_win_autodel_set(win, EINA_TRUE);
@@ -1079,6 +1087,15 @@ test_entry_style_user(void *data EINA_UNUSED, 
Evas_Object *obj EINA_UNUSED, void
evas_object_show(en);
elm_object_focus_set(en, EINA_TRUE);
 
+   tg = elm_check_add(bx);
+   elm_object_style_set(tg, "toggle");
+   elm_object_text_set(tg, "Singleline Mode");
+   elm_object_part_text_set(tg, "on", "ON");
+   elm_object_part_text_set(tg, "off", "OFF");
+   evas_object_smart_callback_add(tg, "changed", 
ent_tg_singleline_mode_state_changed_cb, en);
+   elm_box_pack_end(bx, tg);
+   evas_object_show(tg);
+
hbx = elm_box_add(bx);
elm_box_horizontal_set(hbx, EINA_TRUE);
elm_box_pack_end(bx, hbx);
diff --git a/src/lib/elementary/elm_entry.c b/src/lib/elementary/elm_entry.c
index 78a3209..49fdac8 100644
--- a/src/lib/elementary/elm_entry.c
+++ b/src/lib/elementary/elm_entry.c
@@ -842,6 +842,7 @@ _elm_entry_elm_widget_theme_apply(Eo *obj, Elm_Entry_Data 
*sd)
 {
const char *str;
const char *t;
+   const char *stl_user;
const char *style = elm_widget_style_get(obj);
 
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, ELM_THEME_APPLY_FAILED);
@@ -863,6 +864,7 @@ _elm_entry_elm_widget_theme_apply(Eo *obj, Elm_Entry_Data 
*sd)
 
_mirrored_set(obj, elm_widget_mirrored_get(obj));
 
+   stl_user = 
eina_stringshare_add(edje_obj_part_text_style_user_peek(sd->entry_edje, 
"elm.text"));
t = eina_stringshare_add(elm_object_text_get(obj));
 
elm_widget_theme_object_set
@@ -875,6 +877,9 @@ _elm_entry_elm_widget_theme_apply(Eo *obj, Elm_Entry_Data 
*sd)
  edje_obj_part_text_select_allow_set
 (sd->entry_edje, "elm.text", EINA_FALSE);
 
+   edje_obj_part_text_style_user_push(sd->entry_edje, "elm.text", stl_user);
+   eina_stringshare_del(stl_user);
+
elm_object_text_set(obj, t);
eina_stringshare_del(t);
 

-- 




[EGIT] [apps/terminology] master 01/01: Add a missing description for text selection of nyanology

2016-10-04 Thread Youngbok Shin
billiob pushed a commit to branch master.

http://git.enlightenment.org/apps/terminology.git/commit/?id=44f6fb8afc7352ed44deff9fc030138bbfdb5a3b

commit 44f6fb8afc7352ed44deff9fc030138bbfdb5a3b
Author: Youngbok Shin <youngb.s...@samsung.com>
Date:   Tue Oct 4 20:44:55 2016 +0200

Add a missing description for text selection of nyanology

Summary:
When nyanology has text selection, it produces an error message
every second.
@fix

Test Plan:
1. Set theme as "nyanology"
2. Set a text selection.
3. See error messages.

Reviewers: raster

Differential Revision: https://phab.enlightenment.org/D4327
---
 data/themes/nyanology/nyanology.edc | 4 
 1 file changed, 4 insertions(+)

diff --git a/data/themes/nyanology/nyanology.edc 
b/data/themes/nyanology/nyanology.edc
index 9c9a3ab..bc06124 100644
--- a/data/themes/nyanology/nyanology.edc
+++ b/data/themes/nyanology/nyanology.edc
@@ -903,6 +903,10 @@ target: "0.clip"; target: "1.clip"; target: "2.clip"; 
target: "3.clip"; target:
}
color: OUTCOL;
 }
+description { state: "pulse" 0.0;
+   inherit: "default" 0.0;
+   color: OUTCOL2;
+}
  }
  program { name: "bottomfull";
 signal: "mode,bottomfull";

-- 




[EGIT] [core/efl] master 03/03: edje_cc: don't warn when image attributes are missing in inherit_only group

2016-09-28 Thread Youngbok Shin
raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=ceb63bb202c46889e53ea030493656698271016f

commit ceb63bb202c46889e53ea030493656698271016f
Author: Youngbok Shin <youngb.s...@samsung.com>
Date:   Wed Sep 28 15:49:23 2016 +0900

edje_cc: don't warn when image attributes are missing in inherit_only group

Summary:
The inherit_only groups could be used for template of other groups.
So, even if it has image part, it dose not need to have image attributes.
@fix

Test Plan: N/A

Reviewers: cedric, conr2d, jpeg, raster

Reviewed By: raster

Differential Revision: https://phab.enlightenment.org/D4322
---
 src/bin/edje/edje_cc_out.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/bin/edje/edje_cc_out.c b/src/bin/edje/edje_cc_out.c
index 90a8e41..ab04fed 100644
--- a/src/bin/edje/edje_cc_out.c
+++ b/src/bin/edje/edje_cc_out.c
@@ -378,6 +378,9 @@ check_image_part_desc(Edje_Part_Collection *pc, Edje_Part 
*ep,
   Edje_Part_Description_Image *epd, Eet_File *ef)
 {
unsigned int i;
+   Edje_Part_Collection_Parser *pcp = (Edje_Part_Collection_Parser *)pc;
+
+   if (pcp->inherit_only) return;
 
if (epd->image.id == -1 && epd->common.visible)
  WRN("Collection %s(%i): image attributes missing for "

-- 




[EGIT] [core/efl] master 01/01: ecore_evas_wayland: Add NULL checking for surface

2016-09-27 Thread Youngbok Shin
devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=ceb0eab402a5283b2bfb9199da2f5ef33374ca38

commit ceb0eab402a5283b2bfb9199da2f5ef33374ca38
Author: Youngbok Shin <youngb.s...@samsung.com>
Date:   Tue Sep 27 08:50:04 2016 -0400

ecore_evas_wayland: Add NULL checking for surface

Summary: Need to NULL check before using surface like other cases.

Test Plan: N/A

Reviewers: jpeg, raster, ManMower, devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D4301
---
 src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c 
b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
index 10d4cca..c469acd 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
@@ -1368,10 +1368,13 @@ _ecore_evas_wl_common_render_flush_pre(void *data, Evas 
*evas EINA_UNUSED, void
 {
Ecore_Evas *ee = data;
Ecore_Evas_Engine_Wl_Data *wdata;
+   struct wl_surface *surf;
 
wdata = ee->engine.data;
-   wdata->anim_callback =
- wl_surface_frame(ecore_wl2_window_surface_get(wdata->win));
+   surf = ecore_wl2_window_surface_get(wdata->win);
+   if (!surf) return;
+
+   wdata->anim_callback = wl_surface_frame(surf);
wl_callback_add_listener(wdata->anim_callback, &_anim_listener, ee);
ecore_evas_manual_render_set(ee, 1);
if (wdata->win->configure_ack && wdata->win->configure_serial)

-- 




[EGIT] [core/efl] master 01/01: elementary entry: send a signal to edje for notifying scrollable mode

2016-09-26 Thread Youngbok Shin
herdsman pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=145f590f849ad79158cb378eea4fe89684facad4

commit 145f590f849ad79158cb378eea4fe89684facad4
Author: Youngbok Shin <youngb.s...@samsung.com>
Date:   Mon Sep 26 16:03:45 2016 +0300

elementary entry: send a signal to edje for notifying scrollable mode

Summary:
If entry edje should be changed according to scrollable mode,
the signal will be used. The following signals are added.
"elm,scroll,enable"
"elm,scroll,disable"

Test Plan: N/A

Reviewers: raster, tasn, herdsman, cedric

Subscribers: minkyu, jpeg, akanad, z-wony, Blackmole

Differential Revision: https://phab.enlightenment.org/D4254
---
 src/lib/elementary/elm_entry.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/src/lib/elementary/elm_entry.c b/src/lib/elementary/elm_entry.c
index 7bb79c7..1c24e40 100644
--- a/src/lib/elementary/elm_entry.c
+++ b/src/lib/elementary/elm_entry.c
@@ -956,6 +956,11 @@ _elm_entry_elm_widget_theme_apply(Eo *obj, Elm_Entry_Data 
*sd)
 "entry", "handler/end", style);
  }
 
+   if (sd->scroll)
+ edje_obj_signal_emit(sd->entry_edje, "elm,scroll,enable", "elm");
+   else
+ edje_obj_signal_emit(sd->entry_edje, "elm,scroll,disable", "elm");
+
sd->changed = EINA_TRUE;
elm_layout_sizing_eval(obj);
 

-- 




[EGIT] [core/efl] master 02/02: elementary label: use text width when label calculates duration for slide

2016-09-06 Thread Youngbok Shin
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=f50674db5884db0b89686d597970b6cf4eac6652

commit f50674db5884db0b89686d597970b6cf4eac6652
Author: Youngbok Shin <youngb.s...@samsung.com>
Date:   Tue Sep 6 15:00:53 2016 -0700

elementary label: use text width when label calculates duration for slide

Summary:
When developers customize theme for making different type of sliding label,
it would be better to send a duration based on whole text.
[The whole text width - label object's w] is only useful for short, bounce
type sliding.

Test Plan: N/A

Reviewers: raster, tasn, herdsman, cedric

Reviewed By: cedric

Subscribers: minkyu, akanad, z-wony, Blackmole, jpeg

Differential Revision: https://phab.enlightenment.org/D4255

Signed-off-by: Cedric BAIL <ced...@osg.samsung.com>
---
 src/lib/elementary/elm_label.c | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/lib/elementary/elm_label.c b/src/lib/elementary/elm_label.c
index a9acf51..7af1237 100644
--- a/src/lib/elementary/elm_label.c
+++ b/src/lib/elementary/elm_label.c
@@ -141,8 +141,12 @@ _label_slide_change(Evas_Object *obj)
 // calculate speed or duration
 if (!strcmp(elm_object_style_get(obj), "slide_long"))
   w = tb_w + w;
-else // slide_short or slide_bounce
+else if (!strcmp(elm_object_style_get(obj), "slide_short") ||
+ !strcmp(elm_object_style_get(obj), "slide_bounce")) // 
slide_short or slide_bounce
   w = tb_w - w;
+else
+  w = tb_w;
+
 if (sd->use_slide_speed)
   {
  if (sd->slide_speed <= 0) sd->slide_speed = 1;

-- 




[EGIT] [core/efl] master 01/01: Evas text: fix RTL text ellipsis issues

2016-08-18 Thread Youngbok Shin
herdsman pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=36d086ec42feabe2b5c868897897c6a9e0460978

commit 36d086ec42feabe2b5c868897897c6a9e0460978
Author: Youngbok Shin <youngb.s...@samsung.com>
Date:   Thu Aug 18 14:39:40 2016 +0300

Evas text: fix RTL text ellipsis issues

Summary:
Visual position of ellipsis item should be set according to
its bidi direction. But, by setting visual position in same way
as logical position, the end ellipsis could be put opposite side.
Also, start ellipsis must placed on left side of RTL text.
@fix T3187

Test Plan: Test an sample on T3187

Reviewers: tasn, woohyun, herdsman

Subscribers: raster, Blackmole, z-wony, cedric, jpeg, minudf

Maniphest Tasks: T3187

Differential Revision: https://phab.enlightenment.org/D3769
---
 src/lib/evas/canvas/evas_object_text.c | 28 
 1 file changed, 20 insertions(+), 8 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_text.c 
b/src/lib/evas/canvas/evas_object_text.c
index b5c79a2..4aa29c8 100644
--- a/src/lib/evas/canvas/evas_object_text.c
+++ b/src/lib/evas/canvas/evas_object_text.c
@@ -890,25 +890,32 @@ _evas_object_text_layout(Evas_Object *eo_obj, 
Evas_Text_Data *o, Eina_Unicode *t
}
  if (itr && (itr != start_ellip_it))
{
-  int cut = 1 + ENFN->font_last_up_to_pos(ENDT,
+  int cut = ENFN->font_last_up_to_pos(ENDT,
 o->font,
 >text_props,
 ellipsis_coord - (advance + l + r),
 0);
-  if (cut > 0)
+  if (cut >= 0)
 {
-
start_ellip_it->text_pos = itr->text_pos;
-   start_ellip_it->visual_pos = itr->visual_pos;
-   if (!_layout_text_item_trim(obj, o, itr, cut, 
EINA_FALSE))
+
+   if (itr->text_props.bidi_dir == EVAS_BIDI_DIRECTION_RTL)
+ start_ellip_it->visual_pos = itr->visual_pos + cut + 
1;
+   else
+ start_ellip_it->visual_pos = itr->visual_pos;
+
+   if (!_layout_text_item_trim(obj, o, itr, cut + 1, 
EINA_FALSE))
  {
 _evas_object_text_item_del(o, itr);
  }
 }
}
 
- o->items = (Evas_Object_Text_Item *) 
eina_inlist_remove(EINA_INLIST_GET(o->items), EINA_INLIST_GET(start_ellip_it));
- o->items = (Evas_Object_Text_Item *) 
eina_inlist_prepend(EINA_INLIST_GET(o->items), EINA_INLIST_GET(start_ellip_it));
+ if (!o->bidi_par_props)
+   {
+  o->items = (Evas_Object_Text_Item *) 
eina_inlist_remove(EINA_INLIST_GET(o->items), EINA_INLIST_GET(start_ellip_it));
+  o->items = (Evas_Object_Text_Item *) 
eina_inlist_prepend(EINA_INLIST_GET(o->items), EINA_INLIST_GET(start_ellip_it));
+   }
   }
 
 if (end_ellip_it)
@@ -946,7 +953,12 @@ _evas_object_text_layout(Evas_Object *eo_obj, 
Evas_Text_Data *o, Eina_Unicode *t
   if (cut >= 0)
 {
end_ellip_it->text_pos = itr->text_pos + cut;
-   end_ellip_it->visual_pos = itr->visual_pos + cut;
+
+if (itr->text_props.bidi_dir == 
EVAS_BIDI_DIRECTION_RTL)
+ end_ellip_it->visual_pos = itr->visual_pos - 1;
+else
+ end_ellip_it->visual_pos = itr->visual_pos + cut;
+
if (_layout_text_item_trim(obj, o, itr, cut, EINA_TRUE))
  {
 itr = (Evas_Object_Text_Item *) 
EINA_INLIST_GET(itr)->next;

-- 




[EGIT] [core/efl] master 01/01: Elementary: Load image for image item with proper orientation

2016-08-18 Thread Youngbok Shin
herdsman pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=b915d29cd1e0b1091a6f6eb066188c65987de280

commit b915d29cd1e0b1091a6f6eb066188c65987de280
Author: Youngbok Shin <youngb.s...@samsung.com>
Date:   Thu Aug 18 14:09:16 2016 +0300

Elementary: Load image for image item with proper orientation

Summary:
Image files can have orientation information. Elm Entry have to
call evas_object_image_load_orientation_set() for showing image
with proper orientation.

Test Plan: N/A

Reviewers: herdsman, raster, jpeg

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D4244
---
 src/lib/elementary/elm_entry.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lib/elementary/elm_entry.c b/src/lib/elementary/elm_entry.c
index 66e7eaa..3e64cce 100644
--- a/src/lib/elementary/elm_entry.c
+++ b/src/lib/elementary/elm_entry.c
@@ -2729,6 +2729,7 @@ _item_get(void *data,
 const char *fname = item + 7;
 
 o = evas_object_image_filled_add(evas_object_evas_get(data));
+evas_object_image_load_orientation_set(o, EINA_TRUE);
 evas_object_image_file_set(o, fname, NULL);
 if (evas_object_image_load_error_get(o) == EVAS_LOAD_ERROR_NONE)
   {

-- 




[EGIT] [core/efl] master 01/01: Evas Text: parse font string everytime for updating lang properly

2016-08-18 Thread Youngbok Shin
herdsman pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=167d41e7b25c2cfda7759d050a1f57633e6abbaf

commit 167d41e7b25c2cfda7759d050a1f57633e6abbaf
Author: Youngbok Shin <youngb.s...@samsung.com>
Date:   Thu Aug 18 13:33:08 2016 +0300

Evas Text: parse font string everytime for updating lang properly

Summary:
We can't assume the given font is same with current fdesc by comparing 
string.
Since Evas starts to supporting "auto" for language,
the given font string should be parsed once before comparing it.
@fix

Test Plan: N/A

Reviewers: tasn, raster, cedric, herdsman

Subscribers: jpeg, minudf, z-wony, Blackmole, woohyun

Differential Revision: https://phab.enlightenment.org/D4227
---
 src/lib/evas/canvas/evas_object_text.c | 19 ---
 1 file changed, 8 insertions(+), 11 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_text.c 
b/src/lib/evas/canvas/evas_object_text.c
index 2e4a418..b5c79a2 100644
--- a/src/lib/evas/canvas/evas_object_text.c
+++ b/src/lib/evas/canvas/evas_object_text.c
@@ -420,18 +420,15 @@ _evas_text_efl_text_properties_font_set(Eo *eo_obj, 
Evas_Text_Data *o, const cha
if ((!font) || (size <= 0)) return;
 
evas_object_async_block(obj);
-   if (!(o->cur.font && !strcmp(font, o->cur.font)))
- {
-fdesc = evas_font_desc_new();
 
-/* Set default language according to locale. */
-eina_stringshare_replace(&(fdesc->lang), 
evas_font_lang_normalize("auto"));
-evas_font_name_parse(fdesc, font);
- }
-   else
- {
-fdesc = evas_font_desc_ref(o->cur.fdesc);
- }
+   /* We can't assume the given font is same with current fdesc by comparing 
string.
+  Since Evas starts to supporting "auto" for language,
+  the given font string should be parsed once before comparing it. */
+   fdesc = evas_font_desc_new();
+
+   /* Set default language according to locale. */
+   eina_stringshare_replace(&(fdesc->lang), evas_font_lang_normalize("auto"));
+   evas_font_name_parse(fdesc, font);
 
if (o->cur.fdesc && !evas_font_desc_cmp(fdesc, o->cur.fdesc) &&
(size == o->cur.size))

-- 




[EGIT] [core/efl] master 01/01: Edje calc: Fix Evas Text width calculation with ellipsis

2016-07-11 Thread Youngbok Shin
raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=982ef0b9d0a5ffb8dc84824ec8a44cfc9b69886c

commit 982ef0b9d0a5ffb8dc84824ec8a44cfc9b69886c
Author: Youngbok Shin <youngb.s...@samsung.com>
Date:   Tue Jul 12 10:20:03 2016 +0900

Edje calc: Fix Evas Text width calculation with ellipsis

Summary:
To keep consistency with Evas Textblock part in edje,
text.min has to work logically even if ellipsis is enabled.
If a Text part has minimum width, maximum width and "text.min: 1 X;",
Text part should be expanded until its width reaches to the maximum width.
Then, ellipsis will work. Singleline Textblock is also working like this.
@fix

Reviewers: cedric, herdsman, raster, tasn

Subscribers: Blackmole, z-wony, jpeg

Differential Revision: https://phab.enlightenment.org/D3587
---
 src/bin/edje/edje_cc_handlers.c | 27 ---
 src/lib/edje/edje_calc.c| 10 --
 src/lib/edje/edje_text.c| 29 ++---
 3 files changed, 14 insertions(+), 52 deletions(-)

diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c
index 88da2ee..7a1b653 100644
--- a/src/bin/edje/edje_cc_handlers.c
+++ b/src/bin/edje/edje_cc_handlers.c
@@ -15057,19 +15057,6 @@ edje_cc_handlers_hierarchy_free(void)
part_hierarchy = NULL;
 }
 
-static Eina_Bool
-_part_text_ellipsis_check(Edje_Part *ep, Edje_Part_Description_Common *desc)
-{
-   Edje_Part_Description_Text *ed;
-
-   if ((ep->type != EDJE_PART_TYPE_TEXT) && (ep->type != 
EDJE_PART_TYPE_TEXTBLOCK))
- return EINA_FALSE;
-
-   ed = (Edje_Part_Description_Text*)desc;
-
-   return ((ed->text.ellipsis != -1) && ed->text.min_x);
-}
-
 static void
 edje_cc_handlers_hierarchy_pop(void)
 {  /* Remove part from hierarchy stack when finished parsing it */
@@ -15093,25 +15080,11 @@ edje_cc_handlers_hierarchy_pop(void)
 file_in, line - 1, current_de->entry, 
current_part->name);
 exit(-1);
}
- if (_part_text_ellipsis_check(current_part, 
current_part->other.desc[i]))
-   {
-  WRN("Part '%s' in group '%s' contains description '%s:%g' 
which has text.min: 1 X; but not text.ellipsis: -1;",
-  current_part->name, current_de->entry,
-  current_part->other.desc[i]->state.name, 
current_part->other.desc[i]->state.value);
-  WRN("This is almost certainly not what you want.");
-   }
   }
 
 /* auto-add default desc if it was omitted */
 if (!current_part->default_desc)
   ob_collections_group_parts_part_description();
-else if (_part_text_ellipsis_check(current_part, 
current_part->default_desc))
-  {
- WRN("Part '%s' in group '%s' contains description '%s:%g' which 
has text.min: 1 X; but not text.ellipsis: -1;",
- current_part->name, current_de->entry,
- current_part->default_desc->state.name, 
current_part->default_desc->state.value);
- WRN("This is almost certainly not what you want.");
-  }
  }
 
if (info)
diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c
index b38b03a..04abc0e 100644
--- a/src/lib/edje/edje_calc.c
+++ b/src/lib/edje/edje_calc.c
@@ -1700,20 +1700,26 @@ _edje_part_recalc_single_text(FLOAT_T sc EINA_UNUSED,
 
if (chosen_desc->text.max_x)
  {
-if ((*maxw < 0) || (mw < *maxw)) *maxw = mw;
+if ((*maxw < 0) || (mw > *maxw)) *maxw = mw;
  }
if (chosen_desc->text.max_y)
  {
-if ((*maxh < 0) || (mh < *maxh)) *maxh = mh;
+if ((*maxh < 0) || (mh > *maxh)) *maxh = mh;
  }
if (chosen_desc->text.min_x)
  {
 if (mw > *minw) *minw = mw;
+if ((*maxw > -1) && (*minw > *maxw)) *minw = *maxw;
  }
if (chosen_desc->text.min_y)
  {
 if (mh > *minh) *minh = mh;
+if ((*maxh > -1) && (*minh > *maxh)) *minh = *maxh;
  }
+   if ((*maxw > -1) && (mw > *maxw)) mw = *maxw;
+   if ((*maxh > -1) && (mh > *maxh)) mh = *maxh;
+
+   evas_object_resize(ep->object, mw, mh);
 }
 
 #else
diff --git a/src/lib/edje/edje_text.c b/src/lib/edje/edje_text.c
index 50f8e90..d65f0a9 100644
--- a/src/lib/edje/edje_text.c
+++ b/src/lib/edje/edje_text.c
@@ -135,7 +135,7 @@ _edje_text_fit_x(Edje *ed, Edje_Real_Part *ep,
 
if (ep->part->scale) evas_object_scale_set(ep->object, TO_DOUBLE(sc));
 
-   evas_obj_text_ellipsis_set(ep->object, (chosen_desc->text.min_x || 
chosen_desc->text.fit_x) ? -1 : params->type.text.ellipsis);
+   evas_obj_text_ellipsis_set(ep->object, params->type.text.ell

[EGIT] [core/efl] master 01/01: Evas textblock: Apply scale factor to , formats

2016-07-11 Thread Youngbok Shin
raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=64e0dc341dfb0f9187254d26b6fde705b4830f52

commit 64e0dc341dfb0f9187254d26b6fde705b4830f52
Author: Youngbok Shin <youngb.s...@samsung.com>
Date:   Mon Jul 11 17:57:36 2016 +0900

Evas textblock: Apply scale factor to ,  formats

Summary:
Font size is scaled according to scale factor.
The linesize, linegap formats also have to be scaled properly.
@fix

Test Plan:
Test cases are included.
Run "make check"

Reviewers: woohyun, Jieun, tasn, herdsman

Reviewed By: tasn

Subscribers: raster, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3688
---
 src/lib/evas/canvas/evas_object_textblock.c |  9 +
 src/tests/evas/evas_test_textblock.c| 28 ++--
 2 files changed, 31 insertions(+), 6 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_textblock.c 
b/src/lib/evas/canvas/evas_object_textblock.c
index 1342ff5..3503e71 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -2716,10 +2716,11 @@ _layout_format_ascent_descent_adjust(const Evas_Object 
*eo_obj,
 descent = *maxdescent;
 if (fmt->linesize > 0)
   {
- if ((ascent + descent) < fmt->linesize)
+ int scaled_linesize = fmt->linesize * obj->cur->scale;
+ if ((ascent + descent) < scaled_linesize)
{
-  ascent = ((fmt->linesize * ascent) / (ascent + descent));
-  descent = fmt->linesize - ascent;
+  ascent = ((scaled_linesize * ascent) / (ascent + descent));
+  descent = scaled_linesize - ascent;
}
   }
 else if (fmt->linerelsize > 0.0)
@@ -2727,7 +2728,7 @@ _layout_format_ascent_descent_adjust(const Evas_Object 
*eo_obj,
  descent = descent * fmt->linerelsize;
  ascent = ascent * fmt->linerelsize;
   }
-descent += fmt->linegap;
+descent += fmt->linegap * obj->cur->scale;
 descent += ((ascent + descent) * fmt->linerelgap);
 if (*maxascent < ascent) *maxascent = ascent;
 if (*maxdescent < descent) *maxdescent = descent;
diff --git a/src/tests/evas/evas_test_textblock.c 
b/src/tests/evas/evas_test_textblock.c
index 381c938..f2e542a 100644
--- a/src/tests/evas/evas_test_textblock.c
+++ b/src/tests/evas/evas_test_textblock.c
@@ -3205,6 +3205,7 @@ START_TEST(evas_textblock_formats)
START_TB_TEST();
const char *buf = "Thi

[EGIT] [core/efl] master 01/01: Edje entry: Skip codes for updating cursor when cursor position is not changed

2016-07-11 Thread Youngbok Shin
raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=df40586f655678fc43b2c1ef747fa5ea5b7ac3fe

commit df40586f655678fc43b2c1ef747fa5ea5b7ac3fe
Author: Youngbok Shin <youngb.s...@samsung.com>
Date:   Mon Jul 11 17:09:31 2016 +0900

Edje entry: Skip codes for updating cursor when cursor position is not 
changed

Summary:
When ever a Edje's cursor function is called, "cursor,changed" signal is
emitted. Even if the position is not changed. And, in Elementary, the signal
will trigger evas_smart_objects_calculate() from 
elm_widget_show_region_set().
It causes bad performace.
@fix

Test Plan: N/A

Reviewers: tasn, herdsman, cedric, woohyun

Subscribers: jpeg, z-wony, Blackmole

Differential Revision: https://phab.enlightenment.org/D3902
---
 src/lib/edje/edje_entry.c | 25 +
 1 file changed, 25 insertions(+)

diff --git a/src/lib/edje/edje_entry.c b/src/lib/edje/edje_entry.c
index c5ed2b3..2519461 100644
--- a/src/lib/edje/edje_entry.c
+++ b/src/lib/edje/edje_entry.c
@@ -3822,6 +3822,7 @@ _edje_entry_cursor_begin(Edje_Real_Part *rp, Edje_Cursor 
cur)
 {
Entry *en;
Evas_Textblock_Cursor *c = _cursor_get(rp, cur);
+   int old_cur_pos;
 
if ((rp->type != EDJE_RP_TYPE_TEXT) ||
(!rp->typedata.text)) return;
@@ -3831,7 +3832,12 @@ _edje_entry_cursor_begin(Edje_Real_Part *rp, Edje_Cursor 
cur)
 
_edje_entry_imf_context_reset(rp);
 
+   old_cur_pos = evas_textblock_cursor_pos_get(c);
evas_textblock_cursor_paragraph_first(c);
+
+   if (old_cur_pos == evas_textblock_cursor_pos_get(c))
+ return;
+
_sel_update(en->ed, c, rp->object, rp->typedata.text->entry_data);
 
_edje_entry_imf_cursor_info_set(en);
@@ -3844,6 +3850,7 @@ _edje_entry_cursor_end(Edje_Real_Part *rp, Edje_Cursor 
cur)
 {
Entry *en;
Evas_Textblock_Cursor *c = _cursor_get(rp, cur);
+   int old_cur_pos;
 
if ((rp->type != EDJE_RP_TYPE_TEXT) ||
(!rp->typedata.text)) return;
@@ -3853,7 +3860,12 @@ _edje_entry_cursor_end(Edje_Real_Part *rp, Edje_Cursor 
cur)
 
_edje_entry_imf_context_reset(rp);
 
+   old_cur_pos = evas_textblock_cursor_pos_get(c);
_curs_end(c, rp->object, rp->typedata.text->entry_data);
+
+   if (old_cur_pos == evas_textblock_cursor_pos_get(c))
+ return;
+
_sel_update(en->ed, c, rp->object, rp->typedata.text->entry_data);
 
_edje_entry_imf_cursor_info_set(en);
@@ -3891,6 +3903,7 @@ _edje_entry_cursor_line_begin(Edje_Real_Part *rp, 
Edje_Cursor cur)
 {
Entry *en;
Evas_Textblock_Cursor *c = _cursor_get(rp, cur);
+   int old_cur_pos;
 
if ((rp->type != EDJE_RP_TYPE_TEXT) ||
(!rp->typedata.text)) return;
@@ -3899,7 +3912,12 @@ _edje_entry_cursor_line_begin(Edje_Real_Part *rp, 
Edje_Cursor cur)
if (!c) return;
_edje_entry_imf_context_reset(rp);
 
+   old_cur_pos = evas_textblock_cursor_pos_get(c);
evas_textblock_cursor_line_char_first(c);
+
+   if (old_cur_pos == evas_textblock_cursor_pos_get(c))
+ return;
+
_sel_update(en->ed, c, rp->object, rp->typedata.text->entry_data);
 
_edje_entry_imf_cursor_info_set(en);
@@ -3913,6 +3931,7 @@ _edje_entry_cursor_line_end(Edje_Real_Part *rp, 
Edje_Cursor cur)
 {
Entry *en;
Evas_Textblock_Cursor *c = _cursor_get(rp, cur);
+   int old_cur_pos;
 
if ((rp->type != EDJE_RP_TYPE_TEXT) ||
(!rp->typedata.text)) return;
@@ -3920,7 +3939,13 @@ _edje_entry_cursor_line_end(Edje_Real_Part *rp, 
Edje_Cursor cur)
if (!en) return;
if (!c) return;
_edje_entry_imf_context_reset(rp);
+
+   old_cur_pos = evas_textblock_cursor_pos_get(c);
evas_textblock_cursor_line_char_last(c);
+
+   if (old_cur_pos == evas_textblock_cursor_pos_get(c))
+ return;
+
_sel_update(en->ed, c, rp->object, rp->typedata.text->entry_data);
 
_edje_entry_imf_cursor_info_set(en);

-- 




[EGIT] [core/efl] master 01/01: edje: update a style when a style is added as class's member

2016-07-10 Thread Youngbok Shin
raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=8e93b88175f2c97677fbb40628953bd1a12f3578

commit 8e93b88175f2c97677fbb40628953bd1a12f3578
Author: Youngbok Shin <youngb.s...@samsung.com>
Date:   Mon Jul 11 13:13:38 2016 +0900

edje: update a style when a style is added as class's member

Summary:
If there is no member styles when a text_class is updated,
newly added styles can't be updated.
So, newly added styles as member of text_class should be updated.
@fix

Test Plan:
Test case is included.

1. Run "elementary_test -to "font overlay""
2. Press Next button. Check the font size.
3. Press Prev button.
4. Put font_size as 50
5. Click Apply button.
6. Press Next button. Check the font size is not changed.

Reviewers: cedric, tasn, herdsman, raster

Subscribers: jpeg, z-wony, Blackmole

Differential Revision: https://phab.enlightenment.org/D4125
---
 data/elementary/objects/test.edc |  27 +
 src/bin/elementary/test.c|   2 +
 src/bin/elementary/test_config.c | 119 ++
 src/lib/edje/edje_textblock_styles.c | 191 +++
 4 files changed, 253 insertions(+), 86 deletions(-)

diff --git a/data/elementary/objects/test.edc b/data/elementary/objects/test.edc
index 90db73c..e58a595 100644
--- a/data/elementary/objects/test.edc
+++ b/data/elementary/objects/test.edc
@@ -833,4 +833,31 @@ group { name: "page_layout";
  }
   }
}
+   group { name: "font_overlay_layout";
+  styles {
+ style { name: "test_class_style";
+base: "font=Sans font_size=20 color=#fff 
text_class=font_overlay_test wrap=mixed";
+ }
+  }
+  parts {
+ part { name: "bg";
+type: RECT;
+scale: 1;
+description { state: "default" 0.0;
+   min: 400 300;
+   color: 0 0 0 0;
+}
+ }
+ part { name: "elm.text";
+type: TEXTBLOCK;
+scale: 1;
+description { state: "default" 0.0;
+   fixed: 1 1;
+   text {
+  style: "test_class_style";
+   }
+}
+ }
+  }
+   }
 }
diff --git a/src/bin/elementary/test.c b/src/bin/elementary/test.c
index 9f6eb8d..917983e 100644
--- a/src/bin/elementary/test.c
+++ b/src/bin/elementary/test.c
@@ -266,6 +266,7 @@ void test_external_video(void *data, Evas_Object *obj, void 
*event_info);
 void test_external_icon(void *data, Evas_Object *obj, void *event_info);
 void test_external_combobox(void *data, Evas_Object *obj, void *event_info);
 void test_config(void *data, Evas_Object *obj, void *event_info);
+void test_config_font_overlay(void *data, Evas_Object *obj, void *event_info);
 void test_video(void *data, Evas_Object *obj, void *event_info);
 void test_eio(void *data, Evas_Object *obj, void *event_info);
 void test_web(void *data, Evas_Object *obj, void *event_info);
@@ -916,6 +917,7 @@ add_tests:
ADD_TEST(NULL, "Miscellaneous", "Accessibility", test_access);
ADD_TEST(NULL, "Miscellaneous", "Accessibility2", test_access2);
ADD_TEST(NULL, "Miscellaneous", "Accessibility3", test_access3);
+   ADD_TEST(NULL, "Miscellaneous", "Font overlay", test_config_font_overlay);
 
//--//
ADD_TEST(NULL, "Application client/server", "Task switcher", 
test_task_switcher);
diff --git a/src/bin/elementary/test_config.c b/src/bin/elementary/test_config.c
index bf032a7..2f19092 100644
--- a/src/bin/elementary/test_config.c
+++ b/src/bin/elementary/test_config.c
@@ -532,3 +532,122 @@ test_config(void *data, Evas_Object *obj, void 
*event_info EINA_UNUSED)
evas_object_resize(win, 400, 500);
evas_object_show(win);
 }
+
+static void
+_font_overlay_page_next(void *data, Evas_Object *obj EINA_UNUSED, void 
*event_info EINA_UNUSED)
+{
+   Evas_Object *layout;
+   Evas_Object *nf = (Evas_Object *)data;
+   char buf[255];
+
+   layout = elm_layout_add(nf);
+   snprintf(buf, sizeof(buf), "%s/objects/test.edj", elm_app_data_dir_get());
+   elm_layout_file_set(layout, buf, "font_overlay_layout");
+   elm_layout_text_set(layout, "elm.text", "TEXTBLOCK part of test_class");
+   evas_object_show(layout);
+
+   elm_naviframe_item_push(nf, "Font Overlay", NULL, NULL, layout, NULL);
+}
+
+static void
+_apply_font_overlay_btn_clicked_cb(void *data, Evas_Object *obj EINA_UNUSED, 
void *event_info EINA_UNUSED)
+{
+   Evas_Object *nf = (Evas_Object *)data;
+   Evas_Object *entry;
+   const char *font;
+   const char *font_size_temp;
+   int font_size;
+
+   entry = (Evas_Object *)evas_object_

[EGIT] [core/efl] master 01/01: evas: add pattern "style" when evas query fonts via fontconfig

2016-06-27 Thread Youngbok Shin
raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=2ce33e73a7d48d4b54a075c07f12c0162972f350

commit 2ce33e73a7d48d4b54a075c07f12c0162972f350
Author: Youngbok Shin <youngb.s...@samsung.com>
Date:   Tue Jun 28 10:49:37 2016 +0900

evas: add pattern "style" when evas query fonts via fontconfig

Summary:
Some fonts can have weird style and weight value.
If a font has a style name as "medium" and a weight value as "semi-bold",
Evas can't load the font using "font=Somefont:style=Medium".
It only can be load with "font=Somefont:style=SemiBold" or
"font=Somefont:weight=SemiBold".
On the other hand, it could be loaded when I tested the following commands.
fc-match -s ":family=Somefont:style=Medium" or
fc-match -s ":family=Somefont:weight=SemiBold"

Evas also should load font based on font's style name.
@fix

Test Plan: N/A

Reviewers: tasn, herdsman, cedric, woohyun, raster

Reviewed By: raster

Subscribers: Blackmole, z-wony, jpeg

Differential Revision: https://phab.enlightenment.org/D4108
---
 src/lib/evas/canvas/evas_font_dir.c | 5 +
 src/lib/evas/include/evas_private.h | 1 +
 2 files changed, 6 insertions(+)

diff --git a/src/lib/evas/canvas/evas_font_dir.c 
b/src/lib/evas/canvas/evas_font_dir.c
index 75546eb..1369dfe 100644
--- a/src/lib/evas/canvas/evas_font_dir.c
+++ b/src/lib/evas/canvas/evas_font_dir.c
@@ -420,6 +420,7 @@ evas_font_desc_unref(Evas_Font_Description *fdesc)
if (--(fdesc->ref) == 0)
  {
 eina_stringshare_del(fdesc->name);
+eina_stringshare_del(fdesc->style);
 eina_stringshare_del(fdesc->fallbacks);
 eina_stringshare_del(fdesc->lang);
 free(fdesc);
@@ -506,6 +507,7 @@ evas_font_name_parse(Evas_Font_Description *fdesc, const 
char *name)
 #define _SET_STYLE(x, len) \
  fdesc->x = _evas_font_style_find_internal(name + len, tend, \
_style_##x##_map, _STYLE_MAP_LEN(_style_##x##_map));
+ eina_stringshare_replace_length(&(fdesc->style), name + 7, tend - 
(name + 7));
  _SET_STYLE(slant, 7);
  _SET_STYLE(weight, 7);
  _SET_STYLE(width, 7);
@@ -804,6 +806,9 @@ evas_font_load(Evas *eo_evas, Evas_Font_Description *fdesc, 
const char *source,
   NULL);
 FcPatternAddString (p_nm, FC_FAMILY, (FcChar8*) fdesc->name);
 
+if (fdesc->style)
+  FcPatternAddString (p_nm, FC_STYLE, (FcChar8*) fdesc->style);
+
 /* Handle font fallbacks */
 if (fdesc->fallbacks)
   {
diff --git a/src/lib/evas/include/evas_private.h 
b/src/lib/evas/include/evas_private.h
index f8d3e9b..394fa58 100644
--- a/src/lib/evas/include/evas_private.h
+++ b/src/lib/evas/include/evas_private.h
@@ -1211,6 +1211,7 @@ struct _Evas_Font_Description
const char *name;
const char *fallbacks;
const char *lang;
+   const char *style;
 
Evas_Font_Slant slant;
Evas_Font_Weight weight;

-- 




[EGIT] [core/efl] master 06/11: edje: replace 4000x4000 min size limitarion with loop count restriction.

2016-06-23 Thread Youngbok Shin
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=47df4439721f1ba3fb9610f3192c760c06f8e1df

commit 47df4439721f1ba3fb9610f3192c760c06f8e1df
Author: Youngbok Shin <youngb.s...@samsung.com>
Date:   Thu Jun 23 10:11:39 2016 -0700

edje: replace 4000x4000 min size limitarion with loop count restriction.

Summary:
4000x4000 min size limitation was added to prevent infinite
calculation loop. But, it can ruin calculation of some proper Edjes.
Normally, properly generated Edje runs the calculation loop below 10 times.
So, "255" could be proper limitation for calculation loop.
It also make better performance for broken Edje.

Test Plan: N/A

Reviewers: raster, Hermet, woohyun, cedric

Reviewed By: cedric

Subscribers: jpeg, z-wony, Blackmole

Differential Revision: https://phab.enlightenment.org/D4075

Signed-off-by: Cedric BAIL <ced...@osg.samsung.com>
---
 src/lib/edje/edje_util.c | 19 +--
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/src/lib/edje/edje_util.c b/src/lib/edje/edje_util.c
index fead840..970e2d8 100644
--- a/src/lib/edje/edje_util.c
+++ b/src/lib/edje/edje_util.c
@@ -4058,10 +4058,11 @@ _edje_object_parts_extends_calc(Eo *obj EINA_UNUSED, 
Edje *ed, Evas_Coord *x, Ev
 EOLIAN void
 _edje_object_size_min_restricted_calc(Eo *obj EINA_UNUSED, Edje *ed, 
Evas_Coord *minw, Evas_Coord *minh, Evas_Coord restrictedw, Evas_Coord 
restrictedh)
 {
-   const int MIN_LIMIT = 4000;
+   const int CALC_COUNT_LIMIT = 255;
 
Evas_Coord orig_w, orig_h; //original edje size
int max_over_w, max_over_h;  //maximum over-calculated size.
+   int calc_count = 0;
Eina_Bool repeat_w, repeat_h;
Eina_Bool reset_max = EINA_TRUE;
Edje_Real_Part *pep = NULL;
@@ -4092,6 +4093,8 @@ again:
  {
 unsigned int i;
 
+calc_count++;
+
 repeat_w = EINA_FALSE;
 repeat_h = EINA_FALSE;
 ed->dirty = EINA_TRUE;
@@ -4181,7 +4184,7 @@ again:
  if (ed->h < restrictedh) ed->h = restrictedh;
   }
 
-if ((ed->w > MIN_LIMIT) || (ed->h > MIN_LIMIT))
+if (reset_max && (calc_count > CALC_COUNT_LIMIT))
   {
  /* Only print it if we have a non-fixed textblock.
   * We should possibly avoid all of this if in this case, but in
@@ -4192,16 +4195,12 @@ again:
 ERR("file %s, group %s has a non-fixed part '%s'. Adding 
'fixed: 1 1;' to source EDC may help. Continuing discarding faulty part.",
 ed->path, ed->group, pep->part->name);
   else
-ERR("file %s, group %s overflowed %dx%d with minimum size 
of %dx%d. Continuing discarding faulty parts.",
-ed->path, ed->group, MIN_LIMIT, MIN_LIMIT,
-ed->w, ed->h);
+ERR("file %s, group %s runs infinite minimum calculation 
loops.Continuing discarding faulty parts.",
+ed->path, ed->group);
}
 
- if (reset_max)
-   {
-  reset_max = EINA_FALSE;
-  goto again;
-   }
+ reset_max = EINA_FALSE;
+ goto again;
   }
  }
while (repeat_w || repeat_h);

-- 




[EGIT] [core/efl] master 02/02: Edje, Elementary: Remove

2016-06-20 Thread Youngbok Shin
raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=14cbd23d29464a73d8853f4defb451abc50983d4

commit 14cbd23d29464a73d8853f4defb451abc50983d4
Author: Youngbok Shin <youngb.s...@samsung.com>
Date:   Mon Jun 20 21:11:25 2016 +0900

Edje, Elementary: Remove 

[EGIT] [core/efl] master 01/01: Elementary toolbar: Don't call "clicked" callback when item is just selected

2016-05-12 Thread Youngbok Shin
jaehwan pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=91437fafb001391bbc8f54807f64b012cfacde09

commit 91437fafb001391bbc8f54807f64b012cfacde09
Author: Youngbok Shin <youngb.s...@samsung.com>
Date:   Fri May 13 14:06:18 2016 +0900

Elementary toolbar: Don't call "clicked" callback when item is just selected

Summary:
"clicked" callback must be called when an item is really clicked.
But, toolbar had called it whenever an item was selected.
Even, it could be triggered by "elm_toolbar_item_selected_set()" API.
So, "clicked" callback will be called when only an item is clicked.
Also, it changed confusing names of related internal functions.
@fix

Test Plan: N/A

Reviewers: jaehwan, woohyun, cedric

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D3937
---
 src/lib/elementary/elm_toolbar.c | 22 +-
 1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/src/lib/elementary/elm_toolbar.c b/src/lib/elementary/elm_toolbar.c
index 506ae53..4e2314b 100644
--- a/src/lib/elementary/elm_toolbar.c
+++ b/src/lib/elementary/elm_toolbar.c
@@ -1174,7 +1174,6 @@ _item_select(Elm_Toolbar_Item_Data *it)
  {
 if (it->func) it->func((void *)(WIDGET_ITEM_DATA_GET(EO_OBJ(it))), 
WIDGET(it), EO_OBJ(it));
  }
-   eo_event_callback_call(obj, EVAS_CLICKABLE_INTERFACE_EVENT_CLICKED, 
EO_OBJ(it));
eo_event_callback_call(obj, EVAS_SELECTABLE_INTERFACE_EVENT_SELECTED, 
EO_OBJ(it));
if (_elm_config->atspi_mode)
 elm_interface_atspi_accessible_state_changed_signal_emit(EO_OBJ(it), 
ELM_ATSPI_STATE_SELECTED, EINA_TRUE);
@@ -1807,7 +1806,7 @@ _move_cb(void *data,
 }
 
 static void
-_select_filter_cb(Elm_Toolbar_Item_Data *it,
+_mouse_clicked_cb(Elm_Toolbar_Item_Data *it,
   Evas_Object *obj EINA_UNUSED,
   const char *emission,
   const char *source EINA_UNUSED)
@@ -1816,16 +1815,21 @@ _select_filter_cb(Elm_Toolbar_Item_Data *it,
char buf[sizeof("elm,action,click,") + 1];
 
button = atoi(emission + sizeof("mouse,clicked,") - 1);
-   if (button == 1) return;  /* regular left click event */
+   if (button == 1)
+ {
+/* regular left click event */
+eo_event_callback_call(WIDGET(it), 
EVAS_CLICKABLE_INTERFACE_EVENT_CLICKED, EO_OBJ(it));
+return;
+ }
snprintf(buf, sizeof(buf), "elm,action,click,%d", button);
elm_layout_signal_emit(VIEW(it), buf, "elm");
 }
 
 static void
-_select_cb(void *data,
-   Evas_Object *obj EINA_UNUSED,
-   const char *emission EINA_UNUSED,
-   const char *source EINA_UNUSED)
+_action_click_cb(void *data,
+ Evas_Object *obj EINA_UNUSED,
+ const char *emission EINA_UNUSED,
+ const char *source EINA_UNUSED)
 {
Elm_Toolbar_Item_Data *it = data;
 
@@ -2512,9 +2516,9 @@ _item_new(Evas_Object *obj,
(VIEW(it), "toolbar", "item", elm_widget_style_get(obj)))
  CRI("Failed to set layout!");
elm_layout_signal_callback_add
- (VIEW(it), "elm,action,click", "elm", _select_cb, it);
+ (VIEW(it), "elm,action,click", "elm", _action_click_cb, it);
elm_layout_signal_callback_add
- (VIEW(it), "mouse,clicked,*", "*", (Edje_Signal_Cb)_select_filter_cb, it);
+ (VIEW(it), "mouse,clicked,*", "*", (Edje_Signal_Cb)_mouse_clicked_cb, it);
elm_layout_signal_callback_add
  (VIEW(it), "elm,mouse,in", "elm", _mouse_in_cb, it);
elm_layout_signal_callback_add

-- 




[EGIT] [core/efl] master 01/01: entry: add elm_entry_select_allow_set/get APIs

2016-05-11 Thread Youngbok Shin
thiep pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=e49d84f057c1b7019d0f2bc6b6d9bebba61e1cbf

commit e49d84f057c1b7019d0f2bc6b6d9bebba61e1cbf
Author: Youngbok Shin <youngb.s...@samsung.com>
Date:   Thu May 12 11:10:42 2016 +0900

entry: add elm_entry_select_allow_set/get APIs

Summary:
There is no way to allow/deny the text selection feature.
It is only controlled by disabled state. But, some UX does
not want to allow the text selection on editable entry widget.
@feature

Test Plan:
Run the following test case. You can see "Select Allow" check box.
elementary_test -to entry

Reviewers: tasn, herdsman, cedric, thiepha

Reviewed By: thiepha

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D3934
---
 src/bin/elementary/test_entry.c   | 30 --
 src/lib/elementary/elm_entry.c| 28 +---
 src/lib/elementary/elm_entry.eo   | 11 +++
 src/lib/elementary/elm_widget_entry.h |  1 +
 4 files changed, 65 insertions(+), 5 deletions(-)

diff --git a/src/bin/elementary/test_entry.c b/src/bin/elementary/test_entry.c
index 388059f..0ca4e66 100644
--- a/src/bin/elementary/test_entry.c
+++ b/src/bin/elementary/test_entry.c
@@ -94,10 +94,22 @@ changed_cb1(void *data, Evas_Object *obj, void *event_info 
EINA_UNUSED)
printf("ck2 %p is now %i\n", ck, elm_check_state_get(ck));
 }
 
+static void
+select_allow_check_changed_cb(void *data, Evas_Object *obj, void *event_info 
EINA_UNUSED)
+{
+   Evas_Object *en = data;
+   elm_entry_select_allow_set(en, elm_check_state_get(obj));
+
+   if (elm_check_state_get(obj))
+ printf("Entry %p is now selectable.\n", en);
+   else
+ printf("Entry %p is now unselectable.\n", en);
+}
+
 void
 test_entry(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void 
*event_info EINA_UNUSED)
 {
-   Evas_Object *win, *bx, *bx2, *bt, *en, *ck;
+   Evas_Object *win, *bx, *bx2, *bx3, *bt, *en, *ck;
char buf[4096];
 
win = elm_win_util_standard_add("entry", "Entry");
@@ -216,13 +228,27 @@ test_entry(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_inf
elm_object_focus_allow_set(bt, EINA_FALSE);
evas_object_show(bt);
 
+   bx3 = elm_box_add(win);
+   elm_box_horizontal_set(bx3, EINA_TRUE);
+   evas_object_size_hint_weight_set(bx3, EVAS_HINT_EXPAND, 0.0);
+   evas_object_size_hint_align_set(bx3, EVAS_HINT_FILL, EVAS_HINT_FILL);
+
ck = elm_check_add(win);
elm_object_text_set(ck, "Context Menu Disable");
evas_object_smart_callback_add(ck, "changed", changed_cb1, ck);
-   elm_box_pack_end(bx, ck);
+   elm_box_pack_end(bx3, ck);
evas_object_show(ck);
 
+   ck = elm_check_add(win);
+   elm_object_text_set(ck, "Select Allow");
+   elm_check_state_set(ck, elm_entry_select_allow_get(en));
+   evas_object_smart_callback_add(ck, "changed", 
select_allow_check_changed_cb, en);
+   elm_box_pack_end(bx3, ck);
+   evas_object_show(ck);
+
+   elm_box_pack_end(bx, bx3);
elm_box_pack_end(bx, bx2);
+   evas_object_show(bx3);
evas_object_show(bx2);
 
evas_object_show(win);
diff --git a/src/lib/elementary/elm_entry.c b/src/lib/elementary/elm_entry.c
index 008a6e6..583f206 100644
--- a/src/lib/elementary/elm_entry.c
+++ b/src/lib/elementary/elm_entry.c
@@ -862,8 +862,12 @@ _elm_entry_elm_widget_theme_apply(Eo *obj, Elm_Entry_Data 
*sd)
elm_widget_theme_object_set
  (obj, sd->entry_edje, "entry", _elm_entry_theme_group_get(obj), style);
 
-   edje_object_part_text_select_allow_set
-   (sd->entry_edje, "elm.text", _elm_config->desktop_entry);
+   if (sd->sel_allow && _elm_config->desktop_entry)
+ edje_obj_part_text_select_allow_set
+(sd->entry_edje, "elm.text", EINA_TRUE);
+   else
+ edje_obj_part_text_select_allow_set
+(sd->entry_edje, "elm.text", EINA_FALSE);
 
elm_object_text_set(obj, t);
eina_stringshare_del(t);
@@ -1383,6 +1387,8 @@ _hover_selected_cb(void *data,
 {
ELM_ENTRY_DATA_GET(data, sd);
 
+   if (!sd->sel_allow) return;
+
sd->sel_mode = EINA_TRUE;
edje_object_part_text_select_none(sd->entry_edje, "elm.text");
 
@@ -1673,7 +1679,7 @@ _menu_call(Evas_Object *obj)
   {
  if (!sd->sel_mode)
{
-  if (!_elm_config->desktop_entry)
+  if (sd->sel_allow && !_elm_config->desktop_entry)
 {
if (!sd->password)
  elm_hoversel_item_add
@@ -3590,6 +3596,7 @@ _elm_entry_evas_object_smart_add(Eo *obj, Elm_Entry_Data 
*priv)
priv->context_menu = EINA_TRUE;
priv->auto_save = EINA_TRUE;
priv->editable = EINA_TRUE;
+   pr

[EGIT] [core/efl] master 01/01: evas: Add safety check for NULL pointer of clipper.

2015-03-23 Thread Youngbok Shin
hermet pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=b8b6c1e1a8dd461026c47f316475f2812d32eeb0

commit b8b6c1e1a8dd461026c47f316475f2812d32eeb0
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Tue Mar 24 12:53:34 2015 +0900

evas: Add safety check for NULL pointer of clipper.

Summary: It caused crash when clipper is NULL and it makes evas test-suite 
fail.

Test Plan: Run evas test-suite. (make check)

Reviewers: woohyun, tasn, herdsman, Hermet

Reviewed By: Hermet

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2215
---
 src/lib/evas/canvas/evas_object_text.c  | 13 -
 src/lib/evas/canvas/evas_object_textblock.c | 13 -
 2 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_text.c 
b/src/lib/evas/canvas/evas_object_text.c
index 87c4d5a..e17bd63 100644
--- a/src/lib/evas/canvas/evas_object_text.c
+++ b/src/lib/evas/canvas/evas_object_text.c
@@ -2055,11 +2055,14 @@ normal_render:
 
 /* normal text */
 ENFN-context_multiplier_unset(output, context);
-ENFN-context_multiplier_set(output, context,
- obj-cur-clipper-cur-cache.clip.r,
- obj-cur-clipper-cur-cache.clip.g,
- obj-cur-clipper-cur-cache.clip.b,
- obj-cur-clipper-cur-cache.clip.a);
+
+if (obj-cur-clipper)
+  ENFN-context_multiplier_set(output, context,
+   obj-cur-clipper-cur-cache.clip.r,
+   obj-cur-clipper-cur-cache.clip.g,
+   obj-cur-clipper-cur-cache.clip.b,
+   obj-cur-clipper-cur-cache.clip.a);
+
 COLOR_ONLY_SET(obj, cur-cache, clip);
 DRAW_TEXT(0, 0);
 ENFN-context_multiplier_unset(output, context);
diff --git a/src/lib/evas/canvas/evas_object_textblock.c 
b/src/lib/evas/canvas/evas_object_textblock.c
index 7b836b3..7a70ac0 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -11669,11 +11669,14 @@ evas_object_textblock_render(Evas_Object *eo_obj 
EINA_UNUSED,
int line_position =
evas_common_font_instance_underline_position_get(NULL);
ENFN-context_multiplier_unset(output, context);
-   ENFN-context_multiplier_set(output, context,
-obj-cur-clipper-cur-cache.clip.r,
-obj-cur-clipper-cur-cache.clip.g,
-obj-cur-clipper-cur-cache.clip.b,
-obj-cur-clipper-cur-cache.clip.a);
+
+   if (obj-cur-clipper)
+ ENFN-context_multiplier_set(output, context,
+  obj-cur-clipper-cur-cache.clip.r,
+  obj-cur-clipper-cur-cache.clip.g,
+  obj-cur-clipper-cur-cache.clip.b,
+  obj-cur-clipper-cur-cache.clip.a);
+
ITEM_WALK()
  {
 Evas_Object_Textblock_Text_Item *ti;

-- 




[EGIT] [core/efl] master 01/01: evas: Support bitmap embedded color font.

2015-03-19 Thread Youngbok Shin
raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=e197f8804f9a2bded1f7a0e5bccf5fb33c415d77

commit e197f8804f9a2bded1f7a0e5bccf5fb33c415d77
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Thu Mar 19 19:02:02 2015 +0900

evas: Support bitmap embedded color font.

Summary:
Add the code for getting bitmap buffers from embedded color font,
And draw the bitmap buffers as images.
For drawing the bitmap buffers as images,
evas_common_draw_context_font_ext_set internal API is changed to
pass additional gl engine functions.
T2139
@feature

Test Plan:
1. Set a bitmap embedded color font to textblock.
2. Set a unicode emoticon text.
3. See the result.

Please check the sample unicode in the following link.
http://www.fileformat.info/info/unicode/char/1f3af/index.htm
http://www.fileformat.info/info/unicode/char/1f555/index.htm
http://www.fileformat.info/info/unicode/char/2600/index.htm
http://www.fileformat.info/info/unicode/char/263a/index.htm

Reviewers: tasn, woohyun, jpeg, raster

Reviewed By: raster

Subscribers: herdsman, cedric

Differential Revision: https://phab.enlightenment.org/D2084
---
 src/lib/evas/canvas/evas_object_text.c |   8 ++
 src/lib/evas/canvas/evas_object_textblock.c|  11 +-
 src/lib/evas/common/evas_draw.h|   5 +-
 src/lib/evas/common/evas_draw_main.c   |  14 ++-
 src/lib/evas/common/evas_font_draw.c   | 135 +++--
 src/lib/evas/common/evas_font_load.c   |   9 +-
 src/lib/evas/common/evas_font_main.c   |  37 --
 src/lib/evas/include/evas_common_private.h |  13 +-
 .../evas/engines/gl_common/evas_gl_common.h|   3 +
 src/modules/evas/engines/gl_common/evas_gl_image.c |  26 
 src/modules/evas/engines/gl_generic/evas_engine.c  |   8 +-
 .../evas/engines/software_generic/evas_engine.c|   4 +
 12 files changed, 242 insertions(+), 31 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_text.c 
b/src/lib/evas/canvas/evas_object_text.c
index f59bbd8..87c4d5a 100644
--- a/src/lib/evas/canvas/evas_object_text.c
+++ b/src/lib/evas/canvas/evas_object_text.c
@@ -1978,6 +1978,7 @@ normal_render:
  }
EINA_INLIST_FOREACH(EINA_INLIST_GET(o-items), it)
  {
+ENFN-context_multiplier_set(output, context, 0, 0, 0, 0);
 /* Shadows */
 if (haveshad)
   {
@@ -2053,8 +2054,15 @@ normal_render:
   }
 
 /* normal text */
+ENFN-context_multiplier_unset(output, context);
+ENFN-context_multiplier_set(output, context,
+ obj-cur-clipper-cur-cache.clip.r,
+ obj-cur-clipper-cur-cache.clip.g,
+ obj-cur-clipper-cur-cache.clip.b,
+ obj-cur-clipper-cur-cache.clip.a);
 COLOR_ONLY_SET(obj, cur-cache, clip);
 DRAW_TEXT(0, 0);
+ENFN-context_multiplier_unset(output, context);
  }
 }
 
diff --git a/src/lib/evas/canvas/evas_object_textblock.c 
b/src/lib/evas/canvas/evas_object_textblock.c
index da4d41b..7b836b3 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -11246,8 +11246,8 @@ evas_object_textblock_render(Evas_Object *eo_obj 
EINA_UNUSED,
  };
 
/* render object to surface with context, and offxet by x,y */
-   obj-layer-evas-engine.func-context_multiplier_unset(output,
-  context);
+   ENFN-context_multiplier_unset(output, context);
+   ENFN-context_multiplier_set(output, context, 0, 0, 0, 0);
ENFN-context_render_op_set(output, context, obj-cur-render_op);
/* FIXME: This clipping is just until we fix inset handling correctly. */
ENFN-context_clip_clip(output, context,
@@ -11668,6 +11668,12 @@ evas_object_textblock_render(Evas_Object *eo_obj 
EINA_UNUSED,
evas_common_font_instance_underline_thickness_get(NULL);
int line_position =
evas_common_font_instance_underline_position_get(NULL);
+   ENFN-context_multiplier_unset(output, context);
+   ENFN-context_multiplier_set(output, context,
+obj-cur-clipper-cur-cache.clip.r,
+obj-cur-clipper-cur-cache.clip.g,
+obj-cur-clipper-cur-cache.clip.b,
+obj-cur-clipper-cur-cache.clip.a);
ITEM_WALK()
  {
 Evas_Object_Textblock_Text_Item *ti;
@@ -11701,6 +11707,7 @@ evas_object_textblock_render(Evas_Object *eo_obj 
EINA_UNUSED,
   line_position, line_thickness);
  }
ITEM_WALK_END();
+   ENFN-context_multiplier_unset(output, context);
 }
 
 static void
diff --git a/src/lib/evas/common/evas_draw.h b/src/lib/evas/common/evas_draw.h
index

[EGIT] [core/elementary] master 01/01: config: Reinitialize font config using evas_font_reinit() API.

2015-03-19 Thread Youngbok Shin
raster pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=695a0e59cb525350e9d295e6d93c325dddc9e8a1

commit 695a0e59cb525350e9d295e6d93c325dddc9e8a1
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Thu Mar 19 18:04:58 2015 +0900

config: Reinitialize font config using evas_font_reinit() API.

Summary:
Call evas_font_reinit() API before applying font overlays when config is 
fully reloaded.
Application could modify or add font config *.conf files.
And It should affects all of other running EFL application.
So, put evas_font_reinit() API to be called when x win property is changed.
@feature

Reviewers: cedric, raster, tasn, woohyun

Differential Revision: https://phab.enlightenment.org/D2113
---
 src/lib/elm_config.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lib/elm_config.c b/src/lib/elm_config.c
index 46b9f7a..43a4466 100644
--- a/src/lib/elm_config.c
+++ b/src/lib/elm_config.c
@@ -218,6 +218,7 @@ _prop_config_get(void)
_env_get();
_config_apply();
_config_sub_apply();
+   evas_font_reinit();
_elm_config_font_overlay_apply();
_elm_config_color_overlay_apply();
_elm_rescale();

-- 




[EGIT] [core/efl] master 01/01: evas/font: Add evas_font_reinit API.

2015-03-19 Thread Youngbok Shin
raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=6616d11619796eb94755ac62f193dc4ec17c2b48

commit 6616d11619796eb94755ac62f193dc4ec17c2b48
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Thu Mar 19 18:01:41 2015 +0900

evas/font: Add evas_font_reinit API.

Summary:
Reinitialize FontConfig. If FontConfig has to be reinitialized
according to changes of system enviroments(ex. Changing font config files), 
it will be useful.

Reviewers: woohyun, seoz, tasn, cedric, raster

Reviewed By: raster

Subscribers: raster, herdsman, cedric

Differential Revision: https://phab.enlightenment.org/D1962
---
 src/lib/evas/Evas_Common.h  |  9 +
 src/lib/evas/canvas/evas_font_dir.c | 16 
 2 files changed, 25 insertions(+)

diff --git a/src/lib/evas/Evas_Common.h b/src/lib/evas/Evas_Common.h
index ccefa1a..c10668a 100644
--- a/src/lib/evas/Evas_Common.h
+++ b/src/lib/evas/Evas_Common.h
@@ -5690,6 +5690,15 @@ EAPI void
evas_font_path_global_prepend(const char *path) EIN
 EAPI const Eina_List*evas_font_path_global_list(void) 
EINA_WARN_UNUSED_RESULT;
 
 /**
+ * Reinitialize FontConfig. If FontConfig has to be reinitialized
+ * according to changes of system enviroments(ex. Changing font config files), 
it will be useful.
+ *
+ * @ingroup Evas_Font_Path_Group
+ * @since 1.14
+ */
+EAPI voidevas_font_reinit(void);
+
+/**
  * @}
  */
 
diff --git a/src/lib/evas/canvas/evas_font_dir.c 
b/src/lib/evas/canvas/evas_font_dir.c
index 31debb4..c3491cc 100644
--- a/src/lib/evas/canvas/evas_font_dir.c
+++ b/src/lib/evas/canvas/evas_font_dir.c
@@ -1493,3 +1493,19 @@ evas_font_available_list_free(Evas *eo_e, Eina_List 
*available)
evas_font_dir_available_list_free(available);
 }
 
+EAPI void
+evas_font_reinit(void)
+{
+#ifdef HAVE_FONTCONFIG
+   Eina_List *l;
+   char *path;
+
+   if (fc_config) FcConfigDestroy(fc_config);
+
+   FcInitReinitialize();
+   fc_config = FcInitLoadConfigAndFonts();
+
+   EINA_LIST_FOREACH(global_font_path, l, path)
+  FcConfigAppFontAddDir(fc_config, (const FcChar8 *) path);
+#endif
+}

-- 




[EGIT] [core/efl] master 01/01: evas: fix build failure with old version freetype.

2015-03-19 Thread Youngbok Shin
hermet pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=262dd3a1394a52c3ff10c8c057d37e346a3bf75a

commit 262dd3a1394a52c3ff10c8c057d37e346a3bf75a
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Fri Mar 20 13:24:31 2015 +0900

evas: fix build failure with old version freetype.

Summary:
Fix build failure with old version freetype.
It is caused for supporting colored font.

Reviewers: raster, jpeg, woohyun, Hermet

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2200
---
 src/lib/evas/include/evas_common_private.h | 4 
 1 file changed, 4 insertions(+)

diff --git a/src/lib/evas/include/evas_common_private.h 
b/src/lib/evas/include/evas_common_private.h
index da53e2e..e3d6b07 100644
--- a/src/lib/evas/include/evas_common_private.h
+++ b/src/lib/evas/include/evas_common_private.h
@@ -198,6 +198,10 @@ extern EAPI int _evas_log_dom_global;
 # define FT_HAS_COLOR(face) 0
 #endif
 
+#ifndef FT_LOAD_COLOR
+# define FT_LOAD_COLOR FT_LOAD_DEFAULT
+#endif
+
 #ifdef __GNUC__
 # if __GNUC__ = 4
 // BROKEN in gcc 4 on amd64

-- 




[EGIT] [core/efl] efl-1.13 01/01: evas/clip: If the clipper is image or has color, clipped area should be redrawn.

2015-03-17 Thread Youngbok Shin
jpeg pushed a commit to branch efl-1.13.

http://git.enlightenment.org/core/efl.git/commit/?id=e1bcd5ccae5d8c89ac1ab14e8aea2f2c45f6e4c1

commit e1bcd5ccae5d8c89ac1ab14e8aea2f2c45f6e4c1
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Tue Mar 17 11:02:04 2015 +0900

evas/clip: If the clipper is image or has color, clipped area should be 
redrawn.

Summary:
If the clipper is image or has color, it affects to its clipees.
Even if we unset the clipper or change the clipper to another object,
it seems the clipper is not changed.

Test Plan:
Make two clipper objects and one clipee object.
And make clip the clipee according to following example

ex) Clipee object - inner_clipper - clipper

evas_object_clip_set(clipee, inner_clipper);
evas_object_clip_set(inner_clipper, clipper);

After checking the result and hide inner_clipper.

evas_object_clip_set(clipee, clipper);
evas_object_hide(inner_clipper);

See the result.

Reviewers: raster, cedric, Hermet, jpeg

Subscribers: woohyun, cedric

Differential Revision: https://phab.enlightenment.org/D2112

Signed-off-by: Jean-Philippe Andre jp.an...@samsung.com

Note: Technically we should not check the color of the fact that
  the clipper is a mask and not a simple rect. But because of
  real-life performance issues, damage_add was disabled so we're
  trying to keep the perf in most cases while being correct in
  cases where the clipper is visually important.

@fix (following hermet's advice)
---
 src/lib/evas/canvas/evas_clip.c | 22 --
 1 file changed, 16 insertions(+), 6 deletions(-)

diff --git a/src/lib/evas/canvas/evas_clip.c b/src/lib/evas/canvas/evas_clip.c
index 0e1d43a..4eb3101 100644
--- a/src/lib/evas/canvas/evas_clip.c
+++ b/src/lib/evas/canvas/evas_clip.c
@@ -289,8 +289,13 @@ _evas_object_clip_set(Eo *eo_obj, 
Evas_Object_Protected_Data *obj, Evas_Object *
  EINA_COW_STATE_WRITE_END(obj-cur-clipper, state_write, cur);
 /* i know this was to handle a case where a clip stops having children and
  * becomes a solid colored box - no one ever does that... they hide the clip
- * so dont add damages
- if ((obj-cur-clipper-cur)  (obj-cur-clipper-cur-visible))
+ * so dont add damages.
+ * But, if the clipper could affect color to its clipees,
+ * the clipped area should be redrawn. */
+ if (((obj-cur-clipper-cur)  
(obj-cur-clipper-cur-visible)) 
+ (((obj-cur-clipper-cur-color.r != 255) || 
(obj-cur-clipper-cur-color.g != 255) ||
+   (obj-cur-clipper-cur-color.b != 255) || 
(obj-cur-clipper-cur-color.a != 255)) ||
+  (obj-cur-clipper-mask-is_mask)))
{
   if (obj-cur-clipper-layer)
 {
@@ -302,7 +307,7 @@ _evas_object_clip_set(Eo *eo_obj, 
Evas_Object_Protected_Data *obj, Evas_Object *
  
obj-cur-clipper-cur-geometry.h);
 }
}
- */
+
  _evas_object_clip_mask_unset(obj-cur-clipper);
   }
 evas_object_change(obj-cur-clipper-object, obj-cur-clipper);
@@ -411,8 +416,13 @@ _evas_object_clip_unset(Eo *eo_obj, 
Evas_Object_Protected_Data *obj)
  EINA_COW_STATE_WRITE_END(obj-cur-clipper, state_write, cur);
 /* i know this was to handle a case where a clip stops having children and
  * becomes a solid colored box - no one ever does that... they hide the clip
- * so dont add damages
- if ((obj-cur-clipper-cur)  (obj-cur-clipper-cur-visible))
+ * so dont add damages.
+ * But, if the clipper could affect color to its clipees,
+ * the clipped area should be redrawn. */
+ if (((obj-cur-clipper-cur)  
(obj-cur-clipper-cur-visible)) 
+ (((obj-cur-clipper-cur-color.r != 255) || 
(obj-cur-clipper-cur-color.g != 255) ||
+   (obj-cur-clipper-cur-color.b != 255) || 
(obj-cur-clipper-cur-color.a != 255)) ||
+  (obj-cur-clipper-mask-is_mask)))
{
   if (obj-cur-clipper-layer)
 {
@@ -424,7 +434,7 @@ _evas_object_clip_unset(Eo *eo_obj, 
Evas_Object_Protected_Data *obj)
  
obj-cur-clipper-cur-geometry.h);
 }
}
- */
+
  _evas_object_clip_mask_unset(obj-cur-clipper);
   }
evas_object_change(obj-cur-clipper-object, obj-cur-clipper);

-- 




[EGIT] [core/efl] master 01/01: evas/clip: If the clipper is image or has color, clipped area should be redrawn.

2015-03-16 Thread Youngbok Shin
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=84634ea51f18e6f88ca43527cfb7f2f56828e76a

commit 84634ea51f18e6f88ca43527cfb7f2f56828e76a
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Tue Mar 17 11:02:04 2015 +0900

evas/clip: If the clipper is image or has color, clipped area should be 
redrawn.

Summary:
If the clipper is image or has color, it affects to its clipees.
Even if we unset the clipper or change the clipper to another object,
it seems the clipper is not changed.

Test Plan:
Make two clipper objects and one clipee object.
And make clip the clipee according to following example

ex) Clipee object - inner_clipper - clipper

evas_object_clip_set(clipee, inner_clipper);
evas_object_clip_set(inner_clipper, clipper);

After checking the result and hide inner_clipper.

evas_object_clip_set(clipee, clipper);
evas_object_hide(inner_clipper);

See the result.

Reviewers: raster, cedric, Hermet, jpeg

Subscribers: woohyun, cedric

Differential Revision: https://phab.enlightenment.org/D2112

Signed-off-by: Jean-Philippe Andre jp.an...@samsung.com

Note: Technically we should not check the color of the fact that
  the clipper is a mask and not a simple rect. But because of
  real-life performance issues, damage_add was disabled so we're
  trying to keep the perf in most cases while being correct in
  cases where the clipper is visually important.
---
 src/lib/evas/canvas/evas_clip.c | 22 --
 1 file changed, 16 insertions(+), 6 deletions(-)

diff --git a/src/lib/evas/canvas/evas_clip.c b/src/lib/evas/canvas/evas_clip.c
index 833a7e4..a6f1e6f 100644
--- a/src/lib/evas/canvas/evas_clip.c
+++ b/src/lib/evas/canvas/evas_clip.c
@@ -294,8 +294,13 @@ _evas_object_clip_set(Eo *eo_obj, 
Evas_Object_Protected_Data *obj, Evas_Object *
  EINA_COW_STATE_WRITE_END(obj-cur-clipper, state_write, cur);
 /* i know this was to handle a case where a clip stops having children and
  * becomes a solid colored box - no one ever does that... they hide the clip
- * so dont add damages
- if ((obj-cur-clipper-cur)  (obj-cur-clipper-cur-visible))
+ * so dont add damages.
+ * But, if the clipper could affect color to its clipees,
+ * the clipped area should be redrawn. */
+ if (((obj-cur-clipper-cur)  
(obj-cur-clipper-cur-visible)) 
+ (((obj-cur-clipper-cur-color.r != 255) || 
(obj-cur-clipper-cur-color.g != 255) ||
+   (obj-cur-clipper-cur-color.b != 255) || 
(obj-cur-clipper-cur-color.a != 255)) ||
+  (obj-cur-clipper-mask-is_mask)))
{
   if (obj-cur-clipper-layer)
 {
@@ -307,7 +312,7 @@ _evas_object_clip_set(Eo *eo_obj, 
Evas_Object_Protected_Data *obj, Evas_Object *
  
obj-cur-clipper-cur-geometry.h);
 }
}
- */
+
  _evas_object_clip_mask_unset(obj-cur-clipper);
   }
 evas_object_change(obj-cur-clipper-object, obj-cur-clipper);
@@ -417,8 +422,13 @@ _evas_object_clip_unset(Eo *eo_obj, 
Evas_Object_Protected_Data *obj)
  EINA_COW_STATE_WRITE_END(obj-cur-clipper, state_write, cur);
 /* i know this was to handle a case where a clip stops having children and
  * becomes a solid colored box - no one ever does that... they hide the clip
- * so dont add damages
- if ((obj-cur-clipper-cur)  (obj-cur-clipper-cur-visible))
+ * so dont add damages.
+ * But, if the clipper could affect color to its clipees,
+ * the clipped area should be redrawn. */
+ if (((obj-cur-clipper-cur)  
(obj-cur-clipper-cur-visible)) 
+ (((obj-cur-clipper-cur-color.r != 255) || 
(obj-cur-clipper-cur-color.g != 255) ||
+   (obj-cur-clipper-cur-color.b != 255) || 
(obj-cur-clipper-cur-color.a != 255)) ||
+  (obj-cur-clipper-mask-is_mask)))
{
   if (obj-cur-clipper-layer)
 {
@@ -430,7 +440,7 @@ _evas_object_clip_unset(Eo *eo_obj, 
Evas_Object_Protected_Data *obj)
  
obj-cur-clipper-cur-geometry.h);
 }
}
- */
+
  _evas_object_clip_mask_unset(obj-cur-clipper);
   }
evas_object_change(obj-cur-clipper-object, obj-cur-clipper);

-- 




[EGIT] [core/elementary] master 01/01: panel: Remove error message from elm_panel_add API and _theme_apply func.

2015-02-09 Thread Youngbok Shin
hermet pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=e9e05fa2baf02e8656f1b0742d0d516d445936d0

commit e9e05fa2baf02e8656f1b0742d0d516d445936d0
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Tue Feb 10 13:41:13 2015 +0900

panel: Remove error message from elm_panel_add API and _theme_apply func.

Summary:
elm_layout_content_set API calls _elm_panel_elm_container_content_set func.
The panel widget checks the given parts string is whether 
elm.swallow.event or not.
To avoid error message and set the given object to the elm.swallow.event 
internally,
the panel widget need to call *_content_set for elm.swallow.event part 
using eo_do_super.
@fix

Test Plan: elementary_test - panel

Reviewers: seoz, woohyun, Hermet

Reviewed By: Hermet

Differential Revision: https://phab.enlightenment.org/D1949
---
 src/lib/elm_panel.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/elm_panel.c b/src/lib/elm_panel.c
index ebe43c9..a8da6a8 100644
--- a/src/lib/elm_panel.c
+++ b/src/lib/elm_panel.c
@@ -260,7 +260,7 @@ _elm_panel_elm_widget_theme_apply(Eo *obj, Elm_Panel_Data 
*sd)
 
 if (edje_object_part_exists
 (wd-resize_obj, elm.swallow.event))
-  elm_layout_content_set(obj, elm.swallow.event, sd-event);
+  eo_do_super(obj, MY_CLASS, 
elm_obj_container_content_set(elm.swallow.event, sd-event));
  }
 
elm_layout_sizing_eval(obj);
@@ -986,7 +986,7 @@ _elm_panel_evas_object_smart_add(Eo *obj, Elm_Panel_Data 
*priv)
 
  elm_coords_finger_size_adjust(1, minw, 1, minh);
  evas_object_size_hint_min_set(priv-event, minw, minh);
- elm_layout_content_set(obj, elm.swallow.event, priv-event);
+ eo_do_super(obj, MY_CLASS, 
elm_obj_container_content_set(elm.swallow.event, priv-event));
   }
  }
 

-- 




[EGIT] [core/elementary] master 01/01: widgets: Apply default return value according to description in .eo or add description too.

2015-02-08 Thread Youngbok Shin
seoz pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=bfa5fdf7de3ead3306c68538e4bf3be983de7276

commit bfa5fdf7de3ead3306c68538e4bf3be983de7276
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Mon Feb 9 13:09:05 2015 +0900

widgets: Apply default return value according to description in .eo or add 
description too.

Summary:
1) According to description in .eo file,
some APIs return not 0 when the given object is NULL or not proper object.
But, several APIs are not implemented as those description.
Now, they will return a value as description.
2) If there is no description about the return value when the API fail,
put description according to pair API or old version of elementary.
@fix

Reviewers: woohyun, Hermet, seoz

Differential Revision: https://phab.enlightenment.org/D1933
---
 src/lib/elm_ctxpopup.eo | 3 ++-
 src/lib/elm_entry.eo| 4 ++--
 src/lib/elm_gengrid_item.eo | 2 +-
 src/lib/elm_icon.eo | 3 ++-
 src/lib/elm_list.eo | 2 +-
 src/lib/elm_map.eo  | 6 --
 src/lib/elm_panel.eo| 2 +-
 src/lib/elm_toolbar.eo  | 5 +++--
 src/lib/elm_win.eo  | 8 
 9 files changed, 20 insertions(+), 15 deletions(-)

diff --git a/src/lib/elm_ctxpopup.eo b/src/lib/elm_ctxpopup.eo
index 8bcad01..45ef2b2 100644
--- a/src/lib/elm_ctxpopup.eo
+++ b/src/lib/elm_ctxpopup.eo
@@ -117,11 +117,12 @@ class Elm_Ctxpopup (Elm_Layout, 
Elm_Interface_Atspi_Widget_Action)
 @brief Get the current direction of a ctxpopup.
 
 @return current direction of a ctxpopup
+(If getting the current direction is failed, it returns 
#ELM_CTXPOPUP_DIRECTION_UNKNOWN)
 
 @warning Once the ctxpopup showed up, the direction would be 
determined
 
 @ingroup Ctxpopup */
-return: Elm_Ctxpopup_Direction;
+return: Elm_Ctxpopup_Direction(4);
  }
   }
   items {
diff --git a/src/lib/elm_entry.eo b/src/lib/elm_entry.eo
index 7d2f07a..1a444be 100644
--- a/src/lib/elm_entry.eo
+++ b/src/lib/elm_entry.eo
@@ -1057,10 +1057,10 @@ class Elm_Entry (Elm_Layout, Elm_Interface_Scrollable, 
Evas.Clickable_Interface,
  tag for which no provider finds anything, and no text is displayed, 
this
  function still returns EINA_FALSE.
 
- @return EINA_TRUE if the entry is empty, EINA_FALSE otherwise.
+ @return @c EINA_TRUE if the entry text is empty or @p entry is NULL, 
@c EINA_FALSE otherwise.
 
  @ingroup Entry */
- return: bool;
+ return: bool(true);
   }
   markup_filter_remove {
  /*@
diff --git a/src/lib/elm_gengrid_item.eo b/src/lib/elm_gengrid_item.eo
index 4eceead..8548696 100644
--- a/src/lib/elm_gengrid_item.eo
+++ b/src/lib/elm_gengrid_item.eo
@@ -152,7 +152,7 @@ class Elm_Gengrid_Item(Elm_Widget_Item)
   */
 }
 values {
- Elm_Object_Select_Mode mode; /*@ The selected mode */
+ Elm_Object_Select_Mode mode(4); /*@ The selected mode */
 }
}
   }
diff --git a/src/lib/elm_icon.eo b/src/lib/elm_icon.eo
index 7ba7c3f..a613f29 100644
--- a/src/lib/elm_icon.eo
+++ b/src/lib/elm_icon.eo
@@ -17,6 +17,7 @@ class Elm_Icon (Elm_Image)
 Get the icon lookup order.
 
 @return The icon lookup order
+(If getting the icon order loopup is failed, it returns 
#ELM_ICON_LOOKUP_THEME_FDO)
 
 @see elm_icon_order_lookup_set()
 @see Elm_Icon_Lookup_Order
@@ -24,7 +25,7 @@ class Elm_Icon (Elm_Image)
 @ingroup Icon */
  }
  values {
-Elm_Icon_Lookup_Order order; /*@ The icon lookup order (can be one 
of
+Elm_Icon_Lookup_Order order(1); /*@ The icon lookup order (can be 
one of
 #ELM_ICON_LOOKUP_FDO_THEME, #ELM_ICON_LOOKUP_THEME_FDO, 
#ELM_ICON_LOOKUP_FDO
 or #ELM_ICON_LOOKUP_THEME) */
  }
diff --git a/src/lib/elm_list.eo b/src/lib/elm_list.eo
index 401a250..5c08e7d 100644
--- a/src/lib/elm_list.eo
+++ b/src/lib/elm_list.eo
@@ -67,7 +67,7 @@ class Elm_List (Elm_Layout, Elm_Interface_Scrollable,
 @ingroup List */
  }
  values {
-Elm_Object_Select_Mode mode; /*@ The select mode */
+Elm_Object_Select_Mode mode(4); /*@ The select mode */
  }
   }
   focus_on_selection {
diff --git a/src/lib/elm_map.eo b/src/lib/elm_map.eo
index 8d90063..2af68ff 100644
--- a/src/lib/elm_map.eo
+++ b/src/lib/elm_map.eo
@@ -123,13 +123,14 @@ class Elm_Map (Elm_Widget, Elm_Interface_Scrollable,
 Get the minimum zoom of the source.
 
 @return Returns the minimum zoom of the source.
+(If getting the minimum zoom fails, it returns -1)
 
 @see elm_map_zoom_min_set() for details.
 
 @ingroup Map

[EGIT] [core/elementary] master 01/01: elm_image: fix elm_image_memfile_set API fail when elm_image widget is not visible.

2015-02-03 Thread Youngbok Shin
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=5a3bd37ebc3a8caa63efb3259fd695b9521d00a2

commit 5a3bd37ebc3a8caa63efb3259fd695b9521d00a2
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Tue Feb 3 10:17:47 2015 +0100

elm_image: fix elm_image_memfile_set API fail when elm_image widget is not 
visible.

Summary:
It could success only when the widget was visible.
The API must return EINA_TRUE if buffer and size has no problem, not 
visiblity of widget.
@fix

Reviewers: Hermet, woohyun, jpeg

Differential Revision: https://phab.enlightenment.org/D1917

Signed-off-by: Cedric BAIL ced...@osg.samsung.com
---
 src/lib/elm_image.c | 7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/lib/elm_image.c b/src/lib/elm_image.c
index 037420c..cddc2c4 100644
--- a/src/lib/elm_image.c
+++ b/src/lib/elm_image.c
@@ -609,11 +609,8 @@ _elm_image_memfile_set(Eo *obj, Elm_Image_Data *sd, const 
void *img, size_t size
evas_object_image_memfile_set
  (sd-img, (void *)img, size, (char *)format, (char *)key);
 
-   if (evas_object_visible_get(obj))
- {
-sd-preloading = EINA_TRUE;
-evas_object_image_preload(sd-img, EINA_FALSE);
- }
+   sd-preloading = EINA_TRUE;
+   evas_object_image_preload(sd-img, EINA_FALSE);
 
if (evas_object_image_load_error_get(sd-img) != EVAS_LOAD_ERROR_NONE)
  {

-- 




[EGIT] [core/elementary] master 01/01: win: Add default return value at elm_win_type_get API according to API description.

2015-01-29 Thread Youngbok Shin
seoz pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=bc605e439b738776ea3eb4e07273c19d807b47d3

commit bc605e439b738776ea3eb4e07273c19d807b47d3
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Fri Jan 30 11:04:24 2015 +0900

win: Add default return value at elm_win_type_get API according to API 
description.

Summary: The API must return ELM_WIN_UNKNOWN (-1) when the given object is 
improper.

Test Plan: None.

Reviewers: woohyun, JackDanielZ, seoz

Differential Revision: https://phab.enlightenment.org/D1907
---
 src/lib/elm_win.eo | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/elm_win.eo b/src/lib/elm_win.eo
index 75ca045..71a5641 100644
--- a/src/lib/elm_win.eo
+++ b/src/lib/elm_win.eo
@@ -1139,7 +1139,7 @@ class Elm_Win (Elm_Widget, Elm_Interface_Atspi_Window,
 @return The type of a window object. If the object is not window 
object, return #ELM_WIN_UNKNOWN.
 
 @ingroup Win */
-return: Elm_Win_Type;
+return: Elm_Win_Type(-1);
  }
   }
   noblank {

-- 




[EGIT] [core/elementary] master 02/02: label: Reset sd-lastw as '-1' in some elm_label APIs for ensure the sizing_eval.

2014-11-09 Thread Youngbok Shin
seoz pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=40cd308c019409baae50e00fba39150c7656d9a3

commit 40cd308c019409baae50e00fba39150c7656d9a3
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Mon Nov 10 14:06:32 2014 +0900

label: Reset sd-lastw as '-1' in some elm_label APIs for ensure the 
sizing_eval.

Summary:
In some cases, elm_label doesn't calculate its min size if it is not 
resized from outside.
It is happened when only elm_label used with elm_label_line_wrap_set API.
The following APIs can change min size of the widget, so we can't skip the 
sizing_eval func.

elm_label_line_wrap_set
elm_label_line_width_set
elm_object_text_set - _elm_label_elm_layout_text_set will be called.

@fix

Test Plan:
I put a change to test_notify.c for test.
elementary_test notify
- click top button. - You can't see elm_label without the patch.

Reviewers: woohyun, tasn, seoz

Reviewed By: seoz

Subscribers: herdsman

Differential Revision: https://phab.enlightenment.org/D1652
---
 src/bin/test_notify.c | 4 +++-
 src/lib/elm_label.c   | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/bin/test_notify.c b/src/bin/test_notify.c
index 03bf890..f5ae7cb 100644
--- a/src/bin/test_notify.c
+++ b/src/bin/test_notify.c
@@ -61,7 +61,9 @@ test_notify(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_in
evas_object_show(bx);
 
lb = elm_label_add(win);
-   elm_object_text_set(lb, This position is the default.);
+   elm_label_line_wrap_set(lb, ELM_WRAP_MIXED);
+   elm_label_wrap_width_set(lb, ELM_SCALE_SIZE(140));
+   elm_object_text_set(lb, This position is the default. This is multiline 
text.);
elm_box_pack_end(bx, lb);
evas_object_show(lb);
 
diff --git a/src/lib/elm_label.c b/src/lib/elm_label.c
index 24c6474..505b717 100644
--- a/src/lib/elm_label.c
+++ b/src/lib/elm_label.c
@@ -330,7 +330,7 @@ _elm_label_elm_layout_text_set(Eo *obj, Elm_Label_Data *sd, 
const char *part, co
eo_do_super(obj, MY_CLASS, int_ret = elm_obj_layout_text_set(part, label));
if (int_ret)
  {
-sd-lastw = 0;
+sd-lastw = -1;
 eo_do(obj, elm_obj_layout_sizing_eval());
  }
return int_ret;
@@ -453,6 +453,7 @@ _elm_label_line_wrap_set(Eo *obj, Elm_Label_Data *sd, 
Elm_Wrap_Type wrap)
 
if (_stringshare_key_value_replace(sd-format, wrap, wrap_str, 0) == 0)
  {
+sd-lastw = -1;
 _label_format_set(wd-resize_obj, sd-format);
 elm_layout_sizing_eval(obj);
  }
@@ -476,6 +477,7 @@ _elm_label_wrap_width_set(Eo *obj, Elm_Label_Data *sd, 
Evas_Coord w)
if (sd-ellipsis)
  _label_format_set(wd-resize_obj, sd-format);
sd-wrap_w = w;
+   sd-lastw = -1;
 
elm_layout_sizing_eval(obj);
 }

-- 




[EGIT] [core/elementary] elementary-1.11 01/01: label: Reset sd-lastw as '-1' in some elm_label APIs for ensure the sizing_eval.

2014-11-09 Thread Youngbok Shin
seoz pushed a commit to branch elementary-1.11.

http://git.enlightenment.org/core/elementary.git/commit/?id=0ccd5b03066d0576145a399f188b1ee33ac8ef89

commit 0ccd5b03066d0576145a399f188b1ee33ac8ef89
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Mon Nov 10 14:06:32 2014 +0900

label: Reset sd-lastw as '-1' in some elm_label APIs for ensure the 
sizing_eval.

Summary:
In some cases, elm_label doesn't calculate its min size if it is not 
resized from outside.
It is happened when only elm_label used with elm_label_line_wrap_set API.
The following APIs can change min size of the widget, so we can't skip the 
sizing_eval func.

elm_label_line_wrap_set
elm_label_line_width_set
elm_object_text_set - _elm_label_elm_layout_text_set will be called.

@fix

Test Plan:
I put a change to test_notify.c for test.
elementary_test notify
- click top button. - You can't see elm_label without the patch.

Reviewers: woohyun, tasn, seoz

Reviewed By: seoz

Subscribers: herdsman

Differential Revision: https://phab.enlightenment.org/D1652
---
 src/bin/test_notify.c | 4 +++-
 src/lib/elm_label.c   | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/bin/test_notify.c b/src/bin/test_notify.c
index 03bf890..f5ae7cb 100644
--- a/src/bin/test_notify.c
+++ b/src/bin/test_notify.c
@@ -61,7 +61,9 @@ test_notify(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_in
evas_object_show(bx);
 
lb = elm_label_add(win);
-   elm_object_text_set(lb, This position is the default.);
+   elm_label_line_wrap_set(lb, ELM_WRAP_MIXED);
+   elm_label_wrap_width_set(lb, ELM_SCALE_SIZE(140));
+   elm_object_text_set(lb, This position is the default. This is multiline 
text.);
elm_box_pack_end(bx, lb);
evas_object_show(lb);
 
diff --git a/src/lib/elm_label.c b/src/lib/elm_label.c
index c206b47..48b2625 100644
--- a/src/lib/elm_label.c
+++ b/src/lib/elm_label.c
@@ -332,7 +332,7 @@ _elm_label_elm_layout_text_set(Eo *obj, Elm_Label_Data *sd, 
const char *part, co
eo_do_super(obj, MY_CLASS, int_ret = elm_obj_layout_text_set(part, label));
if (int_ret)
  {
-sd-lastw = 0;
+sd-lastw = -1;
 eo_do(obj, elm_obj_layout_sizing_eval());
  }
return int_ret;
@@ -457,6 +457,7 @@ _elm_label_line_wrap_set(Eo *obj, Elm_Label_Data *sd, 
Elm_Wrap_Type wrap)
 
if (_stringshare_key_value_replace(sd-format, wrap, wrap_str, 0) == 0)
  {
+sd-lastw = -1;
 _label_format_set(wd-resize_obj, sd-format);
 elm_layout_sizing_eval(obj);
  }
@@ -480,6 +481,7 @@ _elm_label_wrap_width_set(Eo *obj, Elm_Label_Data *sd, 
Evas_Coord w)
if (sd-ellipsis)
  _label_format_set(wd-resize_obj, sd-format);
sd-wrap_w = w;
+   sd-lastw = -1;
 
elm_layout_sizing_eval(obj);
 }

-- 




[EGIT] [core/efl] master 01/01: evas: remove duplicate function call in evas_shutdown().

2014-09-05 Thread Youngbok Shin
tasn pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=05a5b4e1b95480be7e139865aaacdd8604c7d055

commit 05a5b4e1b95480be7e139865aaacdd8604c7d055
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Fri Sep 5 09:10:04 2014 +0100

evas: remove duplicate function call in evas_shutdown().

Summary:
evas_font_dir_cache_free() is called twice in evas_shutdown().
evas_common_shutdown() will call evas_font_dir_cache_free().

Test Plan: NONE

Reviewers: tasn, woohyun

Subscribers: herdsman, cedric

Differential Revision: https://phab.enlightenment.org/D1417
---
 src/lib/evas/canvas/evas_main.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c
index 5c2f05a..f7c1fcf 100644
--- a/src/lib/evas/canvas/evas_main.c
+++ b/src/lib/evas/canvas/evas_main.c
@@ -122,7 +122,6 @@ evas_shutdown(void)
evas_thread_shutdown();
_evas_preload_thread_shutdown();
evas_async_events_shutdown();
-   evas_font_dir_cache_free();
evas_common_shutdown();
evas_module_shutdown();
 

-- 




[EGIT] [core/efl] master 01/01: evas textblock: fixed ellipsis character cut off issue with complex markup text.

2014-09-02 Thread Youngbok Shin
tasn pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=15281561e5f9e00566418450c1206a5de41fb469

commit 15281561e5f9e00566418450c1206a5de41fb469
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Tue Sep 2 11:42:32 2014 +0100

evas textblock: fixed ellipsis character cut off issue with complex markup 
text.

Summary:
Evas Textblock ellipsis is handled in a item.
When the ellipsis item is added in the text, some characters are cut off
considering width of ellipsis character.
But, it is handled in only one text item.
If there are many short text item, the ellipsis item can be cut off 
visually.
And there was a bug in the patch when text is displayed in two lines or 
more.
The bug is also fixed.

Fixes Phab ticket T1213

@fix

Test Plan: This commit includes test case.

Reviewers: woohyun, seoz, sohyun, tasn, raster

Subscribers: cedric, herdsman

Differential Revision: https://phab.enlightenment.org/D1360
---
 src/lib/evas/canvas/evas_object_textblock.c | 72 +++--
 src/tests/evas/evas_test_textblock.c| 20 
 2 files changed, 79 insertions(+), 13 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_textblock.c 
b/src/lib/evas/canvas/evas_object_textblock.c
index 9cd26b1..bbe6bea 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -4375,7 +4375,7 @@ _layout_ellipsis_item_new(Ctxt *c, const 
Evas_Object_Textblock_Item *cur_it)
 static inline void
 _layout_handle_ellipsis(Ctxt *c, Evas_Object_Textblock_Item *it, Eina_List *i)
 {
-   Evas_Object_Textblock_Text_Item *ellip_ti;
+   Evas_Object_Textblock_Text_Item *ti, *ellip_ti;
Evas_Object_Textblock_Item *last_it;
Evas_Coord save_cx;
int wrap;
@@ -4385,24 +4385,70 @@ _layout_handle_ellipsis(Ctxt *c, 
Evas_Object_Textblock_Item *it, Eina_List *i)
save_cx = c-x;
c-w -= ellip_ti-parent.w;
 
-   if (it-type == EVAS_TEXTBLOCK_ITEM_TEXT)
+   /* If there is no enough space for ellipsis item, remove all of items */
+   if (c-w = 0)
  {
-Evas_Object_Textblock_Text_Item *ti = _ITEM_TEXT(it);
-
-wrap = _layout_text_cutoff_get(c, last_it-format, ti);
-if ((wrap  0)  !IS_AT_END(ti, (size_t) wrap))
-  {
- _layout_item_text_split_strip_white(c, ti, i, wrap);
-  }
-else if ((wrap == 0)  (c-ln-items))
+while (c-ln-items)
   {
  last_it = _ITEM(EINA_INLIST_GET(c-ln-items)-last);
+ c-ln-items = _ITEM(eina_inlist_remove(
+   EINA_INLIST_GET(c-ln-items),
+   EINA_INLIST_GET(last_it)));
   }
+last_it = NULL;
  }
-   else if (it-type == EVAS_TEXTBLOCK_ITEM_FORMAT)
+
+   while (last_it)
  {
-/* We don't want to add this format item. */
-last_it = NULL;
+if (last_it-type == EVAS_TEXTBLOCK_ITEM_TEXT)
+  {
+ ti = _ITEM_TEXT(last_it);
+
+ wrap = _layout_text_cutoff_get(c, last_it-format, ti);
+
+ if ((wrap  0)  !IS_AT_END(ti, (size_t) wrap))
+   {
+  _layout_item_text_split_strip_white(c, ti, i, wrap);
+  break;
+   }
+ else if (wrap  0)
+   {
+  break;
+   }
+  }
+else
+  {
+ /* We will ignore format items. ex) tab
+  * But, if there is item tag and size is acceptable, we have to 
insert it to line. */
+ if (!strncmp(_ITEM_FORMAT(last_it)-item, item, 4) 
+ ((c-w - c-o-style_pad.l - c-o-style_pad.r - c-marginl - 
c-marginr) = (c-x + last_it-adv)))
+   {
+  break;
+   }
+  }
+
+if (c-ln-items  last_it != it)
+  {
+ c-ln-items = _ITEM(eina_inlist_remove(
+   EINA_INLIST_GET(c-ln-items),
+   EINA_INLIST_GET(last_it)));
+  }
+
+last_it = (c-ln-items) ? _ITEM(EINA_INLIST_GET(c-ln-items)-last) 
: NULL;
+
+if (last_it)
+  {
+ /* We need to renew ellipsis item.
+  * Because, base format is changed to last_it.
+  * We can't reuse it. */
+ c-w += ellip_ti-parent.w;
+ ellip_ti = _layout_ellipsis_item_new(c, last_it);
+ c-w -= ellip_ti-parent.w;
+ c-x -= last_it-adv;
+ if (c-x  0)
+   c-x = 0;
+ save_cx = c-x;
+  }
  }
 
c-x = save_cx;
diff --git a/src/tests/evas/evas_test_textblock.c 
b/src/tests/evas/evas_test_textblock.c
index c740be2..3b49eb9 100644
--- a/src/tests/evas/evas_test_textblock.c
+++ b/src/tests/evas/evas_test_textblock.c
@@ -1763,6 +1763,26 @@ START_TEST(evas_textblock_wrapping)
evas_object_textblock_size_formatted_get(tb, w, h);
ck_assert_int_le(w, (nw

[EGIT] [core/efl] master 01/01: evas textblock: fixed ellipsis character cut off issue with complex markup text.

2014-08-19 Thread Youngbok Shin
tasn pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=d408408283dd4ece9023d792753fd63422b80cb1

commit d408408283dd4ece9023d792753fd63422b80cb1
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Tue Aug 19 15:08:46 2014 +0100

evas textblock: fixed ellipsis character cut off issue with complex markup 
text.

Summary:
Evas Textblock ellipsis is handled in a item.
When the ellipsis item is added in the text, some characters are cut off
considering width of ellipsis character.
But, it is handled in only one text item.
If there are many short text item, the ellipsis item can be cut off 
visually.

Fixes Phab ticket T1213

@fix

Test Plan: This commit includes test case.

Reviewers: woohyun, seoz, sohyun, tasn

Subscribers: herdsman, cedric

Differential Revision: https://phab.enlightenment.org/D1311
---
 src/lib/evas/canvas/evas_object_textblock.c | 71 +++--
 src/tests/evas/evas_test_textblock.c| 23 ++
 2 files changed, 81 insertions(+), 13 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_textblock.c 
b/src/lib/evas/canvas/evas_object_textblock.c
index fb59cee..9f14cb5 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -4373,7 +4373,7 @@ _layout_ellipsis_item_new(Ctxt *c, const 
Evas_Object_Textblock_Item *cur_it)
 static inline void
 _layout_handle_ellipsis(Ctxt *c, Evas_Object_Textblock_Item *it, Eina_List *i)
 {
-   Evas_Object_Textblock_Text_Item *ellip_ti;
+   Evas_Object_Textblock_Text_Item *ti, *ellip_ti;
Evas_Object_Textblock_Item *last_it;
Evas_Coord save_cx;
int wrap;
@@ -4383,24 +4383,69 @@ _layout_handle_ellipsis(Ctxt *c, 
Evas_Object_Textblock_Item *it, Eina_List *i)
save_cx = c-x;
c-w -= ellip_ti-parent.w;
 
-   if (it-type == EVAS_TEXTBLOCK_ITEM_TEXT)
+   /* If there is no enough space for ellipsis item, remove all of items */
+   if (c-w = 0)
  {
-Evas_Object_Textblock_Text_Item *ti = _ITEM_TEXT(it);
-
-wrap = _layout_text_cutoff_get(c, last_it-format, ti);
-if ((wrap  0)  !IS_AT_END(ti, (size_t) wrap))
-  {
- _layout_item_text_split_strip_white(c, ti, i, wrap);
-  }
-else if ((wrap == 0)  (c-ln-items))
+while (c-ln-items)
   {
  last_it = _ITEM(EINA_INLIST_GET(c-ln-items)-last);
+ c-ln-items = _ITEM(eina_inlist_remove(
+   EINA_INLIST_GET(c-ln-items),
+   EINA_INLIST_GET(last_it)));
   }
+last_it = NULL;
  }
-   else if (it-type == EVAS_TEXTBLOCK_ITEM_FORMAT)
+
+   while (last_it)
  {
-/* We don't want to add this format item. */
-last_it = NULL;
+if (last_it-type == EVAS_TEXTBLOCK_ITEM_TEXT)
+  {
+ ti = _ITEM_TEXT(last_it);
+
+ wrap = _layout_text_cutoff_get(c, last_it-format, ti);
+
+ if ((wrap  0)  !IS_AT_END(ti, (size_t) wrap))
+   {
+  _layout_item_text_split_strip_white(c, ti, i, wrap);
+   }
+ else if (wrap  0)
+   {
+  break;
+   }
+  }
+else
+  {
+ /* We will ignore format items. ex) tab
+  * But, if there is item tag and size is acceptable, we have to 
insert it to line. */
+ if (!strncmp(_ITEM_FORMAT(last_it)-item, item, 4) 
+ (c-w - c-o-style_pad.l - c-o-style_pad.r - c-marginl - 
c-marginr = c-x + last_it-adv))
+   {
+  break;
+   }
+  }
+
+if (c-ln-items  last_it != it)
+  {
+ c-ln-items = _ITEM(eina_inlist_remove(
+   EINA_INLIST_GET(c-ln-items),
+   EINA_INLIST_GET(last_it)));
+  }
+
+last_it = (c-ln-items) ? _ITEM(EINA_INLIST_GET(c-ln-items)-last) 
: NULL;
+
+if (last_it)
+  {
+ /* We need to renew ellipsis item.
+  * Because, base format is changed to last_it.
+  * We can't reuse it. */
+ c-w += ellip_ti-parent.w;
+ ellip_ti = _layout_ellipsis_item_new(c, last_it);
+ c-w -= ellip_ti-parent.w;
+ c-x -= last_it-adv;
+ if (c-x  0)
+   c-x = 0;
+ save_cx = c-x;
+  }
  }
 
c-x = save_cx;
diff --git a/src/tests/evas/evas_test_textblock.c 
b/src/tests/evas/evas_test_textblock.c
index 78d83ef..13462e3 100644
--- a/src/tests/evas/evas_test_textblock.c
+++ b/src/tests/evas/evas_test_textblock.c
@@ -1574,6 +1574,7 @@ END_TEST
 START_TEST(evas_textblock_wrapping)
 {
Evas_Coord bw, bh, w, h, nw, nh;
+   Evas_Coord ellip_w, ellip_h;
int i;
START_TB_TEST();
evas_object_textblock_text_markup_set(tb, a);
@@ -1759,6 +1760,28 @@ START_TEST(evas_textblock_wrapping

[EGIT] [core/efl] master 01/01: textblock: Update visual_pos before calling _size_native_calc_line_finalize.

2014-08-06 Thread Youngbok Shin
tasn pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=7a87f322f4efc3e18d7350765ec747973b13535a

commit 7a87f322f4efc3e18d7350765ec747973b13535a
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Wed Aug 6 10:40:02 2014 +0100

textblock: Update visual_pos before calling _size_native_calc_line_finalize.

Summary:
In items loop of _size_native_calc_line_finalize,
last_it should be replaced with new item according to position.
But, visual_pos is not prepared and it is always zero in the function.
So, we need to update visual_pos.
And when textblock only has LTR text,
we can replace last_it according to item list sequence.
@fix

Test Plan:
It includes test cases using the following test case.
 1. ib。/b
 2. 。bi/b

Reviewers: seoz, woohyun, sohyun, tasn

Subscribers: raster, herdsman, cedric

Differential Revision: https://phab.enlightenment.org/D859
---
 src/lib/evas/canvas/evas_object_textblock.c | 22 ++
 src/tests/evas/evas_test_textblock.c| 12 
 2 files changed, 30 insertions(+), 4 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_textblock.c 
b/src/lib/evas/canvas/evas_object_textblock.c
index a3aa98e..8547090 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -10482,6 +10482,7 @@ _size_native_calc_line_finalize(const Evas_Object 
*eo_obj, Eina_List *items,
 {
Evas_Object_Textblock_Item *it, *last_it = NULL;
Eina_List *i;
+   Eina_Bool is_bidi = EINA_FALSE;
 
it = eina_list_data_get(items);
*w = 0;
@@ -10505,8 +10506,10 @@ _size_native_calc_line_finalize(const Evas_Object 
*eo_obj, Eina_List *items,
 /* Add margins. */
 if (it-format)
*w = it-format-margin.l + it-format-margin.r;
-  }
 
+if (it-ln  it-ln-par)
+  is_bidi = it-ln-par-is_bidi;
+  }
 
/* Adjust all the item sizes according to the final line size,
 * and update the x positions of all the items of the line. */
@@ -10539,11 +10542,21 @@ loop_advance:
 *w += it-adv;
 
 /* Only conditional if we have bidi support, otherwise, just set it. */
+if (it-w  0)
+  {
 #ifdef BIDI_SUPPORT
-if (!last_it || (it-visual_pos  last_it-visual_pos))
+ if (is_bidi)
+   {
+  if (!last_it || (it-visual_pos  last_it-visual_pos))
+{
+   last_it = it;
+}
+   }
+ else
 #endif
-  {
- last_it = it;
+   {
+  last_it = it;
+   }
   }
  }
 
@@ -10645,6 +10658,7 @@ _evas_textblock_size_native_get(Eo *eo_obj, 
Evas_Textblock_Data *o, Evas_Coord *
 EINA_INLIST_FOREACH(o-paragraphs, par)
   {
  Evas_Coord tw, th;
+ _layout_paragraph_render(o, par);
  _size_native_calc_paragraph_size(eo_obj, o, par, position, tw, 
th);
  if (tw  wmax)
 wmax = tw;
diff --git a/src/tests/evas/evas_test_textblock.c 
b/src/tests/evas/evas_test_textblock.c
index 76aede3..78d83ef 100644
--- a/src/tests/evas/evas_test_textblock.c
+++ b/src/tests/evas/evas_test_textblock.c
@@ -2898,6 +2898,18 @@ START_TEST(evas_textblock_size)
fail_if((w != nw) || (h != nh));
fail_if(w = 0);
 
+   evas_object_textblock_text_markup_set(tb, ib。/b);
+   evas_object_textblock_size_formatted_get(tb, w, h);
+   evas_object_textblock_size_native_get(tb, nw, nh);
+   ck_assert_int_eq(w, nw);
+   ck_assert_int_eq(h, nh);
+
+   evas_object_textblock_text_markup_set(tb, 。bi/b);
+   evas_object_textblock_size_formatted_get(tb, w, h);
+   evas_object_textblock_size_native_get(tb, nw, nh);
+   ck_assert_int_eq(w, nw);
+   ck_assert_int_eq(h, nh);
+
/* This time with margins. */
  {
 Evas_Textblock_Style *newst;

-- 




[EGIT] [core/efl] master 01/01: evas/textblock: fix to keep original format when a markup tag is matched to a style tag.

2014-08-05 Thread Youngbok Shin
tasn pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=1984961ba6657153dcceffd766cf55a235048647

commit 1984961ba6657153dcceffd766cf55a235048647
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Tue Aug 5 10:26:05 2014 +0100

evas/textblock: fix to keep original format when a markup tag is matched to 
a style tag.

Summary:
We can define a style tag as opener, closer and own closer.
If there is a markup tag that is matched to style tag,
it is reprocessed to format node inside of textblock.
But, when the format node will be converted to markup text,
'/' character can be appended to text at closer and own closer style tag.
Even if original markup tag does not has '/' character,
it will be appended according to format node information.

It makes some issue when compare input text with output text.
@fix

Test Plan: This commit includes test case.

Reviewers: woohyun, raster, sohyun, tasn

Subscribers: herdsman, cedric

Differential Revision: https://phab.enlightenment.org/D1037
---
 src/lib/evas/canvas/evas_object_textblock.c | 70 -
 src/tests/evas/evas_test_textblock.c|  5 +++
 2 files changed, 45 insertions(+), 30 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_textblock.c 
b/src/lib/evas/canvas/evas_object_textblock.c
index 87d6664..a3aa98e 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -2936,7 +2936,7 @@ _layout_format_pop(Ctxt *c, const char *format)
 Eina_List *redo_nodes = NULL;
 
 /* Generic pop, should just pop. */
-if (((format[0] == ' ')  !format[1]) ||
+if (((format[0] == '/')  !format[1]) ||
   !format[0])
   {
  _format_unref_free(c-obj, fmt);
@@ -2962,7 +2962,7 @@ _layout_format_pop(Ctxt *c, const char *format)
* starting tag, and the starting tag's next char is either
* NULL or white. Skip the starting '+'. */
   if (_FORMAT_IS_CLOSER_OF(
-   fmt-fnode-orig_format, format, len))
+   fmt-fnode-orig_format, format + 1, len - 1))
 {
_format_unref_free(c-obj, fmt);
break;
@@ -4993,7 +4993,7 @@ _format_changes_invalidate_text_nodes(Ctxt *c)
   size_t fstr_len;
   fstr_len = strlen(fstr);
   /* Generic popper, just pop */
-  if (((fstr[0] == ' ')  !fstr[1]) || !fstr[0])
+  if (((fstr[0] == '/')  !fstr[1]) || !fstr[0])
 {
fstack = eina_list_remove_list(fstack, fstack);
balance--;
@@ -5007,7 +5007,7 @@ _format_changes_invalidate_text_nodes(Ctxt *c)
EINA_LIST_FOREACH(fstack, i, fnode2)
  {
 if (_FORMAT_IS_CLOSER_OF(
- fnode2-orig_format, fstr, fstr_len))
+ fnode2-orig_format, fstr + 1, fstr_len - 
1))
   {
  fstack = eina_list_remove_list(fstack, i);
  break;
@@ -5901,21 +5901,11 @@ _textblock_style_generic_set(Evas_Object *eo_obj, 
Evas_Textblock_Style *ts,
 const char *match;
 size_t format_len = eina_stringshare_strlen(fnode-orig_format);
 /* Is this safe to use alloca here? Strings might possibly get large */
-char *format = alloca(format_len + 2);
 
-if (!fnode-opener)
-  {
- format[0] = '/';
- format[1] = '\0';
-  }
-else
-  {
- format[0] = '\0';
-  }
-
-strcat(format, fnode-orig_format);
+if (fnode-own_closer)
+  format_len--;
 
-match = _textblock_format_node_from_style_tag(o, fnode, format,
+match = _textblock_format_node_from_style_tag(o, fnode, 
fnode-orig_format,
   format_len);
 
 if (match  fnode-format  strcmp(match, fnode-format))
@@ -6401,11 +6391,7 @@ _markup_get_format_append(Eina_Strbuf *txt, 
Evas_Object_Textblock_Node_Format *f
 
 // FIXME: need to escape
 s = fnode-orig_format;
-if (!fnode-opener  !fnode-own_closer)
-   eina_strbuf_append_char(txt, '/');
 eina_strbuf_append(txt, s);
-if (fnode-own_closer)
-   eina_strbuf_append_char(txt, '/');
  }
eina_strbuf_append_char(txt, '');
 }
@@ -7077,7 +7063,7 @@ _evas_textblock_node_format_remove_pair(Eo *eo_obj, 
Evas_Textblock_Data *o, Evas
  size_t fstr_len;
  fstr_len = strlen(fstr);
  /* Generic popper, just pop */
- if (((fstr[0] == ' ')  !fstr[1]) || !fstr[0])
+ if (((fstr[0] == '/')  !fstr[1

[EGIT] [core/efl] master 01/01: evas/textblock: check item's type before returning result.

2014-06-10 Thread Youngbok Shin
tasn pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=f7cf96d4d94f536de916e798b7ce3bc9b5c80cc5

commit f7cf96d4d94f536de916e798b7ce3bc9b5c80cc5
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Tue Jun 10 15:08:09 2014 +0100

evas/textblock: check item's type before returning result.

Summary:
When format item is cut off by ellipsis, result of 
_find_layout_item_line_match
can be TEXT type item. And it keeps ellipsis item's information.
@fix

Test Plan: D974

Reviewers: woohyun, tasn

CC: cedric, herdsman

Differential Revision: https://phab.enlightenment.org/D975
---
 src/lib/evas/canvas/evas_object_textblock.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lib/evas/canvas/evas_object_textblock.c 
b/src/lib/evas/canvas/evas_object_textblock.c
index b01a554..fc90a4f 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -10321,6 +10321,7 @@ evas_textblock_cursor_format_item_geometry_get(const 
Evas_Textblock_Cursor *cur,
 
if (!evas_textblock_cursor_format_is_visible_get(cur)) return EINA_FALSE;
_find_layout_item_line_match(cur-obj, cur-node, cur-pos, ln, it);
+   if (it  (it-type != EVAS_TEXTBLOCK_ITEM_FORMAT)) return EINA_FALSE;
fi = _ITEM_FORMAT(it);
if ((!ln) || (!fi)) return EINA_FALSE;
x = ln-x + fi-parent.x;

-- 




[EGIT] [core/efl] master 01/01: evas/tests - textblock: add a test case for item format with ellipsis.

2014-06-10 Thread Youngbok Shin
tasn pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=3e81b73aa8998796968bf732b37a675a6d30e70e

commit 3e81b73aa8998796968bf732b37a675a6d30e70e
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Tue Jun 10 15:17:41 2014 +0100

evas/tests - textblock: add a test case for item format with ellipsis.

Summary:
When item format is cutoff by ellipsis, *_cursor_format_item_geometry_get 
API
should be failed at the item position.
But, it can be success and returns abnormal geometry.

Reviewers: woohyun, tasn

CC: cedric, herdsman

Differential Revision: https://phab.enlightenment.org/D974
---
 src/tests/evas/evas_test_textblock.c | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/src/tests/evas/evas_test_textblock.c 
b/src/tests/evas/evas_test_textblock.c
index d8949e2..aebb8aa 100644
--- a/src/tests/evas/evas_test_textblock.c
+++ b/src/tests/evas/evas_test_textblock.c
@@ -1538,6 +1538,13 @@ START_TEST(evas_textblock_items)
evas_textblock_cursor_format_item_geometry_get(cur, NULL, NULL, w2, h2);
fail_if((w != w2) || (h != h2));
 
+   buf = ellipsis=1.0aitem absize=64x64 vsize=ascent 
href=emoticon/knowing-grin/item/ellipsis;
+   evas_object_textblock_text_markup_set(tb, buf);
+   evas_object_resize(tb, 30, 30);
+   evas_textblock_cursor_pos_set(cur, 1);
+   if (evas_textblock_cursor_format_item_geometry_get(cur, NULL, NULL, w, h))
+ fail_if((w != 64) || (h != 64));
+
/* FIXME: Also verify x,y positions of the item. */
 
/* FIXME We need some item tests that involve line wrapping that make the

-- 




[EGIT] [core/efl] efl-1.10 01/02: evas/tests - textblock: add a test case for item format with ellipsis.

2014-06-10 Thread Youngbok Shin
tasn pushed a commit to branch efl-1.10.

http://git.enlightenment.org/core/efl.git/commit/?id=3d9549b94327838eda0528e59a4d4d126391b935

commit 3d9549b94327838eda0528e59a4d4d126391b935
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Tue Jun 10 15:17:41 2014 +0100

evas/tests - textblock: add a test case for item format with ellipsis.

Summary:
When item format is cutoff by ellipsis, *_cursor_format_item_geometry_get 
API
should be failed at the item position.
But, it can be success and returns abnormal geometry.

Reviewers: woohyun, tasn

CC: cedric, herdsman

Differential Revision: https://phab.enlightenment.org/D974
---
 src/tests/evas/evas_test_textblock.c | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/src/tests/evas/evas_test_textblock.c 
b/src/tests/evas/evas_test_textblock.c
index 31d4c0c..deac4d4 100644
--- a/src/tests/evas/evas_test_textblock.c
+++ b/src/tests/evas/evas_test_textblock.c
@@ -1538,6 +1538,13 @@ START_TEST(evas_textblock_items)
evas_textblock_cursor_format_item_geometry_get(cur, NULL, NULL, w2, h2);
fail_if((w != w2) || (h != h2));
 
+   buf = ellipsis=1.0aitem absize=64x64 vsize=ascent 
href=emoticon/knowing-grin/item/ellipsis;
+   evas_object_textblock_text_markup_set(tb, buf);
+   evas_object_resize(tb, 30, 30);
+   evas_textblock_cursor_pos_set(cur, 1);
+   if (evas_textblock_cursor_format_item_geometry_get(cur, NULL, NULL, w, h))
+ fail_if((w != 64) || (h != 64));
+
/* FIXME: Also verify x,y positions of the item. */
 
/* FIXME We need some item tests that involve line wrapping that make the

-- 




[EGIT] [core/efl] efl-1.10 02/02: evas/textblock: check item's type before returning result.

2014-06-10 Thread Youngbok Shin
tasn pushed a commit to branch efl-1.10.

http://git.enlightenment.org/core/efl.git/commit/?id=5c7f0f92d12c1462354e03e94f8d24c9ec3ee7e0

commit 5c7f0f92d12c1462354e03e94f8d24c9ec3ee7e0
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Tue Jun 10 15:08:09 2014 +0100

evas/textblock: check item's type before returning result.

Summary:
When format item is cut off by ellipsis, result of 
_find_layout_item_line_match
can be TEXT type item. And it keeps ellipsis item's information.
@fix

Test Plan: D974

Reviewers: woohyun, tasn

CC: cedric, herdsman

Differential Revision: https://phab.enlightenment.org/D975
---
 src/lib/evas/canvas/evas_object_textblock.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lib/evas/canvas/evas_object_textblock.c 
b/src/lib/evas/canvas/evas_object_textblock.c
index bc0430d..683c6e9 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -10161,6 +10161,7 @@ evas_textblock_cursor_format_item_geometry_get(const 
Evas_Textblock_Cursor *cur,
 
if (!evas_textblock_cursor_format_is_visible_get(cur)) return EINA_FALSE;
_find_layout_item_line_match(cur-obj, cur-node, cur-pos, ln, it);
+   if (it  (it-type != EVAS_TEXTBLOCK_ITEM_FORMAT)) return EINA_FALSE;
fi = _ITEM_FORMAT(it);
if ((!ln) || (!fi)) return EINA_FALSE;
x = ln-x + fi-parent.x;

-- 




[EGIT] [core/efl] master 01/02: evas/text: add text ellipsis test case for ligatures special case.

2014-05-21 Thread Youngbok Shin
tasn pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=e4158510bda9f4194cd3884404087af2b5491b6b

commit e4158510bda9f4194cd3884404087af2b5491b6b
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Wed May 21 10:36:27 2014 +0100

evas/text: add text ellipsis test case for ligatures special case.

Summary:
Some fonts has combination information for ff.
When harfbuzz is enabled with the font, evas text ellipsis logic can be 
broken.

Reviewers: tasn, woohyun, cedric

Reviewed By: tasn

CC: cedric, herdsman

Differential Revision: https://phab.enlightenment.org/D870

Some comment/commit message improvements by TAsn.
---
 src/tests/evas/evas_test_text.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/src/tests/evas/evas_test_text.c b/src/tests/evas/evas_test_text.c
index a113e33..e969050 100644
--- a/src/tests/evas/evas_test_text.c
+++ b/src/tests/evas/evas_test_text.c
@@ -189,6 +189,9 @@ _test_ellipsis(Evas_Object *to, const char *buf, const char 
*font, Evas_Font_Siz
 evas_object_geometry_get(to, NULL, NULL, w, NULL);
 /* If it's gotten way too small, it means we have an issue. */
 fail_if(w  100);
+
+w = evas_object_text_horiz_advance_get(to);
+fail_if(w  100);
  }
 }
 
@@ -218,6 +221,9 @@ START_TEST(evas_text_ellipsis)
_test_ellipsis(to, buf, font, size, 0.5);
_test_ellipsis(to, buf, font, size, 1.0);
 
+   /* Ligatures */
+   buf = Fff;
+   _test_ellipsis(to, buf, font, size, 0.0);
END_TEXT_TEST();
 }
 END_TEST

-- 




[EGIT] [core/efl] master 02/02: evas/text: fix abnormal ellipsis logic when harfbuzz is enabled.

2014-05-21 Thread Youngbok Shin
tasn pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=bc70a1bd84dec728d2b9d417b4a3c92aecddeb75

commit bc70a1bd84dec728d2b9d417b4a3c92aecddeb75
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Wed May 21 10:39:36 2014 +0100

evas/text: fix abnormal ellipsis logic when harfbuzz is enabled.

Summary:
text_props.len indicates visual length from harfbuzz logic when it is 
available.
But, input pram idx is logical length. So, ellipsis works abnormally in 
some case.
@fix

Test Plan: D870

Reviewers: tasn, woohyun

CC: cedric, herdsman

Differential Revision: https://phab.enlightenment.org/D871
---
 src/lib/evas/canvas/evas_object_text.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/evas/canvas/evas_object_text.c 
b/src/lib/evas/canvas/evas_object_text.c
index 8e960da..8ddfdd9 100644
--- a/src/lib/evas/canvas/evas_object_text.c
+++ b/src/lib/evas/canvas/evas_object_text.c
@@ -636,7 +636,7 @@ static Eina_Bool
 _layout_text_item_trim(Evas_Object_Protected_Data *obj, Evas_Text_Data *o, 
Evas_Object_Text_Item *ti, int idx, Eina_Bool want_start)
 {
Evas_Text_Props new_text_props;
-   if (idx = (int) ti-text_props.len)
+   if (idx = (int) ti-text_props.text_len)
   return EINA_FALSE;
 
memset(new_text_props, 0, sizeof (new_text_props));

-- 




[EGIT] [core/efl] efl-1.9 02/02: evas/text: fix abnormal ellipsis logic when harfbuzz is enabled.

2014-05-21 Thread Youngbok Shin
tasn pushed a commit to branch efl-1.9.

http://git.enlightenment.org/core/efl.git/commit/?id=736b02cd22679e5e3b9e69ee2f71a40026555a17

commit 736b02cd22679e5e3b9e69ee2f71a40026555a17
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Wed May 21 10:39:36 2014 +0100

evas/text: fix abnormal ellipsis logic when harfbuzz is enabled.

Summary:
text_props.len indicates visual length from harfbuzz logic when it is 
available.
But, input pram idx is logical length. So, ellipsis works abnormally in 
some case.
@fix

Test Plan: D870

Reviewers: tasn, woohyun

CC: cedric, herdsman

Differential Revision: https://phab.enlightenment.org/D871
---
 src/lib/evas/canvas/evas_object_text.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/evas/canvas/evas_object_text.c 
b/src/lib/evas/canvas/evas_object_text.c
index 8a35fdd..8c74dc1 100644
--- a/src/lib/evas/canvas/evas_object_text.c
+++ b/src/lib/evas/canvas/evas_object_text.c
@@ -685,7 +685,7 @@ static Eina_Bool
 _layout_text_item_trim(Evas_Object_Protected_Data *obj, Evas_Object_Text *o, 
Evas_Object_Text_Item *ti, int idx, Eina_Bool want_start)
 {
Evas_Text_Props new_text_props;
-   if (idx = (int) ti-text_props.len)
+   if (idx = (int) ti-text_props.text_len)
   return EINA_FALSE;
 
memset(new_text_props, 0, sizeof (new_text_props));

-- 




[EGIT] [core/efl] efl-1.9 01/02: evas/text: add text ellipsis test case for ligatures special case.

2014-05-21 Thread Youngbok Shin
tasn pushed a commit to branch efl-1.9.

http://git.enlightenment.org/core/efl.git/commit/?id=316b35a0c64cfcd38c04d37d1e73b0533fd7387c

commit 316b35a0c64cfcd38c04d37d1e73b0533fd7387c
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Wed May 21 10:36:27 2014 +0100

evas/text: add text ellipsis test case for ligatures special case.

Summary:
Some fonts has combination information for ff.
When harfbuzz is enabled with the font, evas text ellipsis logic can be 
broken.

Reviewers: tasn, woohyun, cedric

Reviewed By: tasn

CC: cedric, herdsman

Differential Revision: https://phab.enlightenment.org/D870

Some comment/commit message improvements by TAsn.
---
 src/tests/evas/evas_test_text.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/src/tests/evas/evas_test_text.c b/src/tests/evas/evas_test_text.c
index a113e33..e969050 100644
--- a/src/tests/evas/evas_test_text.c
+++ b/src/tests/evas/evas_test_text.c
@@ -189,6 +189,9 @@ _test_ellipsis(Evas_Object *to, const char *buf, const char 
*font, Evas_Font_Siz
 evas_object_geometry_get(to, NULL, NULL, w, NULL);
 /* If it's gotten way too small, it means we have an issue. */
 fail_if(w  100);
+
+w = evas_object_text_horiz_advance_get(to);
+fail_if(w  100);
  }
 }
 
@@ -218,6 +221,9 @@ START_TEST(evas_text_ellipsis)
_test_ellipsis(to, buf, font, size, 0.5);
_test_ellipsis(to, buf, font, size, 1.0);
 
+   /* Ligatures */
+   buf = Fff;
+   _test_ellipsis(to, buf, font, size, 0.0);
END_TEXT_TEST();
 }
 END_TEST

-- 




[EGIT] [core/elementary] master 01/01: entry: Enable context menu with mosue down even if the entry is not editable in some case.

2014-05-14 Thread Youngbok Shin
tasn pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=c7551bd7d5eb550036edcdf6e4b1861df3dc08c5

commit c7551bd7d5eb550036edcdf6e4b1861df3dc08c5
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Wed May 14 13:26:33 2014 +0100

entry: Enable context menu with mosue down even if the entry is not 
editable in some case.

Summary:
Even if a entry is not editable, user can select text in the entry.
When the entry has selection, we have to support copy option.
@fix

Test Plan:
Precondition: Apply D852 patch for fixing a bug in elementary_test
1. elementary_test -to entry7
2. Select some text in the non-editable entry.
3. Press mouse right button.

Note: You can test it in Desktop profile.

Reviewers: tasn, woohyun, seoz

Differential Revision: https://phab.enlightenment.org/D848
---
 src/lib/elm_entry.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c
index 53c334e..dc97a24 100644
--- a/src/lib/elm_entry.c
+++ b/src/lib/elm_entry.c
@@ -1421,7 +1421,8 @@ _menu_call(Evas_Object *obj)
   {
  /* prevent stupid blank hoversel */
  if (sd-have_selection  sd-password) return;
- if (_elm_config-desktop_entry  ((!sd-editable) || 
(!ownersel))) return;
+ if (_elm_config-desktop_entry  (!sd-have_selection)  
((!sd-editable) || (!ownersel)))
+   return;
   }
 if (sd-hoversel) evas_object_del(sd-hoversel);
 else elm_widget_scroll_freeze_push(obj);

-- 




[EGIT] [core/elementary] master 01/01: entry: Fix a test case for editable, non-editable entry.

2014-05-13 Thread Youngbok Shin
seoz pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=773f25b9f109507067ae69c717a93228ee475f5d

commit 773f25b9f109507067ae69c717a93228ee475f5d
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Tue May 13 15:50:05 2014 +0900

entry: Fix a test case for editable, non-editable entry.

Summary:
elm_entry_context_menu_disabled_set API is called to wrong entry.
It should be called to en2 that added for testing the API.
@fix

Test Plan: 1. elementary -to entry7

Reviewers: woohyun, seoz, tasn

Reviewed By: seoz

CC: herdsman

Differential Revision: https://phab.enlightenment.org/D852
---
 src/bin/test_entry.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/test_entry.c b/src/bin/test_entry.c
index 7f7ea00..9f08ed4 100644
--- a/src/bin/test_entry.c
+++ b/src/bin/test_entry.c
@@ -2190,7 +2190,7 @@ test_entry7(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_in
item size=50x50 vsize=full href=itemprovider/item
   );
elm_entry_item_provider_append(en2, item_provider, NULL);
-   elm_entry_context_menu_disabled_set(en, EINA_TRUE);
+   elm_entry_context_menu_disabled_set(en2, EINA_TRUE);
elm_grid_pack(gd, en2, 10, 50, 45, 30);
evas_object_show(en2);
 

-- 




[EGIT] [core/efl] master 01/01: tests: Add a case for ellipsis in complex markup text.

2014-04-02 Thread Youngbok Shin
raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=9128ac82a0c0b6081d0065891d746768be21ccd5

commit 9128ac82a0c0b6081d0065891d746768be21ccd5
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Wed Apr 2 15:57:16 2014 +0900

tests: Add a case for ellipsis in complex markup text.

Summary: Evas textblock can't cut off text properly when it has separated 
items.

Reviewers: tasn, woohyun, raster

Reviewed By: raster

CC: cedric, herdsman

Differential Revision: https://phab.enlightenment.org/D667
---
 src/tests/evas/evas_test_textblock.c | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/src/tests/evas/evas_test_textblock.c 
b/src/tests/evas/evas_test_textblock.c
index 8b23393..44ad205 100644
--- a/src/tests/evas/evas_test_textblock.c
+++ b/src/tests/evas/evas_test_textblock.c
@@ -1740,6 +1740,17 @@ START_TEST(evas_textblock_wrapping)
evas_object_textblock_size_formatted_get(tb, w, h);
fail_if((w  (nw / 2)) || (h != nh));
 
+   evas_object_textblock_text_markup_set(tb, color=#ffffa/a
+ color=#ffffa/a
+ color=#ffffa/a
+ color=#ffffa/a
+ color=#ffffa/a);
+   evas_textblock_cursor_format_prepend(cur, + ellipsis=1.0);
+   evas_object_textblock_size_native_get(tb, nw, nh);
+   evas_object_resize(tb, nw / 2, nh);
+   evas_object_textblock_size_formatted_get(tb, w, h);
+   fail_if((w  (nw / 2)) || (h != nh));
+
evas_object_textblock_text_markup_set(tb, aabr/b);
evas_textblock_cursor_format_prepend(cur, + ellipsis=1.0 wrap=word);
evas_object_textblock_size_native_get(tb, nw, nh);

-- 




[EGIT] [core/efl] master 01/01: evas/text: fix the issue that size of evas text object be shorten repeatly when ellipsis is shown.

2014-03-17 Thread Youngbok Shin
raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=7a4b65c735eb7d7c45fc5a06aee6a42e3db482b2

commit 7a4b65c735eb7d7c45fc5a06aee6a42e3db482b2
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Mon Mar 17 19:29:16 2014 +0900

evas/text: fix the issue that size of evas text object be shorten repeatly 
when ellipsis is shown.

Summary:
When the text was shorten by ellipsis, object size was fit to the text 
width.
If new text was set to the object, the text calculated with the smaller 
size.
It made shorten the object size when the text is set repeatly.
If the text is cutted off with ellipsis, it means there is no need to
resize the object.

Test Plan: elementary_test - FileSelector Entry - Click Toggle Folder 
Only mode button repeatly.

Reviewers: woohyun, tasn, raster, so.penible.animation, Hermet

Reviewed By: raster

CC: cedric, herdsman

Differential Revision: https://phab.enlightenment.org/D636
---
 src/lib/evas/canvas/evas_object_text.c | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/lib/evas/canvas/evas_object_text.c 
b/src/lib/evas/canvas/evas_object_text.c
index e9e1345..4017b14 100644
--- a/src/lib/evas/canvas/evas_object_text.c
+++ b/src/lib/evas/canvas/evas_object_text.c
@@ -60,6 +60,7 @@ struct _Evas_Text_Data
   Evas_Object_Text_Item*ellipsis_end;
   Evas_Coordw, h;
   int   advance;
+  int   advance_without_ellipsis;
   Eina_Bool ellipsis;
} last_computed;
 
@@ -347,6 +348,12 @@ _evas_object_text_char_at_coords(const Evas_Object *eo_obj,
 }
 
 static Evas_Coord
+_evas_object_text_horiz_advance_without_ellipsis_get(const Evas_Text_Data *o)
+{
+   return o-last_computed.advance_without_ellipsis;
+}
+
+static Evas_Coord
 _evas_object_text_horiz_advance_get(const Evas_Text_Data *o)
 {
return o-last_computed.advance;
@@ -748,6 +755,7 @@ _evas_object_text_layout(Evas_Object *eo_obj, 
Evas_Text_Data *o, Eina_Unicode *t
  len -= run_len;
   }
  }
+   o-last_computed.advance_without_ellipsis = advance;
 
if (!o-cur.filter.chain)
  evas_text_style_pad_get(o-cur.style, l, r, NULL, NULL);
@@ -2252,7 +2260,7 @@ _evas_object_text_recalc(Evas_Object *eo_obj, 
Eina_Unicode *text)
 int w, h;
 int l = 0, r = 0, t = 0, b = 0;
 
-w = _evas_object_text_horiz_advance_get(o);
+w = _evas_object_text_horiz_advance_without_ellipsis_get(o);
 h = _evas_object_text_vert_advance_get(eo_obj, o);
 if (!o-cur.filter.chain)
   evas_text_style_pad_get(o-cur.style, l, r, t, b);

-- 




[EGIT] [core/efl] master 01/01: edje/util: set flag to all_part_change when edje class member is added.

2014-03-17 Thread Youngbok Shin
raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=af69be766cd91ff034a3e1fc72f1ad731c6f2517

commit af69be766cd91ff034a3e1fc72f1ad731c6f2517
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Mon Mar 17 20:23:47 2014 +0900

edje/util: set flag to all_part_change when edje class member is added.

Summary:
When edje class member is added, edje need to change member according to
the edje class.

@fix

Reviewers: raster, tasn, woohyun, seoz, Hermet, cedric

Reviewed By: raster

CC: cedric, herdsman

Differential Revision: https://phab.enlightenment.org/D637
---
 src/lib/edje/edje_util.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lib/edje/edje_util.c b/src/lib/edje/edje_util.c
index 2ef93db..8819f40 100644
--- a/src/lib/edje/edje_util.c
+++ b/src/lib/edje/edje_util.c
@@ -171,6 +171,7 @@ _edje_class_member_add(Edje *ed, Eina_Hash **ehash, 
Eina_Hash **ghash, const cha
if (!lookup) return;
EINA_REFCOUNT_INIT(lookup);
 
+   ed-all_part_change = EINA_TRUE;
/* Get members list */
members = eina_hash_find(*ghash, class);
 

-- 




[EGIT] [core/efl] master 01/01: evas/font: Added evas_font_path_global_* APIs.

2014-03-11 Thread Youngbok Shin
tasn pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=cb5026137b70739c768474c6ea8633abb710c70d

commit cb5026137b70739c768474c6ea8633abb710c70d
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Tue Mar 11 11:15:55 2014 +

evas/font: Added evas_font_path_global_* APIs.

Summary:
These APIs will be used for adding font paths for the application.
The existing APIs for font path, such as evas_font_path_append,
are used for adding font paths to the given evas.
But, these APIs will affect to every evas in the process.

Reviewers: tasn, woohyun, Hermet, seoz

CC: cedric, herdsman

Differential Revision: https://phab.enlightenment.org/D621

@feature
---
 src/lib/evas/Evas_Common.h  |  50 ++
 src/lib/evas/canvas/evas_font_dir.c | 132 +++-
 src/lib/evas/canvas/evas_main.c |   1 +
 3 files changed, 165 insertions(+), 18 deletions(-)

diff --git a/src/lib/evas/Evas_Common.h b/src/lib/evas/Evas_Common.h
index 5d931ca..801846b 100644
--- a/src/lib/evas/Evas_Common.h
+++ b/src/lib/evas/Evas_Common.h
@@ -5253,3 +5253,53 @@ EAPI Eina_Boolevas_key_lock_is_set(const 
Evas_Lock *l, const char *k
  */
 
 typedef Eo Evas_Out;
+
+/**
+ * @ingroup Evas_Font_Group
+ *
+ * @{
+ */
+
+/**
+ * @defgroup Evas_Font_Path_Group Font Path Functions
+ *
+ * Functions that edit the paths being used to load fonts.
+ *
+ * @ingroup Evas_Font_Group
+ */
+
+/**
+ * Removes all font paths loaded into memory by evas_font_path_app_* APIs
+ * for the application.
+ * @ingroup Evas_Font_Path_Group
+ * @since 1.9
+ */
+EAPI voidevas_font_path_global_clear(void);
+
+/**
+ * Appends a font path to the list of font paths used by the application.
+ * @param   path The new font path.
+ * @ingroup Evas_Font_Path_Group
+ * @since 1.9
+ */
+EAPI voidevas_font_path_global_append(const char *path) 
EINA_ARG_NONNULL(1);
+
+/**
+ * Prepends a font path to the list of font paths used by the application.
+ * @param   path The new font path.
+ * @ingroup Evas_Font_Path_Group
+ * @since 1.9
+ */
+EAPI voidevas_font_path_global_prepend(const char *path) 
EINA_ARG_NONNULL(1);
+
+/**
+ * Retrieves the list of font paths used by the application.
+ * @return  The list of font paths used.
+ * @ingroup Evas_Font_Path_Group
+ * @since 1.9
+ */
+EAPI const Eina_List*evas_font_path_global_list(void) 
EINA_WARN_UNUSED_RESULT;
+
+/**
+ * @}
+ */
diff --git a/src/lib/evas/canvas/evas_font_dir.c 
b/src/lib/evas/canvas/evas_font_dir.c
index f8a8a10..33d3eed 100644
--- a/src/lib/evas/canvas/evas_font_dir.c
+++ b/src/lib/evas/canvas/evas_font_dir.c
@@ -20,6 +20,7 @@
 static Eina_Hash *font_dirs = NULL;
 static Eina_List *fonts_cache = NULL;
 static Eina_List *fonts_zero = NULL;
+static Eina_List *global_font_path = NULL;
 
 typedef struct _Fndat Fndat;
 
@@ -662,8 +663,23 @@ evas_font_load(Evas *eo_evas, Evas_Font_Description 
*fdesc, const char *source,
 font = 
evas-engine.func-font_load(evas-engine.data.output, f_file, size, 
wanted_rend);
 if (font) break;
  }
-}
-   }
+ }
+
+   if (!font)
+ {
+EINA_LIST_FOREACH(global_font_path, ll, dir)
+  {
+ const char *f_file;
+
+ f_file = evas_font_dir_cache_find(dir, (char 
*)nm);
+ if (f_file)
+   {
+  font = 
evas-engine.func-font_load(evas-engine.data.output, f_file, size, 
wanted_rend);
+  if (font) break;
+   }
+  }
+ }
+}
   }
  }
else /* Base font loaded, append others */
@@ -710,6 +726,7 @@ evas_font_load(Evas *eo_evas, Evas_Font_Description *fdesc, 
const char *source,
{
   Eina_List *ll;
   char *dir;
+  RGBA_Font *fn = NULL;
 
   EINA_LIST_FOREACH(evas-font_path, ll, dir)
 {
@@ -718,11 +735,28 @@ evas_font_load(Evas *eo_evas, Evas_Font_Description 
*fdesc, const char *source,
f_file = evas_font_dir_cache_find(dir, (char *)nm);
if (f_file)
  {
-if 
(evas-engine.func-font_add(evas-engine.data.output, font, f_file, size, 
wanted_rend))
+fn = (RGBA_Font 
*)evas-engine.func-font_add(evas-engine.data.output, font, f_file, size, 
wanted_rend

[EGIT] [core/efl] efl-1.9 01/01: edje/entry: fix to not emit changed signal in unnecessary cases of password mode.

2014-03-06 Thread Youngbok Shin
cedric pushed a commit to branch efl-1.9.

http://git.enlightenment.org/core/efl.git/commit/?id=3fb2d843ccb1a08ab7b27abd74603daf1479129b

commit 3fb2d843ccb1a08ab7b27abd74603daf1479129b
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Fri Mar 7 14:42:49 2014 +0900

edje/entry: fix to not emit changed signal in unnecessary cases of 
password mode.

Summary:
When text is hidden by password character, changed signal should be 
emitted.
But, even if there is no visible text, the signal was emitted.

@fix

Reviewers: woohyun, tasn, cedric

Reviewed By: cedric

CC: cedric

Differential Revision: https://phab.enlightenment.org/D604

Signed-off-by: Cedric BAIL cedric.b...@samsung.com
---
 src/lib/edje/edje_entry.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/edje/edje_entry.c b/src/lib/edje/edje_entry.c
index 6d56ac6..da646ab 100644
--- a/src/lib/edje/edje_entry.c
+++ b/src/lib/edje/edje_entry.c
@@ -1275,12 +1275,12 @@ _edje_entry_hide_visible_password(Edje *ed, 
Edje_Real_Part *rp)
{
   evas_textblock_node_format_remove_pair(rp-object,
  
(Evas_Object_Textblock_Node_Format *) node);
+  _edje_emit(ed, entry,changed, rp-part-name);
   break;
}
   }
  }
_edje_entry_real_part_configure(ed, rp);
-   _edje_emit(ed, entry,changed, rp-part-name);
 }
 
 static Eina_Bool

-- 




[EGIT] [core/efl] master 03/03: edje/entry: fix to not emit changed signal in unnecessary cases of password mode.

2014-03-06 Thread Youngbok Shin
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=72c8b04e598518932bd06153da185f4a32e85dbd

commit 72c8b04e598518932bd06153da185f4a32e85dbd
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Fri Mar 7 14:42:49 2014 +0900

edje/entry: fix to not emit changed signal in unnecessary cases of 
password mode.

Summary:
When text is hidden by password character, changed signal should be 
emitted.
But, even if there is no visible text, the signal was emitted.

@fix

Reviewers: woohyun, tasn, cedric

Reviewed By: cedric

CC: cedric

Differential Revision: https://phab.enlightenment.org/D604

Signed-off-by: Cedric BAIL cedric.b...@samsung.com
---
 src/lib/edje/edje_entry.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/edje/edje_entry.c b/src/lib/edje/edje_entry.c
index 1ab3631..6a2fb28 100644
--- a/src/lib/edje/edje_entry.c
+++ b/src/lib/edje/edje_entry.c
@@ -1275,12 +1275,12 @@ _edje_entry_hide_visible_password(Edje *ed, 
Edje_Real_Part *rp)
{
   evas_textblock_node_format_remove_pair(rp-object,
  
(Evas_Object_Textblock_Node_Format *) node);
+  _edje_emit(ed, entry,changed, rp-part-name);
   break;
}
   }
  }
_edje_entry_real_part_configure(ed, rp);
-   _edje_emit(ed, entry,changed, rp-part-name);
 }
 
 static Eina_Bool

-- 




[EGIT] [core/efl] efl-1.8 01/01: edje/entry: fix to not emit changed signal in unnecessary cases of password mode.

2014-03-06 Thread Youngbok Shin
cedric pushed a commit to branch efl-1.8.

http://git.enlightenment.org/core/efl.git/commit/?id=66259d09e354396e54a0cc385f09a784678a3a20

commit 66259d09e354396e54a0cc385f09a784678a3a20
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Fri Mar 7 14:42:49 2014 +0900

edje/entry: fix to not emit changed signal in unnecessary cases of 
password mode.

Summary:
When text is hidden by password character, changed signal should be 
emitted.
But, even if there is no visible text, the signal was emitted.

@fix

Reviewers: woohyun, tasn, cedric

Reviewed By: cedric

CC: cedric

Differential Revision: https://phab.enlightenment.org/D604

Signed-off-by: Cedric BAIL cedric.b...@samsung.com
---
 src/lib/edje/edje_entry.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/edje/edje_entry.c b/src/lib/edje/edje_entry.c
index 30fdfa9..fa96160 100644
--- a/src/lib/edje/edje_entry.c
+++ b/src/lib/edje/edje_entry.c
@@ -1267,12 +1267,12 @@ _edje_entry_hide_visible_password(Edje *ed, 
Edje_Real_Part *rp)
{
   evas_textblock_node_format_remove_pair(rp-object,
  
(Evas_Object_Textblock_Node_Format *) node);
+  _edje_emit(ed, entry,changed, rp-part-name);
   break;
}
   }
  }
_edje_entry_real_part_configure(ed, rp);
-   _edje_emit(ed, entry,changed, rp-part-name);
 }
 
 static Eina_Bool

-- 




[EGIT] [core/efl] master 01/01: evas - Added eina_stringshare_ref call for fallbacks, lang in font description.

2014-02-19 Thread Youngbok Shin
tasn pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=2bff3d1c2eb908f8ca62528e6343d7f0e8d4379a

commit 2bff3d1c2eb908f8ca62528e6343d7f0e8d4379a
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Wed Feb 19 10:44:34 2014 +

evas - Added eina_stringshare_ref call for fallbacks, lang in font 
description.

Summary:
When the fdesc(Font Description) is duplicated,
ref of all of stringshare pointers should be increased.
But, in the evas_font_desc_dup API, we only increased ref for name string.
It can cause some of memory issues.

Reviewers: tasn, woohyun, seoz, Hermet

CC: cedric

Differential Revision: https://phab.enlightenment.org/D570
---
 src/lib/evas/canvas/evas_font_dir.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/lib/evas/canvas/evas_font_dir.c 
b/src/lib/evas/canvas/evas_font_dir.c
index 00a1249..a75cd94 100644
--- a/src/lib/evas/canvas/evas_font_dir.c
+++ b/src/lib/evas/canvas/evas_font_dir.c
@@ -444,6 +444,8 @@ evas_font_desc_dup(const Evas_Font_Description *fdesc)
new-ref = 1;
new-is_new = EINA_TRUE;
new-name = eina_stringshare_ref(new-name);
+   new-fallbacks = eina_stringshare_ref(new-fallbacks);
+   new-lang = eina_stringshare_ref(new-lang);
 
return new;
 }

-- 




[EGIT] [core/efl] master 01/02: evas: textblock - Added Null checking in evas_textblock_text_markup_to_utf8 before calling eina_strbuf_append_length API.

2014-02-05 Thread Youngbok Shin
tasn pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=c48c9827ff89bd357834b0f6637922167c4bc17a

commit c48c9827ff89bd357834b0f6637922167c4bc17a
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Wed Feb 5 13:23:55 2014 +

evas: textblock - Added Null checking in evas_textblock_text_markup_to_utf8 
before calling eina_strbuf_append_length API.

Summary:
When input string has non-finished markup tags or escaped tags,
eina_strbuf_append_length is called with Null string.
There is a Null checking in eina_strbuf_* API, but it will print error 
message when input string is Null.
Strictly speaking, *_markup_to_utf8 API could be used with any kind of 
input string.
So, we need to add Null checking for removing the useless error message.

Test Plan:
Call the API like the following code.
evas_textblock_text_markup_to_utf8(NULL, test_text);

ERR message will be printed.

Reviewers: woohyun, tasn, seoz, Hermet, hbr4570

CC: cedric

Differential Revision: https://phab.enlightenment.org/D493
---
 src/lib/evas/canvas/evas_object_textblock.c | 33 +++--
 1 file changed, 27 insertions(+), 6 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_textblock.c 
b/src/lib/evas/canvas/evas_object_textblock.c
index 4ea0e26..c2c1d06 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -6557,8 +6557,15 @@ evas_textblock_text_markup_to_utf8(const Evas_Object 
*eo_obj, const char *text)
}
  else if (*p == 0)
{
-  eina_strbuf_append_length(sbuf, s, p - s);
-  s = NULL;
+  if (s)
+{
+   eina_strbuf_append_length(sbuf, s, p - s);
+   s = NULL;
+}
+  else
+{
+   ERR(There is a invalid markup tag. Please check the 
text.);
+}
}
  if (*p == 0)
 break;
@@ -6571,8 +6578,15 @@ evas_textblock_text_markup_to_utf8(const Evas_Object 
*eo_obj, const char *text)
* mark the start of the tag */
   tag_start = p;
   tag_end = NULL;
-  eina_strbuf_append_length(sbuf, s, p - s);
-  s = NULL;
+  if (s)
+{
+   eina_strbuf_append_length(sbuf, s, p - s);
+   s = NULL;
+}
+  else
+{
+   ERR(There is a invalid markup tag. Please check the 
text.);
+}
}
   }
 else if (*p == '')
@@ -6591,8 +6605,15 @@ evas_textblock_text_markup_to_utf8(const Evas_Object 
*eo_obj, const char *text)
* the start of the escape sequence */
   esc_start = p;
   esc_end = NULL;
-  eina_strbuf_append_length(sbuf, s, p - s);
-  s = NULL;
+  if (s)
+{
+   eina_strbuf_append_length(sbuf, s, p - s);
+   s = NULL;
+}
+  else
+{
+   ERR(There is a invalid markup tag. Please check the 
text.);
+}
}
   }
 else if (*p == ';')

-- 




[EGIT] [core/elementary] master 01/01: entry: Fixed to emit *enabled signal to scr_edje when it is not disabled.

2014-01-21 Thread Youngbok Shin
seoz pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=a6f2538609f312a27aadb25c294c489fdba27448

commit a6f2538609f312a27aadb25c294c489fdba27448
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Wed Jan 22 11:32:08 2014 +0900

entry: Fixed to emit *enabled signal to scr_edje when it is not disabled.

Summary: This fixes coverity issue CID 1162751.

Reviewers: seoz, woohyun, tasn

Reviewed By: seoz

Differential Revision: https://phab.enlightenment.org/D482
---
 src/lib/elm_entry.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c
index c34a31b..b5a3359 100644
--- a/src/lib/elm_entry.c
+++ b/src/lib/elm_entry.c
@@ -529,7 +529,7 @@ _elm_entry_smart_disable(Eo *obj, void *_pd, va_list *list)
 edje_object_signal_emit(sd-entry_edje, elm,state,enabled, elm);
 if (sd-scroll)
   {
- edje_object_signal_emit(sd-scr_edje, elm,state,disabled, 
elm);
+ edje_object_signal_emit(sd-scr_edje, elm,state,enabled, elm);
  eo_do(obj, elm_scrollable_interface_freeze_set(EINA_FALSE));
   }
 sd-disabled = EINA_FALSE;

-- 




[EGIT] [core/elementary] master 01/01: entry: If the scrollable entry is set disable, send *,disabled signal to scr_edje too.

2014-01-20 Thread Youngbok Shin
raster pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=eee7ea4130ec239ac5d009aa227c3b2bbcfece39

commit eee7ea4130ec239ac5d009aa227c3b2bbcfece39
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Mon Jan 20 18:04:30 2014 +0900

entry: If the scrollable entry is set disable, send *,disabled signal to 
scr_edje too.

Summary:
Default theme of entry does not have any disabled state in 
elm/scroller/entry/* styles.
But EFL developer can make any custom style for entry and scroller and it 
can has disabled state.
So _elm_entry_smart_disable has to emit *disabled signal to scr_edje.

Reviewers: woohyun, tasn, seoz, Hermet, raster

Reviewed By: raster

Differential Revision: https://phab.enlightenment.org/D464
---
 src/lib/elm_entry.c | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c
index 3324c8f..1ed0605 100644
--- a/src/lib/elm_entry.c
+++ b/src/lib/elm_entry.c
@@ -519,14 +519,20 @@ _elm_entry_smart_disable(Eo *obj, void *_pd, va_list 
*list)
  {
 edje_object_signal_emit(sd-entry_edje, elm,state,disabled, elm);
 if (sd-scroll)
-  eo_do(obj, elm_scrollable_interface_freeze_set(EINA_TRUE));
+  {
+ edje_object_signal_emit(sd-scr_edje, elm,state,disabled, 
elm);
+ eo_do(obj, elm_scrollable_interface_freeze_set(EINA_TRUE));
+  }
 sd-disabled = EINA_TRUE;
  }
else
  {
 edje_object_signal_emit(sd-entry_edje, elm,state,enabled, elm);
 if (sd-scroll)
-  eo_do(obj, elm_scrollable_interface_freeze_set(EINA_FALSE));
+  {
+ edje_object_signal_emit(sd-scr_edje, elm,state,disabled, 
elm);
+ eo_do(obj, elm_scrollable_interface_freeze_set(EINA_FALSE));
+  }
 sd-disabled = EINA_FALSE;
  }
 

-- 




[EGIT] [core/elementary] master 01/01: entry: Add smart activate for accessbility.

2014-01-20 Thread Youngbok Shin
raster pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=d8821dea6997728a3645c171b0d2258d93d9d498

commit d8821dea6997728a3645c171b0d2258d93d9d498
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Mon Jan 20 18:45:51 2014 +0900

entry: Add smart activate for accessbility.

Summary:
In TTS mode, when the entry is highlighten and double tap to the entry,
the entry will be focused. But clicked smart callback is not called, 
input panel is not shown.
So I we need to call the callback and show input panel in smart activate.

Reviewers: seoz, Hermet, woohyun, tasn, jaehwan, raster

Reviewed By: raster

Differential Revision: https://phab.enlightenment.org/D465
---
 src/lib/elm_entry.c | 22 ++
 1 file changed, 22 insertions(+)

diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c
index 1ed0605..af3aedd 100644
--- a/src/lib/elm_entry.c
+++ b/src/lib/elm_entry.c
@@ -5808,6 +5808,27 @@ _anchor_hover_end(Eo *obj EINA_UNUSED, void *_pd, 
va_list *list EINA_UNUSED)
 /* END - ANCHOR HOVER */
 
 static void
+_elm_entry_smart_activate(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
+{
+   Elm_Activate act = va_arg(*list, Elm_Activate);
+   Eina_Bool *ret = va_arg(*list, Eina_Bool *);
+   if (ret) *ret = EINA_FALSE;
+
+   if (act != ELM_ACTIVATE_DEFAULT) return;
+
+   ELM_ENTRY_DATA_GET(obj, sd);
+
+   if (!elm_widget_disabled_get(obj) 
+   !evas_object_freeze_events_get(obj))
+ {
+evas_object_smart_callback_call(obj, SIG_CLICKED, NULL);
+if (sd-editable  sd-input_panel_enable)
+  edje_object_part_text_input_panel_show(sd-entry_edje, elm.text);
+ }
+   if (ret) *ret = EINA_TRUE;
+}
+
+static void
 _elm_entry_smart_focus_next_manager_is(Eo *obj EINA_UNUSED, void *_pd 
EINA_UNUSED, va_list *list)
 {
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
@@ -5839,6 +5860,7 @@ _class_constructor(Eo_Class *klass)
 EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_TRANSLATE), 
_elm_entry_smart_translate),
 EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_ON_FOCUS_REGION), 
_elm_entry_smart_on_focus_region),
 EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_SUB_OBJECT_DEL), 
_elm_entry_smart_sub_object_del),
+EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_ACTIVATE), 
_elm_entry_smart_activate),
 EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_NEXT_MANAGER_IS), 
_elm_entry_smart_focus_next_manager_is),
 
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_DIRECTION_MANAGER_IS), 
_elm_entry_smart_focus_direction_manager_is),
 

-- 




[EGIT] [core/elementary] master 01/01: conform: Fixed to get a geometry from *focus_region_get for show_region_job.

2014-01-20 Thread Youngbok Shin
raster pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=d93cbb54a48e3f7671dc1f478d28c8c8f2014cee

commit d93cbb54a48e3f7671dc1f478d28c8c8f2014cee
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Mon Jan 20 18:54:20 2014 +0900

conform: Fixed to get a geometry from *focus_region_get for show_region_job.

Summary:
The geometry of elm_widget_show_region_get is only updated by 
elm_widget_show_region_set.
If the geometry of *show_region_get is not updated, the result of 
show_region_job would be incorrect.
So, we need to get a proper geometry using *focus_region_get for focused 
object.

Reviewers: seoz, woohyun, Hermet, raster, tasn

Reviewed By: raster

Differential Revision: https://phab.enlightenment.org/D466
---
 src/lib/elm_conform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/elm_conform.c b/src/lib/elm_conform.c
index 7317074..1855240 100644
--- a/src/lib/elm_conform.c
+++ b/src/lib/elm_conform.c
@@ -689,7 +689,7 @@ _show_region_job(void *data)
  {
 Evas_Coord x, y, w, h;
 
-elm_widget_show_region_get(focus_obj, x, y, w, h);
+elm_widget_focus_region_get(focus_obj, x, y, w, h);
 
 if (h  _elm_config-finger_size)
   h = _elm_config-finger_size;

-- 




[EGIT] [core/efl] master 01/01: edje: Add changed signal emit in _edje_entry_imf_event_delete_surrounding_cb

2014-01-19 Thread Youngbok Shin
raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=c85414b1572ccd8c37de9020e75f44fd52b15850

commit c85414b1572ccd8c37de9020e75f44fd52b15850
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Mon Jan 20 12:54:45 2014 +0900

edje: Add changed signal emit in _edje_entry_imf_event_delete_surrounding_cb

Summary:
_edje_entry_imf_event_delete_surrounding_cb changes text of entry.
When the callback function is called and the entry is changed,
we need to notice to applications that the entry is changed.

Reviewers: seoz, Hermet, tasn, woohyun, jihoon, raster

Reviewed By: raster

CC: cedric

Differential Revision: https://phab.enlightenment.org/D460
---
 src/lib/edje/edje_entry.c | 14 ++
 1 file changed, 14 insertions(+)

diff --git a/src/lib/edje/edje_entry.c b/src/lib/edje/edje_entry.c
index 84051ef..8a8f145 100644
--- a/src/lib/edje/edje_entry.c
+++ b/src/lib/edje/edje_entry.c
@@ -4148,7 +4148,9 @@ _edje_entry_imf_event_delete_surrounding_cb(void *data, 
Ecore_IMF_Context *ctx E
Entry *en = NULL;
Ecore_IMF_Event_Delete_Surrounding *ev = event_info;
Evas_Textblock_Cursor *del_start, *del_end;
+   Edje_Entry_Change_Info *info;
int cursor_pos;
+   int start, end;
 
if ((!rp) || (!ev)) return;
if ((rp-type != EDJE_RP_TYPE_TEXT) ||
@@ -4167,10 +4169,22 @@ _edje_entry_imf_event_delete_surrounding_cb(void *data, 
Ecore_IMF_Context *ctx E
del_end = evas_object_textblock_cursor_new(en-rp-object);
evas_textblock_cursor_pos_set(del_end, cursor_pos + ev-offset + 
ev-n_chars);
 
+   start = evas_textblock_cursor_pos_get(del_start);
+   end = evas_textblock_cursor_pos_get(del_end);
+   if (start == end) goto end;
+
evas_textblock_cursor_range_delete(del_start, del_end);
_anchors_get(en-cursor, rp-object, en);
_anchors_update(en-cursor, rp-object, en);
 
+   info = calloc(1, sizeof(*info));
+   info-insert = EINA_FALSE;
+   info-change.del.start = start;
+   info-change.del.end = end;
+   _edje_emit(ed, entry,changed, en-rp-part-name);
+   _edje_emit_full(ed, entry,changed,user, en-rp-part-name, info,
+   _free_entry_change_info);
+end:
evas_textblock_cursor_free(del_start);
evas_textblock_cursor_free(del_end);
 }

-- 




[EGIT] [core/efl] master 01/01: edje: Call _edje_entry_imf_context_reset in _edje_entry_user_insert.

2014-01-19 Thread Youngbok Shin
raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=443d1e700a5b81cfede261d63d30e05a95c14d86

commit 443d1e700a5b81cfede261d63d30e05a95c14d86
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Mon Jan 20 15:59:50 2014 +0900

edje: Call _edje_entry_imf_context_reset in _edje_entry_user_insert.

Summary:
When user paste text to elm_entry, _edje_entry_user_insert is called.
We need to reset a prediction buffer just like 
_edje_entry_text_markup_insert.

Reviewers: seoz, Hermet, woohyun, tasn, jihoon, raster

Reviewed By: raster

CC: cedric

Differential Revision: https://phab.enlightenment.org/D461
---
 src/lib/edje/edje_entry.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lib/edje/edje_entry.c b/src/lib/edje/edje_entry.c
index 8a8f145..53494a3 100644
--- a/src/lib/edje/edje_entry.c
+++ b/src/lib/edje/edje_entry.c
@@ -2956,6 +2956,7 @@ _edje_entry_user_insert(Edje_Real_Part *rp, const char 
*text)
(!rp-typedata.text)) return;
en = rp-typedata.text-entry_data;
if (!en) return;
+   _edje_entry_imf_context_reset(rp);
info = _text_filter_markup_prepend(en-ed, en, en-cursor, text, NULL, NULL,
  EINA_TRUE, EINA_TRUE);
_anchors_get(en-cursor, rp-object, en);

-- 




[EGIT] [core/efl] master 01/01: evas: Fixed to compare current render_op with previous render_op for textblock. If the render_op is changed, call evas_object_render_pre_prev_cur_add.

2014-01-18 Thread Youngbok Shin
hermet pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=a2c4c404744298670899ee547db49ed8ff3ad84a

commit a2c4c404744298670899ee547db49ed8ff3ad84a
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Sat Jan 18 19:06:16 2014 +0900

evas: Fixed to compare current render_op with previous render_op for 
textblock. If the render_op is changed, call 
evas_object_render_pre_prev_cur_add.

Summary: This change is related to the commit: 
cdb86e34bbf82bd91aefd686bfc3bdf2a018a956

Reviewers: woohyun, tasn, Hermet, seoz

CC: cedric

Differential Revision: https://phab.enlightenment.org/D450
---
 src/lib/evas/canvas/evas_object_textblock.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/src/lib/evas/canvas/evas_object_textblock.c 
b/src/lib/evas/canvas/evas_object_textblock.c
index e7bdf93..30ebdb4 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -11328,6 +11328,12 @@ evas_object_textblock_render_pre(Evas_Object *eo_obj,
 eo_obj, obj);
 goto done;
  }
+   if (obj-cur-render_op != obj-prev-render_op)
+ {
+evas_object_render_pre_prev_cur_add(obj-layer-evas-clip_changes,
+eo_obj, obj);
+goto done;
+ }
 done:
evas_object_render_pre_effect_updates(obj-layer-evas-clip_changes,
  eo_obj, is_v, was_v);

-- 




[EGIT] [core/elementary] master 01/01: When the viewport is resized, the entry size will be recalculate.

2014-01-09 Thread Youngbok Shin
raster pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=6c12d740087ce54e9af59333c0e23dbc129882e7

commit 6c12d740087ce54e9af59333c0e23dbc129882e7
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Fri Jan 10 16:37:55 2014 +0900

When the viewport is resized, the entry size will be recalculate.

Using the elm_scrollable_interface_content_viewport_resize_cb_set in
scrollable entry widget. this only happens in mobile profile when you
drag the content with your finger left/right when the content is
smaller than the gap between icons.

This accepts D187
---
 src/bin/test_entry.c | 66 ++--
 src/lib/elm_entry.c  | 33 +++---
 2 files changed, 79 insertions(+), 20 deletions(-)

diff --git a/src/bin/test_entry.c b/src/bin/test_entry.c
index 4327a7d..c6483d8 100644
--- a/src/bin/test_entry.c
+++ b/src/bin/test_entry.c
@@ -286,10 +286,24 @@ _entry_rejected_cb(void *data, Evas_Object *obj 
EINA_UNUSED, void *event_info EI
  printf(REJECTED: This entry rejects the following character set: 
[%s]\n, accept_set-rejected);
 }
 
+static void
+_end_show_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info 
EINA_UNUSED)
+{
+   Evas_Object *en = data;
+   elm_entry_end_visible_set(en, EINA_TRUE);
+}
+
+static void
+_end_hide_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info 
EINA_UNUSED)
+{
+   Evas_Object *en = data;
+   elm_entry_end_visible_set(en, EINA_FALSE);
+}
+
 void
 test_entry_scrolled(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void 
*event_info EINA_UNUSED)
 {
-   Evas_Object *win, *bx, *bx2, *bt, *en, *en_p, *sp;
+   Evas_Object *win, *bx, *bx2, *bx3, *bt, *en, *en_p, *sp, *entry;
static Elm_Entry_Filter_Accept_Set digits_filter_data, digits_filter_data2;
static Elm_Entry_Filter_Limit_Size limit_filter_data, limit_filter_data2;
 
@@ -449,27 +463,27 @@ test_entry_scrolled(void *data EINA_UNUSED, Evas_Object 
*obj EINA_UNUSED, void *
elm_box_pack_end(bx, en_p);
 
/* entry with icon/end widgets*/
-   en = elm_entry_add(win);
-   elm_entry_scrollable_set(en, EINA_TRUE);
-   elm_scroller_policy_set(en, ELM_SCROLLER_POLICY_OFF, 
ELM_SCROLLER_POLICY_OFF);
-   elm_entry_single_line_set(en, EINA_TRUE);
-   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);
+   entry = elm_entry_add(win);
+   elm_entry_scrollable_set(entry, EINA_TRUE);
+   elm_scroller_policy_set(entry, ELM_SCROLLER_POLICY_OFF, 
ELM_SCROLLER_POLICY_OFF);
+   elm_entry_single_line_set(entry, EINA_TRUE);
+   evas_object_size_hint_weight_set(entry, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+   evas_object_size_hint_align_set(entry, EVAS_HINT_FILL, EVAS_HINT_FILL);
bt = elm_icon_add(win);
elm_icon_standard_set(bt, home);
evas_object_size_hint_min_set(bt, 48, 48);
evas_object_color_set(bt, 128, 0, 0, 128);
evas_object_show(bt);
-   elm_object_part_content_set(en, icon, bt);
+   elm_object_part_content_set(entry, icon, bt);
bt = elm_icon_add(win);
elm_icon_standard_set(bt, delete);
evas_object_color_set(bt, 128, 0, 0, 128);
evas_object_size_hint_min_set(bt, 48, 48);
evas_object_show(bt);
-   elm_object_part_content_set(en, end, bt);
-   elm_object_text_set(en, entry with icon and end objects);
-   evas_object_show(en);
-   elm_box_pack_end(bx, en);
+   elm_object_part_content_set(entry, end, bt);
+   elm_object_text_set(entry, entry with icon and end objects. For the test 
of show/hide end, text should be long long...);
+   evas_object_show(entry);
+   elm_box_pack_end(bx, entry);
 
/* markup entry */
en = elm_entry_add(win);
@@ -551,6 +565,34 @@ test_entry_scrolled(void *data EINA_UNUSED, Evas_Object 
*obj EINA_UNUSED, void *
elm_box_pack_end(bx, bx2);
evas_object_show(bx2);
 
+   bx3 = elm_box_add(win);
+   elm_box_horizontal_set(bx3, EINA_TRUE);
+   evas_object_size_hint_weight_set(bx3, EVAS_HINT_EXPAND, 0.0);
+   evas_object_size_hint_align_set(bx3, EVAS_HINT_FILL, EVAS_HINT_FILL);
+
+   bt = elm_button_add(win);
+   elm_object_text_set(bt, End Show);
+   evas_object_smart_callback_add(bt, clicked, _end_show_cb, entry);
+   evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
+   evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
+   elm_box_pack_end(bx3, bt);
+   evas_object_propagate_events_set(bt, 0);
+   elm_object_focus_allow_set(bt, 0);
+   evas_object_show(bt);
+
+   bt = elm_button_add(win);
+   elm_object_text_set(bt, End Hide);
+   evas_object_smart_callback_add(bt, clicked, _end_hide_cb, entry);
+   evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
+   evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
+   elm_box_pack_end(bx3, bt);
+   evas_object_propagate_events_set(bt, 0);
+   elm_object_focus_allow_set(bt, 0);
+   evas_object_show(bt

[EGIT] [core/elementary] master 01/01: entry - Add rejected smart callback in elm_entry_filter_accept_set

2013-12-30 Thread Youngbok Shin
seoz pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=4b26eeb0d97d0457a5ed630f5e9749180e6233b7

commit 4b26eeb0d97d0457a5ed630f5e9749180e6233b7
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Mon Dec 30 18:25:15 2013 +0900

entry - Add rejected smart callback in elm_entry_filter_accept_set

Summary:
Add rejected smart callback.
Applications using the *filter_accept_set didn't know when the input was 
rejected.
This smart callback can provide a simple information to applications.

Reviewers: woohyun, tasn, seoz

Reviewed By: seoz

Differential Revision: https://phab.enlightenment.org/D413
---
 src/bin/test_entry.c | 15 +++
 src/lib/elm_entry.c  | 12 ++--
 src/lib/elm_entry.h  |  1 +
 3 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/src/bin/test_entry.c b/src/bin/test_entry.c
index e1fdb21..3552c69 100644
--- a/src/bin/test_entry.c
+++ b/src/bin/test_entry.c
@@ -273,6 +273,19 @@ _item_cb(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_info)
printf(\ncurrent selected text = %s\n, 
elm_entry_context_menu_item_label_get(item));
 }
 
+static void
+_entry_rejected_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info 
EINA_UNUSED)
+{
+   Elm_Entry_Filter_Accept_Set *accept_set = data;
+
+   if (!accept_set) return;
+
+   if (accept_set-accepted)
+ printf(REJECTED: This entry only accepts the following character set: 
[%s]\n, accept_set-accepted);
+   else
+ printf(REJECTED: This entry rejects the following character set: 
[%s]\n, accept_set-rejected);
+}
+
 void
 test_entry_scrolled(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void 
*event_info EINA_UNUSED)
 {
@@ -375,6 +388,7 @@ test_entry_scrolled(void *data EINA_UNUSED, Evas_Object 
*obj EINA_UNUSED, void *
digits_filter_data.accepted = 0123456789;
digits_filter_data.rejected = NULL;
elm_entry_markup_filter_append(en, elm_entry_filter_accept_set, 
digits_filter_data);
+   evas_object_smart_callback_add(en, rejected, _entry_rejected_cb, 
digits_filter_data);
 
/* No digits entry */
en = elm_entry_add(win);
@@ -390,6 +404,7 @@ test_entry_scrolled(void *data EINA_UNUSED, Evas_Object 
*obj EINA_UNUSED, void *
digits_filter_data2.accepted = NULL;
digits_filter_data2.rejected = 0123456789;
elm_entry_markup_filter_append(en, elm_entry_filter_accept_set, 
digits_filter_data2);
+   evas_object_smart_callback_add(en, rejected, _entry_rejected_cb, 
digits_filter_data2);
 
/* Size limited entry */
en = elm_entry_add(win);
diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c
index 2f07f81..9f58b1f 100644
--- a/src/lib/elm_entry.c
+++ b/src/lib/elm_entry.c
@@ -52,7 +52,8 @@ EAPI Eo_Op ELM_OBJ_ENTRY_BASE_ID = EO_NOOP;
cmd(SIG_SELECTION_START, selection,start, ) \
cmd(SIG_TEXT_SET_DONE, text,set,done, ) \
cmd(SIG_THEME_CHANGED, theme,changed, ) \
-   cmd(SIG_UNDO_REQUEST, undo,request, )
+   cmd(SIG_UNDO_REQUEST, undo,request, ) \
+   cmd(SIG_REJECTED, rejected, )
 
 ELM_PRIV_ENTRY_SIGNALS(ELM_PRIV_STATIC_VARIABLE_DECLARE);
 
@@ -4700,12 +4701,13 @@ elm_entry_filter_limit_size(void *data,
 
 EAPI void
 elm_entry_filter_accept_set(void *data,
-Evas_Object *entry __UNUSED__,
+Evas_Object *entry,
 char **text)
 {
int read_idx, last_read_idx = 0, read_char;
Elm_Entry_Filter_Accept_Set *as = data;
Eina_Bool goes_in;
+   Eina_Bool rejected = EINA_FALSE;
const char *set;
char *insert;
 
@@ -4803,6 +4805,10 @@ inserting:
memcpy(insert, *text + last_read_idx, size);
  insert += size;
   }
+else
+  {
+ rejected = EINA_TRUE;
+  }
 
 if (read_char)
   {
@@ -4811,6 +4817,8 @@ inserting:
   }
  }
*insert = 0;
+   if (rejected)
+ evas_object_smart_callback_call(entry, SIG_REJECTED, NULL);
 }
 
 EAPI Eina_Bool
diff --git a/src/lib/elm_entry.h b/src/lib/elm_entry.h
index cab30ad..2ec3c6a 100644
--- a/src/lib/elm_entry.h
+++ b/src/lib/elm_entry.h
@@ -248,6 +248,7 @@
  * @li text,set,done: Whole text has been set to the entry.
  * @li theme,changed: Called when the theme is changed.
  * @li undo,request: Called on undo request.
+ * @li rejected: Called when some of inputs are rejected by the filter. 
(since 1.9)
  *
  * Default content parts of the entry items that you can use for are:
  * @li icon - An icon in the entry

-- 




[EGIT] [core/efl] master 01/01: Evas textblock: Fixed range_text_get bug with multiple text nodes.

2013-12-27 Thread Youngbok Shin
tasn pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=4270ddb0b74970afe5b5e05234d8ebe7ecd5f7b0

commit 4270ddb0b74970afe5b5e05234d8ebe7ecd5f7b0
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Fri Dec 27 11:36:10 2013 +

Evas textblock: Fixed range_text_get bug with multiple text nodes.

Summary:
When there is multi text nodes for range text get,
it gets wrong format node of last text node.
It makes broken result.

Test Plan: https://phab.enlightenment.org/D398

Reviewers: woohyun, tasn, seoz

Reviewed By: tasn

CC: cedric

Differential Revision: https://phab.enlightenment.org/D399
---
 src/lib/evas/canvas/evas_object_textblock.c | 20 ++--
 1 file changed, 6 insertions(+), 14 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_textblock.c 
b/src/lib/evas/canvas/evas_object_textblock.c
index c9a7e8f..992c42b 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -8929,26 +8929,18 @@ _evas_textblock_cursor_range_text_markup_get(const 
Evas_Textblock_Cursor *cur1,
  {
 Evas_Object_Textblock_Node_Format *fnode;
 Eina_Unicode *text_base, *text;
+int cur1_pos = 0, cur2_pos = -1;
 int off = 0;
 
 text_base = text =
eina_unicode_strndup(eina_ustrbuf_string_get(tnode-unicode),
 eina_ustrbuf_length_get(tnode-unicode));
 if (tnode == cur2-node)
-  {
- fnode = _evas_textblock_node_text_get_first_format_between(tnode,
-   cur1-pos, cur2-pos);
-  }
-else if (tnode == cur1-node)
-  {
- fnode = _evas_textblock_node_text_get_first_format_between(tnode,
-   cur1-pos, -1);
-  }
-else
-  {
- fnode = _evas_textblock_node_text_get_first_format_between(tnode,
-   0, -1);
-  }
+  cur2_pos = cur2-pos;
+if (tnode == cur1-node)
+  cur1_pos = cur1-pos;
+fnode = _evas_textblock_node_text_get_first_format_between(tnode,
+cur1_pos, cur2_pos);
 /* Init the offset so the first one will count starting from cur1-pos
  * and not the previous format node */
 if (tnode == cur1-node)

-- 




[EGIT] [core/efl] efl-1.8 01/02: Evas test textblock: Added a test for a broken range_text_get case.

2013-12-27 Thread Youngbok Shin
tasn pushed a commit to branch efl-1.8.

http://git.enlightenment.org/core/efl.git/commit/?id=d29f6b13947afec31d133a71ead4713c1dd3b14f

commit d29f6b13947afec31d133a71ead4713c1dd3b14f
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Mon Dec 23 11:01:57 2013 +0900

Evas test textblock: Added a test for a broken range_text_get case.

Summary: Added a test for range_text_get case on the text that include 
multi text node.

Reviewers: tasn, woohyun, seoz

CC: cedric

Differential Revision: https://phab.enlightenment.org/D398
---
 src/tests/evas/evas_test_textblock.c | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/src/tests/evas/evas_test_textblock.c 
b/src/tests/evas/evas_test_textblock.c
index a61fc77..643ad5a 100644
--- a/src/tests/evas/evas_test_textblock.c
+++ b/src/tests/evas/evas_test_textblock.c
@@ -2241,6 +2241,16 @@ START_TEST(evas_textblock_text_getters)
 ck_assert_str_eq(text, evas_object_textblock_text_markup_get(tb));
  }
 
+   /* complex markup range get */
+ {
+const char *text = Break tag tesitem size=40x40 href=a/itemt 
br/Nextbr/ line with ititem size=40x40 href=i/itemem tag;
+evas_object_textblock_text_markup_set(tb, text);
+evas_textblock_cursor_pos_set(main_cur, 14);
+evas_textblock_cursor_pos_set(cur, 37);
+fail_if(strcmp(evas_textblock_cursor_range_text_get(main_cur, cur,
+ EVAS_TEXTBLOCK_TEXT_MARKUP), /itemt br/Nextbr/ line 
with ititem size=40x40 href=i/iteme));
+ }
+
END_TB_TEST();
 }
 END_TEST

-- 




[EGIT] [core/efl] efl-1.8 02/02: Evas textblock: Fixed range_text_get bug with multiple text nodes.

2013-12-27 Thread Youngbok Shin
tasn pushed a commit to branch efl-1.8.

http://git.enlightenment.org/core/efl.git/commit/?id=225c3370bea4818ceecc538b2351b5f137ed294a

commit 225c3370bea4818ceecc538b2351b5f137ed294a
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Fri Dec 27 11:36:10 2013 +

Evas textblock: Fixed range_text_get bug with multiple text nodes.

Summary:
When there is multi text nodes for range text get,
it gets wrong format node of last text node.
It makes broken result.

Test Plan: https://phab.enlightenment.org/D398

Reviewers: woohyun, tasn, seoz

Reviewed By: tasn

CC: cedric

Differential Revision: https://phab.enlightenment.org/D399
---
 src/lib/evas/canvas/evas_object_textblock.c | 20 ++--
 1 file changed, 6 insertions(+), 14 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_textblock.c 
b/src/lib/evas/canvas/evas_object_textblock.c
index 94070e8..0830a09 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -8924,26 +8924,18 @@ _evas_textblock_cursor_range_text_markup_get(const 
Evas_Textblock_Cursor *cur1,
  {
 Evas_Object_Textblock_Node_Format *fnode;
 Eina_Unicode *text_base, *text;
+int cur1_pos = 0, cur2_pos = -1;
 int off = 0;
 
 text_base = text =
eina_unicode_strndup(eina_ustrbuf_string_get(tnode-unicode),
 eina_ustrbuf_length_get(tnode-unicode));
 if (tnode == cur2-node)
-  {
- fnode = _evas_textblock_node_text_get_first_format_between(tnode,
-   cur1-pos, cur2-pos);
-  }
-else if (tnode == cur1-node)
-  {
- fnode = _evas_textblock_node_text_get_first_format_between(tnode,
-   cur1-pos, -1);
-  }
-else
-  {
- fnode = _evas_textblock_node_text_get_first_format_between(tnode,
-   0, -1);
-  }
+  cur2_pos = cur2-pos;
+if (tnode == cur1-node)
+  cur1_pos = cur1-pos;
+fnode = _evas_textblock_node_text_get_first_format_between(tnode,
+cur1_pos, cur2_pos);
 /* Init the offset so the first one will count starting from cur1-pos
  * and not the previous format node */
 if (tnode == cur1-node)

-- 




[EGIT] [core/efl] master 05/10: Evas test textblock: Added a test for a broken range_text_get case.

2013-12-22 Thread Youngbok Shin
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=b4106c90d9ec4e7a813c74afc6efb3e6a3c5fbbd

commit b4106c90d9ec4e7a813c74afc6efb3e6a3c5fbbd
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Mon Dec 23 11:01:57 2013 +0900

Evas test textblock: Added a test for a broken range_text_get case.

Summary: Added a test for range_text_get case on the text that include 
multi text node.

Reviewers: tasn, woohyun, seoz

CC: cedric

Differential Revision: https://phab.enlightenment.org/D398
---
 src/tests/evas/evas_test_textblock.c | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/src/tests/evas/evas_test_textblock.c 
b/src/tests/evas/evas_test_textblock.c
index a61fc77..643ad5a 100644
--- a/src/tests/evas/evas_test_textblock.c
+++ b/src/tests/evas/evas_test_textblock.c
@@ -2241,6 +2241,16 @@ START_TEST(evas_textblock_text_getters)
 ck_assert_str_eq(text, evas_object_textblock_text_markup_get(tb));
  }
 
+   /* complex markup range get */
+ {
+const char *text = Break tag tesitem size=40x40 href=a/itemt 
br/Nextbr/ line with ititem size=40x40 href=i/itemem tag;
+evas_object_textblock_text_markup_set(tb, text);
+evas_textblock_cursor_pos_set(main_cur, 14);
+evas_textblock_cursor_pos_set(cur, 37);
+fail_if(strcmp(evas_textblock_cursor_range_text_get(main_cur, cur,
+ EVAS_TEXTBLOCK_TEXT_MARKUP), /itemt br/Nextbr/ line 
with ititem size=40x40 href=i/iteme));
+ }
+
END_TB_TEST();
 }
 END_TEST

-- 




[EGIT] [core/efl] master 01/02: Evas test textblock: Added a test for a broken range_delete case.

2013-12-16 Thread Youngbok Shin
tasn pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=8bee8853ae1e38823ee0dbcac1643d23c3e34379

commit 8bee8853ae1e38823ee0dbcac1643d23c3e34379
Author: Youngbok Shin youngb.s...@samsung.com
Date:   Mon Dec 16 12:05:47 2013 +

Evas test textblock: Added a test for a broken range_delete case.

This fixes bad integration by me (Tom) of Youngbok's patch in
42a06f24d8de13953fdceea02c51ad534bccd626.
---
 src/tests/evas/evas_test_textblock.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/tests/evas/evas_test_textblock.c 
b/src/tests/evas/evas_test_textblock.c
index 8e1c167..a61fc77 100644
--- a/src/tests/evas/evas_test_textblock.c
+++ b/src/tests/evas/evas_test_textblock.c
@@ -1240,11 +1240,11 @@ START_TEST(evas_textblock_format_removal)
ck_assert_str_eq(evas_object_textblock_text_markup_get(tb), The  text!);
 
/* Range delete with item formats, TEST_CASE#2 */
-   evas_object_textblock_text_markup_set(tb, The bMultiline/bitem 
size=50x50 href=abc/item text!);
+   evas_object_textblock_text_markup_set(tb, The bMultiline/bitem 
size=50x50 href=abc/item text! it is lonitem size=40x40 href=move/itemg 
text for test.);
evas_textblock_cursor_pos_set(cur, 14);
evas_textblock_cursor_pos_set(main_cur, 15);
evas_textblock_cursor_range_delete(cur, main_cur);
-   ck_assert_str_eq(evas_object_textblock_text_markup_get(tb), The 
bMultiline/bitem size=50x50 href=abc/itemtext!);
+   ck_assert_str_eq(evas_object_textblock_text_markup_get(tb), The 
bMultiline/bitem size=50x50 href=abc/itemtext! it is lonitem 
size=40x40 href=move/itemg text for test.);
 
/* Verify fmt position and REP_CHAR positions are the same */
evas_object_textblock_text_markup_set(tb,

-- 




  1   2   >