00001 /* 00002 * "$Id: image.c,v 1.5 2004/04/25 12:17:51 rleigh Exp $" 00003 * 00004 * Print plug-in driver utility functions for the GIMP. 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 #ifdef HAVE_CONFIG_H 00025 #include <config.h> 00026 #endif 00027 #include <gimp-print/gimp-print.h> 00028 #include "gimp-print-internal.h" 00029 00030 void 00031 stp_image_init(stp_image_t *image) 00032 { 00033 if (image->init) 00034 image->init(image); 00035 } 00036 00037 void 00038 stp_image_reset(stp_image_t *image) 00039 { 00040 if (image->reset) 00041 image->reset(image); 00042 } 00043 00044 int 00045 stp_image_width(stp_image_t *image) 00046 { 00047 return image->width(image); 00048 } 00049 00050 int 00051 stp_image_height(stp_image_t *image) 00052 { 00053 return image->height(image); 00054 } 00055 00056 stp_image_status_t 00057 stp_image_get_row(stp_image_t *image, unsigned char *data, 00058 size_t byte_limit, int row) 00059 { 00060 return image->get_row(image, data, byte_limit, row); 00061 } 00062 00063 const char * 00064 stp_image_get_appname(stp_image_t *image) 00065 { 00066 if (image->get_appname) 00067 return image->get_appname(image); 00068 else 00069 return NULL; 00070 } 00071 00072 void 00073 stp_image_conclude(stp_image_t *image) 00074 { 00075 if (image->conclude) 00076 image->conclude(image); 00077 }