From: mike_m Date: Tue, 11 Oct 2011 02:38:49 +0000 (+0000) Subject: elementary: Add support for fixed panes X-Git-Tag: REL_F_I9500_20120323_1~17^2~1668 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5ca192cfd59e12c3440c90084c178da4d8e4816e;p=framework%2Fuifw%2Felementary.git elementary: Add support for fixed panes Signed-off-by: Rajeev Ranjan Signed-off-by: Mike McCormack git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@63973 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/Elementary.h.in b/src/lib/Elementary.h.in index 49028c7..65ef7e8 100644 --- a/src/lib/Elementary.h.in +++ b/src/lib/Elementary.h.in @@ -23688,6 +23688,8 @@ extern "C" { * @ingroup Panes */ EAPI Eina_Bool elm_panes_horizontal_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + EAPI void elm_panes_fixed_set(Evas_Object *obj, Eina_Bool fixed) EINA_ARG_NONNULL(1); + EAPI Eina_Bool elm_panes_fixed_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); /** * @} diff --git a/src/lib/elm_panes.c b/src/lib/elm_panes.c index eec4a69..4352bef 100644 --- a/src/lib/elm_panes.c +++ b/src/lib/elm_panes.c @@ -29,6 +29,7 @@ struct _Widget_Data Eina_Bool clicked_double; Eina_Bool horizontal; + Eina_Bool fixed; }; static const char *widtype = NULL; @@ -88,6 +89,8 @@ _theme_hook(Evas_Object *obj) edje_object_part_swallow(wd->panes, "elm.swallow.left", wd->contents.left); if (wd->contents.right) edje_object_part_swallow(wd->panes, "elm.swallow.right", wd->contents.right); + if (wd->fixed) + edje_object_signal_emit(wd->panes, "elm.panes.fixed", "elm"); edje_object_scale_set(wd->panes, elm_widget_scale_get(obj) * _elm_config->scale); @@ -381,3 +384,23 @@ elm_panes_horizontal_get(const Evas_Object *obj) Widget_Data *wd = elm_widget_data_get(obj); return wd->horizontal; } + +EAPI void +elm_panes_fixed_set(Evas_Object *obj, Eina_Bool fixed) +{ + ELM_CHECK_WIDTYPE(obj, widtype); + Widget_Data *wd = elm_widget_data_get(obj); + wd->fixed = fixed; + if (wd->fixed == EINA_TRUE) + edje_object_signal_emit(wd->panes, "elm.panes.fixed", "elm"); + else + edje_object_signal_emit(wd->panes, "elm.panes.unfixed", "elm"); +} + +EAPI Eina_Bool +elm_panes_fixed_get(const Evas_Object *obj) +{ + ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE; + Widget_Data *wd = elm_widget_data_get(obj); + return wd->fixed; +}