I reverted elm_genlist/els_scroller. Sorry, it was my mistake. Daniel Juyung Seo (SeoZ)
On Tue, Dec 13, 2011 at 8:53 AM, Enlightenment SVN <no-re...@enlightenment.org> wrote: > Log: > elm toolbar/naviframe: Added more documentation about elm_object and > elm_object_item common APIs support. This needs to be done for other > widgets which support elm_object/elm_object_item. > > > Author: seoz > Date: 2011-12-12 15:53:26 -0800 (Mon, 12 Dec 2011) > New Revision: 66122 > Trac: http://trac.enlightenment.org/e/changeset/66122 > > Modified: > trunk/elementary/src/lib/Elementary.h.in > trunk/elementary/src/lib/elm_genlist.c trunk/elementary/src/lib/els_scroller.c > > Modified: trunk/elementary/src/lib/Elementary.h.in > =================================================================== > --- trunk/elementary/src/lib/Elementary.h.in 2011-12-12 19:59:25 UTC (rev > 66121) > +++ trunk/elementary/src/lib/Elementary.h.in 2011-12-12 23:53:26 UTC (rev > 66122) > @@ -15339,6 +15339,13 @@ > * Default text parts of the toolbar items that you can use for are: > * @li "default" - label of the toolbar item > * > + * Supported elm_object_item common APIs. > + * @li elm_object_item_disabled_set > + * @li elm_object_item_text_set > + * @li elm_object_item_part_text_set > + * @li elm_object_item_text_get > + * @li elm_object_item_part_text_get > + * > * List of examples: > * @li @ref toolbar_example_01 > * @li @ref toolbar_example_02 > @@ -29703,6 +29710,22 @@ > * @li "default" - Title label in the title area > * @li "subtitle" - Sub-title label in the title area > * > + * Supported elm_object common APIs. > + * @li elm_object_signal_emit > + * > + * Supported elm_object_item common APIs. > + * @li elm_object_item_text_set > + * @li elm_object_item_part_text_set > + * @li elm_object_item_text_get > + * @li elm_object_item_part_text_get > + * @li elm_object_item_content_set > + * @li elm_object_item_part_content_set > + * @li elm_object_item_content_get > + * @li elm_object_item_part_content_get > + * @li elm_object_item_content_unset > + * @li elm_object_item_part_content_unset > + * @li elm_object_item_signal_emit > + * > * @ref tutorial_naviframe gives a good overview of the usage of the API. > */ > > > Modified: trunk/elementary/src/lib/elm_genlist.c > =================================================================== > --- trunk/elementary/src/lib/elm_genlist.c 2011-12-12 19:59:25 UTC (rev > 66121) > +++ trunk/elementary/src/lib/elm_genlist.c 2011-12-12 23:53:26 UTC (rev > 66122) > @@ -5,6 +5,7 @@ > #include "elm_priv.h" > #include "els_scroller.h" > #include "elm_genlist.h" > +#include "els_pan.h" > > #define MAX_ITEMS_PER_BLOCK 32 > #define REORDER_EFFECT_TIME 0.5 > @@ -137,6 +138,7 @@ > static void _elm_genlist_clear(Evas_Object *obj, Eina_Bool standby); > > static Evas_Smart_Class _pan_sc = EVAS_SMART_CLASS_INIT_VERSION; > +static void _pan_child_size_get(Evas_Object *obj, Evas_Coord *w, Evas_Coord > *h); > > static const char SIG_ACTIVATED[] = "activated"; > static const char SIG_CLICKED_DOUBLE[] = "clicked,double"; > @@ -2154,6 +2156,7 @@ > evas_event_freeze(evas_object_evas_get(it->wd->obj)); > evas_object_resize(view, it->item->w, it->item->h); > evas_object_move(view, it_x, it_y); > +//fprintf(stderr, "it: %p, x %d y %d\n", view, it_x, it_y); > evas_object_show(view); > evas_event_thaw(evas_object_evas_get(it->wd->obj)); > evas_event_thaw_eval(evas_object_evas_get(it->wd->obj)); > @@ -2218,6 +2221,7 @@ > } > if (!it->item->move_effect_enabled) > { > +//fprintf(stderr, "it %p itb->y %d it->y %d pan_y %d oy %d\n", it, itb->y, > it->y, it->wd->pan_y, oy); > if (it->item->mode_view) > _item_position(it, it->item->mode_view, > it->item->scrl_x, > it->item->scrl_y); > @@ -2284,6 +2288,29 @@ > } > > static void > +_scroll_item(Widget_Data *wd) > +{ > + wd->show_item->item->showme = EINA_FALSE; > + if (wd->bring_in) > + elm_smart_scroller_region_bring_in(wd->scr, > + wd->show_item->x + > + wd->show_item->item->block->x, > + wd->show_item->y + > + wd->show_item->item->block->y, > + wd->show_item->item->block->w, > + wd->show_item->item->h); > + else > + elm_smart_scroller_child_region_show(wd->scr, > + wd->show_item->x + > + wd->show_item->item->block->x, > + wd->show_item->y + > + wd->show_item->item->block->y, > + wd->show_item->item->block->w, > + wd->show_item->item->h); > + wd->show_item = NULL; > +} > + > +static void > _calc_job(void *data) > { > Widget_Data *wd = data; > @@ -2292,6 +2319,8 @@ > int in = 0; > Eina_Bool minw_change = EINA_FALSE; > Eina_Bool did_must_recalc = EINA_FALSE; > + Evas_Coord pan_w = 0, pan_h = 0; > + static Eina_Bool check_scroll = EINA_FALSE; > if (!wd) return; > > evas_object_geometry_get(wd->pan_smart, NULL, NULL, &ow, &wd->h); > @@ -2339,27 +2368,25 @@ > itb->h = itb->minh; > y += itb->h; > in += itb->count; > + > if ((showme) && (wd->show_item) && (!wd->show_item->item->queued)) > + check_scroll = EINA_TRUE; > + if (check_scroll) > { > - wd->show_item->item->showme = EINA_FALSE; > - if (wd->bring_in) > - elm_smart_scroller_region_bring_in(wd->scr, > - wd->show_item->x + > - > wd->show_item->item->block->x, > - wd->show_item->y + > - > wd->show_item->item->block->y, > - > wd->show_item->item->block->w, > - wd->show_item->item->h); > - else > - elm_smart_scroller_child_region_show(wd->scr, > - wd->show_item->x + > - > wd->show_item->item->block->x, > - wd->show_item->y + > - > wd->show_item->item->block->y, > - > wd->show_item->item->block->w, > - wd->show_item->item->h); > - wd->show_item = NULL; > + _pan_child_size_get(wd->pan_smart, &pan_w, &pan_h); > + if (ELM_RECTS_INTERSECT( > + 0, 0, pan_w, pan_h, > + wd->show_item->x + wd->show_item->item->block->x, > + wd->show_item->y + wd->show_item->item->block->y, > + wd->show_item->item->block->w, > + wd->show_item->item->h > + )) > + { > + _scroll_item(wd); > + check_scroll = EINA_FALSE; > + } > } > +//fprintf(stderr, "bring in %d %d %d %d : pan child %d %d\n", > wd->show_item->x + wd->show_item->item->block->x, wd->show_item->y + > wd->show_item->item->block->y, wd->show_item->item->block->w, > wd->show_item->item->h, pan_w, pan_h); > } > if (minw_change) > { > @@ -2497,6 +2524,7 @@ > // if (x > ow) x = ow; > // if (y > oh) y = oh; > if ((x == sd->wd->pan_x) && (y == sd->wd->pan_y)) return; > +//fprintf(stderr, "pan_y %d\n", y); > sd->wd->pan_x = x; > sd->wd->pan_y = y; > > > Modified: trunk/elementary/src/lib/els_scroller.c > =================================================================== > --- trunk/elementary/src/lib/els_scroller.c 2011-12-12 19:59:25 UTC (rev > 66121) > +++ trunk/elementary/src/lib/els_scroller.c 2011-12-12 23:53:26 UTC (rev > 66122) > @@ -367,6 +367,7 @@ > > if (sd->scrollto.y.animator) > { > +//fprintf(stderr, "%s %d\n", __func__, __LINE__); > ecore_animator_del(sd->scrollto.y.animator); > sd->scrollto.y.animator = NULL; > } > @@ -539,6 +540,7 @@ > Evas_Coord px, py; > double t, tt; > > +//fprintf(stderr, "%s %d\n", __func__, __LINE__); > t = ecore_loop_time_get(); > tt = (t - sd->scrollto.y.t_start) / (sd->scrollto.y.t_end - > sd->scrollto.y.t_start); > tt = 1.0 - tt; > @@ -552,10 +554,12 @@ > elm_smart_scroller_child_pos_set(sd->smart_obj, px, py); > _update_wanted_coordinates(sd, px, py); > sd->scrollto.y.animator = NULL; > +fprintf(stderr, "%s %d x %d y %d\n", __func__, __LINE__, px, py); > if ((!sd->scrollto.x.animator) && (!sd->down.bounce_x_animator)) > _smart_anim_stop(sd->smart_obj); > return ECORE_CALLBACK_CANCEL; > } > +fprintf(stderr, "%s %d x %d y %d\n", __func__, __LINE__, px, py); > elm_smart_scroller_child_pos_set(sd->smart_obj, px, py); > _update_wanted_coordinates(sd, px, py); > > @@ -580,11 +584,13 @@ > t = ecore_loop_time_get(); > sd->pan_func.get(sd->pan_obj, &px, &py); > sd->scrollto.y.start = py; > +fprintf(stderr, "%s %d y.end %d\n", __func__, __LINE__, pos_y); > sd->scrollto.y.end = pos_y; > sd->scrollto.y.t_start = t; > sd->scrollto.y.t_end = t + t_in; > if (!sd->scrollto.y.animator) > { > +//fprintf(stderr, "%s %d\n", __func__, __LINE__); > sd->scrollto.y.animator = > ecore_animator_add(_smart_scrollto_y_animator, sd); > if (!sd->scrollto.x.animator) > _smart_anim_start(sd->smart_obj); > @@ -967,6 +973,8 @@ > { > if (sd->scrollto.y.animator) > { > + > +//fprintf(stderr, "%s %d\n", __func__, __LINE__); > ecore_animator_del(sd->scrollto.y.animator); > sd->scrollto.y.animator = NULL; > } > @@ -1022,6 +1030,8 @@ > if (y - miny > my) y = my + miny; > } > > +//fprintf(stderr, "x %d y %d\n", x, y); > + if ((px == x) && (py == y)) return; > sd->pan_func.set(sd->pan_obj, x, y); > if ((px != x) || (py != y)) > edje_object_signal_emit(sd->edje_obj, "elm,action,scroll", "elm"); > @@ -1107,6 +1117,7 @@ > } > if (sd->scrollto.y.animator) > { > +//fprintf(stderr, "%s %d\n", __func__, __LINE__); > ecore_animator_del(sd->scrollto.y.animator); > sd->scrollto.y.animator = NULL; > } > @@ -1470,9 +1481,11 @@ > INTERNAL_ENTRY; > Evas_Coord ww, wh, wx = sd->wx; > > +//fprintf(stderr, "%s %d animator : %p\n", __func__, __LINE__, > sd->scrollto.y.animator); > if (sd->down.now || sd->down.momentum_animator || > sd->down.bounce_x_animator || sd->down.bounce_y_animator || > - sd->down.hold_animator || sd->down.onhold_animator) return; > + sd->down.hold_animator || sd->down.onhold_animator || > + sd->scrollto.x.animator || sd->scrollto.y.animator) return; > > sd->child.resized = EINA_FALSE; > > @@ -1604,6 +1617,7 @@ > } > if (sd->scrollto.y.animator) > { > +//fprintf(stderr, "%s %d\n", __func__, __LINE__); > ecore_animator_del(sd->scrollto.y.animator); > sd->scrollto.y.animator = NULL; > } > @@ -1672,6 +1686,7 @@ > } > if (sd->scrollto.y.animator) > { > +//fprintf(stderr, "%s %d\n", __func__, __LINE__); > ecore_animator_del(sd->scrollto.y.animator); > sd->scrollto.y.animator = NULL; > } > @@ -1732,6 +1747,7 @@ > } > if (sd->scrollto.y.animator) > { > +//fprintf(stderr, "%s %d\n", __func__, __LINE__); > ecore_animator_del(sd->scrollto.y.animator); > sd->scrollto.y.animator = NULL; > } > @@ -2537,9 +2553,10 @@ > edje_object_part_drag_value_get(sd->edje_obj, "elm.dragable.hbar", &vx, > NULL); > sd->pan_func.max_get(sd->pan_obj, &mx, &my); > sd->pan_func.min_get(sd->pan_obj, &minx, &miny); > - x = vx * (double)mx + minx; > - y = vy * (double)my + miny; > + x = round(vx * (double)mx + minx); > + y = round(vy * (double)my + miny); > sd->pan_func.get(sd->pan_obj, &px, &py); > +fprintf(stderr, "y %d vy %f my %d miny %d\n", y, vy, my, miny); > sd->pan_func.set(sd->pan_obj, x, y); > if ((px != x) || (py != y)) > edje_object_signal_emit(sd->edje_obj, "elm,action,scroll", "elm"); > > > ------------------------------------------------------------------------------ > Learn Windows Azure Live! Tuesday, Dec 13, 2011 > Microsoft is holding a special Learn Windows Azure training event for > developers. It will provide a great way to learn Windows Azure and what it > provides. You can attend the event by watching it streamed LIVE online. > Learn more at http://p.sf.net/sfu/ms-windowsazure > _______________________________________________ > enlightenment-svn mailing list > enlightenment-...@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-svn ------------------------------------------------------------------------------ Learn Windows Azure Live! Tuesday, Dec 13, 2011 Microsoft is holding a special Learn Windows Azure training event for developers. It will provide a great way to learn Windows Azure and what it provides. You can attend the event by watching it streamed LIVE online. Learn more at http://p.sf.net/sfu/ms-windowsazure _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel