#endif
#ifndef ELM_LIB_QUICKLAUNCH
+// 64 ^ 5 = 1 billion (or so)
+//#define BLOK 64
+// homogenous layout
+//#define HOMOG 1
+
// 32 ^ 5 = 33mil
#define BLOK 32
+// homogenous layout
+//#define HOMOG 1
static void
fac_unrealize(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
{
// setting factory content to null deletes it
- printf("DELETE for factory %p\n", obj);
+ printf("--------DELETE for factory %p [f: %p]\n", elm_factory_content_get(obj), obj);
elm_factory_content_set(obj, NULL);
}
Evas_Object *bx, *bt;
int i;
- printf("ADD for factory 4 %p [%i]\n", obj, (BLOK * (int)evas_object_data_get(obj, "num")));
bx = elm_box_add(win);
+ printf(" ADD lv 4 = %p [%i]\n", bx, (BLOK * (int)evas_object_data_get(obj, "num")));
+#ifdef HOMOG
elm_box_homogeneous_set(bx, EINA_TRUE);
-
+#endif
+
for (i = 0; i < BLOK; i++)
{
char buf[32];
Evas_Object *bx, *fc;
int i;
- printf("ADD for factory 3 %p [%i]\n", obj, (BLOK * (int)evas_object_data_get(obj, "num")));
bx = elm_box_add(win);
+ printf(" ADD lv 3 = %p [%i]\n", bx, (BLOK * (int)evas_object_data_get(obj, "num")));
+#ifdef HOMOG
elm_box_homogeneous_set(bx, EINA_TRUE);
-
+#endif
+
for (i = 0; i < BLOK; i++)
{
fc = elm_factory_add(win);
Evas_Object *bx, *fc;
int i;
- printf("ADD for factory 2 %p [%i]\n", obj, (BLOK * (int)evas_object_data_get(obj, "num")));
bx = elm_box_add(win);
+ printf(" ADD lv 2 = %p [%i]\n", bx, (BLOK * (int)evas_object_data_get(obj, "num")));
+#ifdef HOMOG
elm_box_homogeneous_set(bx, EINA_TRUE);
-
+#endif
+
for (i = 0; i < BLOK; i++)
{
fc = elm_factory_add(win);
Evas_Object *bx, *fc;
int i;
- printf("ADD for factory 1 %p [%i]\n", obj, (BLOK * (int)evas_object_data_get(obj, "num")));
bx = elm_box_add(win);
+ printf(" ADD lv 1 = %p [%i]\n", bx, (BLOK * (int)evas_object_data_get(obj, "num")));
+#ifdef HOMOG
elm_box_homogeneous_set(bx, EINA_TRUE);
-
+#endif
+
for (i = 0; i < BLOK; i++)
{
fc = elm_factory_add(win);
evas_object_show(bg);
bx = elm_box_add(win);
+#ifdef HOMOG
elm_box_homogeneous_set(bx, EINA_TRUE);
+#endif
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
for (i = 0; i < BLOK; i++)
{
Evas_Object *obj;
Evas_Object *content;
+ int last_calc_count;
Eina_Bool eval : 1;
};
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
+ evas_event_freeze(evas_object_evas_get(obj));
evas_object_geometry_get(obj, &x, &y, &w, &h);
+ if (w < 1) w = 1;
+ if (h < 1) h = 1;
evas_output_viewport_get(evas_object_evas_get(obj),
&cvx, &cvy, &cvw, &cvh);
- // this is a hack to get things sane for now.
- if ((w < 10) || (h < 10) || (cvw < 1) || (cvh < 1)) return;
+ if ((cvw < 1) || (cvh < 1)) return;
// need some fuzz value thats beyond the current viewport
+ // for now just make it the viewport * 3 in size (so 1 vp in each direction)
+ /*
+ cvx -= cvw;
+ cvy -= cvh;
+ cvw *= 3;
+ cvh *= 3;
+ */
if (ELM_RECTS_INTERSECT(x, y, w, h, cvx, cvy, cvw, cvh))
{
if (!wd->content)
{
- printf("intersect: %i %i %ix%i | %i %i %ix%i\n",
- x, y, w, h, cvx, cvy, cvw, cvh);
evas_object_smart_callback_call(obj, SIG_REALIZE, NULL);
if (wd->content)
{
if (evas_object_smart_data_get(wd->content))
evas_object_smart_calculate(wd->content);
}
+ wd->last_calc_count =
+ evas_smart_objects_calculate_count_get(evas_object_evas_get(obj));
}
}
else
{
if (wd->content)
- evas_object_smart_callback_call(obj, SIG_UNREALIZE, NULL);
+ {
+ if (wd->last_calc_count !=
+ evas_smart_objects_calculate_count_get(evas_object_evas_get(obj)))
+ evas_object_smart_callback_call(obj, SIG_UNREALIZE, NULL);
+ }
}
+ evas_event_thaw(evas_object_evas_get(obj));
+ evas_event_thaw_eval(evas_object_evas_get(obj));
}
static void
evas_object_smart_callbacks_descriptions_set(obj, _signals);
wd->obj = obj;
+ wd->last_calc_count = -1;
return obj;
}