diff options
author | Jean-Philippe Andre <jp.andre@samsung.com> | 2016-06-03 15:55:29 +0900 |
---|---|---|
committer | Jean-Philippe Andre <jp.andre@samsung.com> | 2016-06-03 16:52:31 +0900 |
commit | 31279d2513f02588854c3720aa811be0ea83c0e4 (patch) | |
tree | edc2d68ccc1376430305a44a9e877af03983e581 /src/lib | |
parent | 681ddb2f909d0282f0c0ec04230d89999e90983a (diff) | |
download | efl-31279d2513f02588854c3720aa811be0ea83c0e4.tar.gz |
Efl.Pack: Replace pack_direction with Efl.Orientation
Since I first made the pack_direction before orientation
existed, the names didn't match. This should improve API
consistency.
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/edje/edje_containers.c | 2 | ||||
-rw-r--r-- | src/lib/edje/efl_canvas_layout_internal_box.eo | 5 | ||||
-rw-r--r-- | src/lib/efl/interfaces/efl_pack_grid.eo | 4 | ||||
-rw-r--r-- | src/lib/efl/interfaces/efl_pack_linear.eo | 11 | ||||
-rw-r--r-- | src/lib/elementary/efl_ui_box.c | 4 | ||||
-rw-r--r-- | src/lib/elementary/efl_ui_box.eo | 15 | ||||
-rw-r--r-- | src/lib/elementary/efl_ui_grid.c | 10 | ||||
-rw-r--r-- | src/lib/elementary/efl_ui_grid.eo | 19 | ||||
-rw-r--r-- | src/lib/elementary/efl_ui_layout_internal_box.eo | 5 | ||||
-rw-r--r-- | src/lib/elementary/elm_layout_pack.c | 4 |
10 files changed, 28 insertions, 51 deletions
diff --git a/src/lib/edje/edje_containers.c b/src/lib/edje/edje_containers.c index d0f4f0a6cf..c62924519c 100644 --- a/src/lib/edje/edje_containers.c +++ b/src/lib/edje/edje_containers.c @@ -319,7 +319,7 @@ _efl_canvas_layout_internal_box_efl_container_content_count(Eo *obj, Edje_Box_Da } EOLIAN static Efl_Orient -_efl_canvas_layout_internal_box_efl_pack_linear_pack_direction_get(Eo *obj, Edje_Box_Data *pd) +_efl_canvas_layout_internal_box_efl_orientation_orientation_get(Eo *obj, Edje_Box_Data *pd) { const Edje_Part_Description_Box *desc = (Edje_Part_Description_Box *) pd->rp->chosen_description; diff --git a/src/lib/edje/efl_canvas_layout_internal_box.eo b/src/lib/edje/efl_canvas_layout_internal_box.eo index a84499d26a..5a28833c2f 100644 --- a/src/lib/edje/efl_canvas_layout_internal_box.eo +++ b/src/lib/edje/efl_canvas_layout_internal_box.eo @@ -1,4 +1,5 @@ -class Efl.Canvas.Layout_Internal.Box (Eo.Base, Efl.Canvas.Layout_Internal, Efl.Pack.Linear) +class Efl.Canvas.Layout_Internal.Box (Eo.Base, Efl.Canvas.Layout_Internal, Efl.Pack.Linear, + Efl.Orientation) { [[Represents a Box created as part of a layout. @@ -24,6 +25,6 @@ class Efl.Canvas.Layout_Internal.Box (Eo.Base, Efl.Canvas.Layout_Internal, Efl.P Efl.Pack.Linear.pack_content_get; Efl.Pack.Linear.pack_unpack_at; Efl.Pack.Linear.pack_index_get; - Efl.Pack.Linear.pack_direction.get; + Efl.Orientation.orientation.get; } } diff --git a/src/lib/efl/interfaces/efl_pack_grid.eo b/src/lib/efl/interfaces/efl_pack_grid.eo index e48384b58c..3e532d2e50 100644 --- a/src/lib/efl/interfaces/efl_pack_grid.eo +++ b/src/lib/efl/interfaces/efl_pack_grid.eo @@ -68,10 +68,10 @@ interface Efl.Pack.Grid (Efl.Pack.Linear) rows: int; } } - @property grid_directions { + @property grid_orientation { [[Primary and secondary up/left/right/down orientations for linear apis. - Default is right and down. Overrides @Efl.Pack.Linear.pack_direction. + Default is right and down. Overrides @Efl.Orientation.orientation. ]] set {} get {} diff --git a/src/lib/efl/interfaces/efl_pack_linear.eo b/src/lib/efl/interfaces/efl_pack_linear.eo index 31bc5ec201..ffb418008a 100644 --- a/src/lib/efl/interfaces/efl_pack_linear.eo +++ b/src/lib/efl/interfaces/efl_pack_linear.eo @@ -1,6 +1,3 @@ -import efl_orientation; - -/* FIXME: Efl.Pack.Linear */ interface Efl.Pack.Linear (Efl.Pack) { [[API for containers ]] @@ -84,13 +81,5 @@ interface Efl.Pack.Linear (Efl.Pack) } return: Efl.Gfx; [[The child item if it could be removed.]] } - @property pack_direction { - [[Primary up/left/right/down orientation. Default is right.]] - set {} - get {} - values { - orient: Efl.Orient; - } - } } } diff --git a/src/lib/elementary/efl_ui_box.c b/src/lib/elementary/efl_ui_box.c index fe30fe07dc..341afa555a 100644 --- a/src/lib/elementary/efl_ui_box.c +++ b/src/lib/elementary/efl_ui_box.c @@ -563,7 +563,7 @@ _efl_ui_box_efl_container_content_iterate(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNUS } EOLIAN static void -_efl_ui_box_efl_pack_linear_pack_direction_set(Eo *obj, Efl_Ui_Box_Data *pd, Efl_Orient dir) +_efl_ui_box_efl_orientation_orientation_set(Eo *obj, Efl_Ui_Box_Data *pd, Efl_Orient dir) { switch (dir) { @@ -583,7 +583,7 @@ _efl_ui_box_efl_pack_linear_pack_direction_set(Eo *obj, Efl_Ui_Box_Data *pd, Efl } EOLIAN static Efl_Orient -_efl_ui_box_efl_pack_linear_pack_direction_get(Eo *obj EINA_UNUSED, Efl_Ui_Box_Data *pd) +_efl_ui_box_efl_orientation_orientation_get(Eo *obj EINA_UNUSED, Efl_Ui_Box_Data *pd) { return pd->orient; } diff --git a/src/lib/elementary/efl_ui_box.eo b/src/lib/elementary/efl_ui_box.eo index 9fe4ab6700..dc45b9a521 100644 --- a/src/lib/elementary/efl_ui_box.eo +++ b/src/lib/elementary/efl_ui_box.eo @@ -1,22 +1,19 @@ -class Efl.Ui.Box (Elm.Widget, Efl.Pack.Linear, Efl.Pack.Layout) +class Efl.Ui.Box (Elm.Widget, Efl.Pack.Linear, Efl.Pack.Layout, + Efl.Orientation) { implements { Eo.Base.constructor; - - // Smart obj Evas.Object.Smart.add; Evas.Object.Smart.del; Evas.Object.Smart.calculate; - - // Focus Elm.Widget.focus_direction; Elm.Widget.focus_next_manager_is; Elm.Widget.focus_direction_manager_is; Elm.Widget.focus_next; - - // Packing interfaces Efl.Container.content_iterate; Efl.Container.content_count; + Efl.Orientation.orientation.set; + Efl.Orientation.orientation.get; Efl.Pack.pack_clear; Efl.Pack.unpack_all; Efl.Pack.unpack; @@ -33,10 +30,6 @@ class Efl.Ui.Box (Elm.Widget, Efl.Pack.Linear, Efl.Pack.Layout) Efl.Pack.Linear.pack_content_get; Efl.Pack.Linear.pack_unpack_at; Efl.Pack.Linear.pack_index_get; - Efl.Pack.Linear.pack_direction.set; - Efl.Pack.Linear.pack_direction.get; - - // Custom layouts Efl.Pack.Layout.layout_update; Efl.Pack.Layout.layout_request; Efl.Pack.Layout.layout_engine.get; diff --git a/src/lib/elementary/efl_ui_grid.c b/src/lib/elementary/efl_ui_grid.c index ce25f17fb1..05c847af93 100644 --- a/src/lib/elementary/efl_ui_grid.c +++ b/src/lib/elementary/efl_ui_grid.c @@ -713,7 +713,7 @@ _efl_ui_grid_efl_pack_grid_grid_contents_get(Eo *obj, Efl_Ui_Grid_Data *pd EINA_ } EOLIAN static void -_efl_ui_grid_efl_pack_linear_pack_direction_set(Eo *obj, Efl_Ui_Grid_Data *pd, Efl_Orient orient) +_efl_ui_grid_efl_orientation_orientation_set(Eo *obj, Efl_Ui_Grid_Data *pd, Efl_Orient orient) { EINA_SAFETY_ON_FALSE_RETURN((orient % 90) == 0); @@ -726,20 +726,20 @@ _efl_ui_grid_efl_pack_linear_pack_direction_set(Eo *obj, Efl_Ui_Grid_Data *pd, E if (!_horiz(pd->dir1)) pd->dir2 = EFL_ORIENT_RIGHT; else - pd->dir2 = EFL_ORIENT_DOWN; + pd->dir2 = EFL_ORIENT_DOWN; } efl_pack_layout_request(obj); } EOLIAN static Efl_Orient -_efl_ui_grid_efl_pack_linear_pack_direction_get(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Data *pd) +_efl_ui_grid_efl_orientation_orientation_get(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Data *pd) { return pd->dir1; } EOLIAN static void -_efl_ui_grid_efl_pack_grid_grid_directions_set(Eo *obj, Efl_Ui_Grid_Data *pd, Efl_Orient primary, Efl_Orient secondary) +_efl_ui_grid_efl_pack_grid_grid_orientation_set(Eo *obj, Efl_Ui_Grid_Data *pd, Efl_Orient primary, Efl_Orient secondary) { EINA_SAFETY_ON_FALSE_RETURN((primary % 90) == 0); EINA_SAFETY_ON_FALSE_RETURN((secondary % 90) == 0); @@ -767,7 +767,7 @@ _efl_ui_grid_efl_pack_grid_grid_directions_set(Eo *obj, Efl_Ui_Grid_Data *pd, Ef } EOLIAN static void -_efl_ui_grid_efl_pack_grid_grid_directions_get(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Data *pd, Efl_Orient *primary, Efl_Orient *secondary) +_efl_ui_grid_efl_pack_grid_grid_orientation_get(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Data *pd, Efl_Orient *primary, Efl_Orient *secondary) { if (primary) *primary = pd->dir1; if (secondary) *secondary = pd->dir2; diff --git a/src/lib/elementary/efl_ui_grid.eo b/src/lib/elementary/efl_ui_grid.eo index 71d8289f49..ff86585acf 100644 --- a/src/lib/elementary/efl_ui_grid.eo +++ b/src/lib/elementary/efl_ui_grid.eo @@ -1,23 +1,20 @@ -class Efl.Ui.Grid (Elm.Widget, Efl.Pack.Grid, Efl.Pack.Layout) +class Efl.Ui.Grid (Elm.Widget, Efl.Pack.Grid, Efl.Pack.Layout, + Efl.Orientation) { implements { Eo.Base.constructor; - - // Smart obj Evas.Object.Smart.add; Evas.Object.Smart.del; Evas.Object.Smart.calculate; - - // Focus Elm.Widget.focus_direction; Elm.Widget.focus_next_manager_is; Elm.Widget.focus_direction_manager_is; Elm.Widget.focus_next; Elm.Widget.theme_apply; - - // Packing interface Efl.Container.content_iterate; Efl.Container.content_count; + Efl.Orientation.orientation.set; + Efl.Orientation.orientation.get; Efl.Pack.pack_clear; Efl.Pack.unpack_all; Efl.Pack.unpack; @@ -34,13 +31,9 @@ class Efl.Ui.Grid (Elm.Widget, Efl.Pack.Grid, Efl.Pack.Layout) Efl.Pack.Grid.grid_columns.get; Efl.Pack.Grid.grid_rows.set; Efl.Pack.Grid.grid_rows.get; - Efl.Pack.Grid.grid_directions.set; - Efl.Pack.Grid.grid_directions.get; + Efl.Pack.Grid.grid_orientation.set; + Efl.Pack.Grid.grid_orientation.get; Efl.Pack.Linear.pack_end; - Efl.Pack.Linear.pack_direction.set; - Efl.Pack.Linear.pack_direction.get; - - // Custom layouts Efl.Pack.Layout.layout_update; Efl.Pack.Layout.layout_request; Efl.Pack.Layout.layout_engine.get; diff --git a/src/lib/elementary/efl_ui_layout_internal_box.eo b/src/lib/elementary/efl_ui_layout_internal_box.eo index d183ac63b3..f9451570b2 100644 --- a/src/lib/elementary/efl_ui_layout_internal_box.eo +++ b/src/lib/elementary/efl_ui_layout_internal_box.eo @@ -1,4 +1,5 @@ -class Efl.Ui.Layout_Internal.Box (Eo.Base, Efl.Pack.Linear) +class Efl.Ui.Layout_Internal.Box (Eo.Base, Efl.Pack.Linear, + Efl.Orientation) { [[Represents a Box created as part of a layout. @@ -21,6 +22,7 @@ class Efl.Ui.Layout_Internal.Box (Eo.Base, Efl.Pack.Linear) Efl.Container.content_iterate; Efl.Container.content_count; Efl.Container.content_remove; + Efl.Orientation.orientation.get; Efl.Pack.pack_clear; Efl.Pack.unpack_all; Efl.Pack.unpack; @@ -33,6 +35,5 @@ class Efl.Ui.Layout_Internal.Box (Eo.Base, Efl.Pack.Linear) Efl.Pack.Linear.pack_content_get; Efl.Pack.Linear.pack_unpack_at; Efl.Pack.Linear.pack_index_get; - Efl.Pack.Linear.pack_direction.get; } } diff --git a/src/lib/elementary/elm_layout_pack.c b/src/lib/elementary/elm_layout_pack.c index f8f66d2839..bd5fc5a9d5 100644 --- a/src/lib/elementary/elm_layout_pack.c +++ b/src/lib/elementary/elm_layout_pack.c @@ -258,11 +258,11 @@ _efl_ui_layout_internal_box_efl_pack_linear_pack_index_get(Eo *obj EINA_UNUSED, } EOLIAN static Efl_Orient -_efl_ui_layout_internal_box_efl_pack_linear_pack_direction_get(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd) +_efl_ui_layout_internal_box_efl_orientation_orientation_get(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd) { ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_ORIENT_NONE); - ELM_PART_RETURN_VAL(efl_pack_direction_get(efl_part(wd->resize_obj, pd->part))); + ELM_PART_RETURN_VAL(efl_orientation_get(efl_part(wd->resize_obj, pd->part))); } |