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

include/gimp-print/printers.h

Go to the documentation of this file.
00001 /*
00002  * "$Id: printers.h,v 1.6 2004/05/07 19:20:23 rleigh Exp $"
00003  *
00004  *   libgimpprint printer 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_PRINTERS_H
00030 #define GIMP_PRINT_PRINTERS_H
00031 
00032 #ifdef __cplusplus
00033 extern "C" {
00034 #endif
00035 
00036 #include <gimp-print/list.h>
00037 #include <gimp-print/vars.h>
00038 
00049 struct stp_printer;
00051 typedef struct stp_printer stp_printer_t;
00052 
00057 extern int stp_printer_model_count(void);
00058 
00066 extern const stp_printer_t *stp_get_printer_by_index(int idx);
00067 
00074 extern const stp_printer_t *stp_get_printer_by_long_name(const char *long_name);
00075 
00082 extern const stp_printer_t *stp_get_printer_by_driver(const char *driver);
00083 
00090 extern const stp_printer_t *stp_get_printer(const stp_vars_t *v);
00091 
00098 extern int stp_get_printer_index_by_driver(const char *driver);
00099 
00105 extern const char *stp_printer_get_long_name(const stp_printer_t * p);
00106 
00112 extern const char *stp_printer_get_driver(const stp_printer_t *p);
00113 
00121 extern const char *stp_printer_get_family(const stp_printer_t *p);
00122 
00128 extern const char *stp_printer_get_manufacturer(const stp_printer_t *p);
00129 
00138 extern int stp_printer_get_model(const stp_printer_t *p);
00139 
00147 extern const stp_vars_t *stp_printer_get_defaults(const stp_printer_t *p);
00148 
00155 extern void stp_set_printer_defaults(stp_vars_t *v, const stp_printer_t *p);
00156 
00157 
00167 extern int stp_print(const stp_vars_t *v, stp_image_t *image);
00168 
00177 extern int stp_start_job(const stp_vars_t *v, stp_image_t *image);
00178 
00185 extern int stp_end_job(const stp_vars_t *v, stp_image_t *image);
00186 
00187 typedef struct
00188 {
00189   stp_parameter_list_t (*list_parameters)(const stp_vars_t *v);
00190   void  (*parameters)(const stp_vars_t *v, const char *name,
00191                       stp_parameter_t *);
00192   void  (*media_size)(const stp_vars_t *v, int *width, int *height);
00193   void  (*imageable_area)(const stp_vars_t *v,
00194                           int *left, int *right, int *bottom, int *top);
00195   void  (*limit)(const stp_vars_t *v, int *max_width, int *max_height,
00196                  int *min_width, int *min_height);
00197   int   (*print)(const stp_vars_t *v, stp_image_t *image);
00198   void  (*describe_resolution)(const stp_vars_t *v, int *x, int *y);
00199   const char *(*describe_output)(const stp_vars_t *v);
00200   int   (*verify)(stp_vars_t *v);
00201   int   (*start_job)(const stp_vars_t *v, stp_image_t *image);
00202   int   (*end_job)(const stp_vars_t *v, stp_image_t *image);
00203 } stp_printfuncs_t;
00204 
00205 typedef struct stp_family
00206 {
00207   const stp_printfuncs_t *printfuncs;   /* printfuncs for the printer */
00208   stp_list_t             *printer_list; /* list of printers */
00209 } stp_family_t;
00210 
00211 extern int stp_get_model_id(const stp_vars_t *v);
00212 
00213 extern int stp_verify_printer_params(stp_vars_t *v);
00214 
00215 extern int stp_family_register(stp_list_t *family);
00216 extern int stp_family_unregister(stp_list_t *family);
00217 extern void stp_initialize_printer_defaults(void);
00218 
00219 extern stp_parameter_list_t stp_printer_list_parameters(const stp_vars_t *v);
00220 
00221 extern void
00222 stp_printer_describe_parameter(const stp_vars_t *v, const char *name,
00223                                stp_parameter_t *description);
00224 
00225 const char *stp_describe_output(const stp_vars_t *v);
00226 
00229 #ifdef __cplusplus
00230   }
00231 #endif
00232 
00233 #endif /* GIMP_PRINT_PRINTERS_H */
00234 /*
00235  * End of "$Id: printers.h,v 1.6 2004/05/07 19:20:23 rleigh Exp $".
00236  */

Generated on Wed Aug 25 07:56:13 2004 for libgimpprint API Reference by doxygen 1.3.6