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.
21 * @file eail_scroller.c
22 * @brief EailScroller implementation
27 #include <Elementary.h>
28 #include "eail_scroller.h"
31 * @brief Definition of EailScroller as GObject
33 * EailScroller is extended EAIL_TYPE_SCROLLABLE_WIDGET
35 G_DEFINE_TYPE(EailScroller, eail_scroller, EAIL_TYPE_SCROLLABLE_WIDGET);
38 * @brief Initializer for AtkObjectClass
40 * @param obj AtkObject instance
41 * @param data initialization data
44 eail_scroller_initialize(AtkObject *obj, gpointer data)
46 ATK_OBJECT_CLASS(eail_scroller_parent_class)->initialize(obj, data);
48 obj->role = ATK_ROLE_SCROLL_PANE;
52 * @brief Prepares Eina_List filled with Evas_Object* objects
53 * representing content of the widget
55 * Call eina_list_free on the returned list when results processing has been finished.
57 * @param widget EailWidget instance
59 * @return Eina_List representing the list of the widget's children
62 eail_scroller_get_widget_children(EailWidget *widget)
64 Eina_List *list = NULL;
66 Evas_Object *obj = eail_widget_get_widget(EAIL_WIDGET(widget));
69 content = elm_object_part_content_get(obj, "default");
71 list = eina_list_append(list, content);
78 * @brief Gets the accessible name of the accessible
80 * Implementation of AtkObject->get_name callback.
82 * @param obj AtkObject instance
84 * @returns string representing the accessible name of
88 eail_scroller_get_name(AtkObject *obj)
91 Evas_Object *widget = NULL;
93 name = ATK_OBJECT_CLASS(eail_scroller_parent_class)->get_name(obj);
97 widget = eail_widget_get_widget(EAIL_WIDGET(obj));
99 name = (const gchar*)elm_object_text_get(widget);
105 * @brief EailFileselector GObject instance initializer
107 * @param scroller EailScroller instance
110 eail_scroller_init(EailScroller *scroller)
115 * @brief Initializer for EailScroller GObject class
117 * Defines callbacks for base AtkObject.
119 * @param klass EailScrollerClass instance
122 eail_scroller_class_init(EailScrollerClass *klass)
124 AtkObjectClass *atk_class = ATK_OBJECT_CLASS(klass);
125 EailWidgetClass *widget_class = EAIL_WIDGET_CLASS(klass);
127 widget_class->get_widget_children = eail_scroller_get_widget_children;
129 atk_class->initialize = eail_scroller_initialize;
130 atk_class->get_name = eail_scroller_get_name;