JWM Source Documentation
color.h File Reference
Header for the color functions. More...
Go to the source code of this file.
Detailed Description
Enumeration Type Documentation
| enum ColorType |
Enumeration of colors used for various JWM components.
- Enumerator:
Function Documentation
| void DestroyColors | ( | ) |
| void GetColor | ( | XColor * | c | ) |
Get the color pixel from red, green, and blue values.
- Parameters:
-
c The structure containing the rgb values and the pixel value.
| void GetColorFromIndex | ( | XColor * | c | ) |
Extract the RGB components from a RGB linear pixel value.
This does the reverse of GetColorIndex.
- Parameters:
-
c The structure containing the rgb values and pixel value.
| void GetColorFromPixel | ( | XColor * | c | ) |
Get the RGB components from a color pixel.
This does the reverse of GetColor.
- Parameters:
-
c The structure containing the rgb values and pixel value.
| void GetColorIndex | ( | XColor * | c | ) |
Get an RGB pixel value from RGB components.
This is used when loading images from external sources. When doing this we need to know the color components even if we are using a color map so we just pretend to have a linear RGB colormap. This prevents calls to XQueryColor.
- Parameters:
-
c The structure containing the rgb values and pixel value.
| XftColor* GetXftColor | ( | ColorType | type | ) |
Get an XFT color.
- Parameters:
-
type The color whose XFT color to get.
- Returns:
- The XFT color.
| void InitializeColors | ( | ) |
| int ParseColor | ( | const char * | value, |
| XColor * | color | ||
| ) |
Parse a color.
- Parameters:
-
value The color name or hex value. color The color return value (with pixel and components filled).
- Returns:
- 1 on success, 0 on failure.
| void SetColor | ( | ColorType | c, |
| const char * | value | ||
| ) |
Set the color to use for a component.
- Parameters:
-
c The component whose color to set. value The color to use.
| void ShutdownColors | ( | ) |
| void StartupColors | ( | ) |
Variable Documentation
| unsigned long colors[COLOR_COUNT] |