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_fileselector.c
22 * @brief Fileselector implementation
25 #include <Elementary.h>
27 #include "eail_fileselector.h"
28 #include "eail_item.h"
29 #include "eail_item_parent.h"
30 #include "eail_priv.h"
33 * @brief Definition of EailFileselector as GObject
35 * EailFileselector is extended EAIL_TYPE_LAYOUT
37 G_DEFINE_TYPE(EailFileselector, eail_fileselector, EAIL_TYPE_LAYOUT);
40 * @brief Initializer for Fileselector AtkObjectClass
42 * @param obj AtkObject instance
43 * @param data initialization data
46 eail_fileselector_initialize(AtkObject *obj, gpointer data)
48 ATK_OBJECT_CLASS(eail_fileselector_parent_class)->initialize(obj, data);
49 obj->role = ATK_ROLE_FILE_CHOOSER;
53 * @brief Gets obj's accessible name
55 * @param obj AtkObject instance
57 * @returns string representing obj's name
60 eail_fileselector_get_name(AtkObject *obj)
65 g_return_val_if_fail(EAIL_IS_FILESELECTOR(obj), NULL);
67 atk_name = ATK_OBJECT_CLASS(eail_fileselector_parent_class)->get_name(obj);
71 widget = eail_widget_get_widget(EAIL_WIDGET(obj));
72 if (!widget) return NULL;
74 return elm_object_text_get(widget);
78 * @brief EailFileselector GObject instance initializer
80 * @param fileselector EailFileselector instance
83 eail_fileselector_init(EailFileselector *fileselector)
88 * @brief Destructor for EailFileselector
90 * @param object GObject object to be finalized
93 eail_fileselector_finalize(GObject *object)
95 G_OBJECT_CLASS(eail_fileselector_parent_class)->finalize(object);
99 * @brief Initializer for EailFileselector GObject class
101 * Defines callbacks for base AtkObject.
103 * @param klass EailFileselectorClass instance
106 eail_fileselector_class_init(EailFileselectorClass *klass)
108 AtkObjectClass *atk_class = ATK_OBJECT_CLASS(klass);
109 GObjectClass *gobject_class = G_OBJECT_CLASS(klass);
110 atk_class->initialize = eail_fileselector_initialize;
111 atk_class->get_name = eail_fileselector_get_name;
112 gobject_class->finalize = eail_fileselector_finalize;