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_separator.c
22 * @brief EailSeparator implementation
25 #include <Elementary.h>
26 #include "eail_separator.h"
29 * @brief EailSeparator type definition
31 G_DEFINE_TYPE(EailSeparator, eail_separator, EAIL_TYPE_WIDGET);
34 * @brief Gets the state set of the accessible
36 * The caller must unreference it when it is no longer needed.
38 * @param accessible AtkObject instance
39 * @return AtkStateSet representing the state set of the accessible
42 eail_separator_ref_state_set(AtkObject *accessible)
44 AtkStateSet *state_set;
47 widget = eail_widget_get_widget(EAIL_WIDGET(accessible));
48 if (!widget) return NULL;
50 state_set = ATK_OBJECT_CLASS(eail_separator_parent_class)->ref_state_set(accessible);
52 if (elm_separator_horizontal_get(widget))
53 atk_state_set_add_state(state_set, ATK_STATE_HORIZONTAL);
55 atk_state_set_add_state(state_set, ATK_STATE_VERTICAL);
61 * @brief EailSeparator initializer
63 * @param obj AtkObject instance
64 * @param data initialization data
67 eail_separator_initialize(AtkObject *obj, gpointer data)
69 ATK_OBJECT_CLASS(eail_separator_parent_class)->initialize(obj, data);
70 obj->role = ATK_ROLE_SEPARATOR;
74 * @brief EailSeparator interface initializer
76 * @param separator EailSeparator instance
79 eail_separator_init(EailSeparator *separator)
84 * @brief EailSeparator class initializer
86 * @param klass EailSeparatorClass instance
89 eail_separator_class_init(EailSeparatorClass *klass)
91 AtkObjectClass *atk_class = ATK_OBJECT_CLASS(klass);
92 atk_class->initialize = eail_separator_initialize;
93 atk_class->ref_state_set = eail_separator_ref_state_set;