#include "elm_atspi_app_object.eo.h"
extern Eina_List *_elm_win_list;
-static Eo *_atspi_root;
-static int _init;
typedef struct _Elm_Atspi_App_Object_Data Elm_Atspi_App_Object_Data;
return ELM_ATSPI_ROLE_APPLICATION;
}
-EAPI void
-_elm_atspi_init(void)
-{
- if (!_init)
- {
- _atspi_root = eo_add(ELM_ATSPI_APP_OBJECT_CLASS, NULL);
- _init = 1;
- }
-}
-
-EAPI void
-_elm_atspi_shutdown(void)
-{
- if (_init)
- {
- eo_unref(_atspi_root);
- _atspi_root = NULL;
- _init = 0;
- }
-}
-
-EAPI Eo*
-_elm_atspi_root_get(void)
-{
- return _atspi_root;
-}
-
#include "elm_atspi_app_object.eo.c"
#include "elm_priv.h"
#include <assert.h>
+#include "elm_atspi_app_object.eo.h"
+
#include "elm_interface_atspi_accessible.h"
#include "elm_interface_atspi_accessible.eo.h"
#include "elm_interface_atspi_component.eo.h"
Eldbus_Message *msg;
Eldbus_Connection *session_bus;
- if (!_init_count && (_elm_config->atspi_mode != ELM_ATSPI_MODE_OFF))
+ if (!_init_count)
{
- _elm_atspi_init();
-
- _root = _elm_atspi_root_get();
+ _root = eo_add(ELM_ATSPI_APP_OBJECT_CLASS, NULL);
if (!_root)
{
- ERR("Unable to get root object");
+ ERR("Unable to create root object");
return;
}
}
}
+EAPI Eo*
+_elm_atspi_bridge_root_get(void)
+{
+ return _root;
+}
+
void
_elm_atspi_bridge_shutdown(void)
{
if (_init_count)
{
- _elm_atspi_shutdown();
+ eo_unref(_root);
if (_cache_update_idler)
ecore_idler_del(_cache_update_idler);
system_handlers[0] = ecore_event_handler_add(ECORE_EVENT_MEMORY_STATE, _sys_memory_changed, NULL);
system_handlers[1] = ecore_event_handler_add(ECORE_EVENT_LOCALE_CHANGED, _sys_lang_changed, NULL);
- _elm_atspi_bridge_init();
+ if (_elm_config->atspi_mode != ELM_ATSPI_MODE_OFF)
+ _elm_atspi_bridge_init();
return _elm_init_count;
}
Elm_Datetime_Field_Type field_type);
};
-void _elm_atspi_init(void);
-void _elm_atspi_shutdown(void);
-Eo *_elm_atspi_root_get(void);
-
+Eo *_elm_atspi_bridge_root_get(void);
void _elm_atspi_bridge_init(void);
void _elm_atspi_bridge_shutdown(void);
if (_elm_config->atspi_mode == ELM_ATSPI_MODE_ON)
{
eo_do(obj, elm_interface_atspi_accessible_role_set(ELM_ATSPI_ROLE_WINDOW));
- elm_interface_atspi_accessible_children_changed_added_signal_emit(_elm_atspi_root_get(), obj);
+ elm_interface_atspi_accessible_children_changed_added_signal_emit(_elm_atspi_bridge_root_get(), obj);
eo_do(obj, eo_event_callback_call(ELM_INTERFACE_ATSPI_WINDOW_EVENT_WINDOW_CREATED, NULL));
}
_elm_win_elm_interface_atspi_accessible_parent_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd EINA_UNUSED)
{
// attach all kinds of windows directly to ATSPI application root object
- return _elm_atspi_root_get();
+ return _elm_atspi_bridge_root_get();
}
#include "elm_win.eo.c"