libgimpprint API Reference: include/gimp-print/color.h Source File

Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

# include/gimp-print/color.h

Go to the documentation of this file.

    00001 /*
    00002  * "$Id: color_8h-source.html,v 1.1.1.2 2004/12/22 23:48:57 jlovell Exp $"
    00003  *
    00004  *   libgimpprint color functions.
    00005  *
    00006  *   Copyright 1997-2000 Michael Sweet (mike@easysw.com) and
    00007  *      Robert Krawitz (rlk@alum.mit.edu)
    00008  *
    00009  *   This program is free software; you can redistribute it and/or modify it
    00010  *   under the terms of the GNU General Public License as published by the Free
    00011  *   Software Foundation; either version 2 of the License, or (at your option)
    00012  *   any later version.
    00013  *
    00014  *   This program is distributed in the hope that it will be useful, but
    00015  *   WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
    00016  *   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    00017  *   for more details.
    00018  *
    00019  *   You should have received a copy of the GNU General Public License
    00020  *   along with this program; if not, write to the Free Software
    00021  *   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    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;       /* Color module name */
    00061   const char *long_name;        /* Long name for UI */
    00062   const stp_colorfuncs_t *colorfuncs;
    00063 } stp_color_t;
    00064
    00065 /*
    00066  * Initialize the color machinery.  Return value is the number
    00067  * of columns of output
    00068  */
    00069 extern int stp_color_init(stp_vars_t *v, stp_image_t *image, size_t steps);
    00070
    00071 /*
    00072  * Acquire input and perform color conversion.  Return value
    00073  * is status; zero is success.
    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 /* GIMP_PRINT_COLOR_H */
    00136 /*
    00137  * End of "$Id: color_8h-source.html,v 1.1.1.2 2004/12/22 23:48:57 jlovell Exp $".
    00138  */