aosd-0.1.1: Bindings to libaosd, a library for Cairo-based on-screen displays

Graphics.Aosd

Contents

Description

For a higher-level API for textual OSDs using Pango, use Graphics.Aosd.Pango.

Synopsis

Renderers

data GeneralRenderer Source

Constructors

GeneralRenderer 

Fields

grRender :: Render ()
 
grInkExtent :: Rectangle

Part of the surface that the renderer actually draws on (determines the window size).

grPositioningExtent :: Rectangle

Part of the surface whose...

  • ... left edge is aligned to the left edge of the screen, if xPos is Min
  • ... center is aligned to the center of the screen, if xPos is Center
  • ... right edge is aligned to the right edge of the screen, if xPos is Max

(Likewise for the y axis)

Options

data AosdOptions Source

Constructors

AosdOptions 

Fields

classHint :: Maybe XClassHint

Nothing = use libaosd default.

transparency :: Maybe Transparency

Nothing = use libaosd default.

xPos :: Position
 
yPos :: Position
 
offset :: (CInt, CInt)

Positive values denote a rightwards respectively downwards offset (in pixels).

hideUponMouseEvent :: Maybe Bool

Nothing = use libaosd default.

mouseEventCB :: Maybe (C'AosdMouseEvent -> IO ())

Mouse-click event handler.

data Transparency Source

Constructors

None 
Fake 
Composite 

Instances

data Position Source

Constructors

Min

Left/top

Center 
Max

Right/bottom

data XClassHint Source

Constructors

XClassHint 

Fields

resName :: String
 
resClass :: String
 

Instances

defaultOpts :: AosdOptionsSource

Non-Nothing defaults:

  • transparency = Just Composite,
  • xPos = Center,
  • yPos = Center,
  • offset = (0,0),
  • hideUponMouseEvent = Just True

Displaying

aosdFlash :: AosdRenderer a => AosdOptions -> a -> FlashDurations -> IO ()Source

Main high-level displayer. Blocks.

data FlashDurations Source

Constructors

FlashDurations 

Fields

inMillis :: CUInt

Fade-in time in milliseconds

fullMillis :: CUInt

Full display time in milliseconds

outMillis :: CUInt

Fade-out time in milliseconds

Instances

Low-level operations

newtype AosdPtr Source

Constructors

AosdPtr 

aosdNew :: AosdRenderer a => AosdOptions -> a -> IO AosdPtrSource

Create an Aosd object managed by the garbage collector.

aosdLoopForSource

Arguments

:: AosdPtr 
-> CUInt

Time in milliseconds.

-> IO () 

Reexports

data Rectangle

Rectangle

  • Specifies x, y, width and height

Constructors

Rectangle Int Int Int Int 

data CInt

Haskell type representing the C int type.

data CUInt

Haskell type representing the C unsigned int type.