summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2014-12-08 15:18:53 +0000
committerTom Hacohen <tom@stosb.com>2015-01-14 08:45:40 +0000
commit8b3403e3759cffbd1ab5bd9f43347ccf5cb3b210 (patch)
treea0bf51d36b166d9b36753d7c29e568bfded3a4a3
parent540251ab4c5ac127e5646d17610386048e8c9f01 (diff)
downloadefl-8b3403e3759cffbd1ab5bd9f43347ccf5cb3b210.tar.gz
Remove more crap.
-rw-r--r--src/lib/evas/canvas/evas_textblock2.c91
-rw-r--r--src/lib/evas/canvas/evas_textblock2.h3
2 files changed, 3 insertions, 91 deletions
diff --git a/src/lib/evas/canvas/evas_textblock2.c b/src/lib/evas/canvas/evas_textblock2.c
index 7a04aeaeef..39165a2041 100644
--- a/src/lib/evas/canvas/evas_textblock2.c
+++ b/src/lib/evas/canvas/evas_textblock2.c
@@ -7932,8 +7932,8 @@ evas_textblock2_cursor_content_get(const Evas_Textblock2_Cursor *cur)
}
}
-static char *
-_evas_textblock2_cursor_range_text_plain_get(const Evas_Textblock2_Cursor *cur1, const Evas_Textblock2_Cursor *_cur2)
+EAPI char *
+evas_textblock2_cursor_range_text_get(const Evas_Textblock2_Cursor *cur1, const Evas_Textblock2_Cursor *_cur2)
{
Eina_UStrbuf *buf;
Evas_Object_Textblock2_Node_Text *n1, *n2;
@@ -7992,93 +7992,6 @@ _evas_textblock2_cursor_range_text_plain_get(const Evas_Textblock2_Cursor *cur1,
}
}
-EAPI Eina_List *
-evas_textblock2_cursor_range_formats_get(const Evas_Textblock2_Cursor *cur1, const Evas_Textblock2_Cursor *cur2)
-{
- Evas_Object *eo_obj;
- Eina_List *ret = NULL;
- Evas_Object_Textblock2_Node_Text *n1, *n2;
- Evas_Object_Textblock2_Node_Format *first, *last;
- if (!cur1 || !cur1->node) return NULL;
- if (!cur2 || !cur2->node) return NULL;
- if (cur1->obj != cur2->obj) return NULL;
-
- eo_obj = cur1->obj;
- TB_HEAD_RETURN(NULL);
-
- if (evas_textblock2_cursor_compare(cur1, cur2) > 0)
- {
- const Evas_Textblock2_Cursor *tc;
-
- tc = cur1;
- cur1 = cur2;
- cur2 = tc;
- }
- n1 = cur1->node;
- n2 = cur2->node;
-
- /* FIXME: Change first and last getting to format_before_or_at_pos_get */
-
- last = n2->format_node;
-
- /* If n2->format_node is NULL, we don't have formats in the tb/range. */
- if (!last)
- return NULL;
- /* If the found format is on our text node, we should go to the last
- * one, otherwise, the one we found is good enough. */
- if (last->text_node == n2)
- {
- Evas_Object_Textblock2_Node_Format *fnode = last;
- while (fnode && (fnode->text_node == n2))
- {
- last = fnode;
- fnode = _NODE_FORMAT(EINA_INLIST_GET(fnode)->next);
- }
- }
-
- /* If the first format node is within the range (i.e points to n1) or if
- * we have other formats in the range, go through them */
- first = n1->format_node;
- if ((first->text_node == n1) || (first != last))
- {
- Evas_Object_Textblock2_Node_Format *fnode = first;
- /* Go to the first one in the range */
- if (fnode->text_node != n1)
- {
- fnode = _NODE_FORMAT(EINA_INLIST_GET(fnode)->next);
- }
-
- while (fnode)
- {
- ret = eina_list_append(ret, fnode);
- if (fnode == last)
- break;
- fnode = _NODE_FORMAT(EINA_INLIST_GET(fnode)->next);
- }
- }
-
- return ret;
-
-}
-
-EAPI char *
-evas_textblock2_cursor_range_text_get(const Evas_Textblock2_Cursor *cur1, const Evas_Textblock2_Cursor *cur2, Evas_Textblock2_Text_Type format)
-{
- // FIXME: Remove the format param, only palin is available from now on. */
- if (format == EVAS_TEXTBLOCK2_TEXT_PLAIN)
- return _evas_textblock2_cursor_range_text_plain_get(cur1, cur2);
- else
- return NULL; /* Not yet supported */
-}
-
-EAPI const Evas_Object_Textblock2_Node_Format *
-evas_textblock2_cursor_format_get(const Evas_Textblock2_Cursor *cur)
-{
- if (!cur) return NULL;
- TB_NULL_CHECK(cur->node, NULL);
- return _evas_textblock2_cursor_node_format_at_pos_get(cur);
-}
-
EAPI const char *
evas_textblock2_node_format_text_get(const Evas_Object_Textblock2_Node_Format *fmt)
{
diff --git a/src/lib/evas/canvas/evas_textblock2.h b/src/lib/evas/canvas/evas_textblock2.h
index b4f5c36732..fb66268c84 100644
--- a/src/lib/evas/canvas/evas_textblock2.h
+++ b/src/lib/evas/canvas/evas_textblock2.h
@@ -606,11 +606,10 @@ EAPI Eina_List *evas_textblock2_cursor_range_forma
*
* @param cur1 one side of the range.
* @param cur2 the other side of the range
- * @param format The form on which to return the text. Markup - in textblock2 markup. Plain - UTF8.
* @return the text in the range
* @see elm_entry_markup_to_utf8()
*/
-EAPI char *evas_textblock2_cursor_range_text_get(const Evas_Textblock2_Cursor *cur1, const Evas_Textblock2_Cursor *cur2, Evas_Textblock2_Text_Type format) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2);
+EAPI char *evas_textblock2_cursor_range_text_get(const Evas_Textblock2_Cursor *cur1, const Evas_Textblock2_Cursor *cur2) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2);
/**
* Return the content of the cursor.