.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/gui_events.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_gallery_gui_events.py: GUI Events ---------- A simple example to demonstrate events (no rendering). .. GENERATED FROM PYTHON SOURCE LINES 7-22 .. code-block:: Python from rendercanvas.auto import RenderCanvas, loop canvas = RenderCanvas(size=(640, 480), title="wgpu events") @canvas.add_event_handler("*") def process_event(event): if event["event_type"] != "pointer_move": print(event) if __name__ == "__main__": loop.run() .. _sphx_glr_download_gallery_gui_events.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: gui_events.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: gui_events.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: gui_events.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_