Merge "custom eail widget implementation" into tizen
[platform/core/uifw/eail.git] / eail / eail_factory.h
1 /*
2  * Copyright (c) 2013 Samsung Electronics Co., Ltd.
3  *
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.
8  *
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.
13  *
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.
18  */
19
20 /**
21  * @file eail_factory.h
22  *
23  * @brief Header for EailFactory implementation
24  */
25
26 #ifndef EAIL_FACTORY_H
27 #define EAIL_FACTORY_H
28
29 #include <atk/atk.h>
30
31 #include <Evas.h>
32
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36
37 /** @brief Definition of object structure for EailFactory cache entry*/
38 typedef struct _EailFactoryObj EailFactoryObj;
39
40 /** @brief Definition of object structure for EailFactory cache entry*/
41 struct _EailFactoryObj
42 {
43    AtkObject *atk_obj;/**< @brief AtkObject representation*/
44    Evas_Object *evas_obj;/**< @brief Evas_Object that needs atk representation*/
45    Elm_Object_Item *obj_item;/**< @brief Elm_Object_Item that needs atk representation*/
46 };
47
48 /**
49  * @brief Creates an accessible EAIL widget that represents the given Evas_Object*
50  */
51 AtkObject * eail_factory_get_accessible    (Evas_Object *widget);
52
53 /**
54  * @brief Returns an instance of AtkObject for the given item
55  */
56 AtkObject * eail_factory_get_item_atk_obj  (Elm_Object_Item *item,
57                                             AtkRole role,
58                                             AtkObject *parent);
59
60 /**
61  * @brief Creates an EailFactoryObj instance for the given item and adds it to cache
62  */
63 void eail_factory_append_item_to_cache     (AtkObject *atk_obj,
64                                             Elm_Object_Item *item);
65 /**
66  * @brief Tries to find an AtkObject representing the given Elm_Object_Item * in cache
67  */
68 EailFactoryObj *eail_factory_find_obj_for_item (const Elm_Object_Item *item);
69
70 /**
71  * @brief Unregisters a widget and associated AtkObject* representation from
72  * factory cache
73  */
74 void eail_factory_unregister_wdgt_from_cache(Evas_Object *widget);
75
76 /**
77  * @brief Unregisters an item and associated AtkObject* representation from
78  * factory cache
79  */
80 void eail_factory_unregister_item_from_cache(Elm_Object_Item *item);
81 Eina_List * eail_factory_find_objects_with_role(AtkRole role);
82
83 #ifdef __cplusplus
84 }
85 #endif
86
87 #endif