eventloop-0.8.2.1: A different take on an IO system. Based on Amanda's IO loop, this eventloop takes a function that maps input events to output events. It can easily be extended by modules that represent IO devices or join multiple modules together.

Safe HaskellNone
LanguageHaskell2010

Eventloop.Module.StatefulGraphics

Synopsis

Documentation

type ScreenAngle Source #

Arguments

 = ScreenMetric

In degrees

data SystemCanvasOut Source #

Opcode: 2000

Constructors

SystemMeasureText CanvasText

Opcode: 2001

data CanvasIn Source #

Opcode: 0100

Constructors

MeasuredText CanvasText ScreenDimensions

Opcode: 0101

data CanvasOut Source #

Reserved type words Type: t | Opcode Arguments: a | List of arguments for that data type Route: r | Either s for system or u for user Object: o | The object that is beneath

Example: {r: s, o: {SystemMeasuredText object}}

SystemMeasuredText object: {t:2102, a:[CanvasId, CanvasText object, ScreenDimensions]}

Opcode: 0200

Instances

Eq CanvasOut Source # 
Show CanvasOut Source # 
Generic CanvasOut Source # 

Associated Types

type Rep CanvasOut :: * -> * #

NFData CanvasOut Source # 

Methods

rnf :: CanvasOut -> () #

type Rep CanvasOut Source # 

data CanvasOperation Source #

Opcode: 0300

Instances

Eq CanvasOperation Source # 
Show CanvasOperation Source # 
Generic CanvasOperation Source # 
NFData CanvasOperation Source # 

Methods

rnf :: CanvasOperation -> () #

type Rep CanvasOperation Source # 

data ScreenPathPart Source #

Opcode: 0400

Instances

Eq ScreenPathPart Source # 
Show ScreenPathPart Source # 
Generic ScreenPathPart Source # 

Associated Types

type Rep ScreenPathPart :: * -> * #

NFData ScreenPathPart Source # 

Methods

rnf :: ScreenPathPart -> () #

type Rep ScreenPathPart Source # 
type Rep ScreenPathPart = D1 (MetaData "ScreenPathPart" "Eventloop.Module.Websocket.Canvas.Types" "eventloop-0.8.2.1-G7ysJx2qRNZBUYxQgu0TzS" False) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "MoveTo" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ScreenPoint))) (C1 (MetaCons "LineTo" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ScreenPoint)))) ((:+:) (C1 (MetaCons "BezierCurveTo" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ScreenControlPoint)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ScreenControlPoint)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ScreenEndPoint))))) (C1 (MetaCons "QuadraticCurveTo" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ScreenControlPoint)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ScreenEndPoint)))))) ((:+:) ((:+:) (C1 (MetaCons "ArcTo" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ScreenControlPoint)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ScreenControlPoint)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ScreenRadius))))) (C1 (MetaCons "Arc" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ScreenCircle)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ScreenStartingAngle)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ScreenEndAngle)))))) ((:+:) (C1 (MetaCons "Rectangle" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ScreenPoint)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ScreenDimensions)))) (C1 (MetaCons "ClosePath" PrefixI False) U1))))

data PathFill Source #

Constructors

PathFill PathRenderFillStyle

Opcode: 0601

NoPathFill

Opcode: 0602

Instances

Eq PathFill Source # 
Show PathFill Source # 
Generic PathFill Source # 

Associated Types

type Rep PathFill :: * -> * #

Methods

from :: PathFill -> Rep PathFill x #

to :: Rep PathFill x -> PathFill #

NFData PathFill Source # 

Methods

rnf :: PathFill -> () #

type Rep PathFill Source # 
type Rep PathFill = D1 (MetaData "PathFill" "Eventloop.Module.Websocket.Canvas.Types" "eventloop-0.8.2.1-G7ysJx2qRNZBUYxQgu0TzS" False) ((:+:) (C1 (MetaCons "PathFill" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 PathRenderFillStyle))) (C1 (MetaCons "NoPathFill" PrefixI False) U1))

