We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Winamp support: NVDA doesn't detect the status of shuffle and repeat modes
<!--
Please thoroughly read NVDA's wiki article on how to fill in this template, including how to provide the required files.
Issues may be closed if the required information is not present.
https://github.com/nvaccess/nvda/wiki/Github-issue-template-explanation-and-examples
-->

### Steps to reproduce:
1. Start winamp
2. Press r or s toggle shuffle or repeat
3. NVDA will say "off" every time you toggle those modes
### Actual behavior:
NVDA will say "off" every time you toggle those modes
##
### Expected behavior:
NVDA needs to state if setting is on or off.
### System configuration
#### NVDA installed/portable/running from source:
Installed
#### NVDA version:
2019.3.1
#### Windows version:
Windows10 latest

#### Name and version of other software in use when reproducing the issue:
Winamp 5.666 Build 3516
#### Other information about your system:

### Other questions
#### Does the issue still occur after restarting your computer?
Yes
#### Have you tried any other versions of NVDA? If so, please report their behaviors.
No
#### If addons are disabled, is your problem still occuring?
Yes
#### Did you try to run the COM registry fixing tool in NVDA menu / tools?
No

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `source/appModules/winamp.py`
Content:
```
1 #appModules/winamp.py
2 #A part of NonVisual Desktop Access (NVDA)
3 #Copyright (C) 2006-2012 NVDA Contributors
4 #This file is covered by the GNU General Public License.
5 #See the file COPYING for more details.
6 
7 from ctypes import *
8 from ctypes.wintypes import *
9 import winKernel
10 import winUser
11 from scriptHandler import isScriptWaiting
12 from NVDAObjects.IAccessible import IAccessible 
13 import appModuleHandler
14 import speech
15 import locale
16 import controlTypes
17 import api
18 import watchdog
19 import braille
20 import ui
21 
22 # message used to sent many messages to winamp's main window. 
23 # most all of the IPC_* messages involve sending the message in the form of:
24 #   result = SendMessage(hwnd_winamp,WM_WA_IPC,(parameter),IPC_*);
25 
26 WM_WA_IPC=winUser.WM_USER
27 
28 # winamp window
29 IPC_GET_SHUFFLE=250
30 IPC_GET_REPEAT=251
31 
32 # playlist editor
33 IPC_PLAYLIST_GET_NEXT_SELECTED=3029
34 IPC_PE_GETCURINDEX=100
35 IPC_PE_GETINDEXTOTAL=101
36 # in_process ONLY
37 IPC_PE_GETINDEXTITLE=200 #  lParam = pointer to fileinfo2 structure
38 
39 class fileinfo2(Structure):
40 	_fields_=[
41 		('fileindex',c_int),
42 		('filetitle',c_char*256),
43 		('filelength',c_char*16),
44 	]
45 
46 hwndWinamp=0
47 
48 def getShuffle():
49 	global hwndWinamp
50 	return watchdog.cancellableSendMessage(hwndWinamp,WM_WA_IPC,0,IPC_GET_SHUFFLE)
51 
52 def getRepeat():
53 	global hwndWinamp
54 	return watchdog.cancellableSendMessage(hwndWinamp,WM_WA_IPC,0,IPC_GET_REPEAT)
55 
56 class AppModule(appModuleHandler.AppModule):
57 
58 	def event_NVDAObject_init(self,obj):
59 		global hwndWinamp
60 		hwndWinamp=windll.user32.FindWindowA("Winamp v1.x",None)
61 
62 	def chooseNVDAObjectOverlayClasses(self, obj, clsList):
63 		windowClass = obj.windowClassName
64 		if windowClass == "Winamp PE":
65 			clsList.insert(0, winampPlaylistEditor)
66 		elif windowClass == "Winamp v1.x":
67 			clsList.insert(0, winampMainWindow)
68 
69 class winampMainWindow(IAccessible):
70 
71 	def event_nameChange(self):
72 		pass
73 
74 	def script_shuffleToggle(self,gesture):
75 		gesture.send()
76 		if not isScriptWaiting():
77 			api.processPendingEvents()
78 			if getShuffle():
79 				# Translators: the user has pressed the shuffle tracks toggle in winamp, shuffle is now on.
80 				onOff=pgettext("shuffle", "on")
81 			else:
82 				# Translators: the user has pressed the shuffle tracks toggle in winamp, shuffle is now off.
83 				onOff=pgettext("shuffle", "off")
84 			ui.message(onOff)
85 
86 	def script_repeatToggle(self,gesture):
87 		gesture.send()
88 		if not isScriptWaiting():
89 			api.processPendingEvents()
90 			if getRepeat():
91 				# Translators: the user has pressed the repeat track toggle in winamp, repeat is now on.
92 				onOff=pgettext("repeat", "on")
93 			else:
94 				# Translators: the user has pressed the repeat track toggle in winamp, repeat is now off.
95 				onOff=pgettext("repeat", "off")
96 			ui.message(onOff)
97 
98 	__gestures = {
99 		"kb:s": "shuffleToggle",
100 		"kb:r": "repeatToggle",
101 	}
102 
103 class winampPlaylistEditor(winampMainWindow):
104 
105 	def _get_name(self):
106 		curIndex=watchdog.cancellableSendMessage(hwndWinamp,WM_WA_IPC,-1,IPC_PLAYLIST_GET_NEXT_SELECTED)
107 		if curIndex <0:
108 			return None
109 		info=fileinfo2()
110 		info.fileindex=curIndex
111 		internalInfo=winKernel.virtualAllocEx(self.processHandle,None,sizeof(info),winKernel.MEM_COMMIT,winKernel.PAGE_READWRITE)
112 		try:
113 			winKernel.writeProcessMemory(self.processHandle,internalInfo,byref(info),sizeof(info),None)
114 			watchdog.cancellableSendMessage(self.windowHandle,WM_WA_IPC,IPC_PE_GETINDEXTITLE,internalInfo)
115 			winKernel.readProcessMemory(self.processHandle,internalInfo,byref(info),sizeof(info),None)
116 		finally:
117 			winKernel.virtualFreeEx(self.processHandle,internalInfo,0,winKernel.MEM_RELEASE)
118 		# file title is fetched in the current locale encoding.
119 		# We need to decode it to unicode first. 
120 		encoding=locale.getlocale()[1]
121 		fileTitle=info.filetitle.decode(encoding,errors="replace")
122 		return "%d.\t%s\t%s"%(curIndex+1,fileTitle,info.filelength)
123 
124 	def _get_role(self):
125 		return controlTypes.ROLE_LISTITEM
126 
127 	def script_changeItem(self,gesture):
128 		gesture.send()
129 		if not isScriptWaiting():
130 			api.processPendingEvents()
131 			speech.speakObject(self,reason=controlTypes.REASON_FOCUS)
132 			braille.handler.handleGainFocus(self)
133 
134 	def event_nameChange(self):
135 		return super(winampMainWindow,self).event_nameChange()
136 
137 	__changeItemGestures = (
138 		"kb:upArrow",
139 		"kb:downArrow",
140 		"kb:pageUp",
141 		"kb:pageDown",
142 	)
143 
144 	def initOverlayClass(self):
145 		for gesture in self.__changeItemGestures:
146 			self.bindGesture(gesture, "changeItem")
147
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/source/appModules/winamp.py b/source/appModules/winamp.py
--- a/source/appModules/winamp.py
+++ b/source/appModules/winamp.py
@@ -1,8 +1,7 @@
-#appModules/winamp.py
-#A part of NonVisual Desktop Access (NVDA)
-#Copyright (C) 2006-2012 NVDA Contributors
-#This file is covered by the GNU General Public License.
-#See the file COPYING for more details.
+# A part of NonVisual Desktop Access (NVDA)
+# Copyright (C) 2006-2020 NV Access Limited
+# This file is covered by the GNU General Public License.
+# See the file COPYING for more details.
 
 from ctypes import *
 from ctypes.wintypes import *
@@ -57,7 +56,7 @@
 
 	def event_NVDAObject_init(self,obj):
 		global hwndWinamp
-		hwndWinamp=windll.user32.FindWindowA("Winamp v1.x",None)
+		hwndWinamp = winUser.FindWindow("Winamp v1.x", None)
 
 	def chooseNVDAObjectOverlayClasses(self, obj, clsList):
 		windowClass = obj.windowClassName

{"golden_diff": "diff --git a/source/appModules/winamp.py b/source/appModules/winamp.py\n--- a/source/appModules/winamp.py\n+++ b/source/appModules/winamp.py\n@@ -1,8 +1,7 @@\n-#appModules/winamp.py\r\n-#A part of NonVisual Desktop Access (NVDA)\r\n-#Copyright (C) 2006-2012 NVDA Contributors\r\n-#This file is covered by the GNU General Public License.\r\n-#See the file COPYING for more details.\r\n+# A part of NonVisual Desktop Access (NVDA)\r\n+# Copyright (C) 2006-2020 NV Access Limited\r\n+# This file is covered by the GNU General Public License.\r\n+# See the file COPYING for more details.\r\n \r\n from ctypes import *\r\n from ctypes.wintypes import *\r\n@@ -57,7 +56,7 @@\n \r\n \tdef event_NVDAObject_init(self,obj):\r\n \t\tglobal hwndWinamp\r\n-\t\thwndWinamp=windll.user32.FindWindowA(\"Winamp v1.x\",None)\r\n+\t\thwndWinamp = winUser.FindWindow(\"Winamp v1.x\", None)\r\n \r\n \tdef chooseNVDAObjectOverlayClasses(self, obj, clsList):\r\n \t\twindowClass = obj.windowClassName\n", "issue": "Winamp support: NVDA doesn't detect the status of shuffle and repeat modes\n<!--\r\nPlease thoroughly read NVDA's wiki article on how to fill in this template, including how to provide the required files.\r\nIssues may be closed if the required information is not present.\r\nhttps://github.com/nvaccess/nvda/wiki/Github-issue-template-explanation-and-examples\r\n-->\r\n\r\n### Steps to reproduce:\r\n1. Start winamp\r\n2. Press r or s toggle shuffle or repeat\r\n3. NVDA will say \"off\" every time you toggle those modes\r\n### Actual behavior:\r\nNVDA will say \"off\" every time you toggle those modes\r\n##\r\n### Expected behavior:\r\nNVDA needs to state if setting is on or off.\r\n### System configuration\r\n#### NVDA installed/portable/running from source:\r\nInstalled\r\n#### NVDA version:\r\n2019.3.1\r\n#### Windows version:\r\nWindows10 latest\r\n\r\n#### Name and version of other software in use when reproducing the issue:\r\nWinamp 5.666 Build 3516\r\n#### Other information about your system:\r\n\r\n### Other questions\r\n#### Does the issue still occur after restarting your computer?\r\nYes\r\n#### Have you tried any other versions of NVDA? If so, please report their behaviors.\r\nNo\r\n#### If addons are disabled, is your problem still occuring?\r\nYes\r\n#### Did you try to run the COM registry fixing tool in NVDA menu / tools?\r\nNo\n", "before_files": [{"content": "#appModules/winamp.py\r\n#A part of NonVisual Desktop Access (NVDA)\r\n#Copyright (C) 2006-2012 NVDA Contributors\r\n#This file is covered by the GNU General Public License.\r\n#See the file COPYING for more details.\r\n\r\nfrom ctypes import *\r\nfrom ctypes.wintypes import *\r\nimport winKernel\r\nimport winUser\r\nfrom scriptHandler import isScriptWaiting\r\nfrom NVDAObjects.IAccessible import IAccessible \r\nimport appModuleHandler\r\nimport speech\r\nimport locale\r\nimport controlTypes\r\nimport api\r\nimport watchdog\r\nimport braille\r\nimport ui\r\n\r\n# message used to sent many messages to winamp's main window. \r\n# most all of the IPC_* messages involve sending the message in the form of:\r\n#   result = SendMessage(hwnd_winamp,WM_WA_IPC,(parameter),IPC_*);\r\n\r\nWM_WA_IPC=winUser.WM_USER\r\n\r\n# winamp window\r\nIPC_GET_SHUFFLE=250\r\nIPC_GET_REPEAT=251\r\n\r\n# playlist editor\r\nIPC_PLAYLIST_GET_NEXT_SELECTED=3029\r\nIPC_PE_GETCURINDEX=100\r\nIPC_PE_GETINDEXTOTAL=101\r\n# in_process ONLY\r\nIPC_PE_GETINDEXTITLE=200 #  lParam = pointer to fileinfo2 structure\r\n\r\nclass fileinfo2(Structure):\r\n\t_fields_=[\r\n\t\t('fileindex',c_int),\r\n\t\t('filetitle',c_char*256),\r\n\t\t('filelength',c_char*16),\r\n\t]\r\n\r\nhwndWinamp=0\r\n\r\ndef getShuffle():\r\n\tglobal hwndWinamp\r\n\treturn watchdog.cancellableSendMessage(hwndWinamp,WM_WA_IPC,0,IPC_GET_SHUFFLE)\r\n\r\ndef getRepeat():\r\n\tglobal hwndWinamp\r\n\treturn watchdog.cancellableSendMessage(hwndWinamp,WM_WA_IPC,0,IPC_GET_REPEAT)\r\n\r\nclass AppModule(appModuleHandler.AppModule):\r\n\r\n\tdef event_NVDAObject_init(self,obj):\r\n\t\tglobal hwndWinamp\r\n\t\thwndWinamp=windll.user32.FindWindowA(\"Winamp v1.x\",None)\r\n\r\n\tdef chooseNVDAObjectOverlayClasses(self, obj, clsList):\r\n\t\twindowClass = obj.windowClassName\r\n\t\tif windowClass == \"Winamp PE\":\r\n\t\t\tclsList.insert(0, winampPlaylistEditor)\r\n\t\telif windowClass == \"Winamp v1.x\":\r\n\t\t\tclsList.insert(0, winampMainWindow)\r\n\r\nclass winampMainWindow(IAccessible):\r\n\r\n\tdef event_nameChange(self):\r\n\t\tpass\r\n\r\n\tdef script_shuffleToggle(self,gesture):\r\n\t\tgesture.send()\r\n\t\tif not isScriptWaiting():\r\n\t\t\tapi.processPendingEvents()\r\n\t\t\tif getShuffle():\r\n\t\t\t\t# Translators: the user has pressed the shuffle tracks toggle in winamp, shuffle is now on.\r\n\t\t\t\tonOff=pgettext(\"shuffle\", \"on\")\r\n\t\t\telse:\r\n\t\t\t\t# Translators: the user has pressed the shuffle tracks toggle in winamp, shuffle is now off.\r\n\t\t\t\tonOff=pgettext(\"shuffle\", \"off\")\r\n\t\t\tui.message(onOff)\r\n\r\n\tdef script_repeatToggle(self,gesture):\r\n\t\tgesture.send()\r\n\t\tif not isScriptWaiting():\r\n\t\t\tapi.processPendingEvents()\r\n\t\t\tif getRepeat():\r\n\t\t\t\t# Translators: the user has pressed the repeat track toggle in winamp, repeat is now on.\r\n\t\t\t\tonOff=pgettext(\"repeat\", \"on\")\r\n\t\t\telse:\r\n\t\t\t\t# Translators: the user has pressed the repeat track toggle in winamp, repeat is now off.\r\n\t\t\t\tonOff=pgettext(\"repeat\", \"off\")\r\n\t\t\tui.message(onOff)\r\n\r\n\t__gestures = {\r\n\t\t\"kb:s\": \"shuffleToggle\",\r\n\t\t\"kb:r\": \"repeatToggle\",\r\n\t}\r\n\r\nclass winampPlaylistEditor(winampMainWindow):\r\n\r\n\tdef _get_name(self):\r\n\t\tcurIndex=watchdog.cancellableSendMessage(hwndWinamp,WM_WA_IPC,-1,IPC_PLAYLIST_GET_NEXT_SELECTED)\r\n\t\tif curIndex <0:\r\n\t\t\treturn None\r\n\t\tinfo=fileinfo2()\r\n\t\tinfo.fileindex=curIndex\r\n\t\tinternalInfo=winKernel.virtualAllocEx(self.processHandle,None,sizeof(info),winKernel.MEM_COMMIT,winKernel.PAGE_READWRITE)\r\n\t\ttry:\r\n\t\t\twinKernel.writeProcessMemory(self.processHandle,internalInfo,byref(info),sizeof(info),None)\r\n\t\t\twatchdog.cancellableSendMessage(self.windowHandle,WM_WA_IPC,IPC_PE_GETINDEXTITLE,internalInfo)\r\n\t\t\twinKernel.readProcessMemory(self.processHandle,internalInfo,byref(info),sizeof(info),None)\r\n\t\tfinally:\r\n\t\t\twinKernel.virtualFreeEx(self.processHandle,internalInfo,0,winKernel.MEM_RELEASE)\r\n\t\t# file title is fetched in the current locale encoding.\r\n\t\t# We need to decode it to unicode first. \r\n\t\tencoding=locale.getlocale()[1]\r\n\t\tfileTitle=info.filetitle.decode(encoding,errors=\"replace\")\r\n\t\treturn \"%d.\\t%s\\t%s\"%(curIndex+1,fileTitle,info.filelength)\r\n\r\n\tdef _get_role(self):\r\n\t\treturn controlTypes.ROLE_LISTITEM\r\n\r\n\tdef script_changeItem(self,gesture):\r\n\t\tgesture.send()\r\n\t\tif not isScriptWaiting():\r\n\t\t\tapi.processPendingEvents()\r\n\t\t\tspeech.speakObject(self,reason=controlTypes.REASON_FOCUS)\r\n\t\t\tbraille.handler.handleGainFocus(self)\r\n\r\n\tdef event_nameChange(self):\r\n\t\treturn super(winampMainWindow,self).event_nameChange()\r\n\r\n\t__changeItemGestures = (\r\n\t\t\"kb:upArrow\",\r\n\t\t\"kb:downArrow\",\r\n\t\t\"kb:pageUp\",\r\n\t\t\"kb:pageDown\",\r\n\t)\r\n\r\n\tdef initOverlayClass(self):\r\n\t\tfor gesture in self.__changeItemGestures:\r\n\t\t\tself.bindGesture(gesture, \"changeItem\")\r\n", "path": "source/appModules/winamp.py"}], "after_files": [{"content": "# A part of NonVisual Desktop Access (NVDA)\r\n# Copyright (C) 2006-2020 NV Access Limited\r\n# This file is covered by the GNU General Public License.\r\n# See the file COPYING for more details.\r\n\r\nfrom ctypes import *\r\nfrom ctypes.wintypes import *\r\nimport winKernel\r\nimport winUser\r\nfrom scriptHandler import isScriptWaiting\r\nfrom NVDAObjects.IAccessible import IAccessible \r\nimport appModuleHandler\r\nimport speech\r\nimport locale\r\nimport controlTypes\r\nimport api\r\nimport watchdog\r\nimport braille\r\nimport ui\r\n\r\n# message used to sent many messages to winamp's main window. \r\n# most all of the IPC_* messages involve sending the message in the form of:\r\n#   result = SendMessage(hwnd_winamp,WM_WA_IPC,(parameter),IPC_*);\r\n\r\nWM_WA_IPC=winUser.WM_USER\r\n\r\n# winamp window\r\nIPC_GET_SHUFFLE=250\r\nIPC_GET_REPEAT=251\r\n\r\n# playlist editor\r\nIPC_PLAYLIST_GET_NEXT_SELECTED=3029\r\nIPC_PE_GETCURINDEX=100\r\nIPC_PE_GETINDEXTOTAL=101\r\n# in_process ONLY\r\nIPC_PE_GETINDEXTITLE=200 #  lParam = pointer to fileinfo2 structure\r\n\r\nclass fileinfo2(Structure):\r\n\t_fields_=[\r\n\t\t('fileindex',c_int),\r\n\t\t('filetitle',c_char*256),\r\n\t\t('filelength',c_char*16),\r\n\t]\r\n\r\nhwndWinamp=0\r\n\r\ndef getShuffle():\r\n\tglobal hwndWinamp\r\n\treturn watchdog.cancellableSendMessage(hwndWinamp,WM_WA_IPC,0,IPC_GET_SHUFFLE)\r\n\r\ndef getRepeat():\r\n\tglobal hwndWinamp\r\n\treturn watchdog.cancellableSendMessage(hwndWinamp,WM_WA_IPC,0,IPC_GET_REPEAT)\r\n\r\nclass AppModule(appModuleHandler.AppModule):\r\n\r\n\tdef event_NVDAObject_init(self,obj):\r\n\t\tglobal hwndWinamp\r\n\t\thwndWinamp = winUser.FindWindow(\"Winamp v1.x\", None)\r\n\r\n\tdef chooseNVDAObjectOverlayClasses(self, obj, clsList):\r\n\t\twindowClass = obj.windowClassName\r\n\t\tif windowClass == \"Winamp PE\":\r\n\t\t\tclsList.insert(0, winampPlaylistEditor)\r\n\t\telif windowClass == \"Winamp v1.x\":\r\n\t\t\tclsList.insert(0, winampMainWindow)\r\n\r\nclass winampMainWindow(IAccessible):\r\n\r\n\tdef event_nameChange(self):\r\n\t\tpass\r\n\r\n\tdef script_shuffleToggle(self,gesture):\r\n\t\tgesture.send()\r\n\t\tif not isScriptWaiting():\r\n\t\t\tapi.processPendingEvents()\r\n\t\t\tif getShuffle():\r\n\t\t\t\t# Translators: the user has pressed the shuffle tracks toggle in winamp, shuffle is now on.\r\n\t\t\t\tonOff=pgettext(\"shuffle\", \"on\")\r\n\t\t\telse:\r\n\t\t\t\t# Translators: the user has pressed the shuffle tracks toggle in winamp, shuffle is now off.\r\n\t\t\t\tonOff=pgettext(\"shuffle\", \"off\")\r\n\t\t\tui.message(onOff)\r\n\r\n\tdef script_repeatToggle(self,gesture):\r\n\t\tgesture.send()\r\n\t\tif not isScriptWaiting():\r\n\t\t\tapi.processPendingEvents()\r\n\t\t\tif getRepeat():\r\n\t\t\t\t# Translators: the user has pressed the repeat track toggle in winamp, repeat is now on.\r\n\t\t\t\tonOff=pgettext(\"repeat\", \"on\")\r\n\t\t\telse:\r\n\t\t\t\t# Translators: the user has pressed the repeat track toggle in winamp, repeat is now off.\r\n\t\t\t\tonOff=pgettext(\"repeat\", \"off\")\r\n\t\t\tui.message(onOff)\r\n\r\n\t__gestures = {\r\n\t\t\"kb:s\": \"shuffleToggle\",\r\n\t\t\"kb:r\": \"repeatToggle\",\r\n\t}\r\n\r\nclass winampPlaylistEditor(winampMainWindow):\r\n\r\n\tdef _get_name(self):\r\n\t\tcurIndex=watchdog.cancellableSendMessage(hwndWinamp,WM_WA_IPC,-1,IPC_PLAYLIST_GET_NEXT_SELECTED)\r\n\t\tif curIndex <0:\r\n\t\t\treturn None\r\n\t\tinfo=fileinfo2()\r\n\t\tinfo.fileindex=curIndex\r\n\t\tinternalInfo=winKernel.virtualAllocEx(self.processHandle,None,sizeof(info),winKernel.MEM_COMMIT,winKernel.PAGE_READWRITE)\r\n\t\ttry:\r\n\t\t\twinKernel.writeProcessMemory(self.processHandle,internalInfo,byref(info),sizeof(info),None)\r\n\t\t\twatchdog.cancellableSendMessage(self.windowHandle,WM_WA_IPC,IPC_PE_GETINDEXTITLE,internalInfo)\r\n\t\t\twinKernel.readProcessMemory(self.processHandle,internalInfo,byref(info),sizeof(info),None)\r\n\t\tfinally:\r\n\t\t\twinKernel.virtualFreeEx(self.processHandle,internalInfo,0,winKernel.MEM_RELEASE)\r\n\t\t# file title is fetched in the current locale encoding.\r\n\t\t# We need to decode it to unicode first. \r\n\t\tencoding=locale.getlocale()[1]\r\n\t\tfileTitle=info.filetitle.decode(encoding,errors=\"replace\")\r\n\t\treturn \"%d.\\t%s\\t%s\"%(curIndex+1,fileTitle,info.filelength)\r\n\r\n\tdef _get_role(self):\r\n\t\treturn controlTypes.ROLE_LISTITEM\r\n\r\n\tdef script_changeItem(self,gesture):\r\n\t\tgesture.send()\r\n\t\tif not isScriptWaiting():\r\n\t\t\tapi.processPendingEvents()\r\n\t\t\tspeech.speakObject(self,reason=controlTypes.REASON_FOCUS)\r\n\t\t\tbraille.handler.handleGainFocus(self)\r\n\r\n\tdef event_nameChange(self):\r\n\t\treturn super(winampMainWindow,self).event_nameChange()\r\n\r\n\t__changeItemGestures = (\r\n\t\t\"kb:upArrow\",\r\n\t\t\"kb:downArrow\",\r\n\t\t\"kb:pageUp\",\r\n\t\t\"kb:pageDown\",\r\n\t)\r\n\r\n\tdef initOverlayClass(self):\r\n\t\tfor gesture in self.__changeItemGestures:\r\n\t\t\tself.bindGesture(gesture, \"changeItem\")\r\n", "path": "source/appModules/winamp.py"}]}