aboutsummaryrefslogtreecommitdiff
path: root/src/color.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/color.c')
-rw-r--r--src/color.c82
1 files changed, 61 insertions, 21 deletions
diff --git a/src/color.c b/src/color.c
index edf5f7a..1ed527e 100644
--- a/src/color.c
+++ b/src/color.c
@@ -86,13 +86,17 @@ static void DarkenColor(ColorType oldColor, ColorType newColor);
/****************************************************************************
****************************************************************************/
-void InitializeColors() {
+void
+InitializeColors()
+{
}
/****************************************************************************
****************************************************************************/
-void StartupColors() {
+void
+StartupColors()
+{
int x;
int red, green, blue;
@@ -206,7 +210,9 @@ void StartupColors() {
/****************************************************************************
****************************************************************************/
-void ShutdownColors() {
+void
+ShutdownColors()
+{
#ifdef USE_XFT
@@ -232,7 +238,9 @@ void ShutdownColors() {
/****************************************************************************
****************************************************************************/
-void DestroyColors() {
+void
+DestroyColors()
+{
int x;
@@ -250,8 +258,10 @@ void DestroyColors() {
/****************************************************************************
****************************************************************************/
-void ComputeShiftMask(unsigned long maskIn,
- unsigned long *shiftOut, unsigned long *maskOut) {
+void
+ComputeShiftMask(unsigned long maskIn,
+ unsigned long *shiftOut, unsigned long *maskOut)
+{
int shift;
@@ -276,7 +286,9 @@ void ComputeShiftMask(unsigned long maskIn,
/****************************************************************************
****************************************************************************/
-unsigned long GetRGBFromXColor(const XColor *c) {
+unsigned long
+GetRGBFromXColor(const XColor *c)
+{
float red, green, blue;
unsigned long rgb;
@@ -297,7 +309,9 @@ unsigned long GetRGBFromXColor(const XColor *c) {
/****************************************************************************
****************************************************************************/
-XColor GetXColorFromRGB(unsigned long rgb) {
+XColor
+GetXColorFromRGB(unsigned long rgb)
+{
XColor ret = { 0 };
@@ -312,7 +326,9 @@ XColor GetXColorFromRGB(unsigned long rgb) {
/****************************************************************************
****************************************************************************/
-void SetColor(ColorType c, const char *value) {
+void
+SetColor(ColorType c, const char *value)
+{
if(!value) {
Warning("empty color tag");
@@ -331,7 +347,9 @@ void SetColor(ColorType c, const char *value) {
/****************************************************************************
****************************************************************************/
-int ParseColor(ColorType type, const char *value) {
+int
+ParseColor(ColorType type, const char *value)
+{
XColor temp;
unsigned long rgb;
@@ -362,7 +380,9 @@ int ParseColor(ColorType type, const char *value) {
/****************************************************************************
****************************************************************************/
-void SetDefaultColor(ColorType type) {
+void
+SetDefaultColor(ColorType type)
+{
int x;
@@ -377,7 +397,9 @@ void SetDefaultColor(ColorType type) {
/****************************************************************************
****************************************************************************/
-void InitializeNames() {
+void
+InitializeNames()
+{
int x;
@@ -392,7 +414,9 @@ void InitializeNames() {
/****************************************************************************
****************************************************************************/
-unsigned long ReadHex(const char *hex) {
+unsigned long
+ReadHex(const char *hex)
+{
unsigned long value = 0;
int x;
@@ -416,7 +440,9 @@ unsigned long ReadHex(const char *hex) {
/****************************************************************************
****************************************************************************/
-void LightenColor(ColorType oldColor, ColorType newColor) {
+void
+LightenColor(ColorType oldColor, ColorType newColor)
+{
XColor temp;
float red, green, blue;
@@ -444,7 +470,9 @@ void LightenColor(ColorType oldColor, ColorType newColor) {
/****************************************************************************
****************************************************************************/
-void DarkenColor(ColorType oldColor, ColorType newColor) {
+void
+DarkenColor(ColorType oldColor, ColorType newColor)
+{
XColor temp;
float red, green, blue;
@@ -472,7 +500,9 @@ void DarkenColor(ColorType oldColor, ColorType newColor) {
/***************************************************************************
***************************************************************************/
-int GetColorByName(const char *str, XColor *c) {
+int
+GetColorByName(const char *str, XColor *c)
+{
Assert(str);
Assert(c);
@@ -490,7 +520,9 @@ int GetColorByName(const char *str, XColor *c) {
/***************************************************************************
* Compute the RGB components from an index into our RGB colormap.
***************************************************************************/
-void GetColorFromIndex(XColor *c) {
+void
+GetColorFromIndex(XColor *c)
+{
unsigned long red;
unsigned long green;
@@ -511,7 +543,9 @@ void GetColorFromIndex(XColor *c) {
/***************************************************************************
* Compute the pixel value from RGB components.
***************************************************************************/
-void GetDirectPixel(XColor *c) {
+void
+GetDirectPixel(XColor *c)
+{
unsigned long red;
unsigned long green;
@@ -537,7 +571,9 @@ void GetDirectPixel(XColor *c) {
/***************************************************************************
* Compute the pixel value from RGB components.
***************************************************************************/
-void GetMappedPixel(XColor *c) {
+void
+GetMappedPixel(XColor *c)
+{
Assert(c);
@@ -549,7 +585,9 @@ void GetMappedPixel(XColor *c) {
/***************************************************************************
* Compute the pixel value from RGB components.
***************************************************************************/
-void GetColor(XColor *c) {
+void
+GetColor(XColor *c)
+{
Assert(c);
Assert(rootVisual);
@@ -572,7 +610,9 @@ void GetColor(XColor *c) {
* we have a linear RGB colormap even if we don't.
* This prevents calls to XQueryColor later.
***************************************************************************/
-void GetColorIndex(XColor *c) {
+void
+GetColorIndex(XColor *c)
+{
Assert(c);