diff options
author | Daniel Stenberg <daniel@haxx.se> | 2002-03-26 13:47:42 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2002-03-26 13:47:42 +0000 |
commit | e4469775794e43c6bb0c6cb00e7fa8f4d9fd788e (patch) | |
tree | 122f0cf7544da29585dc2205fe9c07ceef1e7452 /uisimulator | |
parent | d2a47e88c162b410a23ede7caabb066f1f1924d0 (diff) | |
download | rockbox-e4469775794e43c6bb0c6cb00e7fa8f4d9fd788e.tar.gz rockbox-e4469775794e43c6bb0c6cb00e7fa8f4d9fd788e.zip |
unused includes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator')
-rw-r--r-- | uisimulator/colors.h | 140 | ||||
-rw-r--r-- | uisimulator/hsv.h | 27 | ||||
-rw-r--r-- | uisimulator/list.h | 38 | ||||
-rw-r--r-- | uisimulator/usleep.h | 20 | ||||
-rw-r--r-- | uisimulator/yarandom.h | 64 |
5 files changed, 0 insertions, 289 deletions
diff --git a/uisimulator/colors.h b/uisimulator/colors.h deleted file mode 100644 index 61421cf5c3..0000000000 --- a/uisimulator/colors.h +++ /dev/null | |||
@@ -1,140 +0,0 @@ | |||
1 | /* xscreensaver, Copyright (c) 1992, 1997 Jamie Zawinski <jwz@jwz.org> | ||
2 | * | ||
3 | * Permission to use, copy, modify, distribute, and sell this software and its | ||
4 | * documentation for any purpose is hereby granted without fee, provided that | ||
5 | * the above copyright notice appear in all copies and that both that | ||
6 | * copyright notice and this permission notice appear in supporting | ||
7 | * documentation. No representations are made about the suitability of this | ||
8 | * software for any purpose. It is provided "as is" without express or | ||
9 | * implied warranty. | ||
10 | */ | ||
11 | |||
12 | #ifndef __COLORS_H__ | ||
13 | #define __COLORS_H__ | ||
14 | |||
15 | /* Like XFreeColors, but works on `XColor *' instead of `unsigned long *' | ||
16 | */ | ||
17 | extern void free_colors (Display *, Colormap, XColor *, int ncolors); | ||
18 | |||
19 | |||
20 | /* Allocates writable, non-contiguous color cells. The number requested is | ||
21 | passed in *ncolorsP, and the number actually allocated is returned there. | ||
22 | (Unlike XAllocColorCells(), this will allocate as many as it can, instead | ||
23 | of failing if they can't all be allocated.) | ||
24 | */ | ||
25 | extern void allocate_writable_colors (Display *dpy, Colormap cmap, | ||
26 | unsigned long *pixels, int *ncolorsP); | ||
27 | |||
28 | |||
29 | /* Generates a sequence of colors evenly spaced between the given pair | ||
30 | of HSV coordinates. | ||
31 | |||
32 | If closed_p is true, the colors will go from the first point to the | ||
33 | second then back to the first. | ||
34 | |||
35 | If allocate_p is true, the colors will be allocated from the map; | ||
36 | if enough colors can't be allocated, we will try for less, and the | ||
37 | result will be returned to ncolorsP. | ||
38 | |||
39 | If writable_p is true, writable color cells will be allocated; | ||
40 | otherwise, read-only cells will be allocated. | ||
41 | */ | ||
42 | extern void make_color_ramp (Display *dpy, Colormap cmap, | ||
43 | int h1, double s1, double v1, | ||
44 | int h2, double s2, double v2, | ||
45 | XColor *colors, int *ncolorsP, | ||
46 | Bool closed_p, | ||
47 | Bool allocate_p, | ||
48 | Bool writable_p); | ||
49 | |||
50 | /* Generates a sequence of colors evenly spaced around the triangle | ||
51 | indicated by the thee HSV coordinates. | ||
52 | |||
53 | If allocate_p is true, the colors will be allocated from the map; | ||
54 | if enough colors can't be allocated, we will try for less, and the | ||
55 | result will be returned to ncolorsP. | ||
56 | |||
57 | If writable_p is true, writable color cells will be allocated; | ||
58 | otherwise, read-only cells will be allocated. | ||
59 | */ | ||
60 | extern void make_color_loop (Display *, Colormap, | ||
61 | int h1, double s1, double v1, | ||
62 | int h2, double s2, double v2, | ||
63 | int h3, double s3, double v3, | ||
64 | XColor *colors, int *ncolorsP, | ||
65 | Bool allocate_p, | ||
66 | Bool writable_p); | ||
67 | |||
68 | |||
69 | /* Allocates a hopefully-interesting colormap, which will be a closed loop | ||
70 | without any sudden transitions. | ||
71 | |||
72 | If allocate_p is true, the colors will be allocated from the map; | ||
73 | if enough colors can't be allocated, we will try for less, and the | ||
74 | result will be returned to ncolorsP. An error message will be | ||
75 | printed on stderr (if verbose_p). | ||
76 | |||
77 | If *writable_pP is true, writable color cells will be allocated; | ||
78 | otherwise, read-only cells will be allocated. If no writable cells | ||
79 | cannot be allocated, we will try to allocate unwritable cells | ||
80 | instead, and print a message on stderr to that effect (if verbose_p). | ||
81 | */ | ||
82 | extern void make_smooth_colormap (Display *dpy, Visual *visual, | ||
83 | Colormap cmap, | ||
84 | XColor *colors, int *ncolorsP, | ||
85 | Bool allocate_p, | ||
86 | Bool *writable_pP, | ||
87 | Bool verbose_p); | ||
88 | |||
89 | /* Allocates a uniform colormap which touches each hue of the spectrum, | ||
90 | evenly spaced. The saturation and intensity are chosen randomly, but | ||
91 | will be high enough to be visible. | ||
92 | |||
93 | If allocate_p is true, the colors will be allocated from the map; | ||
94 | if enough colors can't be allocated, we will try for less, and the | ||
95 | result will be returned to ncolorsP. An error message will be | ||
96 | printed on stderr (if verbose_p). | ||
97 | |||
98 | If *writable_pP is true, writable color cells will be allocated; | ||
99 | otherwise, read-only cells will be allocated. If no writable cells | ||
100 | cannot be allocated, we will try to allocate unwritable cells | ||
101 | instead, and print a message on stderr to that effect (if verbose_p). | ||
102 | */ | ||
103 | extern void make_uniform_colormap (Display *dpy, Visual *visual, | ||
104 | Colormap cmap, | ||
105 | XColor *colors, int *ncolorsP, | ||
106 | Bool allocate_p, | ||
107 | Bool *writable_pP, | ||
108 | Bool verbose_p); | ||
109 | |||
110 | /* Allocates a random colormap (the colors are unrelated to one another.) | ||
111 | If `bright_p' is false, the colors will be completely random; if it is | ||
112 | true, all of the colors will be bright enough to see on a black background. | ||
113 | |||
114 | If allocate_p is true, the colors will be allocated from the map; | ||
115 | if enough colors can't be allocated, we will try for less, and the | ||
116 | result will be returned to ncolorsP. An error message will be | ||
117 | printed on stderr (if verbose_p). | ||
118 | |||
119 | If *writable_pP is true, writable color cells will be allocated; | ||
120 | otherwise, read-only cells will be allocated. If no writable cells | ||
121 | cannot be allocated, we will try to allocate unwritable cells | ||
122 | instead, and print a message on stderr to that effect (if verbose_p). | ||
123 | */ | ||
124 | extern void make_random_colormap (Display *dpy, Visual *visual, | ||
125 | Colormap cmap, | ||
126 | XColor *colors, int *ncolorsP, | ||
127 | Bool bright_p, | ||
128 | Bool allocate_p, | ||
129 | Bool *writable_pP, | ||
130 | Bool verbose_p); | ||
131 | |||
132 | |||
133 | /* Assuming that the array of colors indicates the current state of a set | ||
134 | of writable color cells, this rotates the contents of the array by | ||
135 | `distance' steps, moving the colors of cell N to cell (N - distance). | ||
136 | */ | ||
137 | extern void rotate_colors (Display *, Colormap, | ||
138 | XColor *, int ncolors, int distance); | ||
139 | |||
140 | #endif /* __COLORS_H__ */ | ||
diff --git a/uisimulator/hsv.h b/uisimulator/hsv.h deleted file mode 100644 index e0fdfb0fe6..0000000000 --- a/uisimulator/hsv.h +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | /* xscreensaver, Copyright (c) 1992, 1997 Jamie Zawinski <jwz@jwz.org> | ||
2 | * | ||
3 | * Permission to use, copy, modify, distribute, and sell this software and its | ||
4 | * documentation for any purpose is hereby granted without fee, provided that | ||
5 | * the above copyright notice appear in all copies and that both that | ||
6 | * copyright notice and this permission notice appear in supporting | ||
7 | * documentation. No representations are made about the suitability of this | ||
8 | * software for any purpose. It is provided "as is" without express or | ||
9 | * implied warranty. | ||
10 | */ | ||
11 | |||
12 | #ifndef __HSV_H__ | ||
13 | #define __HSV_H__ | ||
14 | |||
15 | /* Converts between RGB and HSV color spaces. | ||
16 | R, G, and B are in the range 0 - 65535; | ||
17 | H is in the range 0 - 360; | ||
18 | S and V are in the range 0.0 - 1.0. | ||
19 | */ | ||
20 | extern void hsv_to_rgb (int h, double s, double v, | ||
21 | unsigned short *r, | ||
22 | unsigned short *g, | ||
23 | unsigned short *b); | ||
24 | extern void rgb_to_hsv (unsigned short r, unsigned short g, unsigned short b, | ||
25 | int *h, double *s, double *v); | ||
26 | |||
27 | #endif /* __HSV_H__ */ | ||
diff --git a/uisimulator/list.h b/uisimulator/list.h deleted file mode 100644 index 91a85869bc..0000000000 --- a/uisimulator/list.h +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | #ifndef LIST_H | ||
2 | #define LIST_H | ||
3 | |||
4 | |||
5 | class ListWalk { | ||
6 | public: | ||
7 | ListWalk(class List *list); | ||
8 | void restart(); | ||
9 | |||
10 | void* getNext(); | ||
11 | |||
12 | private: | ||
13 | int index; | ||
14 | class List *list; | ||
15 | }; | ||
16 | |||
17 | class List { | ||
18 | friend ListWalk; | ||
19 | public: | ||
20 | List(); | ||
21 | |||
22 | void* getNext(void *); // next after this | ||
23 | |||
24 | int getSize(); | ||
25 | |||
26 | bool add(void *); | ||
27 | void *remove(void *); | ||
28 | |||
29 | private: | ||
30 | void **data; | ||
31 | int datasize; | ||
32 | |||
33 | int size; | ||
34 | |||
35 | }; | ||
36 | |||
37 | |||
38 | #endif // LIST_H | ||
diff --git a/uisimulator/usleep.h b/uisimulator/usleep.h deleted file mode 100644 index c40363ef4a..0000000000 --- a/uisimulator/usleep.h +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | /* xscreensaver, Copyright (c) 1992, 1996 Jamie Zawinski <jwz@jwz.org> | ||
2 | * | ||
3 | * Permission to use, copy, modify, distribute, and sell this software and its | ||
4 | * documentation for any purpose is hereby granted without fee, provided that | ||
5 | * the above copyright notice appear in all copies and that both that | ||
6 | * copyright notice and this permission notice appear in supporting | ||
7 | * documentation. No representations are made about the suitability of this | ||
8 | * software for any purpose. It is provided "as is" without express or | ||
9 | * implied warranty. | ||
10 | */ | ||
11 | |||
12 | #ifndef __SCREENHACK_USLEEP_H__ | ||
13 | #define __SCREENHACK_USLEEP_H__ | ||
14 | |||
15 | extern void screenhack_usleep (unsigned long usecs); | ||
16 | |||
17 | #undef usleep | ||
18 | #define usleep(usecs) screenhack_usleep(usecs) | ||
19 | |||
20 | #endif /* __SCREENHACK_USLEEP_H__ */ | ||
diff --git a/uisimulator/yarandom.h b/uisimulator/yarandom.h deleted file mode 100644 index 0e1dfcfb76..0000000000 --- a/uisimulator/yarandom.h +++ /dev/null | |||
@@ -1,64 +0,0 @@ | |||
1 | /* xscreensaver, Copyright (c) 1997, 1998 by Jamie Zawinski <jwz@jwz.org> | ||
2 | * | ||
3 | * Permission to use, copy, modify, distribute, and sell this software and its | ||
4 | * documentation for any purpose is hereby granted without fee, provided that | ||
5 | * the above copyright notice appear in all copies and that both that | ||
6 | * copyright notice and this permission notice appear in supporting | ||
7 | * documentation. No representations are made about the suitability of this | ||
8 | * software for any purpose. It is provided "as is" without express or | ||
9 | * implied warranty. | ||
10 | */ | ||
11 | |||
12 | #ifndef __YARANDOM_H__ | ||
13 | #define __YARANDOM_H__ | ||
14 | |||
15 | #undef random | ||
16 | #undef rand | ||
17 | #undef drand48 | ||
18 | #undef srandom | ||
19 | #undef srand | ||
20 | #undef srand48 | ||
21 | #undef frand | ||
22 | #undef RAND_MAX | ||
23 | |||
24 | #ifdef VMS | ||
25 | # include "vms-gtod.h" | ||
26 | #endif | ||
27 | |||
28 | extern unsigned int ya_random (void); | ||
29 | extern void ya_rand_init (unsigned int); | ||
30 | |||
31 | #define random() ya_random() | ||
32 | #define RAND_MAX 0x7FFFFFFF | ||
33 | |||
34 | /*#define srandom(i) ya_rand_init(0)*/ | ||
35 | |||
36 | /* Define these away to keep people from using the wrong APIs in xscreensaver. | ||
37 | */ | ||
38 | #define rand __ERROR_use_random_not_rand_in_xscreensaver__ | ||
39 | #define drand48 __ERROR_use_random_not_drand48_in_xscreensaver__ | ||
40 | #define srandom __ERROR_do_not_call_srandom_in_xscreensaver__ | ||
41 | #define srand __ERROR_do_not_call_srand_in_xscreensaver__ | ||
42 | #define srand48 __ERROR_do_not_call_srand48_in_xscreensaver__ | ||
43 | #define ya_rand_init __ERROR_do_not_call_ya_rand_init_in_xscreensaver__ | ||
44 | |||
45 | |||
46 | #if defined (__GNUC__) && (__GNUC__ >= 2) | ||
47 | /* Implement frand using GCC's statement-expression extension. */ | ||
48 | |||
49 | # define frand(f) \ | ||
50 | ({ double tmp = (((double) random()) / \ | ||
51 | (((double) ((unsigned int)~0)) / ((double) (f)))); \ | ||
52 | tmp < 0 ? (-tmp) : tmp; }) | ||
53 | |||
54 | #else /* not GCC2 - implement frand using a global variable.*/ | ||
55 | |||
56 | static double _frand_tmp_; | ||
57 | # define frand(f) \ | ||
58 | (_frand_tmp_ = (((double) random()) / \ | ||
59 | (((double) ((unsigned int)~0)) / ((double) (f)))), \ | ||
60 | _frand_tmp_ < 0 ? (-_frand_tmp_) : _frand_tmp_) | ||
61 | |||
62 | #endif /* not GCC2 */ | ||
63 | |||
64 | #endif /* __YARANDOM_H__ */ | ||