Back to index

tetex-bin  3.0
special.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2002-2004 the xdvik development team
00003  *
00004  * Permission is hereby granted, free of charge, to any person obtaining a copy
00005  * of this software and associated documentation files (the "Software"), to
00006  * deal in the Software without restriction, including without limitation the
00007  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
00008  * sell copies of the Software, and to permit persons to whom the Software is
00009  * furnished to do so, subject to the following conditions:
00010  *
00011  * The above copyright notice and this permission notice shall be included in
00012  * all copies or substantial portions of the Software.
00013  *
00014  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00015  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00016  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
00017  * PAUL VOJTA OR ANY OTHER AUTHOR OF THIS SOFTWARE BE LIABLE FOR ANY CLAIM,
00018  * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
00019  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
00020  * OTHER DEALINGS IN THE SOFTWARE.
00021  */
00022 
00023 #ifndef SPECIAL_H_
00024 #define SPECIAL_H_
00025 
00026 #include "xdvi-config.h"
00027 #include "xdvi.h"
00028 #include "events.h"
00029 
00030 extern Boolean scan_special(char *str, int str_len, void *data);
00031 
00032 #if PS
00033 
00034 struct psprocs {
00035     void (*toggle)   (int flag);
00036     void (*destroy)  (void);
00037     void (*interrupt)       (void);
00038     void (*endpage)  (void);
00039     void (*drawbegin)       (int, int, const char *);
00040     void (*drawraw)  (const char *);
00041     void (*drawfile) (const char *, FILE *);
00042     void (*drawend)  (const char *);
00043     void (*beginheader)     (void);
00044     void (*endheader)       (void);
00045     void (*newdoc)   (void);
00046 };
00047 
00048 extern void ps_clear_cache(void);
00049 extern void ps_destroy(void);
00050 extern void drawbegin_none(int, int, const char *);
00051 extern void draw_bbox(void);
00052 extern void display_bboxes(void);
00053 extern void clear_bboxes(void);
00054 extern void save_bbox(void);
00055 
00056 #endif
00057 
00058 extern void applicationDoSpecial(char *str, size_t len);
00059 extern void geom_do_special(struct scan_info *, char *, double);
00060 extern void color_special(const char *colorspec);
00061 
00062 extern void init_prescan(void);
00063 
00064 /*
00065   info on whether this DVI file contains papersize specials,
00066   and a resetting method.
00067 */
00068 extern void reset_papersize_special(void);
00069 extern Boolean have_papersize_special(void);
00070 
00071 #if COLOR
00072 extern void init_page_colors(struct rgb *foreground, struct rgb *background);
00073 extern void scan_color_eop(void);
00074 extern void scan_color(const char *color);
00075 struct rgb; /* forward declaration */
00076 extern void set_fg_color(const struct rgb *);
00077 #endif
00078 
00079 #endif /* SPECIAL_H_ */