def getPlayPauseButton(self):
     oDeb = self.IAObject
     count = oDeb.accChildCount
     i = 0
     while i < count:
         o = oDeb.accChild(i)
         i = i + 1
         role = o.accRole(0)
         if role == oleacc.ROLE_SYSTEM_PUSHBUTTON and (
                 getString(vlc_strings.ID_PlayButtonDescription)
                 in o.accDescription(0) or getString(
                     vlc_strings.ID_PauseThePlaybackButtonDescription)
                 in o.accDescription(0)):
             return o
     return None
def getForegroundObject():
    hdMain = ctypes.windll.user32.GetForegroundWindow()
    if not getString(
            vlc_strings.ID_VLCAppTitle) in winUser.getWindowText(hdMain):
        hdMain = winUser.getWindow(winUser.getWindow(hdMain, 2), 2)
    o = getNVDAObjectFromEvent(hdMain, -4, 0)
    return o
 def getMuteAndLevel(self):
     o = self.volumeIAObject
     label = getString(vlc_strings.ID_UnMuteImageDescription)
     if o is None or len(label) == 0:
         return (None, None)
     muteState = False
     if label in o.accChild(1).accDescription(0):
         muteState = True
     level = o.accChild(2).accValue(0)
     return (muteState, level)
Beispiel #4
0
		def isInsideMediaInfo(oIA, obj, clsList):
			try:
				name = oIA.accName(0)
				MediaInformationDialogTitle = vlc_strings.getString(
					vlc_strings.ID_MediaInformationDialogTitle)
				if name and MediaInformationDialogTitle in name:
					clsList.insert(0, VLCMediaInfos)
					return True
			except:  # noqa:E722
				pass
			return False
Beispiel #5
0
		def isInVlcMainWindow(oIA, obj, clsList):
			try:
				name = oIA.accName(0)
				if name and name == api.getDesktopObject().name:
					return False
				if oIA.accRole(0) == oleacc.ROLE_SYSTEM_WINDOW:
					VLCAppTitle = vlc_strings.getString(vlc_strings.ID_VLCAppTitle)
					if VLCAppTitle in name or name == "vlc":
						clsList.insert(0, InVLCViewWindow)
						return True
			except:  # noqa:E722
				pass
			return False
 def getLoopCheckButtonState(self):
     oDeb = self.IAObject
     count = oDeb.accChildCount
     i = 0
     while i <= count:
         o = oDeb.accChild(i)
         i = i + 1
         if o and o.accRole(
                 0) == oleacc.ROLE_SYSTEM_CHECKBUTTON and getString(
                     vlc_strings.ID_LoopCheckButtonDescription
                 ) in o.accDescription(0):
             return True if o.accState(
                 0) & oleacc.STATE_SYSTEM_CHECKED else False
     return False
 def isPlaying(self):
     try:
         oDeb = self.timesNVDAObject.next.IAccessibleObject
     except Exception:
         return False
     count = oDeb.accChildCount
     i = 0
     while i < count:
         o = oDeb.accChild(i)
         i = i + 1
         if o.accRole(0) == oleacc.ROLE_SYSTEM_PUSHBUTTON and getString(
                 vlc_strings.ID_PauseThePlaybackButtonDescription
         ) == o.accDescription(0):
             return True
     return False
Beispiel #8
0
	def isInside(self, obj):
		o = obj.IAccessibleObject
		while o:
			try:
				name = o.accName(0)
				MediaInformationDialogTitle = vlc_strings.getString(
					vlc_strings.ID_MediaInformationDialogTitle)
				if name and (MediaInformationDialogTitle in name):
					return True
			except:  # noqa:E722
				pass
			try:
				o = o.accParent
			except:  # noqa:E722
				o = None
		return False