gles_do_animation();
else
fb->blit();
+
+ gles_flush();
#else
fb->blit();
#endif
gles_set_buffer((unsigned int *)surface.data);
gles_set_animation(1, o->parm.setShowHideInfo->point.x(), o->parm.setShowHideInfo->point.y(), o->parm.setShowHideInfo->size.width(), o->parm.setShowHideInfo->size.height());
#endif
+ delete o->parm.setShowHideInfo;
break;
}
case gOpcode::sendHide:
gles_set_buffer((unsigned int *)surface.data);
gles_set_animation(0, o->parm.setShowHideInfo->point.x(), o->parm.setShowHideInfo->point.y(), o->parm.setShowHideInfo->size.width(), o->parm.setShowHideInfo->size.height());
#endif
+ delete o->parm.setShowHideInfo;
break;
}
#ifdef USE_LIBVUGLES2
+ case gOpcode::sendShowItem:
+ {
+ gles_set_buffer((unsigned int *)surface.data);
+ gles_set_animation_listbox(o->parm.setShowItemInfo->dir, o->parm.setShowItemInfo->point.x(), o->parm.setShowItemInfo->point.y(), o->parm.setShowItemInfo->size.width(), o->parm.setShowItemInfo->size.height());
+ delete o->parm.setShowItemInfo;
+ break;
+ }
+ case gOpcode::setFlush:
+ {
+ gles_set_flush(o->parm.setFlush->enable);
+ delete o->parm.setFlush;
+ break;
+ }
case gOpcode::setView:
{
gles_viewport(o->parm.setViewInfo->size.width(), o->parm.setViewInfo->size.height(), fb->Stride());
+ delete o->parm.setViewInfo;
break;
}
#endif
}
#ifdef USE_LIBVUGLES2
+void gPainter::sendShowItem(long dir, ePoint point, eSize size)
+{
+ if ( m_dc->islocked() )
+ return;
+ gOpcode o;
+ o.opcode=gOpcode::sendShowItem;
+ o.dc = m_dc.grabRef();
+ o.parm.setShowItemInfo = new gOpcode::para::psetShowItemInfo;
+ o.parm.setShowItemInfo->dir = dir;
+ o.parm.setShowItemInfo->point = point;
+ o.parm.setShowItemInfo->size = size;
+ m_rc->submit(o);
+}
+
+void gPainter::setFlush(bool val)
+{
+ if ( m_dc->islocked() )
+ return;
+ gOpcode o;
+ o.opcode=gOpcode::setFlush;
+ o.dc = m_dc.grabRef();
+ o.parm.setFlush = new gOpcode::para::psetFlush;
+ o.parm.setFlush->enable = val;
+ m_rc->submit(o);
+}
+
void gPainter::setView(eSize size)
{
if ( m_dc->islocked() )
case gOpcode::sendHide:
break;
#ifdef USE_LIBVUGLES2
+ case gOpcode::sendShowItem:
+ break;
+ case gOpcode::setFlush:
+ break;
case gOpcode::setView:
break;
#endif
sendShow,
sendHide,
#ifdef USE_LIBVUGLES2
+ sendShowItem,
+ setFlush,
setView,
#endif
} opcode;
ePoint point;
eSize size;
} *setShowHideInfo;
+
#ifdef USE_LIBVUGLES2
+ struct psetShowItemInfo
+ {
+ long dir;
+ ePoint point;
+ eSize size;
+ } *setShowItemInfo;
+
+ struct psetFlush
+ {
+ bool enable;
+ } *setFlush;
+
struct psetViewInfo
{
eSize size;
void sendShow(ePoint point, eSize size);
void sendHide(ePoint point, eSize size);
#ifdef USE_LIBVUGLES2
+ void sendShowItem(long dir, ePoint point, eSize size);
+ void setFlush(bool val);
void setView(eSize size);
#endif
};
#include <lib/gui/elistboxcontent.h>
#include <lib/gui/eslider.h>
#include <lib/actions/action.h>
+#ifdef USE_LIBVUGLES2
+#include "vuplus_gles.h"
+#endif
eListbox::eListbox(eWidget *parent) :
eWidget(parent), m_scrollbar_mode(showNever), m_prev_scrollbar_page(-1),
int oldtop = m_top;
int oldsel = m_selected;
/* first, move cursor */
+#ifdef USE_LIBVUGLES2
+ m_dir = dir;
+#endif
switch (dir)
{
case moveUp:
if (!entry_clip_rect.empty())
m_content->paint(painter, *style, ePoint(0, y), m_selected == m_content->cursorGet() && m_content->size() && m_selection_enabled);
+#ifdef USE_LIBVUGLES2
+ if (m_selected == m_content->cursorGet() && m_content->size() && m_selection_enabled) {
+ ePoint pos = getAbsolutePosition();
+ painter.sendShowItem(m_dir, ePoint(pos.x(), pos.y() + y), eSize(m_scrollbar && m_scrollbar->isVisible() ? size().width() - m_scrollbar->size().width() : size().width(), m_itemheight));
+ gles_set_animation_listbox_current(pos.x(), pos.y() + y, m_scrollbar && m_scrollbar->isVisible() ? size().width() - m_scrollbar->size().width() : size().width(), m_itemheight);
+ m_dir = justCheck;
+ }
+#endif
/* (we could clip with entry_clip_rect, but
this shouldn't change the behavior of any
ePtr<iListboxContent> m_content;
eSlider *m_scrollbar;
eListboxStyle m_style;
+#ifdef USE_LIBVUGLES2
+ long m_dir;
+#endif
#endif
};
from Components.ConfigList import ConfigListScreen
from Components.MenuList import MenuList
from Components.Sources.StaticText import StaticText
-from Components.config import config, ConfigNumber, ConfigSelectionNumber, getConfigListEntry
+from Components.config import config, ConfigNumber, ConfigSelection, ConfigSelectionNumber, getConfigListEntry
from Plugins.Plugin import PluginDescriptor
-from enigma import setAnimation_current, setAnimation_speed
+from enigma import setAnimation_current, setAnimation_speed, setAnimation_current_listbox
# default = slide to left
g_default = {
- "current": 6,
- "speed" : 20,
+ "current": 6,
+ "speed" : 20,
+ "listbox": "2",
}
g_max_speed = 30
config.misc.window_animation_default = ConfigNumber(default=g_default["current"])
config.misc.window_animation_speed = ConfigSelectionNumber(1, g_max_speed, 1, default=g_default["speed"])
+config.misc.listbox_animation_default = ConfigSelection(default = g_default["listbox"], choices = [ ("0", _("Disable")), ("1", _("Enable")), ("2", _("Same behavior as current animation")) ])
class AnimationSetupConfig(ConfigListScreen, Screen):
skin= """
def keyGreen(self):
config.misc.window_animation_speed.save()
- setAnimation_speed(int(config.misc.window_animation_speed.value))
+ setAnimation_speed(int(config.misc.window_animation_speed.value))
+ config.misc.listbox_animation_default.save()
+ setAnimation_current_listbox(int(config.misc.listbox_animation_default.value))
self.close()
def keyRed(self):
config.misc.window_animation_speed.cancel()
+ config.misc.listbox_animation_default.cancel()
self.close()
def keyYellow(self):
- global g_default
- config.misc.window_animation_speed.value = g_default["speed"]
+ global g_default
+
+ config.misc.window_animation_speed.value = g_default["speed"]
+ config.misc.listbox_animation_default.value = g_default["listbox"]
self.makeConfigList()
def keyLeft(self):
entrySpeed = getConfigListEntry(_("Animation Speed"), config.misc.window_animation_speed)
self.entrylist.append(entrySpeed)
+ entryMoveSelection = getConfigListEntry(_("Enable Focus Animation"), config.misc.listbox_animation_default)
+ self.entrylist.append(entryMoveSelection)
+
self["config"].list = self.entrylist
self["config"].l.setList(self.entrylist)
<widget source="key_blue" render="Label" position="420,0" zPosition="2" size="140,40" font="Regular;20" halign="center" valign="center" foregroundColor="#ffffff" backgroundColor="#18188b" transparent="1" />
<widget name="list" position="10,60" size="560,364" scrollbarMode="showOnDemand" />
- <widget source="introduction" render="Label" position="0,370" size="560,40" zPosition="10" font="Regular;20" valign="center" backgroundColor="#25062748" transparent="1" />
+ <widget source="introduction" render="Label" position="0,370" size="560,40" zPosition="10" font="Regular;20" valign="center" backgroundColor="#25062748" transparent="1" />
</screen>"""
def __init__(self, session):
config.misc.window_animation_default.value = key
config.misc.window_animation_default.save()
setAnimation_current(key)
+ setAnimation_current_listbox(int(config.misc.listbox_animation_default.value))
self.close()
- def keyclose(self):
+ def keyclose(self):
setAnimation_current(config.misc.window_animation_default.value)
- setAnimation_speed(int(config.misc.window_animation_speed.value))
+ setAnimation_speed(int(config.misc.window_animation_speed.value))
+ setAnimation_current_listbox(int(config.misc.listbox_animation_default.value))
self.close()
def config(self):
- self.session.open(AnimationSetupConfig)
+ self.session.open(AnimationSetupConfig)
def preview(self):
current = self["list"].getCurrent()
def sessionAnimationSetup(session, reason, **kwargs):
setAnimation_current(config.misc.window_animation_default.value)
setAnimation_speed(int(config.misc.window_animation_speed.value))
+ setAnimation_current_listbox(int(config.misc.listbox_animation_default.value))
global g_orig_show, g_orig_doClose
if g_orig_show is None:
extern void dump_malloc_stats(void);
extern void setAnimation_current(int a);
extern void setAnimation_speed(int speed);
+extern void setAnimation_current_listbox(int a);
%}
extern void addFont(const char *filename, const char *alias, int scale_factor, int is_replacement);
extern void dump_malloc_stats(void);
extern void setAnimation_current(int a);
extern void setAnimation_speed(int speed);
+extern void setAnimation_current_listbox(int a);
{
if (service_info)
service_info->getName(*m_cursor, text);
+#ifdef USE_LIBVUGLES2
+ painter.setFlush(text == "<n/a>");
+#endif
break;
}
case celServiceInfo:
{
gles_set_animation_speed(speed);
}
+
+void setAnimation_current_listbox(int a)
+{
+ gles_set_animation_listbox_func(a);
+}
#else
void setAnimation_current(int a) {}
void setAnimation_speed(int speed) {}
+void setAnimation_current_listbox(int a) {}
#endif