data RenderStyle Source #

data CanvasImage Source #

Opcode: 0800

Constructors

CanvasElement CanvasId ScreenPoint ScreenDimensions

Opcode: 0801

ImageData ScreenDimensions [ScreenPixel]

Opcode: 0802 [ScreenPixel] should be as long as width * height * 4. Each quad is red,green,blue,alpha

data PatternRepetition Source #

Opcode: 0900

Constructors

Repeat

Opcode: 0901

RepeatX

Opcode: 0902

RepeatY

Opcode: 0903

NoRepeat

Opcode: 0904

Instances

data CanvasGradientType Source #

Opcode: 1000

Constructors

RadialGradient ScreenCircle ScreenCircle

Opcode: 1001 First circle = inner circle, Second circle is enclosing circle

LinearGradient ScreenPoint ScreenPoint

Opcode: 1002

data Font Source #

Opcode: 1300

Constructors

Font FontFamily FontSize

Opcode: 1301

Instances

Eq Font Source # 

Methods

(==) :: Font -> Font -> Bool #

(/=) :: Font -> Font -> Bool #

Show Font Source # 

Methods

showsPrec :: Int -> Font -> ShowS #

show :: Font -> String #

showList :: [Font] -> ShowS #

Generic Font Source # 

Associated Types

type Rep Font :: * -> * #

Methods

from :: Font -> Rep Font x #

to :: Rep Font x -> Font #

NFData Font Source # 

Methods

rnf :: Font -> () #

type Rep Font Source # 
type Rep Font = D1 (MetaData "Font" "Eventloop.Module.Websocket.Canvas.Types" "eventloop-0.8.2.1-G7ysJx2qRNZBUYxQgu0TzS" False) (C1 (MetaCons "Font" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 FontFamily)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 FontSize))))

data TextFill Source #

Opcode: 2400

Constructors

TextFill TextFillRenderStyle

Opcode: 2401

NoTextFill

Opcode: 2402

Instances

Eq TextFill Source # 
Show TextFill Source # 
Generic TextFill Source # 

Associated Types

type Rep TextFill :: * -> * #

Methods

from :: TextFill -> Rep TextFill x #

to :: Rep TextFill x -> TextFill #

NFData TextFill Source # 

Methods

rnf :: TextFill -> () #

type Rep TextFill Source # 
type Rep TextFill = D1 (MetaData "TextFill" "Eventloop.Module.Websocket.Canvas.Types" "eventloop-0.8.2.1-G7ysJx2qRNZBUYxQgu0TzS" False) ((:+:) (C1 (MetaCons "TextFill" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 TextFillRenderStyle))) (C1 (MetaCons "NoTextFill" PrefixI False) U1))

data Alignment Source #

Opcode: 1500

Constructors

AlignLeft

Opcode: 1501

AlignRight

Opcode: 1502

AlignCenter

Opcode: 1503

Instances

Eq Alignment Source # 
Show Alignment Source # 
Generic Alignment Source # 

Associated Types

type Rep Alignment :: * -> * #

NFData Alignment Source # 

Methods

rnf :: Alignment -> () #

type Rep Alignment Source # 
type Rep Alignment = D1 (MetaData "Alignment" "Eventloop.Module.Websocket.Canvas.Types" "eventloop-0.8.2.1-G7ysJx2qRNZBUYxQgu0TzS" False) ((:+:) (C1 (MetaCons "AlignLeft" PrefixI False) U1) ((:+:) (C1 (MetaCons "AlignRight" PrefixI False) U1) (C1 (MetaCons "AlignCenter" PrefixI False) U1)))

type TransformUnit = Float Source #

Opcode: 1600

data CanvasTransform Source #

Constructors

Save

Opcode: 1601

Restore

Opcode: 1602

Translate ScreenPoint

Opcode: 1603

Rotate ScreenAngle

Opcode: 1604

Scale ScaleX ScaleY

Opcode: 1605

