示例#1
0
	def show(self):
		OSDWindow.show(self)

		from ctypes import byref

		pb = self.b.get_pixbuf()
		win = X.XID(self.get_window().get_xid())
		
		pixmap = X.create_pixmap(self.xdisplay, win,
			pb.get_width(), pb.get_height(), 1)
		width = pb.get_width()
		height = pb.get_height()
		self.f.move(self.cursor, int(width / 2), int(height / 2))
		
		gc = X.create_gc(self.xdisplay, pixmap, 0, None)
		X.set_foreground(self.xdisplay, gc, 0)
		X.fill_rectangle(self.xdisplay, pixmap, gc, 0, 0, pb.get_width(), pb.get_height())
		X.set_foreground(self.xdisplay, gc, 1)
		X.set_background(self.xdisplay, gc, 1)
		
		r = int(pb.get_width() * 0.985)
		x = (pb.get_width() - r) / 2
		
		X.fill_arc(self.xdisplay, pixmap, gc,
			x, x, r, r, 0, 360*64)
		
		X.flush_gc(self.xdisplay, gc)
		X.flush(self.xdisplay)
		
		X.shape_combine_mask(self.xdisplay, win, X.SHAPE_BOUNDING, 0, 0, pixmap, X.SHAPE_SET)
		
		X.flush(self.xdisplay)
示例#2
0
 def show(self, *a):
     OSDWindow.show(self, *a)
     self.profile.load(find_profile(".scc-osd.keyboard")).compress()
     self.mapper = SlaveMapper(self.profile, keyboard=b"SCC OSD Keyboard")
     self.mapper.set_special_actions_handler(self)
     self.set_cursor_position(0, 0, self.cursors[LEFT], self.limits[LEFT])
     self.set_cursor_position(0, 0, self.cursors[RIGHT], self.limits[RIGHT])
示例#3
0
    def show(self):
        self.main_area = Gtk.Fixed()
        self.background = SVGWidget(self,
                                    os.path.join(self.imagepath, self.IMAGE))
        self.lpadTest = Gtk.Image.new_from_file(
            os.path.join(self.imagepath, "inputdisplay-cursor.svg"))
        self.rpadTest = Gtk.Image.new_from_file(
            os.path.join(self.imagepath, "inputdisplay-cursor.svg"))
        self.stickTest = Gtk.Image.new_from_file(
            os.path.join(self.imagepath, "inputdisplay-cursor.svg"))

        self.main_area.set_property("margin-left", 10)
        self.main_area.set_property("margin-right", 10)
        self.main_area.set_property("margin-top", 10)
        self.main_area.set_property("margin-bottom", 10)

        self.main_area.put(self.background, 0, 0)
        self.main_area.put(self.lpadTest, 40, 40)
        self.main_area.put(self.rpadTest, 290, 90)
        self.main_area.put(self.stickTest, 150, 40)

        self.add(self.main_area)

        OSDWindow.show(self)
        self.lpadTest.hide()
        self.rpadTest.hide()
        self.stickTest.hide()
示例#4
0
	def show(self):
		OSDWindow.show(self)

		from ctypes import byref

		pb = self.b.get_pixbuf()
		win = X.XID(self.get_window().get_xid())
		
		pixmap = X.create_pixmap(self.xdisplay, win,
			pb.get_width(), pb.get_height(), 1)
		width = pb.get_width()
		height = pb.get_height()
		self.f.move(self.cursor, int(width / 2), int(height / 2))
		
		gc = X.create_gc(self.xdisplay, pixmap, 0, None)
		X.set_foreground(self.xdisplay, gc, 0)
		X.fill_rectangle(self.xdisplay, pixmap, gc, 0, 0, pb.get_width(), pb.get_height())
		X.set_foreground(self.xdisplay, gc, 1)
		X.set_background(self.xdisplay, gc, 1)
		
		r = int(pb.get_width() * 0.985)
		x = (pb.get_width() - r) / 2
		
		X.fill_arc(self.xdisplay, pixmap, gc,
			x, x, r, r, 0, 360*64)
		
		X.flush_gc(self.xdisplay, gc)
		X.flush(self.xdisplay)
		
		X.shape_combine_mask(self.xdisplay, win, X.SHAPE_BOUNDING, 0, 0, pixmap, X.SHAPE_SET)
		
		X.flush(self.xdisplay)
示例#5
0
	def show(self, *a):
		OSDWindow.show(self, *a)
		self.profile.load(find_profile(".scc-osd.keyboard")).compress()
		self.mapper = SlaveMapper(self.profile, keyboard=b"SCC OSD Keyboard")
		self.mapper.set_special_actions_handler(self)
		self.set_cursor_position(0, 0, self.cursors[LEFT], self.limits[LEFT])
		self.set_cursor_position(0, 0, self.cursors[RIGHT], self.limits[RIGHT])
示例#6
0
    def show(self):
        self.l = Gtk.Label()
        self.l.set_name("osd-label")
        self.l.set_label(self.text)

        self.add(self.l)

        OSDWindow.show(self)
        GLib.timeout_add_seconds(self.timeout, self.quit)
示例#7
0
	def show(self, *a):
		if self.background is None:
			self.realize()
			self.background = SVGWidget(self.args.image, init_hilighted=True)
			self.c.add(self.background)
			self.add(self.c)
		
		OSDWindow.show(self, *a)
		self.move(*self.compute_position())
示例#8
0
    def show(self, *a):
        if self.background is None:
            self.realize()
            self.background = SVGWidget(self.args.image, init_hilighted=True)
            self.c.add(self.background)
            self.add(self.c)

        OSDWindow.show(self, *a)
        self.move(*self.compute_position())
示例#9
0
	def show(self):
		self.l = Gtk.Label()
		self.l.set_name("osd-label")
		self.l.set_label(self.text)
		
		self.add(self.l)
		
		OSDWindow.show(self)
		GLib.timeout_add_seconds(self.timeout, self.quit)
示例#10
0
	def show(self):
		self.l = Gtk.Label()
		self.l.set_name("osd-label-%s" % (self.size, ))
		self.l.set_label(self.text)
		
		self.add(self.l)
		
		if self.size < 2:
			self.set_name("osd-message-1")
		OSDWindow.show(self)
		if self.timeout > 0:
			self._timeout_id = GLib.timeout_add_seconds(self.timeout, self.quit)
示例#11
0
	def show(self, *a):
		if self.background is None:
			self._create_background()
		OSDWindow.show(self, *a)
		self.load_profile()
		self.mapper = SlaveMapper(self.profile, None,
			keyboard=b"SCC OSD Keyboard", mouse=b"SCC OSD Mouse")
		self.mapper.set_special_actions_handler(self)
		self.set_cursor_position(0, 0, self.cursors[LEFT], self.limits[LEFT])
		self.set_cursor_position(0, 0, self.cursors[RIGHT], self.limits[RIGHT])
		self.set_cursor_position(0, 0, self.cursors[CPAD], self.limits[CPAD])
		self.timer('labels', 0.1, self.update_labels)
示例#12
0
    def show(self):
        self.l = Gtk.Label()
        self.l.set_name("osd-label-%s" % (self.size, ))
        self.l.set_label(self.text)

        self.add(self.l)

        if self.size < 2:
            self.set_name("osd-message-1")
        OSDWindow.show(self)
        if self.timeout > 0:
            self._timeout_id = GLib.timeout_add_seconds(
                self.timeout, self.quit)
示例#13
0
 def show(self, *a):
     if self.background is None:
         self._create_background()
     OSDWindow.show(self, *a)
     self.load_profile()
     self.mapper = SlaveMapper(self.profile,
                               None,
                               keyboard=b"SCC OSD Keyboard",
                               mouse=b"SCC OSD Mouse")
     self.mapper.set_special_actions_handler(self)
     self.set_cursor_position(0, 0, self.cursors[LEFT], self.limits[LEFT])
     self.set_cursor_position(0, 0, self.cursors[RIGHT], self.limits[RIGHT])
     self.set_cursor_position(0, 0, self.cursors[CPAD], self.limits[CPAD])
     self.timer('labels', 0.1, self.update_labels)
示例#14
0
	def show(self):
		self.main_area = Gtk.Fixed()
		self.background = SVGWidget(os.path.join(self.imagepath, self.IMAGE))
		self.lpadTest = Gtk.Image.new_from_file(os.path.join(self.imagepath, "inputdisplay-cursor.svg"))
		self.rpadTest = Gtk.Image.new_from_file(os.path.join(self.imagepath, "inputdisplay-cursor.svg"))
		self.stickTest = Gtk.Image.new_from_file(os.path.join(self.imagepath, "inputdisplay-cursor.svg"))
		
		self.main_area.set_property("margin-left", 10)
		self.main_area.set_property("margin-right", 10)
		self.main_area.set_property("margin-top", 10)
		self.main_area.set_property("margin-bottom", 10)
		
		self.main_area.put(self.background, 0, 0)
		self.main_area.put(self.lpadTest, 40, 40)
		self.main_area.put(self.rpadTest, 290, 90)
		self.main_area.put(self.stickTest, 150, 40)
		
		self.add(self.main_area)
		
		OSDWindow.show(self)
		self.lpadTest.hide()
		self.rpadTest.hide()
		self.stickTest.hide()
示例#15
0
	def show(self, *a):
		OSDWindow.show(self, *a)
示例#16
0
 def show(self):
     OSDWindow.show(self)
     self.realize()
     self.resize(*self.size)
     self.make_hole(self.BORDER_WIDTH)
示例#17
0
 def show(self, *a):
     if not self.select(0):
         self.next_item(1)
     OSDWindow.show(self, *a)
示例#18
0
	def show(self, *a):
		if not self.select(0):
			self.next_item(1)
		OSDWindow.show(self, *a)
示例#19
0
	def show(self, *a):
		if not self.select(0):
			self.next_item(1)
		OSDWindow.show(self, *a)
		for c in self.cursors:
			c.set_visible(False)
示例#20
0
	def show(self, *a):
		if not self.select(0):
			self.next_item(1)
		OSDWindow.show(self, *a)
		GLib.timeout_add(1, self._check_on_screen_position, True)
示例#21
0
 def show(self, *a):
     OSDWindow.show(self, *a)
示例#22
0
 def show(self, *a):
     if not self.select(0):
         self._direction = 1
         self.next_item()
         self._direction = 0
     OSDWindow.show(self, *a)
示例#23
0
 def show(self, *a):
     if not self.select(0):
         self.next_item(1)
     OSDWindow.show(self, *a)
     GLib.timeout_add(1, self._check_on_screen_position, True)
示例#24
0
	def show(self, *a):
		self.select(0)
		OSDWindow.show(self, *a)
示例#25
0
	def show(self, *a):
		if not self.select(0):
			self._direction = 1
			self.next_item()
			self._direction = 0
		OSDWindow.show(self, *a)
示例#26
0
	def show(self, *a):
		OSDWindow.show(self, *a)
		self.keyboard = uinputKeyboard(b"SCC OSD Keyboard")
示例#27
0
	def show(self, *a):
		if not self.select(0):
			self.next_item(1)
		OSDWindow.show(self, *a)
		for c in self.cursors:
			c.set_visible(False)
示例#28
0
	def show(self):
		OSDWindow.show(self)
		self.realize()
		self.resize(*self.size)
		self.make_hole(self.BORDER_WIDTH)