1 #include <Elementary.h>
2 #include <Elementary_Cursor.h>
6 * @defgroup Genscroller Genscroller
10 typedef struct _Widget_Data Widget_Data;
11 typedef struct _Pan Pan;
15 Evas_Object *obj, *scr, *pan_smart;
17 Evas_Coord pan_x, pan_y, minw, minh;
21 Evas_Coord total_w, total_h;
27 Evas_Object_Smart_Clipped_Data __clipped_data;
31 static const char *widtype = NULL;
32 static void _del_hook(Evas_Object *obj);
33 static void _mirrored_set(Evas_Object *obj,
35 static void _theme_hook(Evas_Object *obj);
36 static void _show_region_hook(void *data,
38 static void _sizing_eval(Evas_Object *obj);
39 static void _on_focus_hook(void *data,
41 static Eina_Bool _event_hook(Evas_Object *obj,
43 Evas_Callback_Type type,
45 static void _signal_emit_hook(Evas_Object *obj,
48 static void _pan_calculate(Evas_Object *obj);
50 static Evas_Smart_Class _pan_sc = EVAS_SMART_CLASS_INIT_VERSION;
52 static const char SIG_SCROLL_EDGE_TOP[] = "scroll,edge,top";
53 static const char SIG_SCROLL_EDGE_BOTTOM[] = "scroll,edge,bottom";
54 static const char SIG_SCROLL_EDGE_LEFT[] = "scroll,edge,left";
55 static const char SIG_SCROLL_EDGE_RIGHT[] = "scroll,edge,right";
57 static const Evas_Smart_Cb_Description _signals[] = {
58 {SIG_SCROLL_EDGE_TOP, ""},
59 {SIG_SCROLL_EDGE_BOTTOM, ""},
60 {SIG_SCROLL_EDGE_LEFT, ""},
61 {SIG_SCROLL_EDGE_RIGHT, ""},
66 _event_hook(Evas_Object *obj,
67 Evas_Object *src __UNUSED__,
68 Evas_Callback_Type type,
71 if (type != EVAS_CALLBACK_KEY_DOWN) return EINA_FALSE;
72 Evas_Event_Key_Down *ev = event_info;
73 Widget_Data *wd = elm_widget_data_get(obj);
74 if (!wd) return EINA_FALSE;
75 if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return EINA_FALSE;
76 if (elm_widget_disabled_get(obj)) return EINA_FALSE;
80 Evas_Coord step_x = 0;
81 Evas_Coord step_y = 0;
84 Evas_Coord page_x = 0;
85 Evas_Coord page_y = 0;
87 elm_smart_scroller_child_pos_get(wd->scr, &x, &y);
88 elm_smart_scroller_step_size_get(wd->scr, &step_x, &step_y);
89 elm_smart_scroller_page_size_get(wd->scr, &page_x, &page_y);
90 elm_smart_scroller_child_viewport_size_get(wd->scr, &v_w, &v_h);
92 if ((!strcmp(ev->keyname, "Left")) || (!strcmp(ev->keyname, "KP_Left")))
96 else if ((!strcmp(ev->keyname, "Right")) ||
97 (!strcmp(ev->keyname, "KP_Right")))
101 else if ((!strcmp(ev->keyname, "Up")) || (!strcmp(ev->keyname, "KP_Up")))
105 else if ((!strcmp(ev->keyname, "Down")) || (!strcmp(ev->keyname, "KP_Down")))
109 else return EINA_FALSE;
111 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
112 elm_smart_scroller_child_pos_set(wd->scr, x, y);
117 _on_focus_hook(void *data __UNUSED__,
120 Widget_Data *wd = elm_widget_data_get(obj);
122 if (elm_widget_focus_get(obj))
124 elm_object_signal_emit(wd->obj, "elm,action,focus", "elm");
125 evas_object_focus_set(wd->obj, EINA_TRUE);
129 elm_object_signal_emit(wd->obj, "elm,action,unfocus", "elm");
130 evas_object_focus_set(wd->obj, EINA_FALSE);
135 _del_hook(Evas_Object *obj)
137 Widget_Data *wd = elm_widget_data_get(obj);
143 _del_pre_hook(Evas_Object *obj)
145 Widget_Data *wd = elm_widget_data_get(obj);
147 evas_object_del(wd->pan_smart);
148 wd->pan_smart = NULL;
152 _mirrored_set(Evas_Object *obj,
155 Widget_Data *wd = elm_widget_data_get(obj);
157 elm_smart_scroller_mirrored_set(wd->scr, rtl);
161 _theme_hook(Evas_Object *obj)
163 Widget_Data *wd = elm_widget_data_get(obj);
165 evas_event_freeze(evas_object_evas_get(wd->obj));
166 _elm_widget_mirrored_reload(obj);
167 _mirrored_set(obj, elm_widget_mirrored_get(obj));
168 elm_smart_scroller_object_theme_set(obj, wd->scr, "genscroller", "base",
169 elm_widget_style_get(obj));
170 edje_object_scale_set(wd->scr, elm_widget_scale_get(obj) * _elm_config->scale);
172 evas_event_thaw(evas_object_evas_get(wd->obj));
173 evas_event_thaw_eval(evas_object_evas_get(wd->obj));
177 _show_region_hook(void *data,
180 Widget_Data *wd = elm_widget_data_get(data);
181 Evas_Coord x, y, w, h;
183 elm_widget_show_region_get(obj, &x, &y, &w, &h);
184 //x & y are screen coordinates, Add with pan coordinates
187 elm_smart_scroller_child_region_show(wd->scr, x, y, w, h);
191 _sizing_eval(Evas_Object *obj)
193 Widget_Data *wd = elm_widget_data_get(obj);
194 Evas_Coord minw = -1, minh = -1, maxw = -1, maxh = -1;
197 evas_object_size_hint_min_get(wd->scr, &minw, &minh);
198 evas_object_size_hint_max_get(wd->scr, &maxw, &maxh);
199 edje_object_size_min_calc
200 (elm_smart_scroller_edje_object_get(wd->scr), &vmw, &vmh);
203 evas_object_size_hint_min_set(obj, minw, minh);
204 evas_object_size_hint_max_set(obj, maxw, maxh);
208 _signal_emit_hook(Evas_Object *obj,
209 const char *emission,
212 Widget_Data *wd = elm_widget_data_get(obj);
213 edje_object_signal_emit(elm_smart_scroller_edje_object_get(wd->scr),
218 _pan_set(Evas_Object *obj,
222 Pan *sd = evas_object_smart_data_get(obj);
224 if ((x == sd->wd->pan_x) && (y == sd->wd->pan_y)) return;
227 // FIXME: pan virtual scroll pos set
228 printf("PAN SET: %i %i\n", x, y);
232 _pan_get(Evas_Object *obj,
236 Pan *sd = evas_object_smart_data_get(obj);
238 if (x) *x = sd->wd->pan_x;
239 if (y) *y = sd->wd->pan_y;
243 _pan_max_get(Evas_Object *obj,
247 Pan *sd = evas_object_smart_data_get(obj);
250 evas_object_geometry_get(obj, NULL, NULL, &ow, &oh);
251 ow = sd->wd->minw - ow;
253 oh = sd->wd->minh - oh;
260 _pan_min_get(Evas_Object *obj __UNUSED__,
269 _pan_child_size_get(Evas_Object *obj,
273 Pan *sd = evas_object_smart_data_get(obj);
275 if (w) *w = sd->wd->minw;
276 if (h) *h = sd->wd->minh;
280 _pan_add(Evas_Object *obj)
283 Evas_Object_Smart_Clipped_Data *cd;
286 cd = evas_object_smart_data_get(obj);
289 sd->__clipped_data = *cd;
291 evas_object_smart_data_set(obj, sd);
295 _pan_del(Evas_Object *obj)
297 Pan *sd = evas_object_smart_data_get(obj);
304 _pan_resize(Evas_Object *obj,
308 // Pan *sd = evas_object_smart_data_get(obj);
311 evas_object_geometry_get(obj, NULL, NULL, &ow, &oh);
312 if ((ow == w) && (oh == h)) return;
313 // FIXME: pan resized
314 printf("PAN SIZE: %i %i\n", w, h);
318 _pan_calculate(Evas_Object *obj)
320 // Pan *sd = evas_object_smart_data_get(obj);
321 Evas_Coord ox, oy, ow, oh, cvx, cvy, cvw, cvh;
323 evas_event_freeze(evas_object_evas_get(obj));
324 evas_object_geometry_get(obj, &ox, &oy, &ow, &oh);
325 evas_output_viewport_get(evas_object_evas_get(obj), &cvx, &cvy, &cvw, &cvh);
326 // FIXME: move/resize/show/realize/unrealize stuff
327 printf("PAN CALC\n");
328 evas_event_thaw(evas_object_evas_get(obj));
329 evas_event_thaw_eval(evas_object_evas_get(obj));
333 _pan_move(Evas_Object *obj __UNUSED__,
337 // Pan *sd = evas_object_smart_data_get(obj);
339 printf("PAN MOVE: %i %i\n", x, y);
343 _hold_on(void *data __UNUSED__,
345 void *event_info __UNUSED__)
347 Widget_Data *wd = elm_widget_data_get(obj);
349 elm_smart_scroller_hold_set(wd->scr, 1);
353 _hold_off(void *data __UNUSED__,
355 void *event_info __UNUSED__)
357 Widget_Data *wd = elm_widget_data_get(obj);
359 elm_smart_scroller_hold_set(wd->scr, 0);
363 _freeze_on(void *data __UNUSED__,
365 void *event_info __UNUSED__)
367 Widget_Data *wd = elm_widget_data_get(obj);
369 elm_smart_scroller_freeze_set(wd->scr, 1);
373 _freeze_off(void *data __UNUSED__,
375 void *event_info __UNUSED__)
377 Widget_Data *wd = elm_widget_data_get(obj);
379 elm_smart_scroller_freeze_set(wd->scr, 0);
383 _scroll_edge_left(void *data,
384 Evas_Object *scr __UNUSED__,
385 void *event_info __UNUSED__)
387 Evas_Object *obj = data;
388 evas_object_smart_callback_call(obj, SIG_SCROLL_EDGE_LEFT, NULL);
392 _scroll_edge_right(void *data,
393 Evas_Object *scr __UNUSED__,
394 void *event_info __UNUSED__)
396 Evas_Object *obj = data;
397 evas_object_smart_callback_call(obj, SIG_SCROLL_EDGE_RIGHT, NULL);
401 _scroll_edge_top(void *data,
402 Evas_Object *scr __UNUSED__,
403 void *event_info __UNUSED__)
405 Evas_Object *obj = data;
406 evas_object_smart_callback_call(obj, SIG_SCROLL_EDGE_TOP, NULL);
410 _scroll_edge_bottom(void *data,
411 Evas_Object *scr __UNUSED__,
412 void *event_info __UNUSED__)
414 Evas_Object *obj = data;
415 evas_object_smart_callback_call(obj, SIG_SCROLL_EDGE_BOTTOM, NULL);
418 /****************************************************************************/
420 typedef struct _Cell Cell;
421 typedef struct _Span Span;
426 Evas_Coord pos; // position RELATIVE to parent (geom)
427 Evas_Coord size; // size of whole set of children (geom)
428 int total_child_count; // total number of children in all sub trees
429 int child_count; // number of children in children array
430 Span **child; // child array (ordered)
441 * SPAN SPAN SPAN ... N SPAN CHILDREN
444 * +-SPAN-SPAN-SPAN-SPAN-SPAN-SPAN
446 * S +--+ +--+ +--+ +--+ +--+ +--+
447 * P | | | | | | | | | | | |<- Cell
448 * A | | | | | | | | | | | |
449 * N +--+ +--+ +--+ +--+ +--+ +--+
451 * S +--+ +--+ +--+ +--+ +--+ +--+
452 * P | | | | | | | | | | | |
453 * A | | | | | | | | | | | |
454 * N +--+ +--+ +--+ +--+ +--+ +--+
456 * S +--+ +--+ +--+ +--+ +--+ +--+
457 * P | | | | | | | | | | | |
458 * A | | | | | | | | | | | |
459 * N +--+ +--+ +--+ +--+ +--+ +--+
464 __span_build(int total, Evas_Coord size, int levels, Evas_Coord pos, int bucketsize)
472 sp = calloc(1, sizeof(Span));
473 for (i = 0; i < lv; i++) printf(" ");
474 printf("SP: %i tot\n", total);
475 // FIXME: alloc fail handle
476 sp->size = size * total;
477 sp->total_child_count = total;
479 if (bucketsize == 1) return sp;
481 // get max number of children per bucket
482 num = bucket = (bucketsize + (levels - 1)) / levels;
483 sp->child = calloc(levels, sizeof(Span *));
484 // FIXME: alloc fail handle
486 for (i = 0; i < levels; i++)
488 if (total < num) num = total;
492 sp->child[i] = __span_build(num, size, levels, p - pos, bucket);
494 // FIXME: alloc fail handle
495 sp->child[i]->parent = sp;
496 p += sp->child[i]->size;
503 _span_build(int total, Evas_Coord size, int levels)
505 // total == total # of leaf nodes (# of cells)
506 // size == size of each leaf node (geom)
507 // levels == number of children per node (preferred), eg 2, 3, 4, 5 etc.
508 int bucketsize = ((total + (levels - 1)) / levels) * levels;
509 return __span_build(total, size, levels, 0, bucketsize);
513 _span_first(Span *sp)
517 if (!sp->child) return sp;
518 sp2 = _span_first(sp->child[0]);
527 if (!sp->child) return sp;
528 sp2 = _span_last(sp->child[sp->child_count - 1]);
539 if (!spp) return NULL;
540 for (i = 0; i < spp->child_count; i++)
542 if (spp->child[i] == sp)
544 if (i < (spp->child_count - 1)) return spp->child[i + 1];
547 spn = _span_next(spp);
548 if (!spn) return NULL;
549 return _span_first(spn);
563 if (!spp) return NULL;
564 for (i = 0; i < spp->child_count; i++)
566 if (spp->child[i] == sp)
568 if (i > 0) return spp->child[i - 1];
571 spn = _span_prev(spp);
572 if (!spn) return NULL;
573 return _span_last(spn);
581 _span_real_pos_get(Span *sp)
584 Evas_Coord pos = sp->pos;
586 for (spp = sp->parent; spp; spp = spp->parent)
592 _span_real_num_get(Span *sp)
594 Span *spp, *spp_prev;
597 for (spp_prev = sp, spp = sp->parent; spp;
598 spp_prev = spp, spp = spp->parent)
602 for (i = 0; i < spp->child_count; i++)
604 if (spp->child[i] == spp_prev) break;
605 num += spp->child[i]->total_child_count;
613 _span_num_get(Span *sp, int num)
617 if (num < 0) return NULL;
618 if (!sp->child) return sp;
619 for (n = 0, i = 0; i < sp->child_count; i++)
621 cnt = sp->child[i]->total_child_count;
623 if (n > num) return _span_num_get(sp->child[i], num - (n - cnt));
629 _span_pos_get(Span *sp, Evas_Coord pos)
634 if (pos < 0) return NULL;
635 if (!sp->child) return sp;
636 for (p = 0, i = 0; i < sp->child_count; i++)
638 sz = sp->child[i]->size;
640 if (p > pos) return _span_pos_get(sp->child[i], pos - (p - sz));
646 __span_del(Span *sp, int num, int count, Evas_Coord *delsize)
648 int i, n, cnt, reduce = 0, deleted = 0, delstart = -1, num2, done;
649 Evas_Coord deleted_size = 0, size;
657 for (n = 0, i = 0; i < sp->child_count; i++)
659 cnt = sp->child[i]->total_child_count;
663 num2 = num - (n - cnt);
664 if (num2 < 0) num2 = 0;
668 done = __span_del(sp->child[i], num2, count, &size);
669 deleted_size += size;
670 if (i < (sp->child_count - 1))
671 sp->child[i + 1]->pos -= deleted_size;
676 if (delstart == -1) delstart = i;
683 for (i = delstart; i < sp->child_count; i++)
685 if ((i + deleted) < sp->child_count)
686 sp->child[i] = sp->child[i + deleted];
689 sp->size -= deleted_size;
690 sp->child_count -= deleted;
691 sp->total_child_count -= reduce;
692 if (sp->child_count == 0)
697 *delsize = deleted_size;
702 _span_del(Span *sp, int num, int count)
705 return __span_del(sp, num, count, &deleted);
709 __span_insert(Span *sp, int num, int count, Evas_Coord size, Evas_Coord pos)
716 // total child count and size go up by what we are inserting
717 sp->total_child_count += count;
718 sp->size += size * count;
719 // if we have more than 1 child we have to find out which branch to go down
720 // or if we have only 1 child AND that child has another child
721 if ((sp->child_count > 1) ||
722 ((sp->child_count == 1) && (sp->child[0]->child_count >= 1)))
724 for (n = 0, i = 0; i < sp->child_count; i++)
727 n += sp2->total_child_count;
728 // if num is within the child we are looking at
731 // advance all children along by size * count
732 for (j = (i + 1); j < sp->child_count; j++)
733 sp->child[j]->pos += (size * count);
734 // now adjust num for new span in child
735 num -= (n - sp2->total_child_count);
736 // and check in new child span and try next child down
742 // now that we are just up from a leaf node... do this
745 // no child at all... just fill it in
746 sp->child_count = count;
747 sp->child = calloc(count, sizeof(Span *));
748 sp->size = size * count;
750 for (i = 0; i < count; i++)
752 sp->child[i] = calloc(1, sizeof(Span));
753 sp->child[i]->size = size;
754 sp->child[i]->pos = sp->pos + (i * size);
755 sp->child[i]->total_child_count = 1;
756 sp->child[i]->child_count = 0;
757 sp->child[i]->child = NULL;
763 // we have some children - find a spot and plug 'er in
767 // alloc a new child array and copy in old child ptrs from old array
768 // up until the insertion point (num)
769 child = calloc(count + sp->child_count, sizeof(Span *));
770 for (i = 0; i < num; i++)
772 child[i] = sp->child[src];
773 pos = child[i]->pos + child[i]->size;
776 // now alloc new children of the right size and stick them in
777 for (i = 0; i < count; i++)
779 child[num + i] = calloc(1, sizeof(Span));
780 sp->child[num + i]->size = size;
781 sp->child[num + i]->pos = pos;
782 sp->child[num + i]->total_child_count = 1;
783 sp->child[num + i]->child_count = 0;
784 sp->child[num + i]->child = NULL;
787 // append rest of old children and adjust their pos values
788 for (i = num; i < (count + sp->child_count); i++)
790 child[count + i] = sp->child[src];
791 sp->child[count + i]->pos = pos;
792 pos += sp->child[num + count + i]->size;
795 sp->child_count += count;
802 _span_insert(Span *sp, int num, int count, Evas_Coord size)
804 __span_insert(sp, num, count, size, 0);
808 _span_rebalance(Span *sp, int levels)
814 _span_resize(Span *sp, int num, Evas_Coord size)
819 /****************************************************************************/
822 * Add a new Genscroller object
824 * @param parent The parent object
825 * @return The new object or NULL if it cannot be created
827 * @ingroup Genscroller
830 elm_genscroller_add(Evas_Object *parent)
835 Evas_Coord minw, minh;
836 static Evas_Smart *smart = NULL;
840 static Evas_Smart_Class sc;
842 evas_object_smart_clipped_smart_set(&_pan_sc);
844 sc.name = "elm_genscroller_pan";
845 sc.version = EVAS_SMART_CLASS_VERSION;
848 sc.resize = _pan_resize;
850 sc.calculate = _pan_calculate;
851 if (!(smart = evas_smart_class_new(&sc))) return NULL;
854 ELM_WIDGET_STANDARD_SETUP(wd, Widget_Data, parent, e, obj, NULL);
856 ELM_SET_WIDTYPE(widtype, "genscroller");
857 elm_widget_type_set(obj, "genscroller");
858 elm_widget_sub_object_add(parent, obj);
859 elm_widget_on_focus_hook_set(obj, _on_focus_hook, NULL);
860 elm_widget_signal_emit_hook_set(obj, _signal_emit_hook);
861 elm_widget_data_set(obj, wd);
862 elm_widget_del_hook_set(obj, _del_hook);
863 elm_widget_del_pre_hook_set(obj, _del_pre_hook);
864 elm_widget_theme_hook_set(obj, _theme_hook);
865 elm_widget_can_focus_set(obj, EINA_TRUE);
866 elm_widget_event_hook_set(obj, _event_hook);
867 elm_widget_on_show_region_hook_set(obj, _show_region_hook, obj);
869 wd->scr = elm_smart_scroller_add(e);
870 elm_smart_scroller_widget_set(wd->scr, obj);
871 elm_smart_scroller_object_theme_set(obj, wd->scr, "genscroller", "base",
872 elm_widget_style_get(obj));
873 elm_smart_scroller_bounce_allow_set(wd->scr,
874 _elm_config->thumbscroll_bounce_enable,
875 _elm_config->thumbscroll_bounce_enable);
876 elm_widget_resize_object_set(obj, wd->scr);
878 evas_object_smart_callback_add(wd->scr, "edge,left", _scroll_edge_left, obj);
879 evas_object_smart_callback_add(wd->scr, "edge,right", _scroll_edge_right,
881 evas_object_smart_callback_add(wd->scr, "edge,top", _scroll_edge_top, obj);
882 evas_object_smart_callback_add(wd->scr, "edge,bottom", _scroll_edge_bottom,
887 evas_object_smart_callback_add(obj, "scroll-hold-on", _hold_on, obj);
888 evas_object_smart_callback_add(obj, "scroll-hold-off", _hold_off, obj);
889 evas_object_smart_callback_add(obj, "scroll-freeze-on", _freeze_on, obj);
890 evas_object_smart_callback_add(obj, "scroll-freeze-off", _freeze_off, obj);
892 wd->pan_smart = evas_object_smart_add(e, smart);
893 wd->pan = evas_object_smart_data_get(wd->pan_smart);
896 elm_smart_scroller_extern_pan_set(wd->scr, wd->pan_smart,
897 _pan_set, _pan_get, _pan_max_get,
898 _pan_min_get, _pan_child_size_get);
900 edje_object_size_min_calc(elm_smart_scroller_edje_object_get(wd->scr),
902 evas_object_size_hint_min_set(obj, minw, minh);
904 evas_object_smart_callbacks_descriptions_set(obj, _signals);
906 _mirrored_set(obj, elm_widget_mirrored_get(obj));
912 sp0 = _span_build(46, 10, 4);
913 sp = _span_first(sp0);
914 if (sp) printf("first @ %i [%i], size %i\n", sp->pos, _span_real_pos_get(sp), sp->size);
915 sp = _span_last(sp0);
916 if (sp) printf("last @ %i [%i], size %i\n", sp->pos, _span_real_pos_get(sp), sp->size);
917 for (sp = _span_first(sp0); sp; sp = _span_next(sp))
919 if (sp) printf(" @ %i [%i], size %i t: %i %i\n",
921 _span_real_pos_get(sp),
924 sp->total_child_count);
926 for (sp = _span_last(sp0); sp; sp = _span_prev(sp))
928 if (sp) printf(" @ %i [%i], size %i\n", sp->pos, _span_real_pos_get(sp), sp->size);
930 sp = _span_num_get(sp0, 0);
931 if (sp) printf("sp 0 @ %i [%i]\n", _span_real_pos_get(sp), _span_real_num_get(sp));
932 sp = _span_num_get(sp0, 1);
933 if (sp) printf("sp 1 @ %i [%i]\n", _span_real_pos_get(sp), _span_real_num_get(sp));
934 sp = _span_num_get(sp0, 7);
935 if (sp) printf("sp 7 @ %i [%i]\n", _span_real_pos_get(sp), _span_real_num_get(sp));
936 sp = _span_num_get(sp0, 39);
937 if (sp) printf("sp 39 @ %i [%i]\n", _span_real_pos_get(sp), _span_real_num_get(sp));
938 sp = _span_num_get(sp0, 44);
939 if (sp) printf("sp 44 @ %i [%i]\n", _span_real_pos_get(sp), _span_real_num_get(sp));
941 sp = _span_pos_get(sp0, -1);
942 if (sp) printf("sp pos -1 @ %i [%i]\n", _span_real_pos_get(sp), _span_real_num_get(sp));
943 sp = _span_pos_get(sp0, 0);
944 if (sp) printf("sp pos 0 @ %i [%i]\n", _span_real_pos_get(sp), _span_real_num_get(sp));
945 sp = _span_pos_get(sp0, 1);
946 if (sp) printf("sp pos 1 @ %i [%i]\n", _span_real_pos_get(sp), _span_real_num_get(sp));
947 sp = _span_pos_get(sp0, 13);
948 if (sp) printf("sp pos 13 @ %i [%i]\n", _span_real_pos_get(sp), _span_real_num_get(sp));
949 sp = _span_pos_get(sp0, 159);
950 if (sp) printf("sp pos 159 @ %i [%i]\n", _span_real_pos_get(sp), _span_real_num_get(sp));
951 sp = _span_pos_get(sp0, 371);
952 if (sp) printf("sp pos 371 @ %i [%i]\n", _span_real_pos_get(sp), _span_real_num_get(sp));
953 sp = _span_pos_get(sp0, 455);
954 if (sp) printf("sp pos 455 @ %i [%i]\n", _span_real_pos_get(sp), _span_real_num_get(sp));
955 sp = _span_pos_get(sp0, 461);
956 if (sp) printf("sp pos 461 @ %i [%i]\n", _span_real_pos_get(sp), _span_real_num_get(sp));
958 printf("del @13, 11 spans\n");
959 _span_del(sp0, 13, 11);
960 for (sp = _span_first(sp0); sp; sp = _span_next(sp))
962 if (sp) printf(" @ %i [%i], size %i\n", sp->pos, _span_real_pos_get(sp), sp->size);
965 printf("add @23, 29 spans, size 20\n");
966 _span_insert(sp0, 23, 19, 20);
967 for (sp = _span_first(sp0); sp; sp = _span_next(sp))
969 if (sp) printf(" @ %i [%i], size %i\n", sp->pos, _span_real_pos_get(sp), sp->size);
980 * @param obj The genlist object
982 * @ingroup Genscroller
985 elm_genscroller_world_size_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
987 ELM_CHECK_WIDTYPE(obj, widtype);
988 Widget_Data *wd = elm_widget_data_get(obj);
992 evas_object_smart_callback_call(wd->pan_smart, "changed", NULL);
993 _sizing_eval(wd->obj);
994 evas_object_smart_changed(wd->pan_smart);
998 elm_genscroller_world_size_get(Evas_Object *obj, Evas_Coord *w, Evas_Coord *h)
1003 elm_genscroller_cell_size_set(Evas_Object *obj, int w, int h)
1005 ELM_CHECK_WIDTYPE(obj, widtype);
1006 Widget_Data *wd = elm_widget_data_get(obj);
1013 elm_genscroller_cell_size_get(Evas_Object *obj, int *w, int *h)
1018 elm_genscroller_cell_all_size_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
1023 elm_genscroller_cell_row_size_set(Evas_Object *obj, int y, Evas_Coord h)
1028 elm_genscroller_cell_col_size_set(Evas_Object *obj, int x, Evas_Coord w)
1033 elm_genscroller_cell_rows_insert(Evas_Object *obj, int y, int rows)
1038 elm_genscroller_cell_rows_del(Evas_Object *obj, int y, int rows)
1043 elm_genscroller_cell_cols_insert(Evas_Object *obj, int x, int cols)
1048 elm_genscroller_cell_cols_del(Evas_Object *obj, int x, int cols)