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_action_widget.h
23 * @brief Header for EailActionWidget implementation
26 #ifndef EAIL_ACTION_WIDGET_H
27 #define EAIL_ACTION_WIDGET_H
29 #include "eail_widget.h"
32 * @brief Returns a value corresponding to the type of EailActionWidget class
34 #define EAIL_TYPE_ACTION_WIDGET (eail_action_widget_get_type())
36 * @brief Macro upcasts an instance (obj) of a subclass to the EailActionWidget
39 * @param obj AtkObject instance
42 #define EAIL_ACTION_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), \
43 EAIL_TYPE_ACTION_WIDGET, EailActionWidget))
45 * @brief Macro upcasts a subclass (klass) to the EailActionWidget class
47 * @param klass subclass object
50 #define EAIL_ACTION_WIDGET_CLASS(klass) (G_TYPE_ACTION_WIDGET_CLASS_CAST((klass), \
51 EAIL_TYPE_ACTION_WIDGET, EailActionWidgetClass))
53 * @brief Tests whether object (obj) is an instance of EailActionWidget class
55 * @param obj an AtkObject
57 #define EAIL_IS_ACTION_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), \
58 EAIL_TYPE_ACTION_WIDGET))
60 * @brief Tests whether given klass is a subclass of EailActionWidget
62 * @param klass klass object
65 #define EAIL_IS_ACTION_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), \
66 EAIL_TYPE_ACTION_WIDGET))
68 * @brief Gets EailActionWidget class structure from an obj (class instance)
70 * @param obj object instance to get EailActionWidget class from
72 #define EAIL_ACTION_WIDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), \
73 EAIL_TYPE_ACTION_WIDGET, EailActionWidgetClass))
79 /** @brief Definition of object structure for Atk EailActionWidget*/
80 typedef struct _EailActionWidget EailActionWidget;
81 /** @brief Definition of class structure for Atk EailActionWidget*/
82 typedef struct _EailActionWidgetClass EailActionWidgetClass;
84 /*! \brief Callback used for performing work-action by given ActionObject
86 typedef gboolean (* Eail_Do_Action_Cb) (AtkAction *obj, void *data);
88 /*! \brief Appends given action to action list used by EailActionWidget
90 void eail_action_widget_action_append(EailActionWidget *action_widget,
91 const gchar *action_name,
92 const gchar *keybinding,
93 Eail_Do_Action_Cb action_cb);
95 /** @brief Definition of object structure for Atk EailActionWidget
97 struct _EailActionWidget
99 /** @brief Parent widget whose functionality is being extended */
101 /** @brief List of action objects (EailActionObj*) */
102 Eina_List *action_objs;
105 /** @brief Definition of class structure for Atk EailActionWidget
107 struct _EailActionWidgetClass
109 EailWidgetClass parent_class;/**< class whose functionality is being extended*/
112 /** @brief Getter for EailActionWidget GType
113 * @returns GType for EailActionWidget implementation
115 GType eail_action_widget_get_type(void);