summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-08-23 15:16:22 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-08-23 15:24:37 +0900
commit29bacf59887b5b47f08a68c5c7b20647f8dd244f (patch)
treeabdd5f40b6a91cfeddbf8714fd9b3675e8978fb0
parent20e6c2e9087f60c286fe779218d85d6155205347 (diff)
gfx: Remove size hint request (EO)
This hint is simply not supported by any container. Add the EO API back if the containers support it. Ref T5487
-rw-r--r--src/lib/efl/interfaces/efl_gfx_size_hint.eo18
-rw-r--r--src/lib/evas/canvas/efl_canvas_object.eo1
-rw-r--r--src/lib/evas/canvas/evas_object_main.c38
-rw-r--r--src/lib/evas/include/evas_inline.x2
4 files changed, 16 insertions, 43 deletions
diff --git a/src/lib/efl/interfaces/efl_gfx_size_hint.eo b/src/lib/efl/interfaces/efl_gfx_size_hint.eo
index 7431e3658e..fad4376edc 100644
--- a/src/lib/efl/interfaces/efl_gfx_size_hint.eo
+++ b/src/lib/efl/interfaces/efl_gfx_size_hint.eo
@@ -111,24 +111,6 @@ interface Efl.Gfx.Size.Hint
111 h: int; [[Integer to use as the maximum height hint.]] 111 h: int; [[Integer to use as the maximum height hint.]]
112 } 112 }
113 } 113 }
114 @property hint_request {
115 [[Hints for the object's optimum size.
116
117 This is not a size enforcement in any way, it's just a hint
118 that should be used whenever appropriate.
119
120 Values 0 will be treated as unset hint components, when
121 queried by managers.
122
123 Note: This property is meant to be set by applications and not by
124 EFL itself. Very few containers actually implement support for
125 this requested size, see @.hint_min instead.
126 ]]
127 values {
128 w: int; [[Integer to use as the preferred width hint.]]
129 h: int; [[Integer to use as the preferred height hint.]]
130 }
131 }
132 @property hint_restricted_min { 114 @property hint_restricted_min {
133 [[Internal hints for an object's minimum size. 115 [[Internal hints for an object's minimum size.
134 116
diff --git a/src/lib/evas/canvas/efl_canvas_object.eo b/src/lib/evas/canvas/efl_canvas_object.eo
index cf92e6f2c7..6eb174caab 100644
--- a/src/lib/evas/canvas/efl_canvas_object.eo
+++ b/src/lib/evas/canvas/efl_canvas_object.eo
@@ -683,7 +683,6 @@ abstract Efl.Canvas.Object (Efl.Object, Efl.Gfx, Efl.Gfx.Stack, Efl.Animator,
683 Efl.Gfx.Size.Hint.hint_min { get; set; } 683 Efl.Gfx.Size.Hint.hint_min { get; set; }
684 Efl.Gfx.Size.Hint.hint_max { get; set; } 684 Efl.Gfx.Size.Hint.hint_max { get; set; }
685 Efl.Gfx.Size.Hint.hint_margin { get; set; } 685 Efl.Gfx.Size.Hint.hint_margin { get; set; }
686 Efl.Gfx.Size.Hint.hint_request { get; set; }
687 Efl.Gfx.Size.Hint.hint_weight { get; set; } 686 Efl.Gfx.Size.Hint.hint_weight { get; set; }
688 Efl.Input.Interface.seat_event_filter { get; set; } 687 Efl.Input.Interface.seat_event_filter { get; set; }
689 Efl.Loop_User.loop { get; } 688 Efl.Loop_User.loop { get; }
diff --git a/src/lib/evas/canvas/evas_object_main.c b/src/lib/evas/canvas/evas_object_main.c
index f129cfb5bd..794dc4a105 100644
--- a/src/lib/evas/canvas/evas_object_main.c
+++ b/src/lib/evas/canvas/evas_object_main.c
@@ -1486,9 +1486,12 @@ _efl_canvas_object_efl_gfx_size_hint_hint_max_set(Eo *eo_obj, Evas_Object_Protec
1486 evas_object_inform_call_changed_size_hints(eo_obj); 1486 evas_object_inform_call_changed_size_hints(eo_obj);
1487} 1487}
1488 1488
1489EOLIAN static void 1489EAPI void
1490_efl_canvas_object_efl_gfx_size_hint_hint_request_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, Evas_Coord *w, Evas_Coord *h) 1490evas_object_size_hint_request_get(const Eo *eo_obj, Evas_Coord *w, Evas_Coord *h)
1491{ 1491{
1492 Evas_Object_Protected_Data *obj = EVAS_OBJECT_DATA_SAFE_GET(eo_obj);
1493 EVAS_OBJECT_DATA_VALID_CHECK(obj);
1494
1492 if ((!obj->size_hints) || obj->delete_me) 1495 if ((!obj->size_hints) || obj->delete_me)
1493 { 1496 {
1494 if (w) *w = 0; 1497 if (w) *w = 0;
@@ -1499,11 +1502,12 @@ _efl_canvas_object_efl_gfx_size_hint_hint_request_get(Eo *eo_obj EINA_UNUSED, Ev
1499 if (h) *h = obj->size_hints->request.h; 1502 if (h) *h = obj->size_hints->request.h;
1500} 1503}
1501 1504
1502EOLIAN static void 1505EAPI void
1503_efl_canvas_object_efl_gfx_size_hint_hint_request_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, Evas_Coord w, Evas_Coord h) 1506evas_object_size_hint_request_set(Eo *eo_obj, Evas_Coord w, Evas_Coord h)
1504{ 1507{
1505 if (obj->delete_me) 1508 Evas_Object_Protected_Data *obj = EVAS_OBJECT_DATA_SAFE_GET(eo_obj);
1506 return; 1509 EVAS_OBJECT_DATA_ALIVE_CHECK(obj);
1510
1507 evas_object_async_block(obj); 1511 evas_object_async_block(obj);
1508 if (EINA_UNLIKELY(!obj->size_hints)) 1512 if (EINA_UNLIKELY(!obj->size_hints))
1509 { 1513 {
@@ -2081,7 +2085,7 @@ _efl_canvas_object_efl_object_dbg_info_get(Eo *eo_obj, Evas_Object_Protected_Dat
2081 unsigned int m; 2085 unsigned int m;
2082 int r, g, b, a; 2086 int r, g, b, a;
2083 int w, h; 2087 int w, h;
2084 int requestw, requesth; 2088 //int requestw, requesth;
2085 int minw, minh; 2089 int minw, minh;
2086 int maxw, maxh; 2090 int maxw, maxh;
2087 int x, y; 2091 int x, y;
@@ -2101,7 +2105,7 @@ _efl_canvas_object_efl_object_dbg_info_get(Eo *eo_obj, Evas_Object_Protected_Dat
2101 scale = efl_canvas_object_scale_get(eo_obj); 2105 scale = efl_canvas_object_scale_get(eo_obj);
2102 efl_gfx_size_hint_restricted_min_get(eo_obj, &minw, &minh); 2106 efl_gfx_size_hint_restricted_min_get(eo_obj, &minw, &minh);
2103 efl_gfx_size_hint_max_get(eo_obj, &maxw, &maxh); 2107 efl_gfx_size_hint_max_get(eo_obj, &maxw, &maxh);
2104 efl_gfx_size_hint_request_get(eo_obj, &requestw, &requesth); 2108 //efl_gfx_size_hint_request_get(eo_obj, &requestw, &requesth);
2105 efl_gfx_size_hint_align_get(eo_obj, &dblx, &dbly); 2109 efl_gfx_size_hint_align_get(eo_obj, &dblx, &dbly);
2106 efl_gfx_size_hint_weight_get(eo_obj, &dblw, &dblh); 2110 efl_gfx_size_hint_weight_get(eo_obj, &dblw, &dblh);
2107 efl_gfx_color_get(eo_obj, &r, &g, &b, &a); 2111 efl_gfx_color_get(eo_obj, &r, &g, &b, &a);
@@ -2137,9 +2141,9 @@ _efl_canvas_object_efl_object_dbg_info_get(Eo *eo_obj, Evas_Object_Protected_Dat
2137 EFL_DBG_INFO_APPEND(node, "w", EINA_VALUE_TYPE_INT, maxw); 2141 EFL_DBG_INFO_APPEND(node, "w", EINA_VALUE_TYPE_INT, maxw);
2138 EFL_DBG_INFO_APPEND(node, "h", EINA_VALUE_TYPE_INT, maxh); 2142 EFL_DBG_INFO_APPEND(node, "h", EINA_VALUE_TYPE_INT, maxh);
2139 2143
2140 node = EFL_DBG_INFO_LIST_APPEND(group, "Request size"); 2144 //node = EFL_DBG_INFO_LIST_APPEND(group, "Request size");
2141 EFL_DBG_INFO_APPEND(node, "w", EINA_VALUE_TYPE_INT, requestw); 2145 //EFL_DBG_INFO_APPEND(node, "w", EINA_VALUE_TYPE_INT, requestw);
2142 EFL_DBG_INFO_APPEND(node, "h", EINA_VALUE_TYPE_INT, requesth); 2146 //EFL_DBG_INFO_APPEND(node, "h", EINA_VALUE_TYPE_INT, requesth);
2143 2147
2144 node = EFL_DBG_INFO_LIST_APPEND(group, "Align"); 2148 node = EFL_DBG_INFO_LIST_APPEND(group, "Align");
2145 EFL_DBG_INFO_APPEND(node, "x", EINA_VALUE_TYPE_DOUBLE, dblx); 2149 EFL_DBG_INFO_APPEND(node, "x", EINA_VALUE_TYPE_DOUBLE, dblx);
@@ -2612,18 +2616,6 @@ evas_object_size_hint_max_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord
2612} 2616}
2613 2617
2614EAPI void 2618EAPI void
2615evas_object_size_hint_request_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
2616{
2617 efl_gfx_size_hint_request_set(obj, w, h);
2618}
2619
2620EAPI void
2621evas_object_size_hint_request_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h)
2622{
2623 efl_gfx_size_hint_request_get(obj, w, h);
2624}
2625
2626EAPI void
2627evas_object_size_hint_min_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h) 2619evas_object_size_hint_min_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
2628{ 2620{
2629 efl_gfx_size_hint_restricted_min_set(obj, w, h); 2621 efl_gfx_size_hint_restricted_min_set(obj, w, h);
diff --git a/src/lib/evas/include/evas_inline.x b/src/lib/evas/include/evas_inline.x
index f17e8b3949..74eb25a7f9 100644
--- a/src/lib/evas/include/evas_inline.x
+++ b/src/lib/evas/include/evas_inline.x
@@ -16,7 +16,7 @@
16#define EVAS_OBJECT_DATA_GET(eo_o) \ 16#define EVAS_OBJECT_DATA_GET(eo_o) \
17 efl_data_scope_get((eo_o), EFL_CANVAS_OBJECT_CLASS) 17 efl_data_scope_get((eo_o), EFL_CANVAS_OBJECT_CLASS)
18#define EVAS_OBJECT_DATA_SAFE_GET(eo_o) \ 18#define EVAS_OBJECT_DATA_SAFE_GET(eo_o) \
19 (((eo_o) && efl_isa((eo_o), EFL_CANVAS_OBJECT_CLASS)) ? efl_data_scope_get((eo_o), EFL_CANVAS_OBJECT_CLASS) : NULL) 19 efl_data_scope_safe_get((eo_o), EFL_CANVAS_OBJECT_CLASS)
20 20
21static inline Eina_Bool 21static inline Eina_Bool
22_evas_render_has_map(Evas_Object_Protected_Data *obj) 22_evas_render_has_map(Evas_Object_Protected_Data *obj)