view pytouhou/ui/glide/window.pyx @ 795:2d60a14f4816

python: Rewrite the main entrypoint in Rust This lets us progressively replace Python modules with Rust ones. Currently missing features include: - Saving replays - Networking code for cooperative mode - Reading a configuration file for options - Maybe more. But the base game is working, so yay!
author Link Mauve <linkmauve@linkmauve.fr>
date Tue, 02 Jun 2026 19:06:16 +0200
parents 7492d384d122
children
line wrap: on
line source

import pytouhou.lib.gui as gui
import libtouhou

cdef class Window(gui.Window):
    cdef void present(self) nogil:
        with gil:
            libtouhou.glide.buffer_swap()

    cdef void set_window_size(self, int width, int height) nogil:
        pass

    cdef void set_swap_interval(self, int interval) except *:
        pass

    cdef list get_events(self):
        return []

    cdef int get_keystate(self) nogil:
        return 0

    cdef void toggle_fullscreen(self) nogil:
        pass