haskus-system-0.7.0.0: Haskus system programming framework

Safe HaskellNone
LanguageHaskell2010

Haskus.System.Linux.Graphics.State

Contents

Description

State of the graphics system

Synopsis

Documentation

readGraphicsState :: MonadInIO m => Handle -> Flow m '[GraphicsState, InvalidHandle] Source #

Get the current graphics state from the kernel

Entities

data Controller Source #

Video controller

A controller is used to configure what is displayed on the screen Controllers are called CRTC in original terminology

Constructors

Controller 

Fields

data Encoder Source #

An encoder

An encoder converts data obtained from the controller (i.e. from the frame buffer associated with the controller) into suitable data for the connector (i.e. for the device connected to the connector). Hence it only supports a set of connectors. In addition, it may not work with all controllers.

Constructors

Encoder 

Fields

data EncoderType Source #

Type of the encoder

Constructors

EncoderTypeNone 
EncoderTypeDAC

for VGA and analog on DVI-I/DVI-A

EncoderTypeTMDS

for DVI, HDMI and (embedded) DisplayPort

EncoderTypeLVDS

for display panels

EncoderTypeTVDAC

for TV output (Composite, S-Video, Component, SCART)

EncoderTypeVirtual

for virtual machine display

EncoderTypeDSI 
EncoderTypeDPMST 

data Connector Source #

A connector on the graphic card

Constructors

Connector 

Fields

data Connection Source #

Indicate if a cable is plugged in the connector

Constructors

Connected ConnectedDevice

The connector is connected to a displaying device

Disconnected

The connector is disconnected

ConnectionUnknown

The connection state cannot be determined

data ConnectedDevice Source #

Information about the connected device

Constructors

ConnectedDevice 

Fields

data ConnectorType Source #

Connector type

data Resources Source #

Graphic card ressources

Constructors

Resources 

Fields

switchFrameBuffer' :: MonadIO m => Handle -> ControllerID -> FrameBufferID -> PageFlipFlags -> Word64 -> Flow m '[(), ErrorCode] Source #

Switch to another framebuffer for the given controller without doing a full mode change

Called "mode_page_flip" in the original terminology

getControllerGamma :: MonadInIO m => Controller -> Flow m '[([Word16], [Word16], [Word16]), ErrorCode] Source #

Get controller gama look-up table

setControllerGamma :: MonadInIO m => Controller -> ([Word16], [Word16], [Word16]) -> Flow m '[(), ErrorCode] Source #

Set controller gama look-up table

getEncoders :: MonadInIO m => Handle -> Flow m '[[Encoder], EntryNotFound, InvalidHandle] Source #

Get encoders (discard errors)

getResources :: forall m. MonadInIO m => Handle -> Flow m '[Resources, InvalidHandle] Source #

Get graphic card resources

getEntities :: MonadInIO m => (Resources -> [a]) -> (Handle -> a -> m (Either x b)) -> Handle -> m [b] Source #

Internal function to retreive card entities from their identifiers

pickEncoders :: Resources -> BitSet Word32 Int -> [EncoderID] Source #

Pick the controllers whose indexes are in bs

pickControllers :: Resources -> BitSet Word32 Int -> [ControllerID] Source #

Pick the controllers whose indexes are in bs

getPlaneResources :: forall m. MonadInIO m => Handle -> Flow m '[[PlaneID], InvalidHandle] Source #

Get the IDs of the supported planes

data InvalidPlane Source #

Error invalid plane ID

Constructors

InvalidPlane PlaneID 

data Plane Source #

A plane

Constructors

Plane 

Fields

getPlane :: forall m. MonadInIO m => Handle -> PlaneID -> Flow m '[Plane, InvalidHandle, InvalidPlane] Source #

Get plane information

setPlane :: MonadIO m => Handle -> PlaneID -> Maybe (ControllerID, FrameBufferID, SrcRect, DestRect) -> Flow m '[(), InvalidParam, EntryNotFound, InvalidDestRect, InvalidSrcRect] Source #

Set plane

If the source/destination rectangles are not the same, scaling support is required. Devices not supporting scaling will fail with InvalidParam.

The fractional part in SrcRect is for devices supporting sub-pixel plane coordinates.

disablePlane :: MonadIO m => Handle -> PlaneID -> Flow m '[(), InvalidParam, EntryNotFound] Source #

Disable a plane

data DestRect Source #

Destination rectangle

Constructors

DestRect 

data SrcRect Source #

Source rectangle

Constructors

SrcRect 

Fields