code+comments.

SVN revision: 45891
This commit is contained in:
Carsten Haitzler 2010-02-05 06:14:50 +00:00
parent 8cf715a619
commit a9295a655d
2 changed files with 64 additions and 1 deletions

View File

@ -8,6 +8,12 @@ struct _Widget_Data
Evas_Object *shelf, *panel;
Evas_Object *content;
Ecore_Event_Handler *prop_hdl;
struct {
Ecore_Animator *animator; // animaton timer
double start; // time started
Evas_Coord auto_x, auto_y; // desired delta
Evas_Coord x, y; // current delta
} delta;
};
/* local function prototypes */
@ -70,6 +76,58 @@ _sub_del(void *data, Evas_Object *obj, void *event_info)
}
}
/* unused now - but meant to be for making sure the focused widget is always
* visible when the vkbd comes and goes by moving the conformant obj (and thus
* its children) to show the focused widget (and if focus changes follow)
static Evas_Object *
_focus_object_get(const Evas_Object *obj)
{
Evas_Object *win, *foc;
win = elm_widget_top_get(obj);
if (!win) return NULL;
foc = elm_widget_top_get(win);
}
static void
_focus_object_region_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
{
evas_object_geometry_get(obj, x, y, w, h);
}
static void
_focus_change_del(void *data, Evas_Object *obj, void *event_info)
{
// called from toplevel when the focused window shanges
}
static void
_autoscroll_move(Evas_Object *obj)
{
// move conformant edje by delta to show focused widget
}
static void
_autoscroll_mode_enable(Evas_Object *obj)
{
// called when autoscroll mode should be on - content area smaller than
// its min size
// 1. get focused object
// 2. if not in visible conformant area calculate delta needed to
// get it in
// 3. store delta and call _autoscroll_move() which either asanimates
// or jumps right there
}
static void
_autoscroll_mode_disable(Evas_Object *obj)
{
// called when autoscroll mode should be off - set delta to 0 and
// call _autoscroll_move()
}
*/
static int
_prop_change(void *data, int type, void *event)
{
@ -99,6 +157,7 @@ _prop_change(void *data, int type, void *event)
evas_object_size_hint_min_set(wd->panel, -1, sh);
evas_object_size_hint_max_set(wd->panel, -1, sh);
}
// FIXME: listen to kbd region property changes too.
#endif
return 1;
@ -152,6 +211,7 @@ elm_conformant_add(Evas_Object *parent)
wd->prop_hdl = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_PROPERTY,
_prop_change, obj);
// FIXME: get kbd region prop
#endif
evas_object_smart_callback_add(obj, "sub-object-del", _sub_del, obj);

View File

@ -1675,7 +1675,10 @@ _item_idler(void *data)
it->block->changed = 0;
}
if (showme) it->block->showme = 1;
if ((t - t0) > (ecore_animator_frametime_get())) break;
if (eina_inlist_count(wd->blocks) > 1)
{
if ((t - t0) > (ecore_animator_frametime_get())) break;
}
}
if (n > 0)
{