aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Screens/PictureInPicture.py
blob: 403ecd3d446a3f0cab9ef826d78b528f40a34002 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from Screens.Screen import Screen
from enigma import ePoint, eSize

from Components.VideoWindow import VideoWindow

class PictureInPicture(Screen):
	def __init__(self, session):
		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)))
		self["video"].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())