-
Notifications
You must be signed in to change notification settings - Fork 0
/
color_l.h
47 lines (35 loc) · 1.34 KB
/
color_l.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/**********************************************************************
* color_l.h - Color list object declaration
*
* Copyright 1993, David Nedde
*
* Permission to use, copy, modify, and distribute this software
* and its documentation for any purpose and without fee is granted
* provided that the above copyright notice appears in all copies.
* It is provided "as is" without express or implied warranty.
**********************************************************************/
#ifndef __COLOR_L_H__
#define __COLOR_L_H__
#include "list.h"
#define SHADES 4 /* Number of shades for colors in the rgb.txt file */
typedef struct {
list_type shaded_4_list;
} color_list_struct, *color_list_type;
typedef struct {
int r,g,b;
char * name;
int last_char;
} color_struct, *color_type;
color_list_type color_list__create(/*filename*/);
void color_list__destroy(/*color_list*/);
color_type color_list__remove(/* color_list, index*/);
int color_list__get_count(/* color_list*/);
color_type color_list__get_last(/* color_list*/);
color_type color_list__get_prev(/* color_list*/);
#ifdef NOT_USED
char * color__get_shade(/* color, shade_num*/);
#endif
/* Inline functions */
#define color_list__get_cell(list, index) \
((color_type)list__get_cell((list)->shaded_4_list, index))
#endif