aboutsummaryrefslogtreecommitdiffstats
path: root/notes/e-bevel-button-util.c
diff options
context:
space:
mode:
Diffstat (limited to 'notes/e-bevel-button-util.c')
-rw-r--r--notes/e-bevel-button-util.c189
1 files changed, 0 insertions, 189 deletions
diff --git a/notes/e-bevel-button-util.c b/notes/e-bevel-button-util.c
deleted file mode 100644
index cfa01f71a2..0000000000
--- a/notes/e-bevel-button-util.c
+++ /dev/null
@@ -1,189 +0,0 @@
-#include <gtk/gtk.h>
-#include "e-bevel-button-util.h"
-
-static void rgb_to_hls (gdouble *r, gdouble *g, gdouble *b);
-static void hls_to_rgb (gdouble *h, gdouble *l, gdouble *s);
-
-void
-e_bevel_button_util_shade (GdkColor *a,
- GdkColor *b,
- gdouble k)
-{
- gdouble red;
- gdouble green;
- gdouble blue;
-
- red = (gdouble) a->red / 65535.0;
- green = (gdouble) a->green / 65535.0;
- blue = (gdouble) a->blue / 65535.0;
-
- rgb_to_hls (&red, &green, &blue);
-
- green *= k;
- if (green > 1.0)
- green = 1.0;
- else if (green < 0.0)
- green = 0.0;
-
- blue *= k;
- if (blue > 1.0)
- blue = 1.0;
- else if (blue < 0.0)
- blue = 0.0;
-
- hls_to_rgb (&red, &green, &blue);
-
- b->red = red * 65535.0;
- b->green = green * 65535.0;
- b->blue = blue * 65535.0;
-}
-
-static void
-rgb_to_hls (gdouble *r,
- gdouble *g,
- gdouble *b)
-{
- gdouble min;
- gdouble max;
- gdouble red;
- gdouble green;
- gdouble blue;
- gdouble h, l, s;
- gdouble delta;
-
- red = *r;
- green = *g;
- blue = *b;
-
- if (red > green)
- {
- if (red > blue)
- max = red;
- else
- max = blue;
-
- if (green < blue)
- min = green;
- else
- min = blue;
- }
- else
- {
- if (green > blue)
- max = green;
- else
- max = blue;
-
- if (red < blue)
- min = red;
- else
- min = blue;
- }
-
- l = (max + min) / 2;
- s = 0;
- h = 0;
-
- if (max != min)
- {
- if (l <= 0.5)
- s = (max - min) / (max + min);
- else
- s = (max - min) / (2 - max - min);
-
- delta = max -min;
- if (red == max)
- h = (green - blue) / delta;
- else if (green == max)
- h = 2 + (blue - red) / delta;
- else if (blue == max)
- h = 4 + (red - green) / delta;
-
- h *= 60;
- if (h < 0.0)
- h += 360;
- }
-
- *r = h;
- *g = l;
- *b = s;
-}
-
-static void
-hls_to_rgb (gdouble *h,
- gdouble *l,
- gdouble *s)
-{
- gdouble hue;
- gdouble lightness;
- gdouble saturation;
- gdouble m1, m2;
- gdouble r, g, b;
-
- lightness = *l;
- saturation = *s;
-
- if (lightness <= 0.5)
- m2 = lightness * (1 + saturation);
- else
- m2 = lightness + saturation - lightness * saturation;
- m1 = 2 * lightness - m2;
-
- if (saturation == 0)
- {
- *h = lightness;
- *l = lightness;
- *s = lightness;
- }
- else
- {
- hue = *h + 120;
- while (hue > 360)
- hue -= 360;
- while (hue < 0)
- hue += 360;
-
- if (hue < 60)
- r = m1 + (m2 - m1) * hue / 60;
- else if (hue < 180)
- r = m2;
- else if (hue < 240)
- r = m1 + (m2 - m1) * (240 - hue) / 60;
- else
- r = m1;
-
- hue = *h;
- while (hue > 360)
- hue -= 360;
- while (hue < 0)
- hue += 360;
-
- if (hue < 60)
- g = m1 + (m2 - m1) * hue / 60;
- else if (hue < 180)
- g = m2;
- else if (hue < 240)
- g = m1 + (m2 - m1) * (240 - hue) / 60;
- else
- g = m1;
-
- hue = *h - 120;
- while (hue > 360)
- hue -= 360;
- while (hue < 0)
- hue += 360;
-
- if (hue < 60)
- b = m1 + (m2 - m1) * hue / 60;
- else if (hue < 180)
- b = m2;
- else if (hue < 240)
- b = m1 + (m2 - m1) * (240 - hue) / 60;
- else
- b = m1;
-
- *h = r;
- *l = g;
- *s = b;
- }
-}
-ports-gnome/commit/x11-fonts?h=gstreamer0.10-removal&id=1d658ca374464c2c49a6ec62cfe43ba1f0e4891b'>Add port x11-fonts/code2001:sat2008-05-105-0/+60 * Reset aaron's port maintainerships due to many maintainer-timeouts.linimon2008-04-291-1/+1 * Reset jylefort's port maintainerships. portmgr has taken his commit bitlinimon2008-04-291-1/+1 * - Build-depend on gawsat2008-04-281-0/+1 * - Update to 2.8sat2008-04-242-4/+4 * * ttf-malayalam:thierry2008-04-244-4/+22 * - Fix build after xorg cleanupmiwi2008-04-211-1/+1 * - Remove unneeded dependency from gtk12/gtk20 [1]miwi2008-04-2078-170/+179 * - Take advantage of CPAN macro from bsd.sites.mk, change ${MASTER_SITE_PERL_C...araujo2008-04-173-6/+3 * - Update to 0.4.2rafan2008-04-132-4/+4 * Change maintainers e-mail address.ehaupt2008-04-111-2/+2 * - Move from versioned tcl/tk CATEGORIES to simple tcl and tk categoriespav2008-04-091-1/+1 * Upgrade to 1.17, switch to mkfontscale / mkfontdir and run fc-cache.thierry2008-04-093-20/+17 * - Update to 0.4.1pav2008-04-073-17/+24 * - Makefile cosmetic changes.lippe2008-04-032-14/+13 * This ttf-indic-fonts is a set of TrueType andthierry2008-04-036-0/+304 * Linux Libertine is a font family with a serif typeface. These fontsthierry2008-04-025-0/+77 * - Remove USE_XLIB/USE_X_PREFIX/USE_XPM in favor of USE_XORGmiwi2008-03-267-13/+7 * Fix plistahze2008-03-262-130/+60 * add SHA256 checksums and reformat Makefileedwin2008-03-252-20/+31 * - Remove USE_XLIB/USE_X_PREFIX/USE_XPM in favor of USE_XORGmiwi2008-03-257-14/+9 * - Remove USE_XLIB/USE_X_PREFIX/USE_XPM in favor of USE_XORGmiwi2008-03-251-1/+1 * - Remove USE_XLIB/USE_X_PREFIX/USE_XPM in favor of USE_XORGmiwi2008-03-244-8/+4 * The FreeBSD GNOME team is proud to annunce the release of GNOME 2.22.0 formarcus2008-03-244-92/+13 * - Remove USE_XLIB/USE_X_PREFIX/USE_XPM in favor of USE_XORGmiwi2008-03-242-5/+2 * - Remove USE_XLIB/USE_X_PREFIX/USE_XPM in favor of USE_XORGmiwi2008-03-244-8/+4 * - Remove USE_XLIB/USE_X_PREFIX/USE_XPM in favor of USE_XORGmiwi2008-03-232-4/+2 * - Remove USE_XLIB in favor of USE_XORGmiwi2008-03-221-2/+1 * - Remove USE_GETOPT_LONG which is a no-op since March 2007pav2008-03-201-1/+0 * Add gnu-unifont 1.0.0, unicode font.vanilla2008-03-194-0/+73 * Update to 2.24ahze2008-03-192-4/+4 * - Remove USE_X_PREFIXbeech2008-03-181-3/+2 * - Remove dependency on X_CLIENTS_PORTS and USE_X_PREFIXmiwi2008-03-141-4/+4 * - Chase devel/sdl12 shlib version bumpmiwi2008-03-131-0/+1 * - Mark xtrans as a BUILD_DEPENDS only (unless specified otherwise with :both)flz2008-03-133-2/+4 * - This actually installs a one line shell script that executed mkfontscale, sopav2008-03-121-0/+3 * - Fix BUILD_DEPENDSgahr2008-03-111-2/+4 * - Remove dependency on X_CLIENTS_PORTgahr2008-03-111-4/+2 * Get Commodore 64 font installed under the X Window System.miwi2008-03-114-0/+40 * - XFree86 support was removed few hours ago - unbreak INDEXpav2008-03-081-14/+8 * remove USE_XLIBoliver2008-03-081-4/+14 * Remove support for XFree8-4.flz2008-03-0833-5035/+6 * Update to 2.23ahze2008-02-242-4/+4 * Fontmatrix is a graphical font manager. Targeted audience are mostlymiwi2008-02-175-0/+75 * Update my address.wxs2008-02-041-1/+1 * - Dependancy fixtabthorpe2008-01-271-3/+4 * Fix PCF Font parser buffer overflow (CVE-2008-0006).flz2008-01-232-1/+25 * Update to 2.22ahze2008-01-013-28/+26 * - Update to 0.43gabor2007-12-273-7/+8 * pass maintainership to Intron <intron@intron.ac>dryice2007-12-241-1/+1 * Remove extra whitespace.olgeni2007-12-241-1/+1 * fix the fonts.alias directory. Thanks Intron <intron@intron.ac> for pointingdryice2007-12-231-2/+2 * Update to 2.21ahze2007-12-213-23/+23 * Add patch that fixes a buffer overflow.flz2007-10-312-0/+12 * Presenting GNOME 2.20.1 and all related works for FreeBSD. The officialmarcus2007-10-252-10/+11 * Replace ttmkfdir by mkfontscale & mkfontdir to install correct files.thierry2007-10-211-7/+12 * Replace ttmkfdir by mkfontscale & mkfontdir to install correct files.thierry2007-10-211-8/+13 * - Drop Maintainershipmiwi2007-10-091-1/+1 * Update to 1.0.5 (security fix).flz2007-10-082-5/+4 * - Sort category Makefilessat2007-10-061-3/+3 * Replace #!/usr/bin/perl with ${PERL}. Bump PORTREVISION.hrs2007-09-281-1/+4 * Dominic is a new dad, and will be too busy for a while to work on ports.linimon2007-09-241-2/+1 * new port: x11-fonts/fonts-indicedwin2007-09-245-0/+63 * Update to 2.20ahze2007-09-194-283/+4 * - Update X.org ports to 7.3.flz2007-09-1415-11/+29 * Welcome bsd.perl.mk. Add support for constructs such as USE_PERL5=5.8.0+.linimon2007-09-081-7/+1 * - Update to 2.7sat2007-09-042-4/+4 * - Reduce dependencies[1].hrs2007-09-023-11/+19 * Update to 2.19ahze2007-08-063-8/+4 * Add a missing dependency on docbook-410 when building fontconfig withmarcus2007-07-29