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

src/main/printers.h

Go to the documentation of this file.
00001 /*
00002  * "$Id: printers.h,v 1.13 2004/03/28 21:17:38 rlk Exp $"
00003  *
00004  *   libgimpprint header.
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  * Revision History:
00024  *
00025  *   See ChangeLog
00026  */
00027 
00028 /*
00029  * This file must include only standard C header files.  The core code must
00030  * compile on generic platforms that don't support glib, gimp, gtk, etc.
00031  */
00032 
00033 #ifndef GIMP_PRINT_INTERNAL_PRINTERS_H
00034 #define GIMP_PRINT_INTERNAL_PRINTERS_H
00035 
00036 #ifdef __cplusplus
00037 extern "C" {
00038 #endif
00039 
00040 typedef struct
00041 {
00042   stp_parameter_list_t (*list_parameters)(stp_const_vars_t v);
00043   void  (*parameters)(stp_const_vars_t v, const char *name,
00044                       stp_parameter_t *);
00045   void  (*media_size)(stp_const_vars_t v, int *width, int *height);
00046   void  (*imageable_area)(stp_const_vars_t v,
00047                           int *left, int *right, int *bottom, int *top);
00048   void  (*limit)(stp_const_vars_t v, int *max_width, int *max_height,
00049                  int *min_width, int *min_height);
00050   int   (*print)(stp_const_vars_t v, stp_image_t *image);
00051   void  (*describe_resolution)(stp_const_vars_t v, int *x, int *y);
00052   const char *(*describe_output)(stp_const_vars_t v);
00053   int   (*verify)(stp_vars_t v);
00054   int   (*start_job)(stp_const_vars_t v, stp_image_t *image);
00055   int   (*end_job)(stp_const_vars_t v, stp_image_t *image);
00056 } stpi_printfuncs_t;
00057 
00058 typedef struct stpi_internal_family
00059 {
00060   const stpi_printfuncs_t *printfuncs;   /* printfuncs for the printer */
00061   stpi_list_t             *printer_list; /* list of printers */
00062 } stpi_internal_family_t;
00063 
00064 extern int stpi_get_model_id(stp_const_vars_t v);
00065 
00066 extern int stpi_verify_printer_params(stp_vars_t);
00067 
00068 extern int stpi_family_register(stpi_list_t *family);
00069 extern int stpi_family_unregister(stpi_list_t *family);
00070 extern void stpi_initialize_printer_defaults(void);
00071 
00072 extern stp_parameter_list_t stpi_printer_list_parameters(stp_const_vars_t v);
00073 
00074 extern void
00075 stpi_printer_describe_parameter(stp_const_vars_t v, const char *name,
00076                                 stp_parameter_t *description);
00077 
00078 const char *stpi_describe_output(stp_const_vars_t v);
00079 
00080 #ifdef __cplusplus
00081   }
00082 #endif
00083 
00084 #endif /* GIMP_PRINT_INTERNAL_PRINTERS_H */
00085 /*
00086  * End of "$Id: printers.h,v 1.13 2004/03/28 21:17:38 rlk Exp $".
00087  */

Generated on Sat Apr 17 15:42:11 2004 for libgimpprint API Reference by doxygen1.2.17