Portability | CPP, FFI |
---|---|
Stability | experimental |
Maintainer | Don Stewart <dons@galois.com> |
Tested with: GHC 6.10
Bindings to xosd, the X on-screen display library xosd is a library for displaying an on-screen display (like the one on many TVs) on your X display.
An example using the lowest level C layer:
do x <- create_ 1 setFont x "-adobe-helvetica-bold-r-*-*-34-*-*-*-*-*-*-*" setColor x "DarkRed" display x 0 (String "Screen 1")
- type XOSD = Ptr XOSD_
- create :: Int -> IO (Either String XOSD)
- create_ :: Int -> IO XOSD
- destroy :: XOSD -> IO ()
- withXOSD :: Int -> (XOSD -> IO ()) -> IO ()
- setFont :: XOSD -> String -> IO ()
- setColor :: XOSD -> String -> IO ()
- data Format
- type XOSD_Command = CInt
- display :: XOSD -> Int -> Format -> IO ()
- xosd_percentage :: XOSD_Command
- xosd_string :: XOSD_Command
- xosd_slider :: XOSD_Command
- xosd_create :: CInt -> IO XOSD
- xosd_uninit :: XOSD -> IO CInt
- xosd_set_timeout :: XOSD -> CInt -> IO CInt
- xosd_set_vertical_offset :: XOSD -> CInt -> IO CInt
- xosd_set_horizontal_offset :: XOSD -> CInt -> IO CInt
- xosd_set_pos :: XOSD -> CInt -> IO CInt
- xosd_set_font :: XOSD -> CString -> IO CInt
- xosd_set_colour :: XOSD -> CString -> IO CInt
- xosd_is_onscreen :: XOSD -> IO CInt
- xosd_error :: IO CString
- xosd_get_colour :: XOSD -> Ptr CInt -> Ptr CInt -> Ptr CInt -> IO CInt
- xosd_get_number_lines :: XOSD -> IO CInt
- xosd_wait_until_no_display :: XOSD -> IO CInt
- xosd_hide :: XOSD -> IO CInt
- xosd_show :: XOSD -> IO CInt
- xosd_scroll :: XOSD -> CInt -> IO CInt
- xosd_display_string :: XOSD -> CInt -> XOSD_Command -> CString -> IO CInt
The abstract XOSD type
An abstract X on-screen display object
An xosd window can be used to display textual or numerical data on a X11 display in a unmanaged, shaped window that appears to be transparent. It provides a similar effect to the on-screen display of many televisions and video recorders
Low level Haskell layer
create :: Int -> IO (Either String XOSD)Source
xosd_init creates a new xosd window The argument is the maximum number of lines of text that the window can display.
create_ :: Int -> IO XOSDSource
Create a new xosd window. Throw an exception on failure. The argument is the maximum number of lines of text that the window can display.
destroy :: XOSD -> IO ()Source
xosd_uninit destroys an existing xosd window, freeing the memory. This is an unsafe function: destroying an xosd object twice will likely cause bad things to happen.
withXOSD :: Int -> (XOSD -> IO ()) -> IO ()Source
Run some code with an X on-screen display attached. and automatically close the display when we're done. An exception will be thrown should we not be able to create a new display.
Set attributes
Render to screen
type XOSD_Command = CIntSource
C layer
xosd_create :: CInt -> IO XOSDSource
xosd_uninit :: XOSD -> IO CIntSource
xosd_is_onscreen :: XOSD -> IO CIntSource
xosd_display_string :: XOSD -> CInt -> XOSD_Command -> CString -> IO CIntSource