forked from enlightenment/efl
Efl.Access.Image: remove the whole class
this is a copy of Efl.Access.Component and serves no purpose
This commit is contained in:
parent
5263f311f4
commit
7372802c32
|
@ -91,7 +91,6 @@ elm_public_eolian_files = \
|
|||
lib/elementary/efl_access_action.eo \
|
||||
lib/elementary/efl_access_component.eo \
|
||||
lib/elementary/efl_access_editable_text.eo \
|
||||
lib/elementary/efl_access_image.eo \
|
||||
lib/elementary/efl_access_selection.eo \
|
||||
lib/elementary/efl_access_text.eo \
|
||||
lib/elementary/efl_access_value.eo \
|
||||
|
@ -684,7 +683,6 @@ lib_elementary_libelementary_la_SOURCES = \
|
|||
lib/elementary/efl_access_action.c \
|
||||
lib/elementary/efl_access_component.c \
|
||||
lib/elementary/efl_access_editable_text.c \
|
||||
lib/elementary/efl_access_image.c \
|
||||
lib/elementary/efl_access_selection.c \
|
||||
lib/elementary/efl_access_text.c \
|
||||
lib/elementary/efl_access_value.c \
|
||||
|
|
|
@ -166,7 +166,6 @@ typedef Eo Efl_Ui_Focus_Manager;
|
|||
# include <efl_access_action.eo.h>
|
||||
# include <efl_access_component.eo.h>
|
||||
# include <efl_access_editable_text.eo.h>
|
||||
# include <efl_access_image.eo.h>
|
||||
# include <efl_access_selection.eo.h>
|
||||
# include <efl_access_value.eo.h>
|
||||
|
||||
|
|
|
@ -1,53 +0,0 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
#include "elementary_config.h"
|
||||
#endif
|
||||
|
||||
#define EFL_ACCESS_IMAGE_PROTECTED
|
||||
|
||||
#include <Elementary.h>
|
||||
#include "elm_widget.h"
|
||||
#include "elm_priv.h"
|
||||
|
||||
static void
|
||||
_free_desc_cb(void *data, const Efl_Event *event EINA_UNUSED)
|
||||
{
|
||||
eina_stringshare_del(data);
|
||||
}
|
||||
|
||||
EOLIAN static const char*
|
||||
_efl_access_image_description_get(Eo *obj, void *sd EINA_UNUSED)
|
||||
{
|
||||
const char *descr = NULL;
|
||||
|
||||
descr = efl_key_data_get(obj, "atspi_image_description");
|
||||
return descr;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_access_image_description_set(Eo *obj, void *sd EINA_UNUSED, const char *description)
|
||||
{
|
||||
const char *key = "atspi_image_description";
|
||||
const char *descr = eina_stringshare_add(description);
|
||||
char *old_descr = efl_key_data_get(obj, key);
|
||||
if (old_descr)
|
||||
{
|
||||
eina_stringshare_del(old_descr);
|
||||
efl_event_callback_del(obj, EFL_EVENT_DEL, _free_desc_cb, old_descr);
|
||||
}
|
||||
|
||||
if (descr)
|
||||
{
|
||||
efl_key_data_set(obj, key, descr);
|
||||
efl_event_callback_add(obj, EFL_EVENT_DEL, _free_desc_cb, descr);
|
||||
}
|
||||
}
|
||||
|
||||
EOLIAN static const char*
|
||||
_efl_access_image_locale_get(Eo *obj EINA_UNUSED, void *sd EINA_UNUSED)
|
||||
{
|
||||
// by default assume that descriptions are given in language of current
|
||||
// locale.
|
||||
return getenv("LANG");
|
||||
}
|
||||
|
||||
#include "efl_access_image.eo.c"
|
|
@ -1,39 +0,0 @@
|
|||
mixin Efl.Access.Image ()
|
||||
{
|
||||
[[Accessible image mixin]]
|
||||
data: null;
|
||||
methods {
|
||||
@property extents @protected @beta {
|
||||
[[Gets an image extents.]]
|
||||
get @pure_virtual {
|
||||
}
|
||||
keys {
|
||||
screen_coords: bool; [[$true if we have the screen coordinates, otherwise $false]]
|
||||
}
|
||||
values {
|
||||
x: int; [[X coordinate]]
|
||||
y: int; [[Y coordinate]]
|
||||
width: int; [[Image width]]
|
||||
height: int; [[Image height]]
|
||||
}
|
||||
}
|
||||
@property description @protected @beta {
|
||||
[[Textual description of image]]
|
||||
get {
|
||||
}
|
||||
set {
|
||||
}
|
||||
values {
|
||||
description: string; [[Textual image description]]
|
||||
}
|
||||
}
|
||||
@property locale @protected @beta {
|
||||
[[Gets locale of the image description.]]
|
||||
get {
|
||||
}
|
||||
values {
|
||||
locale: string; [[Locale of description]]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
#define EFL_ACCESS_IMAGE_PROTECTED
|
||||
#define EFL_ACCESS_PROTECTED
|
||||
#define EFL_ACCESS_COMPONENT_PROTECTED
|
||||
#define EFL_ACCESS_WIDGET_ACTION_PROTECTED
|
||||
#define EFL_LAYOUT_CALC_PROTECTED
|
||||
|
||||
|
@ -1568,23 +1569,27 @@ _efl_ui_image_align_get(Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *sd, double *alig
|
|||
|
||||
// A11Y
|
||||
|
||||
EOLIAN static void
|
||||
_efl_ui_image_efl_access_image_extents_get(Eo *obj, Efl_Ui_Image_Data *sd EINA_UNUSED, Eina_Bool screen_coords, int *x, int *y, int *w, int *h)
|
||||
EOLIAN static Eina_Rect
|
||||
_efl_ui_image_efl_access_component_extents_get(Eo *obj, Efl_Ui_Image_Data *sd EINA_UNUSED, Eina_Bool screen_coords)
|
||||
{
|
||||
int ee_x, ee_y;
|
||||
Eina_Rect r;
|
||||
Evas_Object *image = elm_image_object_get(obj);
|
||||
if (!image) return;
|
||||
|
||||
evas_object_geometry_get(image, x, y, NULL, NULL);
|
||||
r.x = r.y = r.w = r.h = -1;
|
||||
if (!image) return r;
|
||||
|
||||
evas_object_geometry_get(image, &r.x, &r.y, NULL, NULL);
|
||||
if (screen_coords)
|
||||
{
|
||||
Ecore_Evas *ee = ecore_evas_ecore_evas_get(evas_object_evas_get(image));
|
||||
if (!ee) return;
|
||||
if (!ee) return r;
|
||||
ecore_evas_geometry_get(ee, &ee_x, &ee_y, NULL, NULL);
|
||||
if (x) *x += ee_x;
|
||||
if (y) *y += ee_y;
|
||||
r.x += ee_x;
|
||||
r.y += ee_y;
|
||||
}
|
||||
elm_image_object_size_get(obj, w, h);
|
||||
elm_image_object_size_get(obj, &r.w, &r.h);
|
||||
return r;
|
||||
}
|
||||
|
||||
EOLIAN const Efl_Access_Action_Data *
|
||||
|
|
|
@ -20,7 +20,7 @@ struct Efl.Ui.Image.Error
|
|||
|
||||
class Efl.Ui.Image (Efl.Ui.Widget, Efl.Ui.Clickable, Efl.Ui.Draggable,
|
||||
Efl.File, Efl.Image, Efl.Image.Load, Efl.Player, Efl.Gfx.View,
|
||||
Efl.Access.Image, Efl.Access.Widget.Action, Efl.Gfx.Color,
|
||||
Efl.Access.Component, Efl.Access.Widget.Action, Efl.Gfx.Color,
|
||||
Efl.Orientation,
|
||||
Efl.Ui.View, Efl.Ui.Model.Connect, Efl.Layout.Calc,
|
||||
Efl.Layout.Group, Efl.Layout.Signal)
|
||||
|
@ -117,7 +117,7 @@ class Efl.Ui.Image (Efl.Ui.Widget, Efl.Ui.Clickable, Efl.Ui.Draggable,
|
|||
Efl.Ui.View.model { get; set; }
|
||||
Efl.Ui.Widget.theme_apply;
|
||||
Efl.Ui.Widget.widget_event;
|
||||
Efl.Access.Image.extents { get; }
|
||||
Efl.Access.Component.extents { get; }
|
||||
Efl.Access.Widget.Action.elm_actions { get; }
|
||||
}
|
||||
events {
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
#define EFL_ACCESS_PROTECTED
|
||||
#define EFL_ACCESS_ACTION_PROTECTED
|
||||
#define EFL_ACCESS_VALUE_PROTECTED
|
||||
#define EFL_ACCESS_IMAGE_PROTECTED
|
||||
#define EFL_ACCESS_SELECTION_PROTECTED
|
||||
#define EFL_ACCESS_TEXT_PROTECTED
|
||||
#define EFL_ACCESS_EDITABLE_TEXT_PROTECTED
|
||||
|
@ -1217,14 +1216,12 @@ _image_extents_get(const Eldbus_Service_Interface *iface, const Eldbus_Message *
|
|||
AtspiCoordType type;
|
||||
Eldbus_Message *ret;
|
||||
const char *obj_path = eldbus_message_path_get(msg);
|
||||
int x, y, w, h;
|
||||
Eina_Bool screen_coords;
|
||||
Eo *bridge = eldbus_service_object_data_get(iface, ELM_ATSPI_BRIDGE_CLASS_NAME);
|
||||
Eo *obj = _bridge_object_from_path(bridge, obj_path);
|
||||
Eina_Rect r;
|
||||
|
||||
x = y = w = h = -1;
|
||||
|
||||
ELM_ATSPI_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, EFL_ACCESS_IMAGE_MIXIN, msg);
|
||||
ELM_ATSPI_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, EFL_ACCESS_MIXIN, msg);
|
||||
|
||||
if (!eldbus_message_arguments_get(msg, "u", &type))
|
||||
return eldbus_message_error_new(msg, "org.freedesktop.DBus.Error.InvalidArgs", "Invalid index type.");
|
||||
|
@ -1233,8 +1230,8 @@ _image_extents_get(const Eldbus_Service_Interface *iface, const Eldbus_Message *
|
|||
EINA_SAFETY_ON_NULL_RETURN_VAL(ret, NULL);
|
||||
|
||||
screen_coords = type == ATSPI_COORD_TYPE_SCREEN ? EINA_TRUE : EINA_FALSE;
|
||||
efl_access_image_extents_get(obj, screen_coords, &x, &y, &w, &h);
|
||||
eldbus_message_arguments_append(ret, "iiii", x, y, w, h);
|
||||
r = efl_access_component_extents_get(obj, screen_coords);
|
||||
eldbus_message_arguments_append(ret, "iiii", r.x, r.y, r.w, r.h);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -1250,7 +1247,7 @@ _image_position_get(const Eldbus_Service_Interface *iface, const Eldbus_Message
|
|||
int x = -1, y = -1;
|
||||
Eina_Bool screen_coords;
|
||||
|
||||
ELM_ATSPI_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, EFL_ACCESS_IMAGE_MIXIN, msg);
|
||||
ELM_ATSPI_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, EFL_ACCESS_MIXIN, msg);
|
||||
|
||||
if (!eldbus_message_arguments_get(msg, "u", &type))
|
||||
return eldbus_message_error_new(msg, "org.freedesktop.DBus.Error.InvalidArgs", "Invalid index type.");
|
||||
|
@ -1259,7 +1256,10 @@ _image_position_get(const Eldbus_Service_Interface *iface, const Eldbus_Message
|
|||
EINA_SAFETY_ON_NULL_RETURN_VAL(ret, NULL);
|
||||
|
||||
screen_coords = type == ATSPI_COORD_TYPE_SCREEN ? EINA_TRUE : EINA_FALSE;
|
||||
efl_access_image_extents_get(obj, screen_coords, &x, &y, NULL, NULL);
|
||||
if (screen_coords)
|
||||
efl_access_component_screen_position_get(obj, &x, &y);
|
||||
else
|
||||
evas_object_geometry_get(obj, &x, &y, NULL, NULL);
|
||||
eldbus_message_arguments_append(ret, "i", x);
|
||||
eldbus_message_arguments_append(ret, "i", y);
|
||||
|
||||
|
@ -1275,12 +1275,12 @@ _image_size_get(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg
|
|||
Eo *obj = _bridge_object_from_path(bridge, obj_path);
|
||||
int w = -1, h = -1;
|
||||
|
||||
ELM_ATSPI_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, EFL_ACCESS_IMAGE_MIXIN, msg);
|
||||
ELM_ATSPI_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, EFL_ACCESS_MIXIN, msg);
|
||||
|
||||
ret = eldbus_message_method_return_new(msg);
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(ret, NULL);
|
||||
|
||||
efl_access_image_extents_get(obj, EINA_FALSE, NULL, NULL, &w, &h);
|
||||
evas_object_geometry_get(obj, NULL, NULL, &w, &h);
|
||||
eldbus_message_arguments_append(ret, "i", w);
|
||||
eldbus_message_arguments_append(ret, "i", h);
|
||||
|
||||
|
@ -2234,18 +2234,18 @@ _image_properties_get(const Eldbus_Service_Interface *interface, const char *pro
|
|||
Eo *bridge = eldbus_service_object_data_get(interface, ELM_ATSPI_BRIDGE_CLASS_NAME);
|
||||
Eo *obj = _bridge_object_from_path(bridge, obj_path);
|
||||
|
||||
ELM_ATSPI_PROPERTY_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, EFL_ACCESS_IMAGE_MIXIN, request_msg, error);
|
||||
ELM_ATSPI_PROPERTY_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, EFL_ACCESS_MIXIN, request_msg, error);
|
||||
|
||||
if (!strcmp(property, "ImageDescription"))
|
||||
{
|
||||
value = efl_access_image_description_get(obj);
|
||||
value = efl_access_description_get(obj);
|
||||
value = value ? value : "";
|
||||
eldbus_message_iter_basic_append(iter, 's', value);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
if (!strcmp(property, "ImageLocale"))
|
||||
{
|
||||
value = efl_access_image_locale_get(obj);
|
||||
value = efl_access_translation_domain_get(obj);
|
||||
value = value ? value : "";
|
||||
eldbus_message_iter_basic_append(iter, 's', value);
|
||||
return EINA_TRUE;
|
||||
|
@ -3182,7 +3182,7 @@ _iter_interfaces_append(Eldbus_Message_Iter *iter, const Eo *obj)
|
|||
eldbus_message_iter_basic_append(iter_array, 's', ATSPI_DBUS_INTERFACE_COMPONENT);
|
||||
if (efl_isa(obj, EFL_ACCESS_EDITABLE_TEXT_INTERFACE))
|
||||
eldbus_message_iter_basic_append(iter_array, 's', ATSPI_DBUS_INTERFACE_EDITABLE_TEXT);
|
||||
if (efl_isa(obj, EFL_ACCESS_IMAGE_MIXIN))
|
||||
if (efl_isa(obj, EFL_ACCESS_MIXIN))
|
||||
eldbus_message_iter_basic_append(iter_array, 's', ATSPI_DBUS_INTERFACE_IMAGE);
|
||||
if (efl_isa(obj, EFL_ACCESS_SELECTION_INTERFACE))
|
||||
eldbus_message_iter_basic_append(iter_array, 's', ATSPI_DBUS_INTERFACE_SELECTION);
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
#include "efl_access_action.eo.h"
|
||||
#include "efl_access_component.eo.h"
|
||||
#include "efl_access_editable_text.eo.h"
|
||||
#include "efl_access_image.eo.h"
|
||||
#include "efl_access_selection.eo.h"
|
||||
#include "efl_access_value.eo.h"
|
||||
#include "efl_ui_legacy.eo.h"
|
||||
|
@ -22,7 +21,6 @@
|
|||
#include "efl_access_action.eo.legacy.h"
|
||||
#include "efl_access_component.eo.legacy.h"
|
||||
#include "efl_access_editable_text.eo.legacy.h"
|
||||
#include "efl_access_image.eo.legacy.h"
|
||||
#include "efl_access_selection.eo.legacy.h"
|
||||
#include "efl_access_value.eo.legacy.h"
|
||||
#include "efl_ui_legacy.eo.legacy.h"
|
||||
|
|
Loading…
Reference in New Issue