Portability | CPP, FFI |
---|---|
Stability | stable |
Maintainer | Don Stewart <dons00@gmail.com> |
Safe Haskell | None |
Graphics.XOSD
Contents
Description
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 ())
- type XOSD = Ptr XOSD_
- data Attribute
- data Format
- data VAlign
- data HAlign
- runXOSD :: [Attribute] -> (XOSD -> IO ()) -> IO ()
- initialize :: [Attribute] -> IO XOSD
- destroy :: XOSD -> IO ()
- set :: XOSD -> [Attribute] -> IO ()
- display :: XOSD -> Int -> Format -> IO ()
- wait :: XOSD -> IO ()
- scroll :: XOSD -> Int -> IO ()
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
Attributes that can be set on an XOSD object
The type of possible display formats
Valid screen positions (vertical alignment)
Constructors
VAlignTop | |
VAlignMiddle | |
VAlignBottom |
Valid screen positions (vertical alignment)
Constructors
HAlignLeft | |
HAlignCenter | |
HAlignRight |
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
Wait until nothing is displayed. Blocks the process until no longer visible.