forked from enlightenment/efl
Evas textblock: Added evas_textblock_cursor_pen_geometry_get.
SVN revision: 56433
This commit is contained in:
parent
952ba44f0b
commit
35847d3c88
|
@ -1448,6 +1448,7 @@ typedef void (*Evas_Object_Image_Pixels_Get_Cb) (void *data, Evas_Object *o);
|
||||||
|
|
||||||
EAPI int evas_textblock_cursor_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch, Evas_BiDi_Direction *dir, Evas_Textblock_Cursor_Type ctype) EINA_ARG_NONNULL(1);
|
EAPI int evas_textblock_cursor_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch, Evas_BiDi_Direction *dir, Evas_Textblock_Cursor_Type ctype) EINA_ARG_NONNULL(1);
|
||||||
EAPI int evas_textblock_cursor_char_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) EINA_ARG_NONNULL(1);
|
EAPI int evas_textblock_cursor_char_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) EINA_ARG_NONNULL(1);
|
||||||
|
EAPI int evas_textblock_cursor_pen_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cpen_x, Evas_Coord *cy, Evas_Coord *cadv, Evas_Coord *ch) EINA_ARG_NONNULL(1);
|
||||||
EAPI int evas_textblock_cursor_line_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) EINA_ARG_NONNULL(1);
|
EAPI int evas_textblock_cursor_line_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) EINA_ARG_NONNULL(1);
|
||||||
EAPI Eina_Bool evas_textblock_cursor_char_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord x, Evas_Coord y) EINA_ARG_NONNULL(1);
|
EAPI Eina_Bool evas_textblock_cursor_char_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord x, Evas_Coord y) EINA_ARG_NONNULL(1);
|
||||||
EAPI int evas_textblock_cursor_line_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord y) EINA_ARG_NONNULL(1);
|
EAPI int evas_textblock_cursor_line_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord y) EINA_ARG_NONNULL(1);
|
||||||
|
|
|
@ -6781,19 +6781,10 @@ evas_textblock_cursor_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** FIXME: doc
|
||||||
/**
|
|
||||||
* Returns the geometry of the char at cur.
|
|
||||||
*
|
|
||||||
* @param cur the position of the char.
|
|
||||||
* @param cx the x of the char.
|
|
||||||
* @param cy the y of the char.
|
|
||||||
* @param cw the width of the char.
|
|
||||||
* @param ch the height of the char.
|
|
||||||
* @return line number of the char on success, -1 on error.
|
|
||||||
*/
|
*/
|
||||||
EAPI int
|
static int
|
||||||
evas_textblock_cursor_char_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch)
|
_evas_textblock_cursor_char_pen_geometry_common_get(int (*query_func) (void *data, void *font, const Eina_Unicode *text, const Evas_BiDi_Props *intl_props, int pos, int *cpen_x, int *cy, int *cadv, int *ch), const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch)
|
||||||
{
|
{
|
||||||
Evas_Object_Textblock *o;
|
Evas_Object_Textblock *o;
|
||||||
Evas_Object_Textblock_Line *ln = NULL;
|
Evas_Object_Textblock_Line *ln = NULL;
|
||||||
|
@ -6846,7 +6837,7 @@ evas_textblock_cursor_char_geometry_get(const Evas_Textblock_Cursor *cur, Evas_C
|
||||||
if (pos < 0) pos = 0;
|
if (pos < 0) pos = 0;
|
||||||
if (ti->format->font.font)
|
if (ti->format->font.font)
|
||||||
{
|
{
|
||||||
ret = cur->ENFN->font_char_coords_get(cur->ENDT,
|
ret = query_func(cur->ENDT,
|
||||||
ti->format->font.font,
|
ti->format->font.font,
|
||||||
ti->text, &ti->parent.bidi_props,
|
ti->text, &ti->parent.bidi_props,
|
||||||
pos,
|
pos,
|
||||||
|
@ -6909,6 +6900,40 @@ evas_textblock_cursor_char_geometry_get(const Evas_Textblock_Cursor *cur, Evas_C
|
||||||
return ln->line_no;
|
return ln->line_no;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the geometry of the char at cur.
|
||||||
|
*
|
||||||
|
* @param cur the position of the char.
|
||||||
|
* @param cx the x of the char.
|
||||||
|
* @param cy the y of the char.
|
||||||
|
* @param cw the w of the char.
|
||||||
|
* @param ch the h of the char.
|
||||||
|
* @return line number of the char on success, -1 on error.
|
||||||
|
*/
|
||||||
|
EAPI int
|
||||||
|
evas_textblock_cursor_char_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch)
|
||||||
|
{
|
||||||
|
return _evas_textblock_cursor_char_pen_geometry_common_get(
|
||||||
|
cur->ENFN->font_char_coords_get, cur, cx, cy, cw, ch);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the geometry of the pen at cur.
|
||||||
|
*
|
||||||
|
* @param cur the position of the char.
|
||||||
|
* @param cpen_x the pen_x of the char.
|
||||||
|
* @param cy the y of the char.
|
||||||
|
* @param cadv the adv of the char.
|
||||||
|
* @param ch the h of the char.
|
||||||
|
* @return line number of the char on success, -1 on error.
|
||||||
|
*/
|
||||||
|
EAPI int
|
||||||
|
evas_textblock_cursor_pen_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch)
|
||||||
|
{
|
||||||
|
return _evas_textblock_cursor_char_pen_geometry_common_get(
|
||||||
|
cur->ENFN->font_pen_coords_get, cur, cx, cy, cw, ch);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the geometry of the line at cur.
|
* Returns the geometry of the line at cur.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue