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

PortabilityCPP, FFI
Stabilityexperimental
MaintainerDon Stewart <dons@galois.com>

Graphics.XOSD.Base

Contents

Description

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")

Synopsis

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

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

data Format Source

Constructors

Percent !Int 
Slider !Int 
String String 

Instances

C layer