able to force a calc if we want to...
authorCarsten Haitzler <raster@rasterman.com>
Sun, 28 Nov 2004 14:52:01 +0000 (14:52 +0000)
committerCarsten Haitzler <raster@rasterman.com>
Sun, 28 Nov 2004 14:52:01 +0000 (14:52 +0000)
SVN revision: 12288

legacy/edje/src/lib/Edje.h
legacy/edje/src/lib/edje_util.c

index 0e066e0..0c677b9 100644 (file)
@@ -187,6 +187,7 @@ extern "C" {
    EAPI void         edje_object_text_class_set      (Evas_Object *obj, const char *text_class, const char *font, Evas_Font_Size size);
    EAPI void         edje_object_size_min_get        (Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh);
    EAPI void         edje_object_size_max_get        (Evas_Object *obj, Evas_Coord *maxw, Evas_Coord *maxh);
+   EAPI void         edje_object_calc_force          (Evas_Object *obj);
    EAPI void         edje_object_size_min_calc       (Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh);
    EAPI int          edje_object_part_exists         (Evas_Object *obj, const char *part);
    EAPI void         edje_object_part_geometry_get   (Evas_Object *obj, const char *part, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
index 3bdcf62..0894a01 100644 (file)
@@ -763,6 +763,26 @@ edje_object_size_max_get(Evas_Object *obj, Evas_Coord *maxw, Evas_Coord *maxh)
      }
 }
 
+/** Force a Size/Geometry Calc
+ * @param obj A valid Evas_Object handle
+ *
+ * Forces the object @p obj to recalc layout regardless of freeze/thaw
+ */
+void
+edje_object_calc_force(Evas_Object *obj)
+{
+   Edje *ed;
+   int pf;
+   
+   ed = _edje_fetch(obj);
+   if (!ed) return;
+   ed->dirty = 1;
+   pf = ed->freeze;
+   ed->freeze = 0;
+   _edje_recalc(ed);
+   ed->freeze = pf;
+}
+
 /** Calculate minimum size
  * @param obj A valid Evas_Object handle
  * @param minw Minimum width pointer