Main Page   Modules   Alphabetical List   Data Structures   File List   Data Fields   Globals  

include/gimp-print/curve-cache.h

Go to the documentation of this file.
00001 /*
00002  * "$Id: curve-cache.h,v 1.2 2004/05/07 19:20:23 rleigh Exp $"
00003  *
00004  *   Gimp-Print color management module - traditional Gimp-Print algorithm.
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 
00024 /*
00025  * This file must include only standard C header files.  The core code must
00026  * compile on generic platforms that don't support glib, gimp, gtk, etc.
00027  */
00028 
00029 #ifndef GIMP_PRINT_CURVE_CACHE_H
00030 #define GIMP_PRINT_CURVE_CACHE_H
00031 
00032 #ifdef __cplusplus
00033 extern "C" {
00034 #endif
00035 
00036 #ifdef HAVE_CONFIG_H
00037 #include <config.h>
00038 #endif
00039 #include <gimp-print/gimp-print.h>
00040 #include "gimp-print-internal.h"
00041 #include <gimp-print/gimp-print-intl-internal.h>
00042 
00043 typedef struct
00044 {
00045   stp_curve_t *curve;
00046   const double *d_cache;
00047   const unsigned short *s_cache;
00048   size_t count;
00049 } stp_cached_curve_t;
00050 
00051 extern void stp_curve_free_curve_cache(stp_cached_curve_t *cache);
00052 
00053 extern void stp_curve_cache_curve_data(stp_cached_curve_t *cache);
00054 
00055 extern stp_curve_t *stp_curve_cache_get_curve(stp_cached_curve_t *cache);
00056 
00057 extern void stp_curve_cache_curve_invalidate(stp_cached_curve_t *cache);
00058 
00059 extern void stp_curve_cache_set_curve(stp_cached_curve_t *cache,
00060                                       stp_curve_t *curve);
00061 
00062 extern void stp_curve_cache_set_curve_copy(stp_cached_curve_t *cache,
00063                                            const stp_curve_t *curve);
00064 
00065 extern const size_t stp_curve_cache_get_count(stp_cached_curve_t *cache);
00066 
00067 extern const unsigned short *stp_curve_cache_get_ushort_data(stp_cached_curve_t *cache);
00068 
00069 extern const double *stp_curve_cache_get_double_data(stp_cached_curve_t *cache);
00070 
00071 extern void stp_curve_cache_copy(stp_cached_curve_t *dest,
00072                                  const stp_cached_curve_t *src);
00073 
00074 #define CURVE_CACHE_FAST_USHORT(cache) ((cache)->s_cache)
00075 #define CURVE_CACHE_FAST_DOUBLE(cache) ((cache)->d_cache)
00076 #define CURVE_CACHE_FAST_COUNT(cache) ((cache)->count)
00077 
00078 #ifdef __cplusplus
00079   }
00080 #endif
00081 
00082 #endif /* GIMP_PRINT_CURVE_CACHE_H */

Generated on Wed May 12 20:21:27 2004 for libgimpprint API Reference by doxygen1.2.17