Commit Graph

342 Commits

Author SHA1 Message Date
Tom Hacohen 1fcbd88e6d Evas textblock: Remove unused function. 2014-08-20 17:08:28 +01:00
Tom Hacohen 841191d907 Evas textblock: Fix BiDi text cut-off at the edges.
This patch fixes an issue causing text to be cut off in some cases.
The problem was that we were calculating line width and alignment before
we did any bidi calculations, which in turn caused us to use the wrong
text items for those calculations.

Many thanks to Daniel Hirt for investigating this deeply, finding all
the nitty-gritty and generally pointing me to where the problem is.
Daniel also provided the test case.
His patch (D1291) was close, but not enough.

Fixes T1496

@Fix
2014-08-20 15:10:23 +01:00
Carsten Haitzler 9a91261a4e Revert "evas textblock: fixed ellipsis character cut off issue with complex markup text."
This reverts commit d408408283.

this breaks mult-line "long" filenames in efm. 2nd line is just ...
for almost all of them (ones that are actually in need of 3 or more
lines). break break! REVERT!
2014-08-20 12:03:14 +09:00
Youngbok Shin d408408283 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
2014-08-19 15:20:35 +01:00
Carsten Haitzler 4b431d3638 evas font - fix null access of font format possibility
this fixes NULL access in CID 1099705, 1099703, 1099704
2014-08-14 18:14:08 +09:00
Carsten Haitzler d539152156 address non nul terminated string due to strncpy
this addresses CID 1230994. as such  eina_unicode_unicode_to_utf8()
always returns a nul terminated string. so it's guaranteed. but yes -
if string is 7 bytes or longer it will not put a nul byte on the
destination. as such for a single unicode char this can never happen
as in utf8 it's 6 bytes. but since eina_unicode_unicode_to_utf8()
safely returns a nul terminated string at all times - we can just use
strcpy safely. no need for strncpy. also handle null return from
eina_unicode_unicode_to_utf8()
2014-08-13 09:03:02 +09:00
Tom Hacohen 90c0eb15a4 Evas textblock: strcpy->strncpy (although the buffer is always big enough).
Many tools will complain about the use of strcpy, and it's not that hard to use
strncpy anyway.

CID1039581.
2014-08-12 10:11:41 +01:00
Tom Hacohen 1d6960867d Evas textblock: remove checks for impossible null derefs.
This improves code clarity based on input from coverity.

CID1190401
CID1190402
2014-08-12 09:52:18 +01:00
Youngbok Shin 7a87f322f4 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. "i<b>。</b>"
 2. "。<b>i</b>"

Reviewers: seoz, woohyun, sohyun, tasn

Subscribers: raster, herdsman, cedric

Differential Revision: https://phab.enlightenment.org/D859
2014-08-06 10:40:02 +01:00
Youngbok Shin 1984961ba6 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
2014-08-05 10:26:05 +01:00
Thiep Ha 104f04eda1 Evas textblock: Correct word start/end moving at new line or line begins with spaces
Summary:
Word start/end works incorrectly when it goes to new line or line begins with spaces.
Ex: In elementary_test/Entry, place cursor at the end of line, press ctrl + right arrow keys: cursor moves to begin of next line. In this case, cursor should move to end of 1st word in next line.
Ex2: In elementary_test/Entry, add some spaces to begin of 2nd line ("   uses markup"), place cursor at the first word ("uses"), press ctrl + left arrow keys twice, cursor moves to begin of 2nd line. In this case, cursor should move to begin of last word in 1st line.

This patch provides a fix by considerring next/previous text node to move cursor to correct place.

@fix

Reviewers: woohyun, raster, tasn

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1140
2014-08-04 11:01:51 +01:00
Thiep Ha 808202e6af Evas textblock: Fix memory leak
Summary:
In evas_textblock_cursor_word_end function, the breaks' memory is allocated but not freed when cursor position is equal to text length.
Fix: Remove memory allocating.

@fix

Reviewers: raster, tasn

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1225
2014-07-25 16:06:37 +01:00
Tom Hacohen 7f3a44894b Evas canvas eolian: Fix namespace and class name for the evas canvas. 2014-06-30 17:47:06 +01:00
Daniel Hirt 2b40860f78 Evas/Textblock: Introduce PS deletion bug test and fix
Summary:
This test should make the test suite fail. It sets "a<ps>b" and
"a<ps/>b" markups, and deletes the PS format. Essentially, these two
different markups should have the same result by this deletion. Instead,
only the <ps/> format gets deleted properly.
A follow-up commit is added with this as a fix.

Evas/Textblock: fix deletion of PS bug

