Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- setupCanvasModuleConfiguration :: EventloopSetupModuleConfiguration
- canvasModuleIdentifier :: EventloopModuleIdentifier
- canvasInitializer :: Initializer
- canvasEventRetriever :: EventRetriever
- canvasEventSender :: EventSender
- type CanvasSystemReceiveBuffer = MVar SystemCanvasIn
- type Opcode = Int
- type ScreenMetric = Int
- type ScreenX = ScreenMetric
- type ScreenY = ScreenMetric
- type ScreenWidth = ScreenMetric
- type ScreenHeight = ScreenMetric
- type ScreenRadius = ScreenMetric
- type ScreenAngle = ScreenMetric
- type ScreenPoint = (ScreenX, ScreenY)
- type ScreenDimensions = (ScreenWidth, ScreenHeight)
- type ScreenStartingPoint = ScreenPoint
- type ScreenControlPoint = ScreenPoint
- type ScreenEndPoint = ScreenPoint
- type ScreenStartingAngle = ScreenAngle
- type ScreenEndAngle = ScreenAngle
- type CanvasId = NumericId
- type ZIndex = Int
- type ScreenColorMetric = Int
- type ScreenRed = ScreenColorMetric
- type ScreenGreen = ScreenColorMetric
- type ScreenBlue = ScreenColorMetric
- type ScreenAlpha = Float
- type ScreenColor = (ScreenRed, ScreenGreen, ScreenBlue, ScreenAlpha)
- type ScreenPixel = ScreenColor
- type ColorStopOffset = Float
- type ScreenCircle = (ScreenPoint, ScreenRadius)
- type ScaleUnit = Float
- type ScaleX = ScaleUnit
- type ScaleY = ScaleUnit
- type ScreenLineThickness = Float
- type FontFamily = [Char]
- type FontSize = Int
- data RoutedMessageIn
- data RoutedMessageOut
- data SystemCanvasIn = SystemMeasuredText CanvasText ScreenDimensions
- data SystemCanvasOut = SystemMeasureText CanvasText
- data CanvasIn = MeasuredText CanvasText ScreenDimensions
- data CanvasOut
- data CanvasOperation
- data ScreenPathPart
- = MoveTo ScreenPoint
- | LineTo ScreenPoint
- | BezierCurveTo ScreenControlPoint ScreenControlPoint ScreenEndPoint
- | QuadraticCurveTo ScreenControlPoint ScreenEndPoint
- | ArcTo ScreenControlPoint ScreenControlPoint ScreenRadius
- | Arc ScreenCircle ScreenStartingAngle ScreenEndAngle
- | Rectangle ScreenPoint ScreenDimensions
- | ClosePath
- type PathRenderStrokeStyle = RenderStyle
- data PathStroke
- type PathRenderFillStyle = RenderStyle
- data PathFill
- type CanvasColorStop = (ColorStopOffset, ScreenColor)
- data RenderStyle
- data CanvasImage
- data PatternRepetition
- data CanvasGradientType
- data CanvasText = CanvasText [Char] Font Alignment
- data Font = Font FontFamily FontSize
- type TextStrokeRenderStyle = RenderStyle
- type TextFillRenderStyle = RenderStyle
- data TextStroke
- data TextFill
- data Alignment
- type TransformUnit = Float
- type TransformationMatrix = (TransformUnit, TransformUnit, TransformUnit, TransformUnit, TransformUnit, TransformUnit)
- data CanvasTransform
- type CSSLeftOffset = CSSUnit
- type CSSTopOffset = CSSUnit
- type CSSMeasurements = (CSSLeftOffset, CSSTopOffset)
- data CSSPosition = CSSPosition CSSBindPoint CSSMeasurements
- data CSSBindPoint
- data CSSUnit
- data ClearPart
Documentation
type ScreenMetric = Int Source #
type ScreenX = ScreenMetric Source #
type ScreenY = ScreenMetric Source #
type ScreenWidth = ScreenMetric Source #
type ScreenHeight = ScreenMetric Source #
type ScreenRadius = ScreenMetric Source #
type ScreenAngle Source #
= ScreenMetric | In degrees |
type ScreenPoint = (ScreenX, ScreenY) Source #
type ScreenDimensions = (ScreenWidth, ScreenHeight) Source #
type ScreenStartingPoint = ScreenPoint Source #
type ScreenControlPoint = ScreenPoint Source #
type ScreenEndPoint = ScreenPoint Source #
type ScreenStartingAngle = ScreenAngle Source #
type ScreenEndAngle = ScreenAngle Source #
type ScreenColorMetric = Int Source #
type ScreenRed = ScreenColorMetric Source #
type ScreenGreen = ScreenColorMetric Source #
type ScreenBlue = ScreenColorMetric Source #
type ScreenAlpha = Float Source #
type ScreenColor = (ScreenRed, ScreenGreen, ScreenBlue, ScreenAlpha) Source #
type ScreenPixel = ScreenColor Source #
type ColorStopOffset = Float Source #
type ScreenCircle = (ScreenPoint, ScreenRadius) Source #
type ScreenLineThickness = Float Source #
type FontFamily = [Char] Source #
data RoutedMessageIn Source #
Instances
Eq RoutedMessageIn Source # | |
Defined in Eventloop.Module.Websocket.Canvas.Types (==) :: RoutedMessageIn -> RoutedMessageIn -> Bool # (/=) :: RoutedMessageIn -> RoutedMessageIn -> Bool # | |
Show RoutedMessageIn Source # | |
Defined in Eventloop.Module.Websocket.Canvas.Types showsPrec :: Int -> RoutedMessageIn -> ShowS # show :: RoutedMessageIn -> String # showList :: [RoutedMessageIn] -> ShowS # | |
FromJSON RoutedMessageIn | |
Defined in Eventloop.Module.Websocket.Canvas.JSONEncoding parseJSON :: Value -> Parser RoutedMessageIn parseJSONList :: Value -> Parser [RoutedMessageIn] |
data RoutedMessageOut Source #
Instances
data SystemCanvasIn Source #
Opcode: 2100
SystemMeasuredText CanvasText ScreenDimensions | Opcode: 2101 |
Instances
Eq SystemCanvasIn Source # | |
Defined in Eventloop.Module.Websocket.Canvas.Types (==) :: SystemCanvasIn -> SystemCanvasIn -> Bool # (/=) :: SystemCanvasIn -> SystemCanvasIn -> Bool # | |
Show SystemCanvasIn Source # | |
Defined in Eventloop.Module.Websocket.Canvas.Types showsPrec :: Int -> SystemCanvasIn -> ShowS # show :: SystemCanvasIn -> String # showList :: [SystemCanvasIn] -> ShowS # | |
FromJSON SystemCanvasIn | |
Defined in Eventloop.Module.Websocket.Canvas.JSONEncoding parseJSON :: Value -> Parser SystemCanvasIn parseJSONList :: Value -> Parser [SystemCanvasIn] |
data SystemCanvasOut Source #
Opcode: 2000
SystemMeasureText CanvasText | Opcode: 2001 |
Instances
Opcode: 0100
MeasuredText CanvasText ScreenDimensions | Opcode: 0101 |
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
SetupCanvas CanvasId ZIndex ScreenDimensions CSSPosition | Opcode: 0201 |
TeardownCanvas CanvasId | Opcode: 0202 |
CanvasOperations CanvasId [CanvasOperation] | Opcode: 0203 |
MeasureText CanvasText | Opcode: 0204 |
Instances
data CanvasOperation Source #
Opcode: 0300
DrawPath ScreenStartingPoint [ScreenPathPart] PathStroke PathFill | Opcode: 0301 |
DrawText CanvasText ScreenPoint TextStroke TextFill | Opcode: 0302 |
DoTransform CanvasTransform | Opcode: 0303 |
Clear ClearPart | Opcode: 0304 |
Frame | Opcode: 0305 |
Instances
data ScreenPathPart Source #
Opcode: 0400
MoveTo ScreenPoint | Opcode: 0401 |
LineTo ScreenPoint | Opcode: 0402 |
BezierCurveTo ScreenControlPoint ScreenControlPoint ScreenEndPoint | Opcode: 0403 |
QuadraticCurveTo ScreenControlPoint ScreenEndPoint | Opcode: 0404 |
ArcTo ScreenControlPoint ScreenControlPoint ScreenRadius | Opcode: 0405 |
Arc ScreenCircle ScreenStartingAngle ScreenEndAngle | Opcode: 0406 |
Rectangle ScreenPoint ScreenDimensions | Opcode: 0407 |
ClosePath | Opcode: 0408 |
Instances
type PathRenderStrokeStyle = RenderStyle Source #
Opcode: 0500
data PathStroke Source #
PathStroke ScreenLineThickness PathRenderStrokeStyle | Opcode: 0501 |
NoPathStroke | Opcode: 0502 |
Instances
type PathRenderFillStyle = RenderStyle Source #
Opcode: 0600
PathFill PathRenderFillStyle | Opcode: 0601 |
NoPathFill | Opcode: 0602 |
Instances
Eq PathFill Source # | |
Show PathFill Source # | |
Generic PathFill Source # | |
NFData PathFill Source # | |
Defined in Eventloop.Module.Websocket.Canvas.Types | |
ToJSON PathFill | |
Defined in Eventloop.Module.Websocket.Canvas.JSONEncoding toEncoding :: PathFill -> Encoding toJSONList :: [PathFill] -> Value toEncodingList :: [PathFill] -> Encoding | |
type Rep PathFill Source # | |
Defined in Eventloop.Module.Websocket.Canvas.Types type Rep PathFill = D1 (MetaData "PathFill" "Eventloop.Module.Websocket.Canvas.Types" "eventloop-0.8.2.8-inplace" False) (C1 (MetaCons "PathFill" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 PathRenderFillStyle)) :+: C1 (MetaCons "NoPathFill" PrefixI False) (U1 :: Type -> Type)) |
type CanvasColorStop = (ColorStopOffset, ScreenColor) Source #
Opcode: 0700
data RenderStyle Source #
CanvasColor ScreenColor | Opcode: 0701 |
CanvasGradient CanvasGradientType [CanvasColorStop] | Opcode:0702 |
CanvasPattern CanvasImage PatternRepetition | Opcode: 0703 |
Instances
data CanvasImage Source #
Opcode: 0800
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 |
Instances
data PatternRepetition Source #
Opcode: 0900
Instances
data CanvasGradientType Source #
Opcode: 1000
RadialGradient ScreenCircle ScreenCircle | Opcode: 1001 First circle = inner circle, Second circle is enclosing circle |
LinearGradient ScreenPoint ScreenPoint | Opcode: 1002 |
Instances
data CanvasText Source #
Opcode: 1200
CanvasText [Char] Font Alignment | Opcode: 1201 |
Instances
Opcode: 1300
Font FontFamily FontSize | Opcode: 1301 |
Instances
Eq Font Source # | |
Show Font Source # | |
Generic Font Source # | |
NFData Font Source # | |
Defined in Eventloop.Module.Websocket.Canvas.Types | |
FromJSON Font | |
Defined in Eventloop.Module.Websocket.Canvas.JSONEncoding parseJSON :: Value -> Parser Font parseJSONList :: Value -> Parser [Font] | |
ToJSON Font | |
type Rep Font Source # | |
Defined in Eventloop.Module.Websocket.Canvas.Types type Rep Font = D1 (MetaData "Font" "Eventloop.Module.Websocket.Canvas.Types" "eventloop-0.8.2.8-inplace" False) (C1 (MetaCons "Font" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 FontFamily) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 FontSize))) |
type TextStrokeRenderStyle = RenderStyle Source #
Opcode: 1400
type TextFillRenderStyle = RenderStyle Source #
data TextStroke Source #
TextStroke ScreenLineThickness TextStrokeRenderStyle | Opcode: 1401 |
NoTextStroke | Opcode: 1402 |
Instances
Opcode: 2400
TextFill TextFillRenderStyle | Opcode: 2401 |
NoTextFill | Opcode: 2402 |
Instances
Eq TextFill Source # | |
Show TextFill Source # | |
Generic TextFill Source # | |
NFData TextFill Source # | |
Defined in Eventloop.Module.Websocket.Canvas.Types | |
ToJSON TextFill | |
Defined in Eventloop.Module.Websocket.Canvas.JSONEncoding toEncoding :: TextFill -> Encoding toJSONList :: [TextFill] -> Value toEncodingList :: [TextFill] -> Encoding | |
type Rep TextFill Source # | |
Defined in Eventloop.Module.Websocket.Canvas.Types type Rep TextFill = D1 (MetaData "TextFill" "Eventloop.Module.Websocket.Canvas.Types" "eventloop-0.8.2.8-inplace" False) (C1 (MetaCons "TextFill" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 TextFillRenderStyle)) :+: C1 (MetaCons "NoTextFill" PrefixI False) (U1 :: Type -> Type)) |
Opcode: 1500
AlignLeft | Opcode: 1501 |
AlignRight | Opcode: 1502 |
AlignCenter | Opcode: 1503 |
Instances
Eq Alignment Source # | |
Show Alignment Source # | |
Generic Alignment Source # | |
NFData Alignment Source # | |
Defined in Eventloop.Module.Websocket.Canvas.Types | |
FromJSON Alignment | |
Defined in Eventloop.Module.Websocket.Canvas.JSONEncoding parseJSON :: Value -> Parser Alignment parseJSONList :: Value -> Parser [Alignment] | |
ToJSON Alignment | |
Defined in Eventloop.Module.Websocket.Canvas.JSONEncoding toEncoding :: Alignment -> Encoding toJSONList :: [Alignment] -> Value toEncodingList :: [Alignment] -> Encoding | |
type Rep Alignment Source # | |
Defined in Eventloop.Module.Websocket.Canvas.Types type Rep Alignment = D1 (MetaData "Alignment" "Eventloop.Module.Websocket.Canvas.Types" "eventloop-0.8.2.8-inplace" False) (C1 (MetaCons "AlignLeft" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "AlignRight" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "AlignCenter" PrefixI False) (U1 :: Type -> Type))) |
type TransformUnit = Float Source #
Opcode: 1600
type TransformationMatrix = (TransformUnit, TransformUnit, TransformUnit, TransformUnit, TransformUnit, TransformUnit) Source #
data CanvasTransform Source #
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
type CSSLeftOffset = CSSUnit Source #
Opcode: 2200
type CSSTopOffset = CSSUnit Source #
type CSSMeasurements = (CSSLeftOffset, CSSTopOffset) Source #
data CSSPosition Source #
CSSPosition CSSBindPoint CSSMeasurements | Opcode: 2201 |
Instances
data CSSBindPoint Source #
Opcode: 2300
CSSFromCenter | Opcode: 2301 |
CSSFromDefault | Opcode: 2302 Usually this is the top left corner of the element |
Instances
Eq CSSBindPoint Source # | |
Defined in Eventloop.Module.Websocket.Canvas.Types (==) :: CSSBindPoint -> CSSBindPoint -> Bool # (/=) :: CSSBindPoint -> CSSBindPoint -> Bool # | |
Show CSSBindPoint Source # | |
Defined in Eventloop.Module.Websocket.Canvas.Types showsPrec :: Int -> CSSBindPoint -> ShowS # show :: CSSBindPoint -> String # showList :: [CSSBindPoint] -> ShowS # | |
Generic CSSBindPoint Source # | |
Defined in Eventloop.Module.Websocket.Canvas.Types type Rep CSSBindPoint :: Type -> Type # from :: CSSBindPoint -> Rep CSSBindPoint x # to :: Rep CSSBindPoint x -> CSSBindPoint # | |
NFData CSSBindPoint Source # | |
Defined in Eventloop.Module.Websocket.Canvas.Types rnf :: CSSBindPoint -> () # | |
ToJSON CSSBindPoint | |
Defined in Eventloop.Module.Websocket.Canvas.JSONEncoding toJSON :: CSSBindPoint -> Value toEncoding :: CSSBindPoint -> Encoding toJSONList :: [CSSBindPoint] -> Value toEncodingList :: [CSSBindPoint] -> Encoding | |
type Rep CSSBindPoint Source # | |
Defined in Eventloop.Module.Websocket.Canvas.Types |
Opcode: 1800
CSSPixels Int | Opcode: 1801 |
CSSPercentage Int | Opcode: 1802 |
Instances
Eq CSSUnit Source # | |
Show CSSUnit Source # | |
Generic CSSUnit Source # | |
NFData CSSUnit Source # | |
Defined in Eventloop.Module.Websocket.Canvas.Types | |
ToJSON CSSUnit | |
Defined in Eventloop.Module.Websocket.Canvas.JSONEncoding toEncoding :: CSSUnit -> Encoding toJSONList :: [CSSUnit] -> Value toEncodingList :: [CSSUnit] -> Encoding | |
type Rep CSSUnit Source # | |
Defined in Eventloop.Module.Websocket.Canvas.Types type Rep CSSUnit = D1 (MetaData "CSSUnit" "Eventloop.Module.Websocket.Canvas.Types" "eventloop-0.8.2.8-inplace" False) (C1 (MetaCons "CSSPixels" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)) :+: C1 (MetaCons "CSSPercentage" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int))) |
Opcode: 1900
ClearRectangle ScreenPoint ScreenDimensions | Opcode: 1901 |
ClearCanvas | Opcode: 1902 |
Instances
Eq ClearPart Source # | |
Show ClearPart Source # | |
Generic ClearPart Source # | |
NFData ClearPart Source # | |
Defined in Eventloop.Module.Websocket.Canvas.Types | |
ToJSON ClearPart | |
Defined in Eventloop.Module.Websocket.Canvas.JSONEncoding toEncoding :: ClearPart -> Encoding toJSONList :: [ClearPart] -> Value toEncodingList :: [ClearPart] -> Encoding | |
type Rep ClearPart Source # | |
Defined in Eventloop.Module.Websocket.Canvas.Types type Rep ClearPart = D1 (MetaData "ClearPart" "Eventloop.Module.Websocket.Canvas.Types" "eventloop-0.8.2.8-inplace" False) (C1 (MetaCons "ClearRectangle" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ScreenPoint) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ScreenDimensions)) :+: C1 (MetaCons "ClearCanvas" PrefixI False) (U1 :: Type -> Type)) |