module Gc(pmCreateGC, wCreateGC, createGC, createGCF, wCreateGCF, pmCreateGCF) where
import Command
import Event
import NullF(F)
import Xrequest
import Xtypes
createGC :: Drawable -> GCId -> GCAttributeList -> (GCId -> f hi ho) -> f hi ho
createGC Drawable
drawable GCId
template GCAttributeList
attr =
let cmd :: XRequest
cmd = Drawable -> GCId -> GCAttributeList -> XRequest
CreateGC Drawable
drawable GCId
template GCAttributeList
attr
expected :: XResponse -> Maybe GCId
expected (GCCreated GCId
gc) = forall a. a -> Maybe a
Just GCId
gc
expected XResponse
_ = forall a. Maybe a
Nothing
in forall {f :: * -> * -> *} {ans} {hi} {ho}.
FudgetIO f =>
XRequest -> (XResponse -> Maybe ans) -> (ans -> f hi ho) -> f hi ho
xrequest XRequest
cmd XResponse -> Maybe GCId
expected
createGCF :: Drawable -> GCId -> GCAttributeList -> (GCId -> F a b) -> F a b
createGCF :: forall a b.
Drawable -> GCId -> GCAttributeList -> (GCId -> F a b) -> F a b
createGCF = forall {f :: * -> * -> *} {hi} {ho}.
FudgetIO f =>
Drawable -> GCId -> GCAttributeList -> (GCId -> f hi ho) -> f hi ho
createGC
wCreateGC :: GCId -> GCAttributeList -> (GCId -> f hi ho) -> f hi ho
wCreateGC GCId
x = forall {f :: * -> * -> *} {hi} {ho}.
FudgetIO f =>
Drawable -> GCId -> GCAttributeList -> (GCId -> f hi ho) -> f hi ho
createGC Drawable
MyWindow GCId
x
pmCreateGC :: PixmapId -> GCId -> GCAttributeList -> (GCId -> f hi ho) -> f hi ho
pmCreateGC PixmapId
x = (forall {f :: * -> * -> *} {hi} {ho}.
FudgetIO f =>
Drawable -> GCId -> GCAttributeList -> (GCId -> f hi ho) -> f hi ho
createGC forall b c a. (b -> c) -> (a -> b) -> a -> c
. PixmapId -> Drawable
Pixmap) PixmapId
x
wCreateGCF :: GCId -> GCAttributeList -> (GCId -> F a b) -> F a b
wCreateGCF = forall a b.
Drawable -> GCId -> GCAttributeList -> (GCId -> F a b) -> F a b
createGCF Drawable
MyWindow
pmCreateGCF :: PixmapId -> GCId -> GCAttributeList -> (GCId -> F a b) -> F a b
pmCreateGCF = forall a b.
Drawable -> GCId -> GCAttributeList -> (GCId -> F a b) -> F a b
createGCF forall b c a. (b -> c) -> (a -> b) -> a -> c
. PixmapId -> Drawable
Pixmap