Fixes an issue with deletion of "<ps>". Format deletion was only
performed for formats that are own-closers. This sets the paragraph
separator to be an own-closer format.

@fix

Reviewers: tasn

Reviewed By: tasn

CC: JackDanielZ, id213sin

Differential Revision: https://phab.enlightenment.org/D1046
2014-06-17 11:11:33 +01:00
Youngbok Shin f7cf96d4d9 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
2014-06-10 15:08:09 +01:00
Tom Hacohen 0fc3279db9 Efl: Update code to use the new class names generated by eolian. 2014-06-03 11:28:01 +01:00
Daniel Hirt 177135ff0d Evas/Textblock: add support for ellipsis values
Summary:
This enables textblock to support more values other than 1.0.
For 0 <= ellipsis < 1.0, it splits the text such that it fits the
textblock's width. The ellipsis is relatively position according to the
ellipsis value, and characters are removed also relatively.
For example, a value of 0.5 will position the ellipsis right in the
center of the textblock's width, while removing characters equally right
and left from the center.

Basic approach to this feature was to do some work before the layout
process. We calculate the expected total width of the items, and by how
much we exceed from the textblock's width. Afterwards is it just some
careful work to set the boundaries of the width we want to cut, and
deciding which characters we need to removed to fulfill this requirement.
The rest is splitting the text and visually-removing the part we
need to cut.
This is all handled before any logical lines are created, so the
_layout_par function remains almost intact. A designated _ellip_prev_it
field in the Paragraph struct instructs after which item we place the
ellipsis item, if at all.

Note that we keep the fast path for ellipsis 1.0, as heavier work needs
to be done for the other values.

Added tests to evas_suite for a range of ellipsis values.

Also, multiline is unsupported at the moment.
@feature

Test Plan: Anything that uses Evas Textblock (single-line, please)

Reviewers: tasn, id213sin, raster

CC: cedric, JackDanielZ, raster

Differential Revision: https://phab.enlightenment.org/D905
2014-05-29 15:52:01 +01:00
ChunEon Park b61b1c9412 evas/textblock - apply efl coding style. 2014-05-28 14:19:46 +09:00
ChunEon Park fbb4d092cb evas/textblock - removed unnecessary null check.
It should be definitely valid.
It's meaningless checking the value there.
2014-05-28 14:14:35 +09:00
ChunEon Park e973390f64 evas/textblock - null check format.
logically it's insane that it doesn't check the null there but it checks right next line.
2014-05-28 14:09:34 +09:00
Tom Hacohen cf4ad9328a Evas textblock: Fix wrong advance calculation when bidi is disabled.
The last_it was not updated correctly with bidi disabled.

Thanks to Daniel Hirt for spotting this.

@fix
2014-05-27 14:20:18 +01:00
ChunEon Park a5b89f17b3 evas - removed stdlib.h math.h header include in each source files.
It's included in the evas_common_private.h.
2014-05-07 16:33:23 +09:00
ChunEon Park c399017cef evas - removed unncessary header include
it's already done in evas_common_private.h. no need it in each file.
2014-04-29 15:44:29 +09:00
Yossi Kantor 1563181922 Eolian: Legacy integration of Evas Rectangle, Polygon, Line, Textgrid and Textblock 2014-04-11 09:26:15 +03:00
Tom Hacohen 35525a53e0 Adjust eo_do calls to work with the eo2 api. 2014-04-10 04:20:21 +01:00
Tom Hacohen 8e5234cf75 Evas textblock: Minor code cleanup.
Moved a global variable into a local scope, as it's no longer needed globally.
2014-04-02 10:06:57 +01:00
Tom Hacohen 2e7565b7c3 Evas textblock: Fixed compilation with FriBiDi disabled.
This issue was introduced in d175b8aa69
during the previous merge window.

Thanks a lot to vtorri for reporting.
2014-03-31 11:41:51 +01:00
Daniel Hirt 5778896735 Evas Textblock: increase ref of format before work
We need to increase ref count for the format prior to calling of
functions that handle the layout.
This resolves valgrind error of accessing already freed memory.
Please note that a scenerio to trigger this exists in test suite, and
for some reason is not being detected by jenkins.
@fix
2014-03-26 12:32:25 +00:00
Cedric BAIL fe2948be08 evas: let's be to safe than sorry.
Fix CID 1193214.
2014-03-20 16:50:48 +09:00
Daniel Zaoui 6fd341a449 Eolian: Fix ctor/dtor generation 2014-03-19 07:04:28 +02:00
Tom Hacohen 2eaf9049b9 Evas textblock: Don't include right margin/padding twice when aligning lines.
This should fix enventor issues.

