+ self.mainWindow.Show()
+ self.mainWindow.OnDropFiles(self.loadFiles)
+
+ setFullScreenCapable(self.mainWindow)
+
+if platform.system() == "Darwin":
+ try:
+ import ctypes, objc
+ _objc = ctypes.PyDLL(objc._objc.__file__)
+
+ # PyObject *PyObjCObject_New(id objc_object, int flags, int retain)
+ _objc.PyObjCObject_New.restype = ctypes.py_object
+ _objc.PyObjCObject_New.argtypes = [ctypes.c_void_p, ctypes.c_int, ctypes.c_int]
+
+ def setFullScreenCapable(frame):
+ frameobj = _objc.PyObjCObject_New(frame.GetHandle(), 0, 1)
+
+ NSWindowCollectionBehaviorFullScreenPrimary = 1 << 7
+ window = frameobj.window()
+ newBehavior = window.collectionBehavior() | NSWindowCollectionBehaviorFullScreenPrimary
+ window.setCollectionBehavior_(newBehavior)
+ except:
+ def setFullScreenCapable(frame):
+ pass
+
+else:
+ def setFullScreenCapable(frame):
+ pass