2 * Copyright (c) 2013 Samsung Electronics Co., Ltd.
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with this library; see the file COPYING.LIB. If not, write to
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
22 * @brief EailFrame implementation
25 #include <Elementary.h>
26 #include "eail_frame.h"
29 * @brief EailFrame type definition
31 G_DEFINE_TYPE(EailFrame, eail_frame, EAIL_TYPE_WIDGET);
34 * @brief EailFrame initializer
36 * @param obj AtkObject instance
37 * @param data initialization data
40 eail_frame_initialize(AtkObject *obj, gpointer data)
42 ATK_OBJECT_CLASS(eail_frame_parent_class)->initialize(obj, data);
44 obj->role = ATK_ROLE_FRAME;
48 * @brief Gets widget's children
50 * @param widget EailWidget instance
51 * @return Eina_List representing the list of widget's children
54 eail_frame_get_widget_children(EailWidget *widget)
56 Eina_List *list = NULL;
60 obj = eail_widget_get_widget(EAIL_WIDGET(widget));
63 content = elm_object_part_content_get(obj, "default");
64 if (elm_object_widget_check(content))
65 list = eina_list_append(list, content);
72 * @brief Gets obj's name
74 * @param obj AtkObject instance
75 * @return string representing obj's name
78 eail_frame_get_name(AtkObject *obj)
81 Evas_Object *widget = NULL;
83 name = ATK_OBJECT_CLASS(eail_frame_parent_class)->get_name(obj);
87 widget = eail_widget_get_widget(EAIL_WIDGET(obj));
89 name = (const gchar*)elm_object_text_get(widget);
95 * @brief EailFrame instance initializer
97 * @param frame EailFrame instance
100 eail_frame_init(EailFrame *frame)
105 * @brief EailFrame class initializer
107 * @param klass EailFrameClass instance
110 eail_frame_class_init(EailFrameClass *klass)
112 AtkObjectClass *atk_class = ATK_OBJECT_CLASS(klass);
113 EailWidgetClass *widget_class = EAIL_WIDGET_CLASS(klass);
115 widget_class->get_widget_children = eail_frame_get_widget_children;
117 atk_class->initialize = eail_frame_initialize;
118 atk_class->get_name = eail_frame_get_name;