tryAllocColor :: FudgetIO f => ColormapId -> RGB -> (Maybe Color -> f b ho) -> f b ho tryAllocColorF :: ColormapId -> RGB -> Cont (F b c) (Maybe Color) allocColor :: FudgetIO f => ColormapId -> RGB -> Cont (f b ho) Color allocColorF :: ColormapId -> RGB -> Cont (F b c) Color allocColorPixel :: FudgetIO f => ColormapId -> RGB -> Cont (f b ho) Pixel allocColorPixelF :: ColormapId -> RGB -> Cont (F b c) Pixel tryAllocNamedColor :: FudgetIO f => ColormapId -> ColorName -> (Maybe Color -> f b ho) -> f b ho tryAllocNamedColorF :: ColormapId -> ColorName -> Cont (F b c) (Maybe Color) allocNamedColor :: FudgetIO f => ColormapId -> ColorName -> Cont (f b ho) Color allocNamedColorF :: ColormapId -> ColorName -> Cont (F b c) Color allocNamedColorPixel :: FudgetIO f => ColormapId -> ColorName -> Cont (f b ho) Pixel allocNamedColorPixelF :: ColormapId -> ColorName -> Cont (F b c) Pixel allocNamedColorDef :: FudgetIO f => ColormapId -> ColorName -> String -> Cont (f b ho) Color allocNamedColorDefPixel :: FudgetIO f => ColormapId -> ColorName -> String -> (Pixel -> f b ho) -> f b ho
tryAllocColor colormap rgb colkernel
data RGB = RGB Int Int Int
data Color = Color {colorPixel :: Pixel, colorRGB :: RGB}
data Pixel = Pixel Word
The functions whose names do not begin with try
abort the program
with an error message, if the allocation fails.
allocNamedColorDef
and allocNamedColorDefPixel
first tries to
allocate one color. If that fails it outputs a warning message on the standard
error channel and tries a fallback color.
colormap :: ColormapId
defaultColormap
is the only supported colormap in the current implementation.
rgb :: RGB
colkernel :: Maybe Color -> f b ho
Maybe Color
value.
XAllocColor
in the Xlib Programming Manual
.