00001 /* 00002 * "$Id: paper.h,v 1.4 2004/05/07 19:20:23 rleigh Exp $" 00003 * 00004 * libgimpprint paper 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_PAPER_H 00030 #define GIMP_PRINT_PAPER_H 00031 00032 #ifdef __cplusplus 00033 extern "C" { 00034 #endif 00035 00036 #include <gimp-print/vars.h> 00037 00050 typedef enum 00051 { 00053 PAPERSIZE_ENGLISH_STANDARD, 00055 PAPERSIZE_METRIC_STANDARD, 00057 PAPERSIZE_ENGLISH_EXTENDED, 00059 PAPERSIZE_METRIC_EXTENDED 00060 } stp_papersize_unit_t; 00061 00063 typedef struct 00064 { 00066 char *name; 00068 char *text; 00070 char *comment; 00072 unsigned width; 00074 unsigned height; 00076 unsigned top; 00078 unsigned left; 00080 unsigned bottom; 00082 unsigned right; 00084 stp_papersize_unit_t paper_unit; 00085 } stp_papersize_t; 00086 00091 extern int stp_known_papersizes(void); 00092 00099 extern const stp_papersize_t *stp_get_papersize_by_name(const char *name); 00100 00109 extern const stp_papersize_t *stp_get_papersize_by_size(int length, 00110 int width); 00111 00119 extern const stp_papersize_t *stp_get_papersize_by_index(int idx); 00120 00121 extern void stp_default_media_size(const stp_vars_t *v, 00122 int *width, int *height); 00123 00126 #ifdef __cplusplus 00127 } 00128 #endif 00129 00130 #endif /* GIMP_PRINT_PAPER_H */ 00131 /* 00132 * End of "$Id: paper.h,v 1.4 2004/05/07 19:20:23 rleigh Exp $". 00133 */