tumble_input.h

Thu, 10 Apr 2003 09:02:12 +0000

author
eric
date
Thu, 10 Apr 2003 09:02:12 +0000
changeset 158
e5452e27f518
parent 157
160d624271cc
child 166
301f6f17c364
permissions
-rw-r--r--

include tumble version in usage message.

eric@141 1 /*
eric@141 2 * tumble: build a PDF file from image files
eric@141 3 *
eric@157 4 * $Id: tumble_input.h,v 1.3 2003/04/10 00:47:30 eric Exp $
eric@141 5 * Copyright 2003 Eric Smith <eric@brouhaha.com>
eric@141 6 *
eric@141 7 * This program is free software; you can redistribute it and/or modify
eric@141 8 * it under the terms of the GNU General Public License version 2 as
eric@141 9 * published by the Free Software Foundation. Note that permission is
eric@141 10 * not granted to redistribute this program under the terms of any
eric@141 11 * other version of the General Public License.
eric@141 12 *
eric@141 13 * This program is distributed in the hope that it will be useful,
eric@141 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
eric@141 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
eric@141 16 * GNU General Public License for more details.
eric@141 17 *
eric@141 18 * You should have received a copy of the GNU General Public License
eric@141 19 * along with this program; if not, write to the Free Software
eric@141 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA
eric@141 21 */
eric@141 22
eric@141 23
eric@141 24 typedef struct
eric@141 25 {
eric@141 26 bool color;
eric@141 27 uint32_t width_samples, height_samples;
eric@141 28 double width_points, height_points;
eric@141 29 double x_resolution, y_resolution;
eric@141 30 } image_info_t;
eric@141 31
eric@141 32
eric@141 33 typedef struct
eric@141 34 {
eric@151 35 bool (*match_suffix) (char *suffix);
eric@141 36 bool (*open_input_file) (FILE *f, char *name);
eric@141 37 bool (*close_input_file) (void);
eric@141 38 bool (*last_input_page) (void);
eric@141 39 bool (*get_image_info) (int image,
eric@141 40 input_attributes_t input_attributes,
eric@141 41 image_info_t *image_info);
eric@141 42 bool (*process_image) (int image,
eric@141 43 input_attributes_t input_attributes,
eric@141 44 image_info_t *image_info,
eric@141 45 pdf_page_handle page);
eric@141 46 } input_handler_t;
eric@141 47
eric@141 48
eric@141 49 void install_input_handler (input_handler_t *handler);
eric@141 50
eric@141 51
eric@151 52 bool match_input_suffix (char *suffix);
eric@141 53 bool open_input_file (char *name);
eric@141 54 bool close_input_file (void);
eric@141 55 bool last_input_page (void);
eric@141 56 bool get_image_info (int image,
eric@141 57 input_attributes_t input_attributes,
eric@141 58 image_info_t *image_info);
eric@141 59 bool process_image (int image,
eric@141 60 input_attributes_t input_attributes,
eric@141 61 image_info_t *image_info,
eric@141 62 pdf_page_handle page);
eric@141 63
eric@141 64
eric@141 65 void init_tiff_handler (void);
eric@141 66 void init_jpeg_handler (void);
eric@157 67 void init_pbm_handler (void);