MCPcopy
hub / github.com/beeware/toga / close_window

Method close_window

cocoa/src/toga_cocoa/hardware/camera.py:217–228  ·  view source on GitHub ↗
(self, widget, **kwargs)

Source from the content-addressed store, hash-verified

215 self._update_flash_mode()
216
217 def close_window(self, widget, **kwargs):
218 # If the user actually takes a photo the window will be programmatically closed.
219 # This handler is only triggered if the user manually closes the window.
220 # Stop the camera session
221 self.camera_session.stopRunning()
222
223 # Set the "no result" result
224 self.result.set_result(None)
225
226 # Clear the reference to the preview window, and allow the window to close
227 self.camera.preview_windows.remove(self)
228 return True
229
230 def take_photo(self, widget, **kwargs):
231 settings = cocoa.AVCapturePhotoSettings.photoSettings()

Callers

nothing calls this directly

Calls 2

set_resultMethod · 0.80
removeMethod · 0.45

Tested by

no test coverage detected