Example #1
0
	def __init__(self, app, editor):
		AEComponent.__init__(self, app, editor)
		TimerManager.__init__(self)
		self._recursing = False
		self.relative_area = False
		self.osd_area_instance = None
		self.parser = GuiActionParser()
Example #2
0
	def __init__(self, cls="osd-menu"):
		OSDWindow.__init__(self, cls)
		TimerManager.__init__(self)
		self.daemon = None
		self.config = None
		self.xdisplay = X.Display(hash(GdkX11.x11_get_default_xdisplay()))	# Magic
		
		cursor = os.path.join(get_share_path(), "images", 'menu-cursor.svg')
		self.cursor = Gtk.Image.new_from_file(cursor)
		self.cursor.set_name("osd-menu-cursor")
		
		self.parent = self.create_parent()
		self.f = Gtk.Fixed()
		self.f.add(self.parent)
		self.add(self.f)
		
		self._submenu = None
		self._is_submenu = False
		self._direction = 0		# Movement direction
		self._selected = None
		self._menuid = None
		self._use_cursor = False
		self._eh_ids = []
		self._control_with = STICK
		self._confirm_with = 'A'
		self._cancel_with = 'B'
Example #3
0
    def __init__(self):
        OSDWindow.__init__(self, "osd-menu")
        TimerManager.__init__(self)
        self.daemon = None
        self.config = None
        self.xdisplay = X.Display(hash(
            GdkX11.x11_get_default_xdisplay()))  # Magic

        cursor = os.path.join(get_share_path(), "images", 'menu-cursor.svg')
        self.cursor = Gtk.Image.new_from_file(cursor)
        self.cursor.set_name("osd-menu-cursor")

        self.parent = self.create_parent()
        self.f = Gtk.Fixed()
        self.f.add(self.parent)
        self.add(self.f)

        self._submenu = None
        self._is_submenu = False
        self._direction = 0  # Movement direction
        self._selected = None
        self._menuid = None
        self._use_cursor = False
        self._eh_ids = []
        self._control_with = STICK
        self._confirm_with = 'A'
        self._cancel_with = 'B'
Example #4
0
 def __init__(self, app, editor):
     AEComponent.__init__(self, app, editor)
     TimerManager.__init__(self)
     self._recursing = False
     self.relative_area = False
     self.osd_area_instance = None
     self.parser = GuiActionParser()
Example #5
0
	def __init__(self, app, editor):
		AEComponent.__init__(self, app, editor)
		TimerManager.__init__(self)
		self._recursing = False
		self.relative_area = False
		self.osd_area_instance = None
		self.on_wayland = False
		self.circular = MouseAction(Rels.REL_WHEEL)
		self.parser = GuiActionParser()
Example #6
0
	def __init__(self, app, editor):
		AEComponent.__init__(self, app, editor)
		TimerManager.__init__(self)
		self._recursing = False
		self.relative_area = False
		self.osd_area_instance = None
		self.on_wayland = False
		self.circular_axis = MouseAction(Rels.REL_WHEEL)
		self.circular_buttons = [ None, None ]
		self.button = None
		self.parser = GuiActionParser()
Example #7
0
    def __init__(self):
        OSDWindow.__init__(self, "osd-keyboard")
        TimerManager.__init__(self)
        self.daemon = None
        self.mapper = None
        self.keymap = Gdk.Keymap.get_default()
        self.keymap.connect('state-changed', self.on_state_changed)
        self.profile = Profile(TalkingActionParser())

        kbimage = os.path.join(get_config_path(), 'keyboard.svg')
        if not os.path.exists(kbimage):
            # Prefer image in ~/.config/scc, but load default one as fallback
            kbimage = os.path.join(get_share_path(), "images", 'keyboard.svg')
        self.background = SVGWidget(self, kbimage)

        self.limits = {}
        self.limits[LEFT] = self.background.get_rect_area(
            self.background.get_element("LIMIT_LEFT"))
        self.limits[RIGHT] = self.background.get_rect_area(
            self.background.get_element("LIMIT_RIGHT"))

        cursor = os.path.join(get_share_path(), "images", 'menu-cursor.svg')
        self.cursors = {}
        self.cursors[LEFT] = Gtk.Image.new_from_file(cursor)
        self.cursors[LEFT].set_name("osd-keyboard-cursor")
        self.cursors[RIGHT] = Gtk.Image.new_from_file(cursor)
        self.cursors[RIGHT].set_name("osd-keyboard-cursor")

        self._eh_ids = []
        self._stick = 0, 0
        self._hovers = {self.cursors[LEFT]: None, self.cursors[RIGHT]: None}
        self._pressed = {self.cursors[LEFT]: None, self.cursors[RIGHT]: None}

        self.c = Gtk.Box()
        self.c.set_name("osd-keyboard-container")

        self.f = Gtk.Fixed()
        self.f.add(self.background)
        self.f.add(self.cursors[LEFT])
        self.f.add(self.cursors[RIGHT])
        self.c.add(self.f)
        self.add(self.c)

        self.timer('labels', 0.1, self.update_labels)
Example #8
0
	def __init__(self):
		OSDWindow.__init__(self, "osd-keyboard")
		TimerManager.__init__(self)
		self.daemon = None
		self.keyboard = None
		self.keymap = Gdk.Keymap.get_default()
		self.keymap.connect('state-changed', self.on_state_changed)
		
		
		kbimage = os.path.join(get_config_path(), 'keyboard.svg')
		if not os.path.exists(kbimage):
			# Prefer image in ~/.config/scc, but load default one as fallback
			kbimage = os.path.join(get_share_path(), "images", 'keyboard.svg')
		self.background = SVGWidget(self, kbimage)
		
		self.limit_left  = self.background.get_rect_area(self.background.get_element("LIMIT_LEFT"))
		self.limit_right = self.background.get_rect_area(self.background.get_element("LIMIT_RIGHT"))
		
		cursor = os.path.join(get_share_path(), "images", 'menu-cursor.svg')
		self.cursor_left = Gtk.Image.new_from_file(cursor)
		self.cursor_left.set_name("osd-keyboard-cursor")
		self.cursor_right = Gtk.Image.new_from_file(cursor)
		self.cursor_right.set_name("osd-keyboard-cursor")
		
		self._eh_ids = []
		self._stick = 0, 0
		self._hovers = { self.cursor_left : None, self.cursor_right : None }
		self._pressed = { self.cursor_left : None, self.cursor_right : None }
		
		self.c = Gtk.Box()
		self.c.set_name("osd-keyboard-container")
		
		self.f = Gtk.Fixed()
		self.f.add(self.background)
		self.f.add(self.cursor_left)
		self.f.add(self.cursor_right)
		self.c.add(self.f)
		self.add(self.c)
		
		self.set_cursor_position(0, 0, self.cursor_left, self.limit_left)
		self.set_cursor_position(0, 0, self.cursor_right, self.limit_right)
		
		self.timer('labels', 0.1, self.update_labels)
Example #9
0
    def __init__(self, config=None):
        self.kbimage = os.path.join(get_config_path(), 'keyboard.svg')
        if not os.path.exists(self.kbimage):
            # Prefer image in ~/.config/scc, but load default one as fallback
            self.kbimage = os.path.join(get_share_path(), "images",
                                        'keyboard.svg')

        TimerManager.__init__(self)
        OSDWindow.__init__(self, "osd-keyboard")
        self.daemon = None
        self.mapper = None
        self.keymap = Gdk.Keymap.get_default()
        self.keymap.connect('state-changed', self.on_keymap_state_changed)
        Action.register_all(sys.modules['scc.osd.osk_actions'], prefix="OSK")
        self.profile = Profile(TalkingActionParser())
        self.config = config or Config()
        self.dpy = X.Display(hash(GdkX11.x11_get_default_xdisplay()))
        self.group = None
        self.limits = {}
        self.background = None

        cursor = os.path.join(get_share_path(), "images", 'menu-cursor.svg')
        self.cursors = {}
        self.cursors[LEFT] = Gtk.Image.new_from_file(cursor)
        self.cursors[LEFT].set_name("osd-keyboard-cursor")
        self.cursors[RIGHT] = Gtk.Image.new_from_file(cursor)
        self.cursors[RIGHT].set_name("osd-keyboard-cursor")
        self.cursors[CPAD] = Gtk.Image.new_from_file(cursor)
        self.cursors[CPAD].set_name("osd-keyboard-cursor")

        self._eh_ids = []
        self._controller = None
        self._stick = 0, 0
        self._hovers = {self.cursors[LEFT]: None, self.cursors[RIGHT]: None}
        self._pressed = {self.cursors[LEFT]: None, self.cursors[RIGHT]: None}
        self._pressed_areas = {}

        self.c = Gtk.Box()
        self.c.set_name("osd-keyboard-container")

        self.f = Gtk.Fixed()
Example #10
0
	def __init__(self, config=None):
		self.kbimage = os.path.join(get_config_path(), 'keyboard.svg')
		if not os.path.exists(self.kbimage):
			# Prefer image in ~/.config/scc, but load default one as fallback
			self.kbimage = os.path.join(get_share_path(), "images", 'keyboard.svg')
		
		TimerManager.__init__(self)
		OSDWindow.__init__(self, "osd-keyboard")
		self.daemon = None
		self.mapper = None
		self.keymap = Gdk.Keymap.get_default()
		self.keymap.connect('state-changed', self.on_keymap_state_changed)
		Action.register_all(sys.modules['scc.osd.osk_actions'], prefix="OSK")
		self.profile = Profile(TalkingActionParser())
		self.config = config or Config()
		self.dpy = X.Display(hash(GdkX11.x11_get_default_xdisplay()))
		self.group = None
		self.limits = {}
		self.background = None
		
		cursor = os.path.join(get_share_path(), "images", 'menu-cursor.svg')
		self.cursors = {}
		self.cursors[LEFT] = Gtk.Image.new_from_file(cursor)
		self.cursors[LEFT].set_name("osd-keyboard-cursor")
		self.cursors[RIGHT] = Gtk.Image.new_from_file(cursor)
		self.cursors[RIGHT].set_name("osd-keyboard-cursor")
		self.cursors[CPAD] = Gtk.Image.new_from_file(cursor)
		self.cursors[CPAD].set_name("osd-keyboard-cursor")
		
		self._eh_ids = []
		self._controller = None
		self._stick = 0, 0
		self._hovers = { self.cursors[LEFT]: None, self.cursors[RIGHT]: None }
		self._pressed = { self.cursors[LEFT]: None, self.cursors[RIGHT]: None }
		self._pressed_areas = {}
		
		self.c = Gtk.Box()
		self.c.set_name("osd-keyboard-container")
		
		self.f = Gtk.Fixed()
Example #11
0
	def __init__(self):
		OSDWindow.__init__(self, "osd-menu")
		TimerManager.__init__(self)
		self.daemon = None
		
		cursor = os.path.join(get_share_path(), "images", 'menu-cursor.svg')
		self.cursor = Gtk.Image.new_from_file(cursor)
		self.cursor.set_name("osd-menu-cursor")
		
		self.parent = self.create_parent()
		self.f = Gtk.Fixed()
		self.f.add(self.parent)
		self.add(self.f)
		
		self._direction = 0		# Movement direction
		self._selected = None
		self._menuid = None
		self._use_cursor = False
		self._eh_ids = []
		self._control_with = STICK
		self._confirm_with = 'A'
		self._cancel_with = 'B'
 def __init__(self):
     OSDWindow.__init__(self, "osd-area")
     TimerManager.__init__(self)
     self.size = (100, 100)
     self.add(Gtk.Fixed())
Example #13
0
 def __init__(self):
     GObject.GObject.__init__(self)
     TimerManager.__init__(self)
     self._direction = 0
Example #14
0
	def __init__(self):
		OSDWindow.__init__(self, "osd-area")
		TimerManager.__init__(self)
		self.size = (100, 100)
		self.add(Gtk.Fixed())
Example #15
0
	def __init__(self):
		GObject.GObject.__init__(self)
		TimerManager.__init__(self)
		self._d = [ 0, 0 ]
Example #16
0
	def __init__(self):
		GObject.GObject.__init__(self)
		TimerManager.__init__(self)
		self._direction = 0