aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/XiteWin.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/XiteWin.py')
-rw-r--r--test/XiteWin.py17
1 files changed, 8 insertions, 9 deletions
diff --git a/test/XiteWin.py b/test/XiteWin.py
index 1321448c6..9acf6ebfd 100644
--- a/test/XiteWin.py
+++ b/test/XiteWin.py
@@ -8,8 +8,7 @@ from __future__ import unicode_literals
import os, platform, sys, unittest
import ctypes
-from ctypes import wintypes
-from ctypes import c_int, c_ulong, c_char_p, c_wchar_p, c_ushort, c_uint, c_long
+from ctypes import c_int, c_char_p, c_wchar_p, c_ushort, c_uint
from ctypes.wintypes import HWND, WPARAM, LPARAM, HANDLE, HBRUSH, LPCWSTR
user32=ctypes.windll.user32
gdi32=ctypes.windll.gdi32
@@ -248,11 +247,11 @@ class XiteWin():
def Invalidate(self):
user32.InvalidateRect(self.win, 0, 0)
- def WndProc(self, h, m, w, l):
+ def WndProc(self, h, m, wp, lp):
user32.DefWindowProcW.argtypes = [HWND, c_uint, WPARAM, LPARAM]
ms = sgsm.get(m, "XXX")
if trace:
- print("%s %s %s %s" % (hex(h)[2:],ms,w,l))
+ print("%s %s %s %s" % (hex(h)[2:],ms,wp,lp))
if ms == "WM_CLOSE":
user32.PostQuitMessage(0)
elif ms == "WM_CREATE":
@@ -260,20 +259,20 @@ class XiteWin():
return 0
elif ms == "WM_SIZE":
# Work out size
- if w != 1:
+ if wp != 1:
self.OnSize()
return 0
elif ms == "WM_COMMAND":
- cmdCode = w & 0xffff
+ cmdCode = wp & 0xffff
if cmdCode in self.cmds:
self.Command(self.cmds[cmdCode])
return 0
elif ms == "WM_ACTIVATE":
- if w != WA_INACTIVE:
+ if wp != WA_INACTIVE:
self.FocusOnEditor()
return 0
else:
- return user32.DefWindowProcW(h, m, w, l)
+ return user32.DefWindowProcW(h, m, wp, lp)
return 0
def Command(self, name):
@@ -506,7 +505,7 @@ class XiteWin():
self.Open()
def CmdSave(self):
- if (self.fullPath == None) or (len(self.fullPath) == 0):
+ if (self.fullPath is None) or (len(self.fullPath) == 0):
self.SaveAs()
else:
self.Save()