Welcome to Python-flavored Magnum! Please note that, while already being
rather stable, this functionality is still considered experimental and
some APIs might get changed without preserving full backwards compatibility.
class
ApplicationSDL2 application
Classes
- class Configuration
- Configuration
- class ExitEvent
- Exit event
- class GLConfiguration
- OpenGL context configuration
- class InputEvent
- Base for input events
- class KeyEvent
- Key event
- class MouseEvent
- Mouse event
- class MouseMoveEvent
- Mouse move event
- class MouseScrollEvent
- Mouse scroll event
- class ViewportEvent
- Viewport event
Enums
- class Cursor: ARROW = 0 TEXT_INPUT = 1 CROSSHAIR = 3 WAIT_ARROW = 4 RESIZE_NWSE = 5 RESIZE_NESW = 6 RESIZE_WE = 7 RESIZE_NS = 8 RESIZE_ALL = 9 NO = 10 HAND = 11 HIDDEN = 12 HIDDEN_LOCKED = 13
- Cursor type
Methods
- def draw_event(self, /) -> None
- Draw event
- def exec(self, /) -> int
- Execute application main loop
- def exit(self, arg0: int, /) -> None
- Exit application main loop
- def exit_event(self, arg0: ExitEvent, /) -> None
- Exit event
- def key_press_event(self, arg0: KeyEvent, /) -> None
- Key press event
- def key_release_event(self, arg0: KeyEvent, /) -> None
- Key release event
- def main_loop_iteration(self, /) -> bool
- Run one iteration of application main loop
- def mouse_move_event(self, arg0: MouseMoveEvent, /) -> None
- Mouse move event
- def mouse_press_event(self, arg0: MouseEvent, /) -> None
- Mouse press event
- def mouse_release_event(self, arg0: MouseEvent, /) -> None
- Mouse release event
- def mouse_scroll_event(self, arg0: MouseScrollEvent, /) -> None
- Mouse scroll event
- def redraw(self, /) -> None
- Redraw immediately
- def swap_buffers(self, /) -> None
- Swap buffers
- def viewport_event(self, arg0: ViewportEvent, /) -> None
- Viewport event
- def warp_cursor(self, arg0: Vector2i, /) -> None
- Warp mouse cursor to given coordinates
Special methods
- def __init__(self, configuration: Configuration = <magnum.platform.sdl2.Application.Configuration object at 0x7fdbb2e57cb0>, gl_configuration: GLConfiguration = <magnum.platform.sdl2.Application.GLConfiguration object at 0x7fdbb2e558f0>) -> None
- Constructor
Properties
- cursor: Cursor get set
- Cursor type
- dpi_scaling: Vector2 get
- DPI scaling
- framebuffer_size: Vector2i get
- Framebuffer size
- swap_interval: int get set
- Swap interval
- window_size: Vector2i get
- Window size