summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2013-11-01 12:02:55 +0000
committerTom Hacohen <tom@stosb.com>2013-11-01 12:02:55 +0000
commita96b421fd496bc7ec851f167d06102e46d1d835b (patch)
tree826e2a3dc618b1f20cdfa686dc5bbede91f22c1e /src/lib
parent91bd46eee96c0519a4426ddd90ceae5361f9bc3f (diff)
Evas textgrid: Added some clouseau debug info.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/evas/canvas/evas_object_textgrid.c31
1 files changed, 30 insertions, 1 deletions
diff --git a/src/lib/evas/canvas/evas_object_textgrid.c b/src/lib/evas/canvas/evas_object_textgrid.c
index 87634d4591..087df05e31 100644
--- a/src/lib/evas/canvas/evas_object_textgrid.c
+++ b/src/lib/evas/canvas/evas_object_textgrid.c
@@ -7,12 +7,14 @@ EAPI Eo_Op EVAS_OBJ_TEXTGRID_BASE_ID = EO_NOOP;
7 7
8#define MY_CLASS EVAS_OBJ_TEXTGRID_CLASS 8#define MY_CLASS EVAS_OBJ_TEXTGRID_CLASS
9 9
10#define MY_CLASS_NAME "textgrid"
11
10/* save typing */ 12/* save typing */
11#define ENFN obj->layer->evas->engine.func 13#define ENFN obj->layer->evas->engine.func
12#define ENDT obj->layer->evas->engine.data.output 14#define ENDT obj->layer->evas->engine.data.output
13 15
14/* private magic number for text objects */ 16/* private magic number for text objects */
15static const char o_type[] = "textgrid"; 17static const char o_type[] = MY_CLASS_NAME;
16 18
17/* private struct for line object internal data */ 19/* private struct for line object internal data */
18typedef struct _Evas_Object_Textgrid Evas_Object_Textgrid; 20typedef struct _Evas_Object_Textgrid Evas_Object_Textgrid;
@@ -1666,11 +1668,38 @@ _update_add(Eo *eo_obj, void *_pd, va_list *list)
1666} 1668}
1667 1669
1668static void 1670static void
1671_dbg_info_get(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list)
1672{
1673 Eo_Dbg_Info *root = (Eo_Dbg_Info *) va_arg(*list, Eo_Dbg_Info *);
1674 eo_do_super(eo_obj, MY_CLASS, eo_dbg_info_get(root));
1675 Eo_Dbg_Info *group = EO_DBG_INFO_LIST_APPEND(root, MY_CLASS_NAME);
1676 Eo_Dbg_Info *node;
1677
1678 const char *text;
1679 int size;
1680 eo_do(eo_obj, evas_obj_textgrid_font_get(&text, &size));
1681 EO_DBG_INFO_APPEND(group, "Font", EINA_VALUE_TYPE_STRING, text);
1682 EO_DBG_INFO_APPEND(group, "Text size", EINA_VALUE_TYPE_INT, size);
1683
1684 eo_do(eo_obj, evas_obj_textgrid_font_source_get(&text));
1685 EO_DBG_INFO_APPEND(group, "Font source", EINA_VALUE_TYPE_STRING, text);
1686
1687 {
1688 int w, h;
1689 eo_do(eo_obj, evas_obj_textgrid_size_get(&w, &h));
1690 node = EO_DBG_INFO_LIST_APPEND(group, "Grid size");
1691 EO_DBG_INFO_APPEND(node, "w", EINA_VALUE_TYPE_INT, w);
1692 EO_DBG_INFO_APPEND(node, "h", EINA_VALUE_TYPE_INT, h);
1693 }
1694}
1695
1696static void
1669_class_constructor(Eo_Class *klass) 1697_class_constructor(Eo_Class *klass)
1670{ 1698{
1671 const Eo_Op_Func_Description func_desc[] = { 1699 const Eo_Op_Func_Description func_desc[] = {
1672 EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _constructor), 1700 EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _constructor),
1673 EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_DESTRUCTOR), _destructor), 1701 EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_DESTRUCTOR), _destructor),
1702 EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_DBG_INFO_GET), _dbg_info_get),
1674 EO_OP_FUNC(EVAS_OBJ_TEXTGRID_ID(EVAS_OBJ_TEXTGRID_SUB_ID_SIZE_SET), _size_set), 1703 EO_OP_FUNC(EVAS_OBJ_TEXTGRID_ID(EVAS_OBJ_TEXTGRID_SUB_ID_SIZE_SET), _size_set),
1675 EO_OP_FUNC(EVAS_OBJ_TEXTGRID_ID(EVAS_OBJ_TEXTGRID_SUB_ID_SIZE_GET), _size_get), 1704 EO_OP_FUNC(EVAS_OBJ_TEXTGRID_ID(EVAS_OBJ_TEXTGRID_SUB_ID_SIZE_GET), _size_get),
1676 EO_OP_FUNC(EVAS_OBJ_TEXTGRID_ID(EVAS_OBJ_TEXTGRID_SUB_ID_FONT_SOURCE_SET), _font_source_set), 1705 EO_OP_FUNC(EVAS_OBJ_TEXTGRID_ID(EVAS_OBJ_TEXTGRID_SUB_ID_FONT_SOURCE_SET), _font_source_set),