elementary: Add support for fixed panes
authormike_m <mike_m@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 11 Oct 2011 02:38:49 +0000 (02:38 +0000)
committermike_m <mike_m@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 11 Oct 2011 02:38:49 +0000 (02:38 +0000)
Signed-off-by: Rajeev Ranjan <rajeev.r@samsung.com>
Signed-off-by: Mike McCormack <mj.mccormack@samsung.com>
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@63973 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/Elementary.h.in
src/lib/elm_panes.c

index 49028c7..65ef7e8 100644 (file)
@@ -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);
 
    /**
     * @}
index eec4a69..4352bef 100644 (file)
@@ -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;
+}