Transform TransformationMatrix

Opcode: 1606

SetTransform TransformationMatrix

Opcode: 1607

ResetTransform

Opcode: 1608

Instances

Eq CanvasTransform Source # 
Show CanvasTransform Source # 
Generic CanvasTransform Source # 
NFData CanvasTransform Source # 

Methods

rnf :: CanvasTransform -> () #

type Rep CanvasTransform Source # 

type CSSLeftOffset = CSSUnit Source #

Opcode: 2200

data CSSBindPoint Source #

Opcode: 2300

Constructors

CSSFromCenter

Opcode: 2301

CSSFromDefault

Opcode: 2302 Usually this is the top left corner of the element

Instances

Eq CSSBindPoint Source # 
Show CSSBindPoint Source # 
Generic CSSBindPoint Source # 

Associated Types

type Rep CSSBindPoint :: * -> * #

NFData CSSBindPoint Source # 

Methods

rnf :: CSSBindPoint -> () #

type Rep CSSBindPoint Source # 
type Rep CSSBindPoint = D1 (MetaData "CSSBindPoint" "Eventloop.Module.Websocket.Canvas.Types" "eventloop-0.8.2.1-G7ysJx2qRNZBUYxQgu0TzS" False) ((:+:) (C1 (MetaCons "CSSFromCenter" PrefixI False) U1) (C1 (MetaCons "CSSFromDefault" PrefixI False) U1))

data CSSUnit Source #

Opcode: 1800

Constructors

CSSPixels Int

Opcode: 1801

CSSPercentage Int

Opcode: 1802

Instances

Eq CSSUnit Source # 

Methods

(==) :: CSSUnit -> CSSUnit -> Bool #

(/=) :: CSSUnit -> CSSUnit -> Bool #

Show CSSUnit Source # 
Generic CSSUnit Source # 

Associated Types

type Rep CSSUnit :: * -> * #

Methods

from :: CSSUnit -> Rep CSSUnit x #

to :: Rep CSSUnit x -> CSSUnit #

NFData CSSUnit Source # 

Methods

rnf :: CSSUnit -> () #

type Rep CSSUnit Source # 
type Rep CSSUnit = D1 (MetaData "CSSUnit" "Eventloop.Module.Websocket.Canvas.Types" "eventloop-0.8.2.1-G7ysJx2qRNZBUYxQgu0TzS" False) ((:+:) (C1 (MetaCons "CSSPixels" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int))) (C1 (MetaCons "CSSPercentage" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int))))

data ClearPart Source #

Opcode: 1900

Constructors

ClearRectangle ScreenPoint ScreenDimensions

Opcode: 1901

ClearCanvas

Opcode: 1902

Instances

Eq ClearPart Source # 
Show ClearPart Source # 
Generic ClearPart Source # 

Associated Types

type Rep ClearPart :: * -> * #

NFData ClearPart Source # 

Methods

rnf :: ClearPart -> () #

type Rep ClearPart Source # 
type Rep ClearPart = D1 (MetaData "ClearPart" "Eventloop.Module.Websocket.Canvas.Types" "eventloop-0.8.2.1-G7ysJx2qRNZBUYxQgu0TzS" False) ((:+:) (C1 (MetaCons "ClearRectangle" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ScreenPoint)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ScreenDimensions)))) (C1 (MetaCons "ClearCanvas" PrefixI False) U1))

data StatefulGraphic Source #

Instances

Eq StatefulGraphic Source # 
Show StatefulGraphic Source # 
Generic StatefulGraphic Source # 
NFData StatefulGraphic Source # 

Methods

rnf :: StatefulGraphic -> () #

Overlaps StatefulGraphic Source # 
ToBoundingBox StatefulGraphic Source # 
ToPrimitives StatefulGraphic Source # 
type Rep StatefulGraphic Source # 

class NoDimChange a where Source #

Minimal complete definition

noDimChange

Methods

noDimChange :: a -> a -> Bool Source #