Evince
Evince is a document viewer capable of displaying multiple and single page document formats like PDF and Postscript.
|
#include <stdio.h>
#include <sys/types.h>
#include <math.h>
#include "sysdeps.h"
#include "bitmap.h"
#include "common.h"
#include "defaults.h"
#include "dviopcodes.h"
#include "hash.h"
#include "paper.h"
#include "fontmap.h"
Go to the source code of this file.
Data Structures | |
struct | _DviDevice |
struct | _TFMChar |
struct | _TFMInfo |
struct | _DviGlyph |
struct | _DviFontInfo |
struct | _DviFontChar |
struct | _DviFontRef |
struct | _DviFontSearch |
struct | _DviFont |
struct | _DviParams |
struct | _DviBuffer |
struct | _DviState |
struct | _DviColorPair |
struct | _DviContext |
struct | _DviRange |
Macros | |
#define | ISVIRTUAL(font) ((font)->search.info->getglyph == NULL) |
#define | SEARCH_DONE(s) ((s).id < 0) |
#define | SEARCH_INIT(s, name, h, v) |
#define | RANGE_HAS_LOWER(x) ((x) == MDVI_RANGE_BOUNDED || (x) == MDVI_RANGE_LOWER) |
#define | RANGE_HAS_UPPER(x) ((x) == MDVI_RANGE_BOUNDED || (x) == MDVI_RANGE_UPPER) |
#define | MDVI_PARAM_ANTIALIASED 1 |
#define | MDVI_PARAM_MONO 2 |
#define | MDVI_PARAM_CHARBOXES 4 |
#define | MDVI_PARAM_SHOWUNDEF 8 |
#define | MDVI_PARAM_DELAYFONTS 16 |
#define | MDVI_FONTPRIO_FALLBACK -3 |
#define | MDVI_FONTPRIO_LOWEST -2 |
#define | MDVI_FONTPRIO_LOW -1 |
#define | MDVI_FONTPRIO_NORMAL 0 |
#define | MDVI_FONTPRIO_HIGH 1 |
#define | MDVI_FONTPRIO_HIGHEST 2 |
#define | MDVI_FONT_ENCODED (1 << 0) |
#define | MDVI_GLYPH_EMPTY ((void *)1) |
#define | MDVI_GLYPH_NONEMPTY(x) ((x) && (x) != MDVI_GLYPH_EMPTY) |
#define | MDVI_GLYPH_UNSET(x) ((x) == NULL) |
#define | MDVI_GLYPH_ISEMPTY(x) ((x) == MDVI_GLYPH_EMPTY) |
#define | MDVI_ENABLED(d, x) ((d)->params.flags & (x)) |
#define | MDVI_DISABLED(d, x) !MDVI_ENABLED((d), (x)) |
#define | MDVI_LASTPAGE(d) ((d)->npages - 1) |
#define | MDVI_NPAGES(d) (d)->npages |
#define | MDVI_VALIDPAGE(d, p) ((p) >= 0 && (p) <= MDVI_LASTPAGE(d)) |
#define | MDVI_FLAGS(d) (d)->params.flags |
#define | MDVI_SHRINK_FROM_DPI(d) Max(1, (d) / 75) |
#define | MDVI_CURRFG(d) (d)->curr_fg |
#define | MDVI_CURRBG(d) (d)->curr_bg |
#define | pixel_round(d, v) (int)((d)->params.conv * (v) + 0.5) |
#define | vpixel_round(d, v) (int)((d)->params.vconv * (v) + 0.5) |
#define | rule_round(d, v) (int)((d)->params.conv * (v) + 0.99999) /*9999999)*/ |
#define | vrule_round(d, v) (int)((d)->params.vconv * (v) + 0.99999) |
#define | get_metrics(name) get_font_metrics((name), DviFontAny, NULL) |
#define | mdvi_config_one(d, x, y) mdvi_configure((d), (x), (y), MDVI_PARAM_LAST) |
#define | mdvi_set_dpi(d, x) mdvi_config_one((d), MDVI_SET_DPI, (x)) |
#define | mdvi_set_xdpi(d, x) mdvi_config_one((d), MDVI_SET_XDPI, (x)) |
#define | mdvi_set_ydpi(d, x) mdvi_config_one((d), MDVI_SET_YDPI, (x)) |
#define | mdvi_set_hshrink(d, h) mdvi_config_one((d), MDVI_SET_XSHRINK, (h)) |
#define | mdvi_set_vshrink(d, h) mdvi_config_one((d), MDVI_SET_YSHRINK, (h)) |
#define | mdvi_set_gamma(d, g) mdvi_config_one((d), MDVI_SET_GAMMA, (g)) |
#define | mdvi_set_density(d, x) mdvi_config_one((d), MDVI_SET_DENSITY, (x)) |
#define | mdvi_set_drift(d, x) mdvi_config_one((d), MDVI_SET_DRIFT, (x)) |
#define | mdvi_set_hdrift(d, h) mdvi_config_one((d), MDVI_SET_HDRIFT, (h)) |
#define | mdvi_set_vdrift(d, v) mdvi_config_one((d), MDVI_SET_VDRIFT, (v)) |
#define | mdvi_set_mag(d, m) mdvi_config_one((d), MDVI_SET_MAGNIFICATION, (m)) |
#define | mdvi_set_foreground(d, x) mdvi_config_one((d), MDVI_SET_FOREGROUND, (x)) |
#define | mdvi_set_background(d, x) mdvi_config_one((d), MDVI_SET_BACKGROUND, (x)) |
#define | mdvi_set_orientation(d, x) mdvi_config_one((d), MDVI_SET_ORIENTATION, (x)) |
#define | mdvi_set_shrink(d, h, v) |
#define | MDVI_FONTSEL_BITMAP (1 << 0) |
#define | MDVI_FONTSEL_GREY (1 << 1) |
#define | MDVI_FONTSEL_GLYPH (1 << 2) |
#define | FONTCHAR(font, code) |
#define | FONT_GLYPH_COUNT(font) ((font)->hic - (font)->loc + 1) |
#define | glyph_present(x) ((x) && (x)->offset) |
#define | font_free_glyph(dev, font, code) |
#define | mdvi_stop_logging(x) mdvi_set_logstream(NULL) |
Typedefs | |
typedef struct _DviGlyph | DviGlyph |
typedef struct _DviDevice | DviDevice |
typedef struct _DviFontChar | DviFontChar |
typedef struct _DviFontRef | DviFontRef |
typedef struct _DviFontInfo | DviFontInfo |
typedef struct _DviFont | DviFont |
typedef struct _DviState | DviState |
typedef struct _DviPageSpec * | DviPageSpec |
typedef struct _DviParams | DviParams |
typedef struct _DviBuffer | DviBuffer |
typedef struct _DviContext | DviContext |
typedef struct _DviRange | DviRange |
typedef struct _DviColorPair | DviColorPair |
typedef struct _DviSection | DviSection |
typedef struct _TFMChar | TFMChar |
typedef struct _TFMInfo | TFMInfo |
typedef struct _DviFontSearch | DviFontSearch |
typedef struct _DviFontClass | DviFontClass |
typedef void DviFreeFunc | __PROTO ((void *)) |
typedef Ulong | DviColor |
typedef long | PageNum [11] |
#define font_free_glyph | ( | dev, | |
font, | |||
code | |||
) |
#define FONT_GLYPH_COUNT | ( | font) | ((font)->hic - (font)->loc + 1) |
#define FONTCHAR | ( | font, | |
code | |||
) |
#define get_metrics | ( | name) | get_font_metrics((name), DviFontAny, NULL) |
#define ISVIRTUAL | ( | font) | ((font)->search.info->getglyph == NULL) |
#define mdvi_config_one | ( | d, | |
x, | |||
y | |||
) | mdvi_configure((d), (x), (y), MDVI_PARAM_LAST) |
#define MDVI_DISABLED | ( | d, | |
x | |||
) | !MDVI_ENABLED((d), (x)) |
#define MDVI_GLYPH_ISEMPTY | ( | x) | ((x) == MDVI_GLYPH_EMPTY) |
#define MDVI_GLYPH_NONEMPTY | ( | x) | ((x) && (x) != MDVI_GLYPH_EMPTY) |
#define mdvi_set_background | ( | d, | |
x | |||
) | mdvi_config_one((d), MDVI_SET_BACKGROUND, (x)) |
#define mdvi_set_density | ( | d, | |
x | |||
) | mdvi_config_one((d), MDVI_SET_DENSITY, (x)) |
#define mdvi_set_dpi | ( | d, | |
x | |||
) | mdvi_config_one((d), MDVI_SET_DPI, (x)) |
#define mdvi_set_drift | ( | d, | |
x | |||
) | mdvi_config_one((d), MDVI_SET_DRIFT, (x)) |
#define mdvi_set_foreground | ( | d, | |
x | |||
) | mdvi_config_one((d), MDVI_SET_FOREGROUND, (x)) |
#define mdvi_set_gamma | ( | d, | |
g | |||
) | mdvi_config_one((d), MDVI_SET_GAMMA, (g)) |
#define mdvi_set_hdrift | ( | d, | |
h | |||
) | mdvi_config_one((d), MDVI_SET_HDRIFT, (h)) |
#define mdvi_set_hshrink | ( | d, | |
h | |||
) | mdvi_config_one((d), MDVI_SET_XSHRINK, (h)) |
#define mdvi_set_mag | ( | d, | |
m | |||
) | mdvi_config_one((d), MDVI_SET_MAGNIFICATION, (m)) |
#define mdvi_set_orientation | ( | d, | |
x | |||
) | mdvi_config_one((d), MDVI_SET_ORIENTATION, (x)) |
#define mdvi_set_shrink | ( | d, | |
h, | |||
v | |||
) |
#define mdvi_set_vdrift | ( | d, | |
v | |||
) | mdvi_config_one((d), MDVI_SET_VDRIFT, (v)) |
#define mdvi_set_vshrink | ( | d, | |
h | |||
) | mdvi_config_one((d), MDVI_SET_YSHRINK, (h)) |
#define mdvi_set_xdpi | ( | d, | |
x | |||
) | mdvi_config_one((d), MDVI_SET_XDPI, (x)) |
#define mdvi_set_ydpi | ( | d, | |
x | |||
) | mdvi_config_one((d), MDVI_SET_YDPI, (x)) |
#define mdvi_stop_logging | ( | x) | mdvi_set_logstream(NULL) |
#define MDVI_VALIDPAGE | ( | d, | |
p | |||
) | ((p) >= 0 && (p) <= MDVI_LASTPAGE(d)) |
#define pixel_round | ( | d, | |
v | |||
) | (int)((d)->params.conv * (v) + 0.5) |
#define RANGE_HAS_LOWER | ( | x) | ((x) == MDVI_RANGE_BOUNDED || (x) == MDVI_RANGE_LOWER) |
#define RANGE_HAS_UPPER | ( | x) | ((x) == MDVI_RANGE_BOUNDED || (x) == MDVI_RANGE_UPPER) |
#define rule_round | ( | d, | |
v | |||
) | (int)((d)->params.conv * (v) + 0.99999) /*9999999)*/ |
#define SEARCH_INIT | ( | s, | |
name, | |||
h, | |||
v | |||
) |
#define vpixel_round | ( | d, | |
v | |||
) | (int)((d)->params.vconv * (v) + 0.5) |
#define vrule_round | ( | d, | |
v | |||
) | (int)((d)->params.vconv * (v) + 0.99999) |
typedef void DviSpecialHandler __PROTO((DviContext *dvi, const char *prefix, const char *arg)) |
typedef struct _DviBuffer DviBuffer |
typedef struct _DviColorPair DviColorPair |
typedef struct _DviContext DviContext |
typedef struct _DviDevice DviDevice |
typedef struct _DviFontChar DviFontChar |
typedef struct _DviFontClass DviFontClass |
typedef struct _DviFontInfo DviFontInfo |
typedef struct _DviFontRef DviFontRef |
typedef struct _DviFontSearch DviFontSearch |
typedef struct _DviPageSpec* DviPageSpec |
typedef struct _DviParams DviParams |
typedef struct _DviSection DviSection |
enum DviBool |
enum DviFontType |
enum DviOrientation |
enum DviPageSort |
enum DviParamCode |
Definition at line 318 of file mdvi.h.
enum DviRangeType |
int mdvi_reload __PROTO | ( | (DviContext *, DviParams *) | ) |
void mdvi_setpage __PROTO | ( | (DviContext *, int) | ) |
void mdvi_shrink_glyph __PROTO | ( | (DviContext *, DviFont *, DviFontChar *, DviGlyph *) | ) |
int mdvi_configure __PROTO | ( | (DviContext *, DviParamCode,...) | ) |
int get_tfm_chars __PROTO | ( | (DviParams *, DviFont *, TFMInfo *, int) | ) |
int tfm_load_file __PROTO | ( | (const char *, TFMInfo *) | ) |
TFMInfo* get_font_metrics __PROTO | ( | (const char *, int, const char *) | ) |
char* lookup_font_metrics __PROTO | ( | (const char *, int *) | ) |
void free_font_metrics __PROTO | ( | (TFMInfo *) | ) |
void flush_font_metrics __PROTO | ( | (void) | ) |
void mdvi_sort_pages __PROTO | ( | (DviContext *, DviPageSort) | ) |
void mdvi_init_kpathsea __PROTO | ( | (const char *, const char *, const char *, int, const char *) | ) |
DviContext* mdvi_init_context __PROTO | ( | (DviParams *, DviPageSpec *, const char *) | ) |
void mdvi_destroy_context __PROTO | ( | (DviContext *) | ) |
DviRange* mdvi_parse_range __PROTO | ( | (const char *, DviRange *, int *, char **) | ) |
DviPageSpec* mdvi_parse_page_spec __PROTO | ( | (const char *) | ) |
void mdvi_free_page_spec __PROTO | ( | (DviPageSpec *) | ) |
int mdvi_in_range __PROTO | ( | (DviRange *, int, int) | ) |
int mdvi_range_length __PROTO | ( | (DviRange *, int) | ) |
int mdvi_page_selected __PROTO | ( | (DviPageSpec *, PageNum, int) | ) |
int mdvi_register_special __PROTO | ( | (const char *label, const char *prefix, const char *regex, DviSpecialHandler handler, int replace) | ) |
int mdvi_unregister_special __PROTO | ( | (const char *prefix) | ) |
int mdvi_do_special __PROTO | ( | (DviContext *dvi, char *dvi_special) | ) |
DviFontRef* font_reference __PROTO | ( | (DviParams *params, Int32 dvi_id, const char *font_name, Int32 checksum, int xdpi, int ydpi, Int32 scale_factor) | ) |
void font_drop_one __PROTO | ( | (DviFontRef *) | ) |
void font_reset_one_glyph __PROTO | ( | (DviDevice *, DviFontChar *, int) | ) |
void font_reset_font_glyphs __PROTO | ( | (DviDevice *, DviFont *, int) | ) |
void font_reset_chain_glyphs __PROTO | ( | (DviDevice *, DviFontRef *, int) | ) |
int font_reopen __PROTO | ( | (DviFont *) | ) |
DviFontChar* font_get_glyph __PROTO | ( | (DviContext *, DviFont *, int) | ) |
void font_transform_glyph __PROTO | ( | (DviOrientation, DviGlyph *) | ) |
int font_free_unused __PROTO | ( | (DviDevice *) | ) |
int mdvi_register_font_type __PROTO | ( | (DviFontInfo *, int) | ) |
char** mdvi_list_font_class __PROTO | ( | (int) | ) |
int mdvi_unregister_font_type __PROTO | ( | (const char *, int) | ) |
char* mdvi_lookup_font __PROTO | ( | (DviFontSearch *) | ) |
DviFont* mdvi_add_font __PROTO | ( | (const char *, Int32, int, int, Int32) | ) |
int mdvi_set_logstream __PROTO | ( | (FILE *) | ) |