mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-02 18:31:12 +02:00
Merge branch 'master' of https://github.com/tuxbox-neutrino/gui-neutrino into ni/tuxbox
Origin commit data
------------------
Commit: bd9aa1b199
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-12-02 (Fri, 02 Dec 2016)
This commit is contained in:
@@ -297,6 +297,7 @@ void CComponentsWindow::initBody()
|
||||
|
||||
ccw_body->setDimensionsAll(x_body, h_header, w_body, h_body);
|
||||
ccw_body->doPaintBg(true);
|
||||
ccw_body->setColorBody(col_body);
|
||||
|
||||
//handle corner behavior
|
||||
if (!ccw_show_header)
|
||||
|
@@ -4,4 +4,4 @@
|
||||
* to luainstance.h changes
|
||||
*/
|
||||
#define LUA_API_VERSION_MAJOR 1
|
||||
#define LUA_API_VERSION_MINOR 65
|
||||
#define LUA_API_VERSION_MINOR 68
|
||||
|
@@ -54,14 +54,16 @@ CLuaCCText *CLuaInstCCText::CCTextCheck(lua_State *L, int n)
|
||||
void CLuaInstCCText::CCTextRegister(lua_State *L)
|
||||
{
|
||||
luaL_Reg meth[] = {
|
||||
{ "new", CLuaInstCCText::CCTextNew },
|
||||
{ "paint", CLuaInstCCText::CCTextPaint },
|
||||
{ "hide", CLuaInstCCText::CCTextHide },
|
||||
{ "setText", CLuaInstCCText::CCTextSetText },
|
||||
{ "scroll", CLuaInstCCText::CCTextScroll },
|
||||
{ "setCenterPos", CLuaInstCCText::CCTextSetCenterPos },
|
||||
{ "enableUTF8", CLuaInstCCText::CCTextEnableUTF8 },
|
||||
{ "__gc", CLuaInstCCText::CCTextDelete },
|
||||
{ "new", CLuaInstCCText::CCTextNew },
|
||||
{ "paint", CLuaInstCCText::CCTextPaint },
|
||||
{ "hide", CLuaInstCCText::CCTextHide },
|
||||
{ "setText", CLuaInstCCText::CCTextSetText },
|
||||
{ "getLines", CLuaInstCCText::CCTextGetLines },
|
||||
{ "scroll", CLuaInstCCText::CCTextScroll },
|
||||
{ "setCenterPos", CLuaInstCCText::CCTextSetCenterPos },
|
||||
{ "enableUTF8", CLuaInstCCText::CCTextEnableUTF8 },
|
||||
{ "setDimensionsAll", CLuaInstCCText::CCTextSetDimensionsAll },
|
||||
{ "__gc", CLuaInstCCText::CCTextDelete },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
@@ -214,6 +216,26 @@ int CLuaInstCCText::CCTextSetText(lua_State *L)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int CLuaInstCCText::CCTextGetLines(lua_State *L)
|
||||
{
|
||||
CLuaCCText *D = CCTextCheck(L, 1);
|
||||
if (!D) return 0;
|
||||
|
||||
lua_Integer lines = 0;
|
||||
if (lua_gettop(L) == 2) {
|
||||
const char* Text = luaL_checkstring(L, 2);
|
||||
lines = (lua_Integer)CTextBox::getLines(Text);
|
||||
}
|
||||
else {
|
||||
CTextBox* ctb = D->ct->getCTextBoxObject();
|
||||
if (ctb)
|
||||
lines = (lua_Integer)ctb->getLines();
|
||||
}
|
||||
|
||||
lua_pushinteger(L, lines);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int CLuaInstCCText::CCTextScroll(lua_State *L)
|
||||
{
|
||||
lua_assert(lua_istable(L,1));
|
||||
@@ -273,6 +295,28 @@ int CLuaInstCCText::CCTextEnableUTF8(lua_State *L)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int CLuaInstCCText::CCTextSetDimensionsAll(lua_State *L)
|
||||
{
|
||||
CLuaCCText *D = CCTextCheck(L, 1);
|
||||
if (!D) return 0;
|
||||
lua_Integer x = luaL_checkint(L, 2);
|
||||
lua_Integer y = luaL_checkint(L, 3);
|
||||
lua_Integer w = luaL_checkint(L, 4);
|
||||
lua_Integer h = luaL_checkint(L, 5);
|
||||
if(x>-1 && y > -1 && w > 1 && h > 1){
|
||||
if (h > (lua_Integer)CFrameBuffer::getInstance()->getScreenHeight())
|
||||
h = (lua_Integer)CFrameBuffer::getInstance()->getScreenHeight();
|
||||
if (w > (lua_Integer)CFrameBuffer::getInstance()->getScreenWidth())
|
||||
w = (lua_Integer)CFrameBuffer::getInstance()->getScreenWidth();
|
||||
if(x > w)
|
||||
x = 0;
|
||||
if(y > h)
|
||||
y = 0;
|
||||
D->ct->setDimensionsAll(x,y,w,h);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int CLuaInstCCText::CCTextDelete(lua_State *L)
|
||||
{
|
||||
LUA_DEBUG("CLuaInstCCText::%s %d\n", __func__, lua_gettop(L));
|
||||
|
@@ -47,9 +47,11 @@ class CLuaInstCCText
|
||||
static int CCTextPaint(lua_State *L);
|
||||
static int CCTextHide(lua_State *L);
|
||||
static int CCTextSetText(lua_State *L);
|
||||
static int CCTextGetLines(lua_State *L);
|
||||
static int CCTextScroll(lua_State *L);
|
||||
static int CCTextSetCenterPos(lua_State *L);
|
||||
static int CCTextEnableUTF8(lua_State *L);
|
||||
static int CCTextSetDimensionsAll(lua_State *L);
|
||||
static int CCTextDelete(lua_State *L);
|
||||
};
|
||||
|
||||
|
@@ -1560,10 +1560,35 @@ void CMoviePlayerGui::PlayFileLoop(void)
|
||||
SetPosition(1000 * (hh * 3600 + mm * 60 + ss), true);
|
||||
|
||||
} else if (msg == CRCInput::RC_help || msg == CRCInput::RC_info) {
|
||||
if (fromInfoviewer)
|
||||
{
|
||||
g_EpgData->show_mp(p_movie_info,GetPosition(),GetDuration());
|
||||
if (fromInfoviewer) {
|
||||
CTimeOSD::mode m_mode = FileTime.getMode();
|
||||
bool restore = FileTime.IsVisible();
|
||||
if (restore)
|
||||
FileTime.kill();
|
||||
CInfoClock::getInstance()->enableInfoClock(false);
|
||||
#ifdef ENABLE_LUA
|
||||
if (isLuaPlay && haveLuaInfoFunc) {
|
||||
int xres = 0, yres = 0, aspectRatio = 0, framerate = -1;
|
||||
if (!videoDecoder->getBlank()) {
|
||||
videoDecoder->getPictureInfo(xres, yres, framerate);
|
||||
if (yres == 1088)
|
||||
yres = 1080;
|
||||
aspectRatio = videoDecoder->getAspectRatio();
|
||||
}
|
||||
CLuaInstVideo::getInstance()->execLuaInfoFunc(luaState, xres, yres, aspectRatio, framerate);
|
||||
}
|
||||
else {
|
||||
#endif
|
||||
g_EpgData->show_mp(p_movie_info,GetPosition(),GetDuration());
|
||||
#ifdef ENABLE_LUA
|
||||
}
|
||||
#endif
|
||||
fromInfoviewer = false;
|
||||
CInfoClock::getInstance()->enableInfoClock(true);
|
||||
if (restore) {
|
||||
FileTime.setMode(m_mode);
|
||||
FileTime.update(position, duration);
|
||||
}
|
||||
}
|
||||
else
|
||||
callInfoViewer();
|
||||
@@ -2175,7 +2200,7 @@ void CMoviePlayerGui::handleMovieBrowser(neutrino_msg_t msg, int /*position*/)
|
||||
cMovieInfo.saveMovieInfo(*p_movie_info); /* save immediately in xml file */
|
||||
}
|
||||
}
|
||||
} else if (msg == NeutrinoMessages::SHOW_EPG && (p_movie_info || (isLuaPlay && haveLuaInfoFunc))) {
|
||||
} else if (msg == NeutrinoMessages::SHOW_EPG && p_movie_info) {
|
||||
CTimeOSD::mode m_mode = FileTime.getMode();
|
||||
bool restore = FileTime.IsVisible();
|
||||
if (restore)
|
||||
@@ -2183,20 +2208,7 @@ void CMoviePlayerGui::handleMovieBrowser(neutrino_msg_t msg, int /*position*/)
|
||||
CInfoClock::getInstance()->enableInfoClock(false);
|
||||
InfoIcons->enableInfoIcons(false); //NI InfoIcons
|
||||
|
||||
if (isLuaPlay && haveLuaInfoFunc) {
|
||||
int xres = 0, yres = 0, aspectRatio = 0, framerate = -1;
|
||||
if (!videoDecoder->getBlank()) {
|
||||
videoDecoder->getPictureInfo(xres, yres, framerate);
|
||||
if (yres == 1088)
|
||||
yres = 1080;
|
||||
aspectRatio = videoDecoder->getAspectRatio();
|
||||
}
|
||||
#ifdef ENABLE_LUA
|
||||
CLuaInstVideo::getInstance()->execLuaInfoFunc(luaState, xres, yres, aspectRatio, framerate);
|
||||
#endif
|
||||
}
|
||||
else if (p_movie_info)
|
||||
g_EpgData->show_mp(p_movie_info, position, duration);
|
||||
g_EpgData->show_mp(p_movie_info, position, duration);
|
||||
|
||||
CInfoClock::getInstance()->enableInfoClock(true);
|
||||
InfoIcons->enableInfoIcons(true); //NI InfoIcons
|
||||
|
Reference in New Issue
Block a user