00001 /* 00002 * "$Id: image.h,v 1.6 2004/04/25 12:17:49 rleigh Exp $" 00003 * 00004 * libgimpprint image 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_IMAGE_H 00030 #define GIMP_PRINT_IMAGE_H 00031 00032 #ifdef __cplusplus 00033 extern "C" { 00034 #endif 00035 00044 /* 00045 * Constants... 00046 */ 00047 00049 #define STP_CHANNEL_LIMIT (32) 00050 00051 00053 typedef enum 00054 { 00055 STP_IMAGE_STATUS_OK, 00056 STP_IMAGE_STATUS_ABORT 00057 } stp_image_status_t; 00058 00065 typedef struct stp_image 00066 { 00072 void (*init)(struct stp_image *image); 00080 void (*reset)(struct stp_image *image); 00085 int (*width)(struct stp_image *image); 00090 int (*height)(struct stp_image *image); 00108 stp_image_status_t (*get_row)(struct stp_image *image, unsigned char *data, 00109 size_t byte_limit, int row); 00110 00115 const char *(*get_appname)(struct stp_image *image); 00119 void (*conclude)(struct stp_image *image); 00124 void *rep; 00125 } stp_image_t; 00126 00127 extern void stp_image_init(stp_image_t *image); 00128 extern void stp_image_reset(stp_image_t *image); 00129 extern int stp_image_width(stp_image_t *image); 00130 extern int stp_image_height(stp_image_t *image); 00131 extern stp_image_status_t stp_image_get_row(stp_image_t *image, 00132 unsigned char *data, 00133 size_t limit, int row); 00134 extern const char *stp_image_get_appname(stp_image_t *image); 00135 extern void stp_image_conclude(stp_image_t *image); 00136 00137 #ifdef __cplusplus 00138 } 00139 #endif 00140 00141 #endif /* GIMP_PRINT_IMAGE_H */ 00142 /* 00143 * End of "$Id: image.h,v 1.6 2004/04/25 12:17:49 rleigh Exp $". 00144 */