@fix
2014-03-14 12:54:09 +00:00
Tom Hacohen d175b8aa69 Evas textblock: Fix clipping issues with some texts with width > advance.
This happens with many texts. The issue occurs when the width of the
last char is larger than it's advance. Before this patch, we didn't the
width into account when calculating width, thus causing clipping issues
in some cases.
2014-03-10 14:58:18 +00:00
Daniel Zaoui ee7541e202 Eolian: Integration of Evas Text Block 2014-03-10 13:28:03 +02:00
Tom Hacohen 46361148b2 Evas textblock: Implemented mid-contextualization formatting.
There are many situations (e.g all the time with Arabic text) in which
characters change their appearance depending on the context they lie
within. Before this patch, we didn't support changing font appearance
mid-context. So for example one couldn't do "a<color=#f00>b" without
messing up 'a' and 'b's change to their contextual forms.

Although Arabic is a very good example, this also applies to Latin text
in many cases, and should fix some wrong spacing that might have
appeared when changing styles.

@feature
2014-02-28 10:47:56 +00:00
Tom Hacohen 0378e41958 Evas textblock: removed unused internal function. 2014-02-26 12:25:08 +00:00
Tom Hacohen 0e5d3f9b98 Evas textblock: Fixed a few word start/end issues.
Fixed issues with valgrind complaints at the end of the textblock, and
Fixed wrong jumping with some special cases like "a a a a "."

This fixes T995.
2014-02-19 14:38:06 +00:00
Tom Hacohen 650b0b6c64 Evas textblock: Fixed colour setting for textblock formats.
Of course Cedric introduced a bug. The bug was that the current colour context
is set to the previously selected colour, instead of the current one, which
made all colours wrong.

Fixes T926.
2014-02-10 16:49:53 +00:00
Tom Hacohen 80033e022d Evas textblock: Fix rendering of spaces in some cases.
The issue was with a textblock that's being resized and a space between formats.
The problem is, that the text would get trimmed when wrapping, and then not
restored, because it had nothing to merge to.

This fixes T924.
2014-02-10 14:17:03 +00:00
Carsten Haitzler acbcc7da6a in case font_instance is null in text_props... avoid using it 2014-02-09 19:39:30 +09:00
Carsten Haitzler 229ee74f6c evas - textblock ... fix valign handling to actually work as documented
valign handling was really broken. this fixes it to pretty much work
again. ie 0.0 == top, 0.5 == centered, 1.0 == bottom align and -1.0
== baseline. only baseline worked before.
2014-02-08 22:54:56 +09:00
Tom Hacohen 354691e03e Evas textblock: Fixed *_cursor_char_coord_set with some y values.
Specifically y values that are between par->y and the first ln->y.

This should fix some selection issues with elm.
2014-02-07 13:14:21 +00:00
Jean-Philippe Andre 2928a2d2da Evas: Move _format_color_parse to common file
This (simple) code should be shared between Textblock and Filters.
2014-02-07 15:38:42 +09:00
Tom Hacohen 9cc7e69338 Evas textblock: Improved error messages when detecting errors in markup. 2014-02-05 13:51:22 +00:00
Youngbok Shin c48c9827ff 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
2014-02-05 13:23:55 +00:00
Tom Hacohen 22813f5b52 Evas textblock: Fix selection with bidi text.
This is a regression introduced in
548e548632.

This is really bad, and essentially broke selection geometry for bidi
text. Very serious.

The problematic code assumed that the range comparison for the items
assumed the item marked with 1 is always logically before the item marked
with 2, which is just not true.
2014-01-29 13:27:45 +00:00
Youngbok Shin a2c4c40474 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: cdb86e34bb

Reviewers: woohyun, tasn, Hermet, seoz

CC: cedric

Differential Revision: https://phab.enlightenment.org/D450
2014-01-18 19:06:16 +09:00
Jean-Philippe Andre 908785b60d Textblock: Relayout if needed in line geometry get
evas_object_textblock_line_number_geometry_get() did not trigger
a relayout, so it could end up returning FALSE and invalid values.
2014-01-15 17:55:27 +09:00
Jean-Philippe Andre 9860af0b35 Textblock: Fix padding with styles (part 2)
Summary:
If ONE single item in the whole textblock has a padding of k,
then ALL the lines of the textblock will be padded by k pixels.

Here's a solution to add the padding only to the first line.

Test Plan:
Write any multiline text, without styles, in an entry.
Add some glow to one element. All lines should be spaced by
an extra 2 pixels.

Reviewers: tasn

CC: cedric

Differential Revision: https://phab.enlightenment.org/D442
2014-01-15 17:55:27 +09:00
Jean-Philippe Andre 6970a020c1 Textblock: Fix padding computation (part 1)
Track padding per paragraph, since this is how it is computed.

