alsa.audio: limit the supported frequencies to common set
[AROS.git] / workbench / libs / icon / changetoselectediconcolor.c
blob5ad13630e195331c9974b500bf0d3a38401d445b
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include "icon_intern.h"
8 #define EFFECT_NONE (0)
9 #define EFFECT_LIGHTEN (1)
10 #define EFFECT_TINT_BLUE (2)
11 #define EFFECT_XOR (3)
13 #define EFFECT EFFECT_LIGHTEN
15 /*****************************************************************************
17 NAME */
19 AROS_LH1(VOID, ChangeToSelectedIconColor,
21 /* SYNOPSIS */
22 AROS_LHA(struct ColorRegister *, cr, A0),
24 /* LOCATION */
25 struct Library *, IconBase, 33, Icon)
27 /* FUNCTION
28 Change a color register for selected icon state.
30 INPUTS
31 cr - colorregister to be changed.
33 RESULT
35 NOTES
37 EXAMPLE
39 BUGS
41 SEE ALSO
43 INTERNALS
45 *****************************************************************************/
47 AROS_LIBFUNC_INIT
49 #if EFFECT == EFFECT_LIGHTEN
50 cr->red = (cr->red >> 1) + (0xFF >> 1);
51 cr->green = (cr->green >> 1) + (0xFF >> 1);
52 cr->blue = (cr->blue >> 1) + (0xFF >> 1);
53 #elif EFFECT == EFFECT_TINT_BLUE
54 cr->red = (cr->red >> 1);
55 cr->green = (cr->green >> 1);
56 cr->blue = (cr->blue >> 1) + (0xFF >> 2);
57 #elif EFFECT == EFFECT_XOR
58 cr->red = cr->red ^ 0xFF;
59 cr->green = cr->green ^ 0xFF;
60 cr->blue = cr->blue ^ 0xFF;
61 #endif
63 AROS_LIBFUNC_EXIT
64 } /* ChangeToSelectedIconColor() */