Copyright | (c) Ashley Towns 2016 |
---|---|
License | BSD3 |
Maintainer | mail@ashleytowns.id.au |
Stability | experimental |
Portability | POSIX |
Safe Haskell | Safe |
Language | Haskell2010 |
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
- c'WLC_RGBA8888 :: Num a => a
- c'wlc_pixels_write :: C'wlc_pixel_format -> Ptr C'wlc_geometry -> Ptr () -> IO ()
- p'wlc_pixels_write :: FunPtr (C'wlc_pixel_format -> Ptr C'wlc_geometry -> Ptr () -> IO ())
- c'wlc_pixels_read :: C'wlc_pixel_format -> Ptr C'wlc_geometry -> Ptr C'wlc_geometry -> Ptr () -> IO ()
- p'wlc_pixels_read :: FunPtr (C'wlc_pixel_format -> Ptr C'wlc_geometry -> Ptr C'wlc_geometry -> Ptr () -> IO ())
- c'wlc_surface_render :: C'wlc_resource -> Ptr C'wlc_geometry -> IO ()
- p'wlc_surface_render :: FunPtr (C'wlc_resource -> Ptr C'wlc_geometry -> IO ())
- c'wlc_output_schedule_render :: C'wlc_handle -> IO ()
- p'wlc_output_schedule_render :: FunPtr (C'wlc_handle -> IO ())
- c'wlc_surface_flush_frame_callbacks :: C'wlc_resource -> IO ()
- p'wlc_surface_flush_frame_callbacks :: FunPtr (C'wlc_resource -> IO ())
- type C'wlc_renderer = CUInt
- c'WLC_RENDERER_GLES2 :: Num a => a
- c'WLC_NO_RENDERER :: Num a => a
- c'wlc_output_get_renderer :: C'wlc_handle -> IO C'wlc_renderer
- type C'wlc_surface_format = CUInt
- p'wlc_output_get_renderer :: FunPtr (C'wlc_handle -> IO C'wlc_renderer)
- c'SURFACE_RGB :: Num a => a
- c'SURFACE_RGBA :: Num a => a
- c'SURFACE_EGL :: Num a => a
- c'SURFACE_Y_UV :: Num a => a
- c'SURFACE_Y_U_V :: Num a => a
- c'SURFACE_Y_XUXV :: Num a => a
Documentation
type C'wlc_pixel_format = CUInt Source
Allowed pixel formats.
c'WLC_RGBA8888 :: Num a => a Source
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.
p'wlc_pixels_write :: FunPtr (C'wlc_pixel_format -> Ptr C'wlc_geometry -> Ptr () -> IO ()) Source
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.
p'wlc_pixels_read :: FunPtr (C'wlc_pixel_format -> Ptr C'wlc_geometry -> Ptr C'wlc_geometry -> Ptr () -> IO ()) Source
Renders surface.
c'wlc_surface_render :: C'wlc_resource -> Ptr C'wlc_geometry -> IO () Source
p'wlc_surface_render :: FunPtr (C'wlc_resource -> Ptr C'wlc_geometry -> IO ()) Source
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.
p'wlc_output_schedule_render :: FunPtr (C'wlc_handle -> IO ()) Source
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).
p'wlc_surface_flush_frame_callbacks :: FunPtr (C'wlc_resource -> IO ()) Source
Enabled renderers
type C'wlc_renderer = CUInt Source
c'WLC_RENDERER_GLES2 :: Num a => a Source
c'WLC_NO_RENDERER :: Num a => a Source
c'wlc_output_get_renderer :: C'wlc_handle -> IO C'wlc_renderer Source
Returns currently active renderer on the given output
type C'wlc_surface_format = CUInt Source
c'SURFACE_RGB :: Num a => a Source
c'SURFACE_RGBA :: Num a => a Source
c'SURFACE_EGL :: Num a => a Source
c'SURFACE_Y_UV :: Num a => a Source
c'SURFACE_Y_U_V :: Num a => a Source
c'SURFACE_Y_XUXV :: Num a => a Source