Problem before this patch:
- If markup text is changed, padding may grow, and the layout is updated (good)
- If the UI itself needs a relayout, the old padding value is NOT reused,
so style paddings will reset the padding to 0.

Test protocol:
- Set some text with style=glow. The whole object should have padding 2,2,2,2
- Relayout the UI, the whole object will have padding 0,0,0,0 (should be 2,2,2,2)
2014-01-15 17:55:27 +09:00
Ryuan Choi b25df71d57 textblock: Simple refactoring for _markup_get_text_utf8_append to call eina_unicode_utf8_next_get directly
Summary:
evas_string_char_next_get is simple wrapper of eina_unicode_utf8_next_get with
some check routines.
But in _markup_get_text_utf8_append, these check routines look unnecessary.

Reviewers: cedric, seoz, raster

Reviewed By: raster

CC: cedric

Differential Revision: https://phab.enlightenment.org/D420
2013-12-29 13:33:20 +09:00
Youngbok Shin 4270ddb0b7 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
2013-12-27 11:36:10 +00:00
Cedric BAIL 922fe6c109 evas: improve textblock rendering by walking even less in all case.
We now build a list of item to walk on for each step to just avoid all necessary walking.
It is a slightly more elegant idea than my previous patch even if it only give a speed
improvement of 5% in the best case. Now that render code and the callee only take 1.6%
of the time I am looking at in the benchmark, meaning nothing else to improve here.

This fix the bug spotted in Enlightenment dialog box.
2013-12-27 09:54:46 +09:00
Carsten Haitzler 3367bf0aba Revert "evas: improve textblock rendering by walking even less in all case."
This reverts commit a69c5ba0ae.

yes - this broke text rendering. revert it. several dialogs/uses in e
broke with shadow and glow text being heavily offset up/to the right
of the proper text.
2013-12-27 00:06:37 +09:00
Cedric BAIL a69c5ba0ae evas: improve textblock rendering by walking even less in all case.
We now build a list of item to walk on for each step to just avoid all necessary walking.
It is a slightly more elegant idea than my previous patch even if it only give a speed
improvement of 5% in the best case. Now that render code and the callee only take 1.6%
of the time I am looking at in the benchmark, meaning nothing else to improve here.
2013-12-26 19:20:12 +09:00
Daniel Juyung Seo 76d8532b54 efl: Unified eina critical manro to CRI.
Being annoyed by different types of eina critical macros - CRI, CRIT,
 CRITICAL -, I concluded to unify them to one. Discussed on IRC and
 finally, CRI was chosen to meet the consistency with other macros -
 ERR, WRN, INF, DBG - in terms of the number of characters.
If there is any missing bits, please let me know.
2013-12-26 12:27:13 +09:00
Cedric BAIL 766bd42639 evas: limit how many times we walk over items.
This does help for some textblock benchmark with a speed increase of 12% and
the one that don't get better don't get slower either, so let's put that in.
2013-12-26 11:27:09 +09:00
Tom Hacohen 7aae5d0804 Evas textblock: Fixed range_deletion bug with multiple visible formats.
This makes the tests added in 8bee8853ae
pass.

Thanks to Youngbok Shin for reporting.
2013-12-16 15:45:10 +00:00
Tom Hacohen 7141c1dbb2 Evas textblock: Fixed deletion of ranges ending with visual formats.
This is a regression introduced in:
3f3ad67616
2013-12-13 14:44:16 +00:00
Carsten Haitzler 5a9184b323 evas - textblock - fix dbg_info_get to avoid leak if root is NULL
fixes CID 1040007
2013-12-11 19:00:15 +09:00
Jean-Philippe Andre 0cb048f9b6 Evas textblock: Fix crash with empty markups values
Markup parsing will segv if a value string is empty,
as in "<style=>". Sure, this is invalid, but hey, it could
definitely be used from an app or even by a user writing
his own markups :)

The internal doc says this function expects an item to be
of the form "key=val" but there are no checks beyond the
presence of "=" in the string before calling it.
2013-12-10 12:05:04 +09:00
Tom Hacohen b5262de237 Evas textblock: Slightly improve paragraph items freeing.
Use the EINA_LIST_FREE macro instead of a safe loop and a list free.
This is faster and cleaner.
2013-12-09 13:33:46 +00:00
Tom Hacohen f0d3cb91b3 Evas textblock: Fixed wrapping of lines ending with whites.
Whites at the end of lines ending with whites should not be cut, but
should be wrapped (there's no legal line break there).

Thanks to Shilpa Singh for reporting.
2013-11-25 14:41:24 +00:00
Tom Hacohen c23ef6de3d Evas textblock: Improved debug helper functions. 2013-11-21 14:22:02 +00:00
Tom Hacohen 7bba64d7ee Evas textblock: Fixed order of tags inserted with markup_app/prepend.
The order was messed up when inserting a few formats in the
markup_append/prepend functions without any characters between them.
For example, inserting "<b><i>" would result in "<i><b>" being inserted.

Thanks to YoungBok Shin for reporting this.
2013-11-19 16:05:34 +00:00
Yakov Goldberg c101d85541 evas/textblock: add const for param in evas_object_textblock_style_set for consistency 2013-11-11 13:17:03 +02:00
Tom Hacohen c7addf4083 Changed Eo class names to be consistent.
All the class names are now of the format: Lib_Type_Subtype_Extra.
2013-11-07 11:17:52 +00:00
Youngbok Shin cdb86e34bb Evas: Fixed textblock rendering to properly set render operation on context.
Render operation are not well tested. It appears that it was never properly setted
on a textblock, this would lead to see it rendered with the render operation of another
object.

Test Plan:
Add some rectangle object with textblock object.
The textblock style should be set to "backing=on backing_color=#ffffffff".
Set render operation to some rectangle with "evas_object_render_op_set(rect, EVAS_RENDER_COPY)".
Check the textblock.

Reviewers: woohyun, cedric, raster

Reviewed By: cedric

CC: cedric

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

Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
2013-11-01 11:12:01 +09:00
Youngbok Shin d17e0d3936 evas: Fixed the textblock format to be drawn according to the glyph's horizontal advance width.
Summary:
Some characters have different two value on glyph's width and horizontal advance width.
If the glyph's width is smaller than advance width, format can be drawn weird.

Test Plan:
Set underline:on to the entry style and just insert the following characters.
。
、
)
(

Reviewers: tasn, woohyun

CC: cedric

Differential Revision: https://phab.enlightenment.org/D270
2013-10-18 11:25:59 +01:00
Cedric Bail 6be9cc74de evas: simplify logic for textblock style parameter parsing. 2013-10-16 18:56:32 +09:00
Carsten Haitzler aba7e9892e evas - fix textblock handling of effects for shadows and so on in some cases 2013-10-15 16:05:11 +09:00
Tom Hacohen 82f5f78dac Revert "evas/textblock - null check."
I'm sorry, but those kind of commit messages are unacceptable for code
I'm the only maintainer of. It's bad enough that to have them in the
project in general, but this I won't accept.

I wanted to review this commit, but the lack of explanation about what
you are trying to fix and why you think this is the good fix prevents me
from doing my job. However, without really looking too much into it,
this commit looks wrong. evas_textblock_cursor_format_is_visible_get
should verify there's a format node...

Please come up with a better commit message and re-commit.

This reverts commit fe33aa7408.
2013-10-03 18:45:07 +01:00
ChunEon Park fe33aa7408 evas/textblock - null check. 2013-10-04 02:43:20 +09:00
Tom Hacohen 04b28686af Evas Textblock: Use font underline properties.
This change causes textblock to use the font properties when drawing
underline.
2013-10-02 11:46:25 +01:00
Tom Hacohen bb84a01f7c Evas textblock: Moved relayout checks to a function.
This cleans up the code a bit and makes it a bit simpler.
2013-09-30 16:15:16 +01:00
Carsten Haitzler a4a285089f evas - improve textblock logic to reduce num of layouts when used - faster
when using genlist and the edje item objects, there seem to be a lot
of excess textblock layouts happening. i was seeing about 12 layouts per tb
part in the edje before this patch. with this it's down to about 3.
2013-09-30 23:31:48 +09:00
Stefan Schmidt 642e4293ff evas/textblock: Remove null statement. 2013-09-30 09:48:34 +01:00
Cedric BAIL 5d37215d26 evas: let's micro optimize the parsing of format.
Only the key is worth being a stringshare as it is used to do an efficient
binary comparison instead of iterating over all possibility. Also reused
some already known value and a few other speedup.
2013-09-29 13:43:46 +02:00
Tom Hacohen 682c69764d Revert "eo: libs,test,benchmarks Eo_Class -> Eo"
This reverts commit 1714fe93f4.

We actually want this type, it makes things clearer.

Conflicts:
	src/tests/eo/function_overrides/function_overrides_inherit2.c
	src/tests/eo/function_overrides/function_overrides_simple.c
	src/tests/eo/suite/eo_test_class_simple.c
2013-09-27 16:40:32 +01:00
Jérémy Zurcher 1714fe93f4 eo: libs,test,benchmarks Eo_Class -> Eo
Conflicts:
	src/tests/eo/suite/eo_test_general.c
2013-09-27 14:01:46 +01:00
Cedric Bail b37494503f evas: update to new eo_parent_get/set API. 2013-09-25 13:34:18 +09:00
Tom Hacohen 2ab088aeea Evas textblock: Fixed native size calculation. 2013-09-23 14:37:18 +01:00
Tom Hacohen 2173652b4d Evas textblock: Fix format based line size calculation.
Format based line size modifiers were not applied.
2013-09-23 14:37:18 +01:00
Tom Hacohen cbde2bef69 Evas textblock: Fixed max descent adjustment and a related bug.
The bug caused wrong line sizing in some situations (appending new
paragraphs to a textblock).
2013-09-23 14:37:18 +01:00
Tom Hacohen 72167b9cc3 Evas textblock: Fixed ascent/descent calculation a bit more.
Separated maxascent/descent from ascent/descent even further.
Fix calculation to be based on font instance and not the font group.
2013-09-23 14:37:18 +01:00
Tom Hacohen 5adffd54e5 Evas textblock: rename maxascent/descent->ascent/descent.
Although we kinda use them as max in some situations, they are actually
just the regular ascent and descent. Following commits will make this
separation even stronger.
2013-09-23 14:37:18 +01:00
Tom Hacohen 94e6f6a5bc Evas textblock: Fix wrong line spacing when appending lines.
This fixes T397 which was introduced by commit: 4bcf4991eb.
This also fixes the issues with enventor.
2013-09-20 13:52:48 +01:00
Tom Hacohen bda3ceb632 Evas textblock: fixed *_markup_get issue with escaped chars.
Markup_get was misbehaving and returning wrong results with some escaped
chars. markup_to_utf8 was working correctly. Merged the code together
and now both are consistent and correct.

Thanks to WooHyun for reporting.
2013-09-03 11:50:34 +01:00
Tom Hacohen 4bcf4991eb Evas textblock: Fixed calculation of maxdescent.
Thanks to YoungBok Shin for reporting.
2013-08-20 11:13:06 +01:00
Tom Hacohen 76eceda2ee Evas textblock: make an if look nicer (no logic change).
This makes things simpler and less confusing and might have prevented
the issue Stefan fixed in 4f484b81d4
from happenning in the first place.
2013-08-09 15:46:40 +01:00
Stefan Schmidt 4f484b81d4 evas/textblock: Do not write out of bounds.
The length is len so last array index must be len - 1. Better not
corrupt memory. :)

CID 1039302
2013-08-09 11:54:42 +01:00
Tom Hacohen 1d75dcaf56 Evas textblock: Make the ellipsis format the same as the surrounding.
This fix is based on a solution by WooHyun Jung.
2013-08-08 13:10:39 +01:00
Tom Hacohen 6583b83c73 Evas textblock: Use max ascent/descent at the edges of the textblock.
Thanks to Youngbok Shin for reporting the difference in behaviour between
textblock and text object.
2013-08-06 09:29:03 +01:00
Cedric Bail 9104fe7322 evas: let's not leak temporary list left over. 2013-08-01 19:39:58 +09:00
Yakov Goldberg ae561346e4 evas/textblock: fix my own boolean expression to be more obvious 2013-07-21 11:57:11 +03:00
Carsten Haitzler 76229f7a2f fix clang nonnull warning. 2013-07-16 16:47:35 +09:00
Cedric Bail 48b40640b5 evas: no need to call eo_data_scope_get in many case after this change.
Reduce CPU usage by 5% in some case (especially when the CPU is not the
limiting factor like with the GL backend).
2013-07-09 09:48:09 +09:00
Tom Hacohen 5d4ff97e20 Evas textblock: Fixed issue with *textblock_cursor_range_formats_get.
In some cases we could return extra formats that are outside of the
range. It's actually not completely fixed yet.

Thanks to clang-analyzer for detecting this.
2013-07-04 10:07:52 +01:00
Tom Hacohen 827885d794 Evas textblock: Fixed format parsing to not be confused by single-quotes.
Before this commit, having a single quote anywhere in the format would mess
up all of the format parsing.

Thanks to MinSu Seo for reporting.
2013-07-01 14:18:52 +01:00
Tom Hacohen fdbc477f79 Evas textblock: Fixed issue with textblocks without fonts segfaulting.
Fixes T184 (which is a regression).
2013-06-25 16:37:48 +01:00
Sebastian Dransfeld 51023d2d4f evas: Keep sane name for public header
Evas_Common.h should be used for the public header, and rather rename
evas_common.h internal header to another name.

Sa:
Evas_Common_Header.h -> Evas_Common.h
evas_common.h -> evas_common_private.h

Shouldn't have both Evas_Common.h and evas_common.h because of case
insensitive filesystems.
2013-06-20 12:53:29 +02:00
ChunEon Park 1f558c6cde evas/textblock - revert the textblock pre_render_done.
Fundamentally, this is not a point of the problem.

somewhere pre_render caller is inccorrect without releasing the flag.
2013-05-30 14:43:41 +09:00
ChunEon Park b7ff5a737f evas/textblock - fix the textblock to render pre again if it needs to be relayouting 2013-05-28 23:07:24 +09:00
ChunEon Park 7003b7fd0b evas/textblock - fix indent 2013-05-28 23:00:31 +09:00
Daniel Juyung Seo b2dd73e841 evas_object_textblock.c: fixed a typo in the documentation. 2013-05-21 19:21:47 +09:00
Tom Hacohen 97acb71175 Evas textblock: Removed double ;. 2013-05-16 10:38:56 +01:00
Carsten Haitzler f8c9a8d167 revert the revert... damn you git!
Revert "Revert "Efl: replace eo_data_get for objects data referencing.""

This reverts commit b64a2994b3.
2013-05-02 16:47:16 +09:00
Carsten Haitzler b64a2994b3 Revert "Efl: replace eo_data_get for objects data referencing."
This reverts commit 654a3f5f94.
2013-05-02 14:17:19 +09:00
Daniel Zaoui 654a3f5f94 Efl: replace eo_data_get for objects data referencing. 2013-05-01 10:37:08 +03:00
Tom Hacohen 455d8790b9 Evas textblock: Fixed line size calculation when using multiple fonts.
Thanks to MinSu Seo for reporting.
2013-04-25 15:16:20 +01:00
Tom Hacohen 3f3ad67616 Evas textblock: Fixed a bug with deletion of ranges.
Fixed a bug with deletion of ranges that end just before a visual format.
Thanks to WooHyun Jung for reporting.
2013-04-15 17:15:22 +01:00
Cedric Bail d1c502fe26 evas: remove warning, no need for double (). 2013-04-12 11:24:14 +09:00
Yakov Goldberg 7016872619 Efl textblock/entry: additions to split BiDi cursor
- handling multiple runs, multiple lines, last char of line/par
   - tests added

Signed-off-by: Yakov Goldberg <yakov.g@samsung.com>
2013-04-10 14:59:48 +03:00
Tom 'TAsn' Hacohen a70abbb381 Efl textblock/entry: Added support for split BiDi cursor.
If logical cursor is between LTR/RTL text two cursors will be shown.
  Upper cursor is shown for the text of the same direction as
  paragraph, lower cursor - for opposite.

  NOT DONE YET

Signed-off-by: Tom 'TAsn' Hacohen <tom@stosb.com>
2013-04-10 14:58:32 +03:00
Cedric Bail f1dfbc4e0e evas: remove one useless pointer (-30KB). 2013-04-07 14:00:10 +09:00
Daniel Willmann 1cb5a8f63a evas_textblock: Avoid dereferencing out-of-bounds element
Address sanitizer found this. Not really a serious error as text[i] will
be 0 in that case (I believe) and the loop is aborted in any case.

Still, better safe than sorry.

Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
2013-04-02 18:57:43 +01:00
Carsten Haitzler 4f4681ebd8 warn-- 2013-03-28 20:13:40 +09:00
Carsten Haitzler 1f1704924d fix word start/end logic to be consistent with other toolkits. 2013-03-28 18:51:18 +09:00
Tom Hacohen a170683334 Change usage of eo_do_super to the new prototype. 2013-03-18 16:14:18 +00:00
Cedric BAIL d79a2efa39 evas: use Eina_Cow a lot more and we are closer to the memory size of 1.7. 2013-03-13 14:35:25 +09:00
Tom Hacohen 5dc2d7c126 Evas textblock: Fixed "high" text size adjustments for multiple paragraphs. 2013-02-28 16:48:09 +00:00
Tom Hacohen 5a55e5e56c Evas textblock: Added proper size adjustments for "high" shaped texts.
This adjusts the starting coords of the textblock to fit the shaped char of
the first line.
2013-02-28 16:26:09 +00:00
Tom Hacohen 2e001a25bf textblock: Added native and formatted sizes to clouseau. 2013-02-15 17:19:29 +00:00
Tom Hacohen 3974cb3dc1 Evas textblock: Fixed a selection bug introduced in my previous commit.
I matched against the wrong values so it never included items in the middle
even when needed.

SVN revision: 83869
2013-02-13 12:42:44 +00:00
Tom Hacohen 548e548632 Evas textblock: Fixed a selection issue.
The issue happens when selecting in strings that have both bidi and different
scripts in the same bidi run. E.g: "עבריתenglishрусскийעברית".

SVN revision: 83786
2013-02-08 15:31:25 +00:00
Tom Hacohen 70156285b0 Eo dbg: Use eina_value as the debug info type.
SVN revision: 83443
2013-01-29 16:36:01 +00:00
Aharon Hillel 028f059d32 Clouseau-Eo integration: Added debug info functions.
From now, classes implementing the Eo function with id
EO_BASE_SUB_ID_DBG_INFO_GET will be able to show in Clouseau their own
specific information.
Information contents is controlled by the class itself and no more
by Clouseau. Basic types and lists are supported..

Signed-off-by: Aharon Hillel <a.hillel@samsung.com>

SVN revision: 83410
2013-01-29 06:36:23 +00:00
Cedric BAIL c0e62fb818 efl: remove a forgotten deprecated call.
SVN revision: 83069
2013-01-22 10:47:47 +00:00
Tom Hacohen ac0ff4c997 Evas textblock: Added EAPI to the ifdefed debugging funcs.
SVN revision: 82815
2013-01-15 14:49:38 +00:00
Tom Hacohen d925820fa9 Evas textblock: simplified and fixed bugs in _cursor_geometry_get
SVN revision: 82798
2013-01-15 10:57:34 +00:00
Stefan Schmidt b4b7c9239d Evas textblock: Fixed issue with line height when breakingon format.
All kudos to Tom for this one.

SVN revision: 82763
2013-01-14 14:18:10 +00:00
Carsten Haitzler 440bb7c23c cut down textprop size a bit... 72 -> 64bytes. if we can wrap
tp->start/len/text_offset/text_len read/wrtie in access funcs. so we
can special case where:

1. start == text_offset == 0 && len == text_len == 1
2. start == text_offset == 0 && len == text_len < 65536
3. start == text_offset == 0 && len == text_len < 256
 


SVN revision: 82692
2013-01-12 08:40:46 +00:00
Leandro Pereira d5f91fd5c2 evas/async_render: do not use async event to unref glyphs
Patch by: Leandro Pereira <leandro@profusion.mobi>



SVN revision: 82662
2013-01-11 19:55:40 +00:00
Tom Hacohen e84686d76d Evas: Fixed a bug with breaking after format items.
SVN revision: 82653
2013-01-11 18:16:24 +00:00
ChunEon Park 5cf84bb84a evas - use Eina_Bool
SVN revision: 82035
2013-01-03 05:38:03 +00:00
ChunEon Park bb39010a0a evas - removed unnecessary lines.
in the render main function, it will always reset changed field whenever it calls the post function.



SVN revision: 81974
2013-01-02 11:56:20 +00:00
Tomas Cech cafaecfce1 efl: Fix typo in evas_object_textblock
Patch by: Tomas Cech <tcech@suse.cz>

SVN revision: 81559
2012-12-21 15:56:26 +00:00
Jonas M. Gastal 55845c5a3e efl: Adding much improved textblock style documentation.
SVN revision: 81485
2012-12-20 20:42:45 +00:00
Leandro Pereira cb10c7d019 evas: Modify software_generic and gl_x11 to with with threaded renderer
SVN revision: 81284
2012-12-18 16:28:55 +00:00
Leandro Dorileo 35a3326371 evas: fix a memory leak introduced on rev 78644
_nodes_clear() is called on object removal and it's not supposed
alloc anything at that stage.


SVN revision: 80984
2012-12-14 20:03:31 +00:00
Daniel Zaoui 25ea899dfa Some KlocWork fixes.
Signed-off-by: Daniel Zaoui <daniel.zaoui@samsung.com>

SVN revision: 80211
2012-12-05 06:25:49 +00:00
Daniel Zaoui d7783e11d6 Added missing descriptions for Eo defines whose functions hadn't
descriptions at all. Needed in language bindings.

Signed-off-by: Daniel Zaoui <daniel.zaoui@samsung.com>

SVN revision: 79646
2012-11-25 09:00:21 +00:00
Vincent Torri c15e9c6575 merge: and now Evas
I've tested make -j 3 install and it works nicely

I've tested expedite with software and opengl xlib,
and it works. Not tested other engines, so please
report any problems (engines or other) on the ML.

TODO: examples and tests, I'll add them later

ISSUE: Eina_Unicode size check. It indirectly depends on
       eina_config.h, which is created at the end of the
       configure script. So its size is always 0. I don't
       know how that size is used, so I can't do a lot,
       for now.


SVN revision: 78895
2012-11-04 11:51:42 +00:00