move/resize PiP window (requires new drivers) (and is not yet working properly)
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Thu, 4 May 2006 23:34:47 +0000 (23:34 +0000)
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Thu, 4 May 2006 23:34:47 +0000 (23:34 +0000)
data/keymap.xml
data/skin_default.xml
lib/python/Screens/InfoBarGenerics.py
lib/python/Screens/Makefile.am
lib/python/Screens/PictureInPicture.py
lib/python/Screens/__init__.py

index c313be3975ad77dda64416274a990dc3a2b90077..a81d5efdc42f234b9cc982d1c9e307037d507d14 100644 (file)
                <key id="KEY_OK" mapto="showMenu" flags="m" />
        </map>
        
+       <map context="PiPSetupActions">
+               <key id="KEY_UP" mapto="up" flags="mr" />
+               <key id="KEY_DOWN" mapto="down" flags="mr" />
+               <key id="KEY_LEFT" mapto="left" flags="mr" />
+               <key id="KEY_RIGHT" mapto="right" flags="mr" />
+               <key id="KEY_EXIT" mapto="cancel" flags="m" />
+               <key id="KEY_OK" mapto="ok" flags="m" />                
+               <key id="KEY_CHANNELUP" mapto="size+" flags="mr" />
+               <key id="KEY_CHANNELDOWN" mapto="size-" flags="mr" />
+       </map>
+       
        <map context="MediaPlayerSeekActions">
                <key id="KEY_YELLOW" mapto="pause" flags="m" />
                <key id="KEY_GREEN" mapto="play" flags="m" />
index cddc18f49d38cb447d8a3e4efcb4d2c30839f344..3ed48eab7e763d94038ffdbe438ce72d7cf7fd39 100644 (file)
        <screen name="PictureInPicture" position="500,100" size="180,140" zPosition="-1" flags="wfNoBorder" >
                <widget name="video" position="0,0" size="160,120" />
        </screen>
+       <screen name="PiPSetup" backgroundColor="transparent" position="70,400" size="600,150" title="PiPSetup" flags="wfNoBorder">
+               <widget name="text" position="0,0" size="600,150" font="Regular;23" />
+       </screen>
        <screen name="MovieSelection" position="90,98" size="560,415" title="Select a movie">
                <widget name="waitingtext" position="0,0" size="500,335" zPosition="2" font="Regular;22" />
                <widget name="list" position="0,0" size="560,375" zPosition="1" scrollbarMode="showOnDemand" />
index c18c698f4ad4f9a4f3449cf78a5bbe90328f5946..7c335f1df886c847dc1f2af2ef088639d01421e2 100644 (file)
@@ -1005,6 +1005,8 @@ class InfoBarTimeshift:
                self.timeshift_enabled = False
                self.__seekableStatusChanged()
 
+from Screens.PiPSetup import PiPSetup
+
 class InfoBarExtensions:
        def __init__(self):
                self.pipshown = False
@@ -1020,6 +1022,7 @@ class InfoBarExtensions:
                        list.append((_("Activate Picture in Picture"), "pipon"))
                elif self.pipshown == True:
                        list.append((_("Disable Picture in Picture"), "pipoff"))
+                       list.append((_("Move Picture in Picture"), "movepip"))
                self.session.openWithCallback(self.extensionCallback, ChoiceBox, title=_("Please choose an extension..."), list = list)
 
        def extensionCallback(self, answer):
@@ -1037,12 +1040,14 @@ class InfoBarExtensions:
                                else:
                                        self.pipservice = None
                                        del self.pip
-       
+                               self.session.nav.playService(newservice)
                        elif answer[1] == "pipoff":
                                #self.pip.hide()
                                self.pipservice = None
                                del self.pip
                                self.pipshown = False
+                       elif answer[1] == "movepip":
+                               self.session.open(PiPSetup, pip = self.pip)
 
 from RecordTimer import parseEvent
 
index 06571d81095e3d7fa8abc12fade2aa0c6b3de3a9..b848b9769bfe4008d4387225d031df26f975003c 100644 (file)
@@ -7,7 +7,7 @@ install_PYTHON = \
        Satconfig.py ScanSetup.py NetworkSetup.py Ci.py TimerEntry.py Volume.py \
        EpgSelection.py EventView.py Mute.py Standby.py ServiceInfo.py \
        InfoBarGenerics.py HelpMenu.py Wizard.py __init__.py \
-       Dish.py LanguageSelection.py StartWizard.py \
+       Dish.py LanguageSelection.py StartWizard.py PiPSetup.py \
        TutorialWizard.py PluginBrowser.py MinuteInput.py Scart.py PVRState.py \
        Console.py InputBox.py ChoiceBox.py SimpleSummary.py ImageWizard.py \
        MediaPlayer.py TimerSelection.py PictureInPicture.py TimeDateInput.py
index 391c042fb2bc63f7eab4e82afcead475fcf9b608..8bf78cfbc1d435bb35304e4561b966d9cba48c5f 100644 (file)
@@ -1,4 +1,5 @@
 from Screens.Screen import Screen
+from enigma import ePoint, eSize
 
 from Components.VideoWindow import VideoWindow
 
@@ -7,3 +8,17 @@ class PictureInPicture(Screen):
                Screen.__init__(self, session)
                
                self["video"] = VideoWindow()
+
+       def move(self, x, y):
+               print "moving pip to", str(x) + ":" + str(y)
+               self.instance.move(ePoint(x, y))
+               
+       def resize(self, w, h):
+               print "resizing pip to", str(w) + "x" + str(h)
+               self.instance.resize(eSize(*(w, h)))
+               
+       def getPosition(self):
+               return ((self.instance.position().x(), self.instance.position().y()))
+               
+       def getSize(self):
+               return (self.instance.size().width(), self.instance.size().height())
\ No newline at end of file
index 30f39b1cd97c12a684476d6df64e4e42480d2b09..55830ea62a1fa1f4a9b55e29380d4f92bb78f4c0 100644 (file)
@@ -4,6 +4,6 @@ __all__ = ["ChannelSelection", "ClockDisplay", "ConfigMenu",
        "TimerEdit", "Setup", "HarddiskSetup", "FixedMenu",
        "Satconfig", "Scanconfig", "Ci.py", "Volume.py", "Mute.py",
        "EpgSelection", "EventView", "Standby", "ServiceInfo",
-       "InfoBarGenerics", "HelpMenu", "Wizard",
+       "InfoBarGenerics", "HelpMenu", "Wizard", "PiPSetup",
        "PVRState", "Console", "InputBox", "ChoiceBox", "SimpleSummary",
        "TimerSelection" ]