00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00029 #ifndef GIMP_PRINT_COLOR_H
00030 #define GIMP_PRINT_COLOR_H
00031
00032 #ifdef __cplusplus
00033 extern "C" {
00034 #endif
00035
00047 typedef struct
00048 {
00049 int (*init)(stp_vars_t *v, stp_image_t *image, size_t steps);
00050 int (*get_row)(stp_vars_t *v, stp_image_t *image,
00051 int row, unsigned *zero_mask);
00052 stp_parameter_list_t (*list_parameters)(const stp_vars_t *v);
00053 void (*describe_parameter)(const stp_vars_t *v, const char *name,
00054 stp_parameter_t *description);
00055 } stp_colorfuncs_t;
00056
00057
00058 typedef struct stp_color
00059 {
00060 const char *short_name;
00061 const char *long_name;
00062 const stp_colorfuncs_t *colorfuncs;
00063 } stp_color_t;
00064
00065
00066
00067
00068
00069 extern int stp_color_init(stp_vars_t *v, stp_image_t *image, size_t steps);
00070
00071
00072
00073
00074
00075 extern int stp_color_get_row(stp_vars_t *v, stp_image_t *image,
00076 int row, unsigned *zero_mask);
00077
00078 extern stp_parameter_list_t stp_color_list_parameters(const stp_vars_t *v);
00079
00080 extern void stp_color_describe_parameter(const stp_vars_t *v, const char *name,
00081 stp_parameter_t *description);
00082
00083 extern int
00084 stp_color_register(const stp_color_t *color);
00085
00086 extern int
00087 stp_color_unregister(const stp_color_t *color);
00088
00093 extern int
00094 stp_color_count(void);
00095
00102 extern const stp_color_t *
00103 stp_get_color_by_name(const char *name);
00104
00111 extern const stp_color_t *
00112 stp_get_color_by_index(int idx);
00113
00114 extern const stp_color_t *
00115 stp_get_color_by_colorfuncs(stp_colorfuncs_t *colorfuncs);
00116
00122 extern const char *
00123 stp_color_get_name(const stp_color_t *c);
00124
00130 extern const char *
00131 stp_color_get_long_name(const stp_color_t *c);
00132
00133
00134
00135 #endif
00136
00137
00138