{-# LANGUAGE CPP #-}
module GCAttrs(module GCAttrs,Cont(..)) where
import FudgetIO
import Xtypes
import EitherUtils(Cont(..))
import Font(FontStruct,font_id,font_range, font_prop, update_font_id)
import Color(tryAllocNamedColor,tryAllocColor)
import LoadFont(listFontsWithInfo,loadFont,loadQueryFont)
import FontProperty(fontProperty)
import CmdLineEnv(argKey)
import Utils(aboth,segments)
#include "exists.h"
data FontData
= FID FontStruct
| FS FontStruct
fdFontId :: FontData -> FontId
fdFontId (FID FontStruct
fs) = forall per_char. FontStructF per_char -> FontId
font_id FontStruct
fs
fdFontId (FS FontStruct
fs) = forall per_char. FontStructF per_char -> FontId
font_id FontStruct
fs
fontdata2struct :: FontData -> (FontStruct -> t) -> t
fontdata2struct (FS FontStruct
fs) FontStruct -> t
k = FontStruct -> t
k FontStruct
fs
fontdata2struct (FID FontStruct
fs) FontStruct -> t
k = FontStruct -> t
k FontStruct
fs
#ifdef USE_EXIST_Q
data ColorSpec = EXISTS(a) TSTHACK((Show EQV(a),ColorGen EQV(a)) =>) ColorSpec EQV(a)
instance Show ColorSpec where showsPrec :: Int -> ColorSpec -> ShowS
showsPrec Int
n (ColorSpec a
c) = forall a. Show a => Int -> a -> ShowS
showsPrec Int
n a
c
data FontSpec = EXISTS(a) TSTHACK((Show EQV(a),FontGen EQV(a)) =>) FontSpeci EQV(a)
instance Show FontSpec where showsPrec :: Int -> FontSpec -> ShowS
showsPrec Int
n (FontSpeci a
f) = forall a. Show a => Int -> a -> ShowS
showsPrec Int
n a
f
colorSpec :: a -> ColorSpec
colorSpec a
x = forall a. (Show a, ColorGen a) => a -> ColorSpec
ColorSpec a
x
fontSpec :: a -> FontSpec
fontSpec a
x = forall a. (Show a, FontGen a) => a -> FontSpec
FontSpeci a
x
#else
data ColorSpec = StringCS ColorName | RGBCS RGB | PixelCS Pixel | ListCS [ColorSpec] deriving (Show)
data FontSpec = StringFS FontName | FontIdFS FontId | FontStructFS FontStruct | ListFS [FontSpec] deriving (Show)
#endif
class ColorGen a where
IFNOEXIST(colorSpec :: a -> ColorSpec)
tryConvColorK :: FudgetIO f => a -> Cont (f i o) (Maybe Pixel)
IFNOEXIST(colorSpecList :: [a] -> ColorSpec)
convColorListK :: FudgetIO f => [a] -> Cont (f i o) (Maybe Pixel)
convColorListK = forall {t} {a} {b}.
(t -> (Maybe a -> b) -> b) -> [t] -> (Maybe a -> b) -> b
convList forall a (f :: * -> * -> *) i o.
(ColorGen a, FudgetIO f) =>
a -> Cont (f i o) (Maybe Pixel)
tryConvColorK
IFNOEXIST(colorSpecList = ListCS . map colorSpec)
convColorK :: a -> (Pixel -> f i o) -> f i o
convColorK a
c = forall a (f :: * -> * -> *) i o.
(ColorGen a, FudgetIO f) =>
a -> Cont (f i o) (Maybe Pixel)
tryConvColorK a
c forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall b a. b -> (a -> b) -> Maybe a -> b
maybe forall {a}. a
err
where err :: a
err = forall a. HasCallStack => String -> a
error (String
"Can't allocate color: "forall a. [a] -> [a] -> [a]
++forall a. Show a => a -> String
show a
c)
class FontGen a where
IFNOEXIST(fontSpec :: a -> FontSpec)
tryConvFontK :: FudgetIO f => a -> Cont (f i o) (Maybe FontData)
IFNOEXIST(fontSpecList :: [a] -> FontSpec)
convFontListK :: FudgetIO f => [a] -> Cont (f i o) (Maybe FontData)
IFNOEXIST(fontSpecList = ListFS . map fontSpec)
convFontListK = forall {t} {a} {b}.
(t -> (Maybe a -> b) -> b) -> [t] -> (Maybe a -> b) -> b
convList forall a (f :: * -> * -> *) i o.
(FontGen a, FudgetIO f) =>
a -> Cont (f i o) (Maybe FontData)
tryConvFontK
convFontK :: a -> (FontData -> f i o) -> f i o
convFontK a
f FontData -> f i o
k = forall a (f :: * -> * -> *) i o.
(FontGen a, FudgetIO f) =>
a -> Cont (f i o) (Maybe FontData)
tryConvFontK a
f forall a b. (a -> b) -> a -> b
$ forall b a. b -> (a -> b) -> Maybe a -> b
maybe (forall a (f :: * -> * -> *) i o.
(FontGen a, FudgetIO f) =>
a -> Cont (f i o) (Maybe FontData)
tryConvFontK String
"fixed" forall a b. (a -> b) -> a -> b
$ forall b a. b -> (a -> b) -> Maybe a -> b
maybe forall {a}. a
err FontData -> f i o
k) FontData -> f i o
k
where err :: a
err = forall a. HasCallStack => String -> a
error (String
"Can't load font: "forall a. [a] -> [a] -> [a]
++forall a. Show a => a -> String
show a
f)
convList :: (t -> (Maybe a -> b) -> b) -> [t] -> (Maybe a -> b) -> b
convList t -> (Maybe a -> b) -> b
try [t]
xs Maybe a -> b
cont = [t] -> b
conv [t]
xs
where conv :: [t] -> b
conv [] = Maybe a -> b
cont forall a. Maybe a
Nothing
conv (t
x:[t]
xs) = t -> (Maybe a -> b) -> b
try t
x forall a b. (a -> b) -> a -> b
$ forall b a. b -> (a -> b) -> Maybe a -> b
maybe ([t] -> b
conv [t]
xs) (Maybe a -> b
cont forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. a -> Maybe a
Just)
#ifdef USE_EXIST_Q
instance ColorGen ColorSpec where tryConvColorK :: forall (f :: * -> * -> *) i o.
FudgetIO f =>
ColorSpec -> Cont (f i o) (Maybe Pixel)
tryConvColorK (ColorSpec a
c) = forall a (f :: * -> * -> *) i o.
(ColorGen a, FudgetIO f) =>
a -> Cont (f i o) (Maybe Pixel)
tryConvColorK a
c
instance FontGen FontSpec where tryConvFontK :: forall (f :: * -> * -> *) i o.
FudgetIO f =>
FontSpec -> Cont (f i o) (Maybe FontData)
tryConvFontK (FontSpeci a
c) = forall a (f :: * -> * -> *) i o.
(FontGen a, FudgetIO f) =>
a -> Cont (f i o) (Maybe FontData)
tryConvFontK a
c
#else
instance ColorGen ColorSpec where
colorSpec = id
tryConvColorK cs =
case cs of
StringCS s -> tryConvColorK s
PixelCS pixel -> tryConvColorK pixel
RGBCS rgb -> tryConvColorK rgb
ListCS cs -> tryConvColorK cs
instance FontGen FontSpec where
fontSpec = id
tryConvFontK fs =
case fs of
StringFS name -> tryConvFontK name
FontStructFS fstr -> tryConvFontK fstr
ListFS fs -> tryConvFontK fs
#endif
instance ColorGen c => ColorGen [c] where
IFNOEXIST(colorSpec = colorSpecList)
tryConvColorK :: forall (f :: * -> * -> *) i o.
FudgetIO f =>
[c] -> Cont (f i o) (Maybe Pixel)
tryConvColorK = forall c (f :: * -> * -> *) i o.
(ColorGen c, FudgetIO f) =>
[c] -> Cont (f i o) (Maybe Pixel)
convColorListK
instance FontGen a => FontGen [a] where
IFNOEXIST(fontSpec = fontSpecList)
tryConvFontK :: forall (f :: * -> * -> *) i o.
FudgetIO f =>
[a] -> Cont (f i o) (Maybe FontData)
tryConvFontK = forall a (f :: * -> * -> *) i o.
(FontGen a, FudgetIO f) =>
[a] -> Cont (f i o) (Maybe FontData)
convFontListK
instance ColorGen Char where
IFNOEXIST(colorSpec c = StringCS [c])
IFNOEXIST(colorSpecList s = StringCS s)
tryConvColorK :: forall (f :: * -> * -> *) i o.
FudgetIO f =>
Char -> Cont (f i o) (Maybe Pixel)
tryConvColorK Char
c = forall c (f :: * -> * -> *) i o.
(ColorGen c, FudgetIO f) =>
[c] -> Cont (f i o) (Maybe Pixel)
convColorListK [Char
c]
convColorListK :: forall (f :: * -> * -> *) i o.
FudgetIO f =>
String -> Cont (f i o) (Maybe Pixel)
convColorListK String
s Maybe Pixel -> f i o
k = forall {f :: * -> * -> *} {hi} {ho}.
FudgetIO f =>
ColormapId -> String -> (Maybe Color -> f hi ho) -> f hi ho
tryAllocNamedColor ColormapId
defaultColormap String
s (Maybe Pixel -> f i o
k forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Color -> Pixel
colorPixel)
getFontData :: FudgetIO f => [Char] -> Cont (f i o) (Maybe FontData)
getFontData :: forall (f :: * -> * -> *) i o.
FudgetIO f =>
String -> Cont (f i o) (Maybe FontData)
getFontData =
case String
usefontstructs of
String
"yes" -> forall (f :: * -> * -> *) i o.
FudgetIO f =>
String -> Cont (f i o) (Maybe FontData)
qf
String
"no" -> forall (f :: * -> * -> *) i o.
FudgetIO f =>
String -> Cont (f i o) (Maybe FontData)
lf
String
_ -> forall (f :: * -> * -> *) i o.
FudgetIO f =>
String -> Cont (f i o) (Maybe FontData)
autof
where
qf :: String -> (Maybe FontData -> f hi ho) -> f hi ho
qf String
fname Maybe FontData -> f hi ho
k = forall {f :: * -> * -> *} {hi} {ho}.
FudgetIO f =>
String -> (Maybe FontStruct -> f hi ho) -> f hi ho
loadQueryFont String
fname (Maybe FontData -> f hi ho
k forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap FontStruct -> FontData
FS)
lf :: String -> (Maybe FontData -> f hi ho) -> f hi ho
lf String
fname Maybe FontData -> f hi ho
k =
forall {f :: * -> * -> *} {hi} {ho}.
FudgetIO f =>
String -> Int -> ([(String, FontStruct)] -> f hi ho) -> f hi ho
listFontsWithInfo String
fname Int
1 forall a b. (a -> b) -> a -> b
$ \ [(String, FontStruct)]
fis ->
case [(String, FontStruct)]
fis of
[] -> Maybe FontData -> f hi ho
k forall a. Maybe a
Nothing
(String
fn,FontStruct
fs):[(String, FontStruct)]
_ -> forall {f :: * -> * -> *} {hi} {ho}.
FudgetIO f =>
String -> (FontId -> f hi ho) -> f hi ho
loadFont String
fname forall a b. (a -> b) -> a -> b
$ \FontId
fid -> Maybe FontData -> f hi ho
k forall a b. (a -> b) -> a -> b
$ forall a. a -> Maybe a
Just forall a b. (a -> b) -> a -> b
$ FontStruct -> FontData
FID forall a b. (a -> b) -> a -> b
$ forall {per_char}.
FontStructF per_char -> FontId -> FontStructF per_char
update_font_id FontStruct
fs FontId
fid
autof :: String -> (Maybe FontData -> f hi ho) -> f hi ho
autof String
fname Maybe FontData -> f hi ho
k =
forall {f :: * -> * -> *} {hi} {ho}.
FudgetIO f =>
String -> Int -> ([(String, FontStruct)] -> f hi ho) -> f hi ho
listFontsWithInfo String
fname Int
1 forall a b. (a -> b) -> a -> b
$ \ [(String, FontStruct)]
fis ->
case [(String, FontStruct)]
fis of
[] -> Maybe FontData -> f hi ho
k forall a. Maybe a
Nothing
(String
fn,FontStruct
fs):[(String, FontStruct)]
_ -> let fprops :: [FontProp]
fprops = forall per_char. FontStructF per_char -> [FontProp]
font_prop FontStruct
fs
in forall {f :: * -> * -> *} {hi} {ho}.
FudgetIO f =>
[FontProp] -> String -> (Maybe String -> f hi ho) -> f hi ho
fontProperty [FontProp]
fprops String
"SPACING" forall a b. (a -> b) -> a -> b
$ \Maybe String
spacing ->
forall {f :: * -> * -> *} {hi} {ho}.
FudgetIO f =>
[FontProp] -> String -> (Maybe String -> f hi ho) -> f hi ho
fontProperty [FontProp]
fprops String
"FONT" forall a b. (a -> b) -> a -> b
$ \Maybe String
font ->
if Int
char_countforall a. Ord a => a -> a -> Bool
<=Int
256
then forall (f :: * -> * -> *) i o.
FudgetIO f =>
String -> Cont (f i o) (Maybe FontData)
qf String
fn Maybe FontData -> f hi ho
k
else let fscons :: FontStruct -> FontData
fscons = if (Maybe String -> Maybe String -> Bool
fixed_width Maybe String
font Maybe String
spacing)
then FontStruct -> FontData
FS
else FontStruct -> FontData
FID
in forall {f :: * -> * -> *} {hi} {ho}.
FudgetIO f =>
String -> (FontId -> f hi ho) -> f hi ho
loadFont String
fname forall a b. (a -> b) -> a -> b
$ \FontId
fid ->
Maybe FontData -> f hi ho
k forall a b. (a -> b) -> a -> b
$ forall a. a -> Maybe a
Just forall a b. (a -> b) -> a -> b
$ FontStruct -> FontData
fscons forall a b. (a -> b) -> a -> b
$ forall {per_char}.
FontStructF per_char -> FontId -> FontStructF per_char
update_font_id FontStruct
fs FontId
fid
where
char_count :: Int
char_count = Int
hiforall a. Num a => a -> a -> a
-Int
lo
(Int
lo,Int
hi) = forall {t} {b}. (t -> b) -> (t, t) -> (b, b)
aboth forall a. Enum a => a -> Int
fromEnum (forall {per_char}. FontStructF per_char -> (Char, Char)
font_range FontStruct
fs)
fixed_width :: Maybe String -> Maybe String -> Bool
fixed_width Maybe String
fnt Maybe String
spcng =
let spc :: [String]
spc = forall {a}. (a -> Bool) -> [a] -> [[a]]
segments (forall a. Eq a => a -> a -> Bool
/=Char
'-') String
fn
spct :: [String]
spct = forall {a}. (a -> Bool) -> [a] -> [[a]]
segments (forall a. Eq a => a -> a -> Bool
/= Char
'-') String
fnt'
monosp :: [String]
monosp = [String
"m", String
"c", String
"M", String
"C"]
[String
fnt', String
spcng'] = forall a b. (a -> b) -> [a] -> [b]
map (\Maybe String
s -> case Maybe String
s of
Just String
c -> String
c
Maybe String
_ -> String
"\xFF") [Maybe String
fnt, Maybe String
spcng]
lspc :: Int
lspc = forall (t :: * -> *) a. Foldable t => t a -> Int
length [String]
spc
lspct :: Int
lspct = forall (t :: * -> *) a. Foldable t => t a -> Int
length [String]
spct
in String
spcng' forall (t :: * -> *) a. (Foldable t, Eq a) => a -> t a -> Bool
`elem` [String]
monosp Bool -> Bool -> Bool
||
Int
lspct forall a. Ord a => a -> a -> Bool
> Int
11 Bool -> Bool -> Bool
&& ([String]
spct forall a. [a] -> Int -> a
!! Int
11) forall (t :: * -> *) a. (Foldable t, Eq a) => a -> t a -> Bool
`elem` [String]
monosp Bool -> Bool -> Bool
||
Int
lspc forall a. Ord a => a -> a -> Bool
> Int
11 Bool -> Bool -> Bool
&& ([String]
spc forall a. [a] -> Int -> a
!! Int
11) forall (t :: * -> *) a. (Foldable t, Eq a) => a -> t a -> Bool
`elem` [String]
monosp Bool -> Bool -> Bool
||
Int
lspc forall a. Eq a => a -> a -> Bool
== Int
1 Bool -> Bool -> Bool
&& (forall a. [a] -> a
head [String]
spc) forall a. Eq a => a -> a -> Bool
== String
"fixed"
instance FontGen Char where
IFNOEXIST(fontSpec c = StringFS [c])
IFNOEXIST(fontSpecList s = StringFS s)
tryConvFontK :: forall (f :: * -> * -> *) i o.
FudgetIO f =>
Char -> Cont (f i o) (Maybe FontData)
tryConvFontK Char
f = forall a (f :: * -> * -> *) i o.
(FontGen a, FudgetIO f) =>
[a] -> Cont (f i o) (Maybe FontData)
convFontListK [Char
f]
convFontListK :: forall (f :: * -> * -> *) i o.
FudgetIO f =>
String -> Cont (f i o) (Maybe FontData)
convFontListK = forall (f :: * -> * -> *) i o.
FudgetIO f =>
String -> Cont (f i o) (Maybe FontData)
getFontData
tryConvColorRGBK :: RGB -> (Maybe Pixel -> f hi ho) -> f hi ho
tryConvColorRGBK RGB
rgb Maybe Pixel -> f hi ho
k = forall {f :: * -> * -> *} {hi} {ho}.
FudgetIO f =>
ColormapId -> RGB -> (Maybe Color -> f hi ho) -> f hi ho
tryAllocColor ColormapId
defaultColormap RGB
rgb (Maybe Pixel -> f hi ho
k forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Color -> Pixel
colorPixel)
instance ColorGen RGB where
IFNOEXIST(colorSpec = RGBCS)
tryConvColorK :: forall (f :: * -> * -> *) i o.
FudgetIO f =>
RGB -> Cont (f i o) (Maybe Pixel)
tryConvColorK = forall (f :: * -> * -> *) i o.
FudgetIO f =>
RGB -> Cont (f i o) (Maybe Pixel)
tryConvColorRGBK
instance ColorGen Pixel where
IFNOEXIST(colorSpec = PixelCS)
tryConvColorK :: forall (f :: * -> * -> *) i o.
FudgetIO f =>
Pixel -> Cont (f i o) (Maybe Pixel)
tryConvColorK Pixel
p Maybe Pixel -> f i o
k = Maybe Pixel -> f i o
k (forall a. a -> Maybe a
Just Pixel
p)
instance FontGen FontStruct where
IFNOEXIST(fontSpec = FontStructFS)
tryConvFontK :: forall (f :: * -> * -> *) i o.
FudgetIO f =>
FontStruct -> Cont (f i o) (Maybe FontData)
tryConvFontK FontStruct
fs Maybe FontData -> f i o
k = Maybe FontData -> f i o
k (forall a. a -> Maybe a
Just (FontStruct -> FontData
FS FontStruct
fs))
convGCSpecK :: FontData
-> [GCAttributes a a]
-> ([GCAttributes Pixel FontId] -> FontData -> f i o)
-> f i o
convGCSpecK FontData
fs [GCAttributes a a]
attrs = forall {a} {f :: * -> * -> *} {a} {i} {o}.
(ColorGen a, FudgetIO f, FontGen a, Show a, Show a) =>
FontData
-> [GCAttributes a a]
-> [GCAttributes Pixel FontId]
-> ([GCAttributes Pixel FontId] -> FontData -> f i o)
-> f i o
gcattrsK FontData
fs [GCAttributes a a]
attrs []
where
gcattrsK :: FontData
-> [GCAttributes a a]
-> [GCAttributes Pixel FontId]
-> ([GCAttributes Pixel FontId] -> FontData -> f i o)
-> f i o
gcattrsK FontData
fs [] [GCAttributes Pixel FontId]
outattrs [GCAttributes Pixel FontId] -> FontData -> f i o
dr = [GCAttributes Pixel FontId] -> FontData -> f i o
dr (forall a. [a] -> [a]
reverse [GCAttributes Pixel FontId]
outattrs) FontData
fs
gcattrsK FontData
fs (GCAttributes a a
attr : [GCAttributes a a]
attrs) [GCAttributes Pixel FontId]
outattrs [GCAttributes Pixel FontId] -> FontData -> f i o
dr =
let cp :: GCAttributes Pixel FontId -> f i o
cp GCAttributes Pixel FontId
attr' = FontData
-> [GCAttributes a a]
-> [GCAttributes Pixel FontId]
-> ([GCAttributes Pixel FontId] -> FontData -> f i o)
-> f i o
gcattrsK FontData
fs [GCAttributes a a]
attrs (GCAttributes Pixel FontId
attr' forall a. a -> [a] -> [a]
: [GCAttributes Pixel FontId]
outattrs) [GCAttributes Pixel FontId] -> FontData -> f i o
dr
in case GCAttributes a a
attr of
GCForeground a
colspec ->
forall {a} {f :: * -> * -> *} {i} {o}.
(ColorGen a, FudgetIO f, Show a) =>
a -> (Pixel -> f i o) -> f i o
convColorK a
colspec forall a b. (a -> b) -> a -> b
$ \Pixel
fg ->
FontData
-> [GCAttributes a a]
-> [GCAttributes Pixel FontId]
-> ([GCAttributes Pixel FontId] -> FontData -> f i o)
-> f i o
gcattrsK FontData
fs [GCAttributes a a]
attrs (forall a b. a -> GCAttributes a b
GCForeground Pixel
fg forall a. a -> [a] -> [a]
: [GCAttributes Pixel FontId]
outattrs) [GCAttributes Pixel FontId] -> FontData -> f i o
dr
GCBackground a
colspec ->
forall {a} {f :: * -> * -> *} {i} {o}.
(ColorGen a, FudgetIO f, Show a) =>
a -> (Pixel -> f i o) -> f i o
convColorK a
colspec forall a b. (a -> b) -> a -> b
$ \Pixel
fg ->
FontData
-> [GCAttributes a a]
-> [GCAttributes Pixel FontId]
-> ([GCAttributes Pixel FontId] -> FontData -> f i o)
-> f i o
gcattrsK FontData
fs [GCAttributes a a]
attrs (forall a b. a -> GCAttributes a b
GCBackground Pixel
fg forall a. a -> [a] -> [a]
: [GCAttributes Pixel FontId]
outattrs) [GCAttributes Pixel FontId] -> FontData -> f i o
dr
GCFont a
fspec ->
forall {a} {f :: * -> * -> *} {i} {o}.
(FontGen a, FudgetIO f, Show a) =>
a -> (FontData -> f i o) -> f i o
convFontK a
fspec forall a b. (a -> b) -> a -> b
$ \FontData
fs' ->
FontData
-> [GCAttributes a a]
-> [GCAttributes Pixel FontId]
-> ([GCAttributes Pixel FontId] -> FontData -> f i o)
-> f i o
gcattrsK FontData
fs' [GCAttributes a a]
attrs (forall a b. b -> GCAttributes a b
GCFont (FontData -> FontId
fdFontId FontData
fs') forall a. a -> [a] -> [a]
: [GCAttributes Pixel FontId]
outattrs) [GCAttributes Pixel FontId] -> FontData -> f i o
dr
GCFunction GCFunction
f -> GCAttributes Pixel FontId -> f i o
cp (forall a b. GCFunction -> GCAttributes a b
GCFunction GCFunction
f)
GCLineWidth Int
w -> GCAttributes Pixel FontId -> f i o
cp (forall a b. Int -> GCAttributes a b
GCLineWidth Int
w)
GCLineStyle GCLineStyle
s -> GCAttributes Pixel FontId -> f i o
cp (forall a b. GCLineStyle -> GCAttributes a b
GCLineStyle GCLineStyle
s)
GCCapStyle GCCapStyle
s -> GCAttributes Pixel FontId -> f i o
cp (forall a b. GCCapStyle -> GCAttributes a b
GCCapStyle GCCapStyle
s)
GCJoinStyle GCJoinStyle
s -> GCAttributes Pixel FontId -> f i o
cp (forall a b. GCJoinStyle -> GCAttributes a b
GCJoinStyle GCJoinStyle
s)
GCSubwindowMode GCSubwindowMode
m -> GCAttributes Pixel FontId -> f i o
cp (forall a b. GCSubwindowMode -> GCAttributes a b
GCSubwindowMode GCSubwindowMode
m)
GCGraphicsExposures Bool
b -> GCAttributes Pixel FontId -> f i o
cp (forall a b. Bool -> GCAttributes a b
GCGraphicsExposures Bool
b)
gcFgA,gcBgA :: c -> [GCAttributes c FontSpec]
gcBgA :: forall c. c -> [GCAttributes c FontSpec]
gcBgA c
c = [forall a b. a -> GCAttributes a b
GCBackground c
c]
gcFgA :: forall c. c -> [GCAttributes c FontSpec]
gcFgA c
c = [forall a b. a -> GCAttributes a b
GCForeground c
c]
gcFontA :: f -> [GCAttributes ColorSpec f]
gcFontA :: forall f. f -> [GCAttributes ColorSpec f]
gcFontA f
f = [forall a b. b -> GCAttributes a b
GCFont f
f]
usefontstructs :: String
usefontstructs = String -> ShowS
argKey String
"fontstructs" String
"auto"