Eina_Strbuf *buf;
Evas_Textblock_Cursor *cur2;
- if (!cur1 || !cur1->node) return NULL;
- if (!_cur2 || !_cur2->node) return NULL;
- if (cur1->obj != _cur2->obj) return NULL;
buf = eina_strbuf_new();
if (evas_textblock_cursor_compare(cur1, _cur2) > 0)
Evas_Object_Textblock_Node_Text *n1, *n2;
Evas_Textblock_Cursor *cur2;
- if (!cur1 || !cur1->node) return NULL;
- if (!_cur2 || !_cur2->node) return NULL;
- if (cur1->obj != _cur2->obj) return NULL;
buf = eina_ustrbuf_new();
if (evas_textblock_cursor_compare(cur1, _cur2) > 0)
EAPI char *
evas_textblock_cursor_range_text_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2, Evas_Textblock_Text_Type format)
{
- Evas_Object_Protected_Data *obj = eo_data_scope_get(cur1->obj, EVAS_OBJECT_CLASS);
+ Evas_Object_Protected_Data *obj;
+
+ if (!cur1 || !cur1->node) return NULL;
+ if (!cur2 || !cur2->node) return NULL;
+ if (cur1->obj != cur2->obj) return NULL;
+
+ obj = eo_data_scope_get(cur1->obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
if (format == EVAS_TEXTBLOCK_TEXT_MARKUP)
return _evas_textblock_cursor_range_text_markup_get(cur1, cur2);
"and now in english."));
/* Range get */
+ /* If one of the given cursor is NULL, it returns NULL. */
+ fail_if(evas_textblock_cursor_range_text_get(NULL, NULL,
+ EVAS_TEXTBLOCK_TEXT_MARKUP));
+ fail_if(evas_textblock_cursor_range_text_get(cur, NULL,
+ EVAS_TEXTBLOCK_TEXT_MARKUP));
+ fail_if(evas_textblock_cursor_range_text_get(NULL, cur,
+ EVAS_TEXTBLOCK_TEXT_MARKUP));
+
Evas_Textblock_Cursor *main_cur = evas_object_textblock_cursor_get(tb);
evas_textblock_cursor_pos_set(main_cur, 2);
evas_textblock_cursor_pos_set(cur, 2);