package hugin

  1. Overview
  2. Docs

Module UsdlSource

Minimal SDL2 bindings.

Thin bindings covering window creation, renderer management, surface pixel access, and event polling. Designed for the Cairo-SDL integration layer; not a general-purpose SDL binding.

All functions raise Failure on SDL errors.

Initialization

Sourceval init : unit -> unit

init () initializes SDL video and sets the render scale quality hint.

Raises Failure if SDL initialization fails.

Sourceval quit : unit -> unit

quit () shuts down SDL.

Handle types

Sourcetype renderer

The type for SDL renderers.

Sourcetype surface

The type for SDL surfaces.

Sourcetype texture

The type for SDL textures.

Window

Sourcemodule Window : sig ... end

Renderer

Sourcemodule Renderer : sig ... end

Surface

Sourcemodule Surface : sig ... end

Texture

Sourcemodule Texture : sig ... end

Events

Sourcemodule Event : sig ... end

Key codes

Sourcemodule Keycode : sig ... end