summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-02-27 14:01:05 -0500
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-02-27 20:19:29 +0100
commit0aaae8208e458a7946376e4dcddf03e071021722 (patch)
treecaf271c0b271147c2b070a8cb2373e46408ea57a
parent29e6d1d364856be926e285e53155c49d4b57bd7b (diff)
efl_ui_widget: make interest_region_mode legacy
summary_: interest_region_mode makes it possible, that interest_region_get either returns WIDGET or ITEM coordinates. However, efl-api does not have items. That means, this can be legacy. ref T7553 Depends on D8026 Reviewers: woohyun, cedric, Jaehyun_Cho, zmike, segfaultxavi Reviewed By: segfaultxavi Subscribers: #reviewers, #committers Tags: #efl Maniphest Tasks: T7553 Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es> Differential Revision: https://phab.enlightenment.org/D8027
-rw-r--r--src/lib/elementary/efl_ui.eot7
-rw-r--r--src/lib/elementary/efl_ui_widget.c12
-rw-r--r--src/lib/elementary/efl_ui_widget.eo20
-rw-r--r--src/lib/elementary/elm_general.h9
-rw-r--r--src/lib/elementary/elm_main.c14
-rw-r--r--src/lib/elementary/elm_widget_gengrid.h2
6 files changed, 20 insertions, 44 deletions
diff --git a/src/lib/elementary/efl_ui.eot b/src/lib/elementary/efl_ui.eot
index ce17980e56..ea61daf86c 100644
--- a/src/lib/elementary/efl_ui.eot
+++ b/src/lib/elementary/efl_ui.eot
@@ -23,13 +23,6 @@ enum Efl.Ui.Focus.Direction
23 last = 6 [[ last direction ]] 23 last = 6 [[ last direction ]]
24} 24}
25 25
26enum Efl.Ui.Interest_Region_Mode
27{
28 [[Focus region show mode.]]
29 widget, [[As a widget.]]
30 item, [[As an item.]]
31}
32
33enum Efl.Ui.Focus.Move_Policy 26enum Efl.Ui.Focus.Move_Policy
34{ 27{
35 [[Focus Movement Policy. 28 [[Focus Movement Policy.
diff --git a/src/lib/elementary/efl_ui_widget.c b/src/lib/elementary/efl_ui_widget.c
index 614b4219b6..f8ead14608 100644
--- a/src/lib/elementary/efl_ui_widget.c
+++ b/src/lib/elementary/efl_ui_widget.c
@@ -3342,18 +3342,6 @@ _efl_ui_widget_focus_highlight_geometry_get(const Eo *obj, Elm_Widget_Smart_Data
3342 return r; 3342 return r;
3343} 3343}
3344 3344
3345EOLIAN static void
3346_efl_ui_widget_interest_region_mode_set(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *_pd, Elm_Focus_Region_Show_Mode mode)
3347{
3348 _pd->focus_region_show_mode = mode;
3349}
3350
3351EOLIAN static Elm_Focus_Region_Show_Mode
3352_efl_ui_widget_interest_region_mode_get(const Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *_pd)
3353{
3354 return _pd->focus_region_show_mode;
3355}
3356
3357EAPI void 3345EAPI void
3358elm_widget_activate(Evas_Object *obj, Efl_Ui_Activate act) 3346elm_widget_activate(Evas_Object *obj, Efl_Ui_Activate act)
3359{ 3347{
diff --git a/src/lib/elementary/efl_ui_widget.eo b/src/lib/elementary/efl_ui_widget.eo
index 2e1e82ff26..619a9dd863 100644
--- a/src/lib/elementary/efl_ui_widget.eo
+++ b/src/lib/elementary/efl_ui_widget.eo
@@ -360,8 +360,6 @@ abstract @beta Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Obje
360 i.e. X,Y start from 0,0 to indicate the top-left corner of the 360 i.e. X,Y start from 0,0 to indicate the top-left corner of the
361 widget. W,H must be greater or equal to 1 for this region to be 361 widget. W,H must be greater or equal to 1 for this region to be
362 taken into account, otherwise it is ignored. 362 taken into account, otherwise it is ignored.
363
364 See also @.interest_region_mode
365 ]] 363 ]]
366 get { 364 get {
367 legacy: elm_widget_focus_region_get; 365 legacy: elm_widget_focus_region_get;
@@ -372,24 +370,6 @@ abstract @beta Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Obje
372 will be ignored, and no action will be taken.]] 370 will be ignored, and no action will be taken.]]
373 } 371 }
374 } 372 }
375 @property interest_region_mode {
376 [[Defines how @.interest_region should be calculated.
377
378 It is up to the implementation of @.interest_region.get to take this
379 value into account (or ignore it).
380 ]]
381 get {
382 legacy: elm_widget_focus_region_show_mode_get;
383 }
384 set {
385 legacy: elm_widget_focus_region_show_mode_set;
386 }
387 values {
388 mode: Efl.Ui.Interest_Region_Mode;
389 [[Whether to show a specific item or the widget as a whole.]]
390 }
391 }
392
393 /* Focus highlight (visual focus rectangle) properties */ 373 /* Focus highlight (visual focus rectangle) properties */
394 @property focus_highlight_geometry @protected { 374 @property focus_highlight_geometry @protected {
395 [[The rectangle region to be highlighted on focus. 375 [[The rectangle region to be highlighted on focus.
diff --git a/src/lib/elementary/elm_general.h b/src/lib/elementary/elm_general.h
index a8b63d7494..4e7a235a9c 100644
--- a/src/lib/elementary/elm_general.h
+++ b/src/lib/elementary/elm_general.h
@@ -50,9 +50,12 @@ typedef enum
50} Elm_Object_Layer; 50} Elm_Object_Layer;
51 51
52/** How the focus region should be calculated (not related to input focus). */ 52/** How the focus region should be calculated (not related to input focus). */
53typedef Efl_Ui_Interest_Region_Mode Elm_Focus_Region_Show_Mode; 53typedef enum
54#define ELM_FOCUS_REGION_SHOW_WIDGET EFL_UI_INTEREST_REGION_MODE_WIDGET 54{
55#define ELM_FOCUS_REGION_SHOW_ITEM EFL_UI_INTEREST_REGION_MODE_ITEM 55 ELM_FOCUS_REGION_SHOW_WIDGET = 0, /**< As a widget. */
56 ELM_FOCUS_REGION_SHOW_ITEM /**< As an item. */
57} Elm_Focus_Region_Show_Mode;
58
56 59
57/**************************************************************************/ 60/**************************************************************************/
58EAPI extern int ELM_ECORE_EVENT_ETHUMB_CONNECT; 61EAPI extern int ELM_ECORE_EVENT_ETHUMB_CONNECT;
diff --git a/src/lib/elementary/elm_main.c b/src/lib/elementary/elm_main.c
index c9e48ff8fb..e29f5139e5 100644
--- a/src/lib/elementary/elm_main.c
+++ b/src/lib/elementary/elm_main.c
@@ -27,6 +27,7 @@
27//we need those for legacy compatible code 27//we need those for legacy compatible code
28#include "elm_genlist.eo.h" 28#include "elm_genlist.eo.h"
29#include "elm_gengrid.eo.h" 29#include "elm_gengrid.eo.h"
30#include "elm_widget_gengrid.h"
30 31
31#define SEMI_BROKEN_QUICKLAUNCH 1 32#define SEMI_BROKEN_QUICKLAUNCH 1
32 33
@@ -1965,13 +1966,22 @@ elm_object_focused_item_get(const Evas_Object *obj)
1965EAPI void 1966EAPI void
1966elm_object_focus_region_show_mode_set(Evas_Object *obj, Elm_Focus_Region_Show_Mode mode) 1967elm_object_focus_region_show_mode_set(Evas_Object *obj, Elm_Focus_Region_Show_Mode mode)
1967{ 1968{
1968 elm_widget_focus_region_show_mode_set(obj, mode); 1969 if (efl_isa(obj, ELM_GENGRID_CLASS))
1970 {
1971 Elm_Gengrid_Data *pd = efl_data_scope_get(obj, ELM_GENGRID_CLASS);
1972 pd->mode = mode;
1973 }
1969} 1974}
1970 1975
1971EAPI Elm_Focus_Region_Show_Mode 1976EAPI Elm_Focus_Region_Show_Mode
1972elm_object_focus_region_show_mode_get(const Evas_Object *obj) 1977elm_object_focus_region_show_mode_get(const Evas_Object *obj)
1973{ 1978{
1974 return elm_widget_focus_region_show_mode_get(obj); 1979 if (efl_isa(obj, ELM_GENGRID_CLASS))
1980 {
1981 Elm_Gengrid_Data *pd = efl_data_scope_get(obj, ELM_GENGRID_CLASS);
1982 return pd->mode;
1983 }
1984 return ELM_FOCUS_REGION_SHOW_WIDGET;
1975} 1985}
1976 1986
1977static void 1987static void
diff --git a/src/lib/elementary/elm_widget_gengrid.h b/src/lib/elementary/elm_widget_gengrid.h
index b995ed07ea..f17b75e8ab 100644
--- a/src/lib/elementary/elm_widget_gengrid.h
+++ b/src/lib/elementary/elm_widget_gengrid.h
@@ -94,6 +94,8 @@ struct _Elm_Gengrid_Data
94 Elm_Gengrid_Reorder_Type type; /**< Reorder type */ 94 Elm_Gengrid_Reorder_Type type; /**< Reorder type */
95 Eina_Bool running : 1; /**< animation is happening */ 95 Eina_Bool running : 1; /**< animation is happening */
96 } reorder; 96 } reorder;
97 Elm_Focus_Region_Show_Mode mode; /**< the mode which describes which rectangle should be returned in the interest region getter*/
98
97 99
98 Eina_Bool reorder_item_changed : 1; 100 Eina_Bool reorder_item_changed : 1;
99 Eina_Bool move_effect_enabled : 1; 101 Eina_Bool move_effect_enabled : 1;