move/resize PiP window (requires new drivers) (and is not yet working properly)
[enigma2.git] / lib / python / Screens / PictureInPicture.py
1 from Screens.Screen import Screen
2 from enigma import ePoint, eSize
3
4 from Components.VideoWindow import VideoWindow
5
6 class PictureInPicture(Screen):
7         def __init__(self, session):
8                 Screen.__init__(self, session)
9                 
10                 self["video"] = VideoWindow()
11
12         def move(self, x, y):
13                 print "moving pip to", str(x) + ":" + str(y)
14                 self.instance.move(ePoint(x, y))
15                 
16         def resize(self, w, h):
17                 print "resizing pip to", str(w) + "x" + str(h)
18                 self.instance.resize(eSize(*(w, h)))
19                 
20         def getPosition(self):
21                 return ((self.instance.position().x(), self.instance.position().y()))
22                 
23         def getSize(self):
24                 return (self.instance.size().width(), self.instance.size().height())