forked from enlightenment/enlightenment
Compare commits
4 Commits
master
...
devs/stanl
Author | SHA1 | Date |
---|---|---|
Lukasz Stanislawski | e102604b48 | |
Lukasz Stanislawski | 2cba9b53a7 | |
Lukasz Stanislawski | 2d371ce0db | |
Lukasz Stanislawski | c3350789a7 |
|
@ -924,6 +924,7 @@ AC_E_OPTIONAL_MODULE([wl_weekeyboard], $have_wayland, [CHECK_MODULE_WL_WEEKEYBOA
|
|||
AC_E_OPTIONAL_MODULE([policy_mobile], true)
|
||||
AC_E_OPTIONAL_MODULE([geolocation], true)
|
||||
AC_E_OPTIONAL_MODULE([xwayland], $have_wayland, [CHECK_MODULE_XWAYLAND])
|
||||
AC_E_OPTIONAL_MODULE([atspi_accessibility], true)
|
||||
|
||||
if test "x${HAVE_WL_X11}" != "xyes" && test "x${have_wayland}" = "xyes" && test "x${HAVE_XWAYLAND}" != "xyes"; then
|
||||
AC_DEFINE_UNQUOTED([HAVE_WAYLAND_ONLY],[1],[enable wayland-only version of enlightenment])
|
||||
|
|
|
@ -126,3 +126,5 @@ include src/modules/Makefile_wl_weekeyboard.mk
|
|||
include src/modules/Makefile_policy_mobile.mk
|
||||
|
||||
include src/modules/Makefile_geolocation.mk
|
||||
|
||||
include src/modules/Makefile_atspi_accessibility.mk
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
if USE_MODULE_ATSPI_ACCESSIBILITY
|
||||
atspi_accessibilitydir = $(MDIR)/atspi_accessibility
|
||||
|
||||
atspi_accessibilitypkgdir = $(MDIR)/atspi_accessibility/$(MODULE_ARCH)
|
||||
atspi_accessibilitypkg_LTLIBRARIES = src/modules/atspi_accessibility/module.la
|
||||
|
||||
src_modules_atspi_accessibility_module_la_LIBADD = $(MOD_LIBS)
|
||||
src_modules_atspi_accessibility_module_la_CPPFLAGS = $(MOD_CPPFLAGS)
|
||||
src_modules_atspi_accessibility_module_la_LDFLAGS = $(MOD_LDFLAGS)
|
||||
src_modules_atspi_accessibility_module_la_SOURCES = src/modules/atspi_accessibility/e_mod_main.c \
|
||||
src/modules/atspi_accessibility/e_atspi_object.c \
|
||||
src/modules/atspi_accessibility/e_a11y_zone.c
|
||||
|
||||
PHONIES += atspi_accessibility install-atspi_accessibility
|
||||
atspi_accessibility: $(atspi_accessibilitypkg_LTLIBRARIES) $(atspi_accessibility_DATA)
|
||||
install-atspi_accessibility: install-atspi_accessibilityDATA install-atspi_accessibilitypkgLTLIBRARIES
|
||||
endif
|
|
@ -0,0 +1,50 @@
|
|||
#include "e.h"
|
||||
|
||||
|
||||
static int _zone_a11y_enable(E_Zone *zone)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int _zone_a11y_disable(E_Zone *zone)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Initializate atspi-accessibility features of E_Zone objects */
|
||||
int e_a11y_zones_init(void)
|
||||
{
|
||||
Eina_List *l;
|
||||
E_Zone *zone;
|
||||
|
||||
if (!e_comp)
|
||||
return -1;
|
||||
|
||||
EINA_LIST_FOREACH(e_comp->zones, l, zone)
|
||||
{
|
||||
_zone_a11y_enable(zone);
|
||||
}
|
||||
|
||||
// register on zone add/remove events
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int e_a11y_zones_shutdown(void)
|
||||
{
|
||||
Eina_List *l;
|
||||
E_Zone *zone;
|
||||
|
||||
if (!e_comp)
|
||||
return -1;
|
||||
|
||||
EINA_LIST_FOREACH(e_comp->zones, l, zone)
|
||||
{
|
||||
_zone_a11y_disable(zone);
|
||||
}
|
||||
|
||||
// unregister zone add/remove events
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
|
||||
int e_a11y_zones_init(void)
|
||||
|
||||
int e_a11y_zones_shutdown(void)
|
|
@ -0,0 +1,80 @@
|
|||
#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
|
||||
#define EFL_BETA_API_SUPPORT
|
||||
#define EFL_EO_API_SUPPORT
|
||||
|
||||
#include <Elementary.h>
|
||||
#include "e_atspi_object.eo.h"
|
||||
|
||||
struct _E_Atspi_Object_Data
|
||||
{
|
||||
Evas_Object *evas_obj;
|
||||
};
|
||||
|
||||
typedef struct _E_Atspi_Object_Data E_Atspi_Object_Data;
|
||||
|
||||
EOLIAN static Eo*
|
||||
_e_atspi_object_eo_base_constructor(Eo *obj, E_Atspi_Object_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
Eo *parent;
|
||||
eo_do_super(obj, E_ATSPI_OBJECT_CLASS, eo_constructor());
|
||||
|
||||
eo_do(obj, parent = eo_parent_get());
|
||||
|
||||
if (!parent || !eo_isa(parent, EVAS_OBJECT_CLASS))
|
||||
{
|
||||
//CRI("Wrong parent passed to %s constructor, class %s do not implement ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN", eo_class_name_get(obj), eo_class_name_get(parent));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
static void
|
||||
_focus_in(void *data, Evas_Object *obj EINA_UNUSED, Evas *evas EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
{
|
||||
Elm_Interface_Atspi_Accessible *ao = data;
|
||||
elm_interface_atspi_accessible_state_changed_signal_emit(ao, ELM_ATSPI_STATE_FOCUSED, EINA_TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
_focus_out(void *data, Evas_Object *obj EINA_UNUSED, Evas *evas EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
{
|
||||
Elm_Interface_Atspi_Accessible *ao = data;
|
||||
elm_interface_atspi_accessible_state_changed_signal_emit(ao, ELM_ATSPI_STATE_FOCUSED, EINA_FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
_obj_del(void *data, Evas_Object *obj EINA_UNUSED, Evas *evas EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
{
|
||||
Elm_Interface_Atspi_Accessible *ao = data;
|
||||
eo_del(ao);
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_e_atspi_object_object_set(Eo *obj, E_Atspi_Object_Data *_pd EINA_UNUSED, Evas_Object *evas_obj)
|
||||
{
|
||||
Eina_Bool finalized;
|
||||
if (eo_do_ret(obj, finalized, eo_finalized_get()))
|
||||
{
|
||||
//CRI("This function is only allowed during construction.");
|
||||
return;
|
||||
}
|
||||
if (!evas_obj || !eo_isa(evas_obj, EVAS_OBJECT_CLASS))
|
||||
{
|
||||
//CRI("Wrong parameter: %s is not EVAS_OBJECT_CLASS", eo_class_name_get(evas_obj));
|
||||
return;
|
||||
}
|
||||
_pd->evas_obj = evas_obj;
|
||||
|
||||
evas_object_event_callback_add(_pd->evas_obj, EVAS_CALLBACK_FOCUS_IN, _focus_in, obj);
|
||||
evas_object_event_callback_add(_pd->evas_obj, EVAS_CALLBACK_FOCUS_OUT, _focus_out, obj);
|
||||
evas_object_event_callback_add(_pd->evas_obj, EVAS_CALLBACK_DEL, _obj_del, obj);
|
||||
}
|
||||
|
||||
EOLIAN static Evas_Object*
|
||||
_e_atspi_object_object_get(Eo *obj EINA_UNUSED, E_Atspi_Object_Data *_pd)
|
||||
{
|
||||
return _pd->evas_obj;
|
||||
}
|
||||
|
||||
#include "e_atspi_object.eo.c"
|
|
@ -0,0 +1,43 @@
|
|||
|
||||
void _e_atspi_object_object_set(Eo *obj, E_Atspi_Object_Data *pd, Evas_Object *object);
|
||||
|
||||
EOAPI EO_VOID_FUNC_BODYV(e_atspi_object_set, EO_FUNC_CALL(object), Evas_Object *object);
|
||||
|
||||
Evas_Object * _e_atspi_object_object_get(Eo *obj, E_Atspi_Object_Data *pd);
|
||||
|
||||
EOAPI EO_FUNC_BODY(e_atspi_object_get, Evas_Object *, 0);
|
||||
|
||||
Eo_Base * _e_atspi_object_eo_base_constructor(Eo *obj, E_Atspi_Object_Data *pd);
|
||||
|
||||
|
||||
static const Eo_Op_Description _e_atspi_object_op_desc[] = {
|
||||
EO_OP_FUNC_OVERRIDE(eo_constructor, _e_atspi_object_eo_base_constructor),
|
||||
EO_OP_FUNC(e_atspi_object_set, _e_atspi_object_object_set),
|
||||
EO_OP_FUNC(e_atspi_object_get, _e_atspi_object_object_get),
|
||||
};
|
||||
|
||||
static const Eo_Class_Description _e_atspi_object_class_desc = {
|
||||
EO_VERSION,
|
||||
"E_Atspi_Object",
|
||||
EO_CLASS_TYPE_REGULAR,
|
||||
EO_CLASS_DESCRIPTION_OPS(_e_atspi_object_op_desc),
|
||||
NULL,
|
||||
sizeof(E_Atspi_Object_Data),
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
EO_DEFINE_CLASS(e_atspi_object_class_get, &_e_atspi_object_class_desc, EO_BASE_CLASS, ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, NULL);
|
||||
EAPI void
|
||||
e_atspi_object_object_set(E_Atspi_Object *obj, Evas_Object *object)
|
||||
{
|
||||
eo_do((E_Atspi_Object *)obj, e_atspi_object_set(object));
|
||||
}
|
||||
|
||||
EAPI Evas_Object *
|
||||
e_atspi_object_object_get(const E_Atspi_Object *obj)
|
||||
{
|
||||
Evas_Object * ret;
|
||||
eo_do((E_Atspi_Object *)obj, ret = e_atspi_object_get());
|
||||
return ret;
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
#ifndef _E_ATSPI_OBJECT_EO_H_
|
||||
#define _E_ATSPI_OBJECT_EO_H_
|
||||
|
||||
#ifndef _E_ATSPI_OBJECT_EO_CLASS_TYPE
|
||||
#define _E_ATSPI_OBJECT_EO_CLASS_TYPE
|
||||
|
||||
typedef Eo E_Atspi_Object;
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef _E_ATSPI_OBJECT_EO_TYPES
|
||||
#define _E_ATSPI_OBJECT_EO_TYPES
|
||||
|
||||
|
||||
#endif
|
||||
#define E_ATSPI_OBJECT_CLASS e_atspi_object_class_get()
|
||||
|
||||
EAPI const Eo_Class *e_atspi_object_class_get(void) EINA_CONST;
|
||||
|
||||
EOAPI void e_atspi_object_set(Evas_Object *object);
|
||||
|
||||
EOAPI Evas_Object *e_atspi_object_get(void);
|
||||
|
||||
|
||||
#endif
|
|
@ -0,0 +1,8 @@
|
|||
#ifdef EFL_BETA_API_SUPPORT
|
||||
#ifdef EFL_EO_API_SUPPORT
|
||||
#include "e_atspi_object.eo.h"
|
||||
#endif
|
||||
#ifndef EFL_NOLEGACY_API_SUPPORT
|
||||
#include "e_atspi_object.eo.legacy.h"
|
||||
#endif
|
||||
#endif
|
|
@ -0,0 +1,27 @@
|
|||
#include "e.h"
|
||||
|
||||
#include <Elementary.h>
|
||||
|
||||
E_API void *
|
||||
e_modapi_init(E_Module *m)
|
||||
{
|
||||
// Ensure that elm is initialized.
|
||||
elm_init(0, NULL);
|
||||
|
||||
// Ensure that atspi mode is on, despite current elm configuration.
|
||||
elm_config_atspi_mode_set(EINA_TRUE);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
E_API int
|
||||
e_modapi_save(E_Module *m EINA_UNUSED)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
E_API int
|
||||
e_modapi_shutdown(E_Module *m)
|
||||
{
|
||||
return 1;
|
||||
}
|
|
@ -142,7 +142,7 @@ e_int_config_apps_desk_lock(Evas_Object *parent EINA_UNUSED, const char *params
|
|||
E_Config_Data *data;
|
||||
char buff[PATH_MAX];
|
||||
|
||||
e_user_dir_concat_static(buff, "applications/screen-lock/.order");
|
||||
e_user_dir_concat_static(buff, "applications/desk-lock/.order");
|
||||
data = E_NEW(E_Config_Data, 1);
|
||||
data->title = eina_stringshare_add(_("Screen Lock Applications"));
|
||||
data->dialog = eina_stringshare_add("applications/screen_lock_applications");
|
||||
|
@ -157,7 +157,7 @@ e_int_config_apps_desk_unlock(Evas_Object *parent EINA_UNUSED, const char *param
|
|||
E_Config_Data *data;
|
||||
char buff[PATH_MAX];
|
||||
|
||||
e_user_dir_concat_static(buff, "applications/screen-unlock/.order");
|
||||
e_user_dir_concat_static(buff, "applications/desk-unlock/.order");
|
||||
data = E_NEW(E_Config_Data, 1);
|
||||
data->title = eina_stringshare_add(_("Screen Unlock Applications"));
|
||||
data->dialog = eina_stringshare_add("applications/screen_unlock_applications");
|
||||
|
|
Loading…
Reference in New Issue