xosd-0.2.1: A binding to the X on-screen display

PortabilityCPP, FFI
MaintainerDon Stewart <dons00@gmail.com>
Safe HaskellNone




Tested with: GHC 6.10, GHC 7.6

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.

 runXOSD [ Timeout 3
          , VAlign VAlignMiddle
          , HAlign HAlignCenter
          , Font "-adobe-helvetica-bold-r-*-*-34-*-*-*-*-*-*-*"
          , Color "LimeGreen"
          , Display (String "TEST")] 
      (const $ return ())


The abstract XOSD type

type XOSD = Ptr XOSD_Source

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

data Format Source

The type of possible display formats


Percent !Int 
Slider !Int 
String String 

data VAlign Source

Valid screen positions (vertical alignment)

data HAlign Source

Valid screen positions (vertical alignment)

Interface to the interpreter

runXOSD :: [Attribute] -> (XOSD -> IO ()) -> IO ()Source

Run some code with an X on-screen display attached.

Introduction and elimination

initialize :: [Attribute] -> IO XOSDSource

Create a new XOSD object with given attributes.

destroy :: XOSD -> IO ()Source

xosd_uninit destroys an existing xosd window, freeing the memory. This is an unsafe function: as destroying an xosd object twice will likely cause bad things to happen, so don't do that.

Operations on a running XOSD

set :: XOSD -> [Attribute] -> IO ()Source

Set a list of attributes

display :: XOSD -> Int -> Format -> IO ()Source

Display some content.

wait :: XOSD -> IO ()Source

Wait until nothing is displayed. Blocks the process until no longer visible.

scroll :: XOSD -> Int -> IO ()Source

Scroll the display