Minor style fix: Use "is None" instead of "== None"
from builtins import object
from pyglet.libs.darwin.cocoapy import *
+
class PygletWindow_Implementation(object):
PygletWindow = ObjCSubclass('NSWindow', 'PygletWindow')
@@ -64,12 +65,11 @@ class PygletWindow_Implementation(object):
event = send_super(self, 'nextEventMatchingMask:untilDate:inMode:dequeue:',
mask, date, mode, dequeue, argtypes=[NSUInteger, c_void_p, c_void_p, c_bool])
- if event.value == None:
+ if event.value is None:
return 0
else:
return event.value
-
# Need this for set_size to not flash.
@PygletWindow.method(b'd'+NSRectEncoding)
def animationResizeTime_(self, newFrame):
@@ -100,5 +100,6 @@ class PygletToolWindow_Implementation(object):
def animationResizeTime_(self, newFrame):
return 0.0
+
PygletWindow = ObjCClass('PygletWindow')
PygletToolWindow = ObjCClass('PygletToolWindow')
