static void _update(void *layout_data, int update_type, void *data)
{
+ struct view_update_data *vdata;
struct _priv *priv;
- int index;
bool update;
if (!layout_data) {
}
priv = layout_data;
+ vdata = data;
switch (update_type) {
case UPDATE_CONTENT:
_update_content_list(priv);
break;
case UPDATE_FOCUS:
- if (!data) {
+ if (!vdata) {
_ERR("invalid argument");
return;
}
- index = *(int *)data;
-
- if (priv->cur_index != index)
+ if (priv->cur_index != vdata->index)
update = true;
else
update = false;
- listmgr_update_focus_item(priv->listmgr, index, update);
+ listmgr_update_focus_item(priv->listmgr, vdata->index, update);
break;
default:
static void _update(void *layout_data, int update_type, void *data)
{
+ struct view_update_data *vdata;
struct _priv *priv;
- int index;
bool update;
if (!layout_data) {
}
priv = layout_data;
+ vdata = data;
switch (update_type) {
case UPDATE_CONTENT:
_update_recent_item(priv);
break;
case UPDATE_FOCUS:
- if (!data) {
+ if (!vdata) {
_ERR("invalid argument");
return;
}
- index = *(int *)data;
-
- if (priv->cur_index != index)
+ if (priv->cur_index != vdata->index)
update = true;
else
update = false;
- listmgr_update_focus_item(priv->listmgr, index, update);
+ listmgr_update_focus_item(priv->listmgr, vdata->index, update);
_update_recent_item(priv);
break;
default:
static void _update(void *layout_data, int update_type, void *data)
{
+ struct view_update_data *vdata;
struct _priv *priv;
- int index;
bool update;
if (!layout_data) {
}
priv = layout_data;
+ vdata = data;
switch (update_type) {
case UPDATE_CONTENT:
_update_playing_item(priv);
break;
case UPDATE_FOCUS:
- if (!data) {
+ if (!vdata) {
_ERR("invalid argument");
return;
}
- index = *(int *)data;
-
- if (priv->cur_index != index)
+ if (priv->cur_index != vdata->index)
update = true;
else
update = false;
- listmgr_update_focus_item(priv->listmgr, index, update);
+ listmgr_update_focus_item(priv->listmgr, vdata->index, update);
_update_playing_item(priv);
break;
default:
layoutmgr_update_layout(priv->lmgr,
g_menu_item[priv->current_layout].layout_id,
- update_type, (void *)&vdata->index);
+ update_type, vdata);
}
static void _destroy(void *view_data)