bindings-wlc- Bindings against the wlc library

Copyright(c) Ashley Towns 2016
Safe HaskellSafe



The functions in this file provide some basic rendering capabilities. *_render(), *_read(), *_write() functions should only be called during post/pre render callbacks. wlc_output_schedule_render() is exception and may be used to force wlc to render new frame (causing callbacks to trigger).

For more advanced drawing you should directly use GLES2. This is not documented as it's currently relying on the implementation details of wlc.



type C'wlc_pixel_format = CUInt Source

Allowed pixel formats.

c'wlc_pixels_write :: C'wlc_pixel_format -> Ptr C'wlc_geometry -> Ptr () -> IO () Source

Write pixel data with the specific format to output's framebuffer. If the geometry is out of bounds, it will be automaticall clamped.

c'wlc_pixels_read :: C'wlc_pixel_format -> Ptr C'wlc_geometry -> Ptr C'wlc_geometry -> Ptr () -> IO () Source

Read pixel data from output's framebuffer. If the geometry is out of bounds, it will be automatically clamped. Potentially clamped geometry will be stored in out_geometry, to indicate width / height of the returned data.

c'wlc_output_schedule_render :: C'wlc_handle -> IO () Source

Schedules output for rendering next frame. If output was already scheduled this is no-op, if output is currently rendering, it will render immediately after.

c'wlc_surface_flush_frame_callbacks :: C'wlc_resource -> IO () Source

Adds frame callbacks of the given surface for the next output frame. It applies recursively to all subsurfaces. Useful when the compositor creates custom animations which require disabling internal rendering, but still need to update the surface textures (for ex. video players).

c'wlc_output_get_renderer :: C'wlc_handle -> IO C'wlc_renderer Source

Returns currently active renderer on the given output