Evince
Evince is a document viewer capable of displaying multiple and single page document formats like PDF and Postscript.
|
#include <config.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <math.h>
#include <errno.h>
#include <unistd.h>
#include <fcntl.h>
#include "mdvi.h"
#include "private.h"
#include "color.h"
Go to the source code of this file.
Macros | |
#define | DVICMDDEF(x) static int x __PROTO((DviContext *, int)) |
#define | DVI_BUFLEN 4096 |
#define | NEEDBYTES(d, n) ((d)->buffer.pos + (n) > (d)->buffer.length) |
#define | dsget1(d) dsgetn((d), 1) |
#define | dsget2(d) dsgetn((d), 2) |
#define | dsget3(d) dsgetn((d), 3) |
#define | dsget4(d) dsgetn((d), 4) |
#define | duget1(d) dugetn((d), 1) |
#define | duget2(d) dugetn((d), 2) |
#define | duget3(d) dugetn((d), 3) |
#define | duget4(d) dugetn((d), 4) |
#define | SHOWCMD(x) if(_mdvi_debug_mask & DBG_OPCODE) do { dviprint x; } while(0) |
#define | DBGSUM(a, b, c) |
Typedefs | |
typedef int DviCommand | __PROTO ((DviContext *, int)) |
Functions | |
DVICMDDEF (set_char) | |
DVICMDDEF (set_rule) | |
DVICMDDEF (no_op) | |
DVICMDDEF (push) | |
DVICMDDEF (pop) | |
DVICMDDEF (move_right) | |
DVICMDDEF (move_down) | |
DVICMDDEF (move_w) | |
DVICMDDEF (move_x) | |
DVICMDDEF (move_y) | |
DVICMDDEF (move_z) | |
DVICMDDEF (sel_font) | |
DVICMDDEF (sel_fontn) | |
DVICMDDEF (special) | |
DVICMDDEF (def_font) | |
DVICMDDEF (undefined) | |
DVICMDDEF (unexpected) | |
static int | mdvi_run_macro (DviContext *dvi, Uchar *macro, size_t len) |
static void | dummy_draw_glyph (DviContext *dvi, DviFontChar *ch, int x, int y) |
static void | dummy_draw_rule (DviContext *dvi, int x, int y, Uint w, Uint h, int f) |
static int | dummy_alloc_colors (void *a, Ulong *b, int c, Ulong d, Ulong e, double f, int g) |
static void * | dummy_create_image (void *a, Uint b, Uint c, Uint d) |
static void | dummy_free_image (void *a) |
static void | dummy_dev_destroy (void *a) |
static void | dummy_dev_putpixel (void *a, int x, int y, Ulong c) |
static void | dummy_dev_refresh (DviContext *a, void *b) |
static void | dummy_dev_set_color (void *a, Ulong b, Ulong c) |
static void | dvierr (DviContext *dvi, const char *format,...) |
static void | dviwarn (DviContext *dvi, const char *format,...) |
static int | get_bytes (DviContext *dvi, size_t n) |
static int | dskip (DviContext *dvi, long offset) |
static long | dsgetn (DviContext *dvi, size_t n) |
static int | dread (DviContext *dvi, char *buffer, size_t len) |
static long | dugetn (DviContext *dvi, size_t n) |
static long | dtell (DviContext *dvi) |
static void | dreset (DviContext *dvi) |
static void | dviprint (DviContext *dvi, const char *command, int sub, const char *fmt,...) |
int | mdvi_find_tex_page (DviContext *dvi, int tex_page) |
static int | sort_up (const void *p1, const void *p2) |
static int | sort_down (const void *p1, const void *p2) |
static int | sort_random (const void *p1, const void *p2) |
static int | sort_dvi_up (const void *p1, const void *p2) |
static int | sort_dvi_down (const void *p1, const void *p2) |
void | mdvi_sort_pages (DviContext *dvi, DviPageSort type) |
static DviFontRef * | define_font (DviContext *dvi, int op) |
static char * | opendvi (const char *name) |
int | mdvi_reload (DviContext *dvi, DviParams *np) |
int | mdvi_configure (DviContext *dvi, DviParamCode option,...) |
DviContext * | mdvi_init_context (DviParams *par, DviPageSpec *spec, const char *file) |
void | mdvi_destroy_context (DviContext *dvi) |
void | mdvi_setpage (DviContext *dvi, int pageno) |
int | mdvi_dopage (DviContext *dvi, int pageno) |
static int | move_vertical (DviContext *dvi, int amount) |
static int | move_horizontal (DviContext *dvi, int amount) |
static void | fix_after_horizontal (DviContext *dvi) |
static void | draw_shrink_rule (DviContext *dvi, int x, int y, Uint w, Uint h, int f) |
static void | draw_box (DviContext *dvi, DviFontChar *ch) |
int | set_char (DviContext *dvi, int opcode) |
int | set_rule (DviContext *dvi, int opcode) |
int | no_op (DviContext *dvi, int opcode) |
int | push (DviContext *dvi, int opcode) |
int | pop (DviContext *dvi, int opcode) |
int | move_right (DviContext *dvi, int opcode) |
int | move_down (DviContext *dvi, int opcode) |
int | move_w (DviContext *dvi, int opcode) |
int | move_x (DviContext *dvi, int opcode) |
int | move_y (DviContext *dvi, int opcode) |
int | move_z (DviContext *dvi, int opcode) |
int | sel_font (DviContext *dvi, int opcode) |
int | sel_fontn (DviContext *dvi, int opcode) |
int | special (DviContext *dvi, int opcode) |
int | def_font (DviContext *dvi, int opcode) |
int | unexpected (DviContext *dvi, int opcode) |
int | undefined (DviContext *dvi, int opcode) |
Variables | |
static const DviCommand | dvi_commands [] |
#define DBGSUM | ( | a, | |
b, | |||
c | |||
) |
#define DVICMDDEF | ( | x) | static int x __PROTO((DviContext *, int)) |
#define NEEDBYTES | ( | d, | |
n | |||
) | ((d)->buffer.pos + (n) > (d)->buffer.length) |
#define SHOWCMD | ( | x) | if(_mdvi_debug_mask & DBG_OPCODE) do { dviprint x; } while(0) |
static char *pk_lookupn __PROTO | ( | (DviContext *, int) | ) |
int def_font | ( | DviContext * | dvi, |
int | opcode | ||
) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
DVICMDDEF | ( | set_char | ) |
DVICMDDEF | ( | set_rule | ) |
DVICMDDEF | ( | no_op | ) |
DVICMDDEF | ( | push | ) |
DVICMDDEF | ( | pop | ) |
DVICMDDEF | ( | move_right | ) |
DVICMDDEF | ( | move_down | ) |
DVICMDDEF | ( | move_w | ) |
DVICMDDEF | ( | move_x | ) |
DVICMDDEF | ( | move_y | ) |
DVICMDDEF | ( | move_z | ) |
DVICMDDEF | ( | sel_font | ) |
DVICMDDEF | ( | sel_fontn | ) |
DVICMDDEF | ( | special | ) |
DVICMDDEF | ( | def_font | ) |
DVICMDDEF | ( | undefined | ) |
DVICMDDEF | ( | unexpected | ) |
|
static |
|
static |
|
static |
|
inlinestatic |
|
static |
int mdvi_configure | ( | DviContext * | dvi, |
DviParamCode | option, | ||
... | |||
) |
void mdvi_destroy_context | ( | DviContext * | dvi) |
int mdvi_dopage | ( | DviContext * | dvi, |
int | pageno | ||
) |
int mdvi_find_tex_page | ( | DviContext * | dvi, |
int | tex_page | ||
) |
DviContext* mdvi_init_context | ( | DviParams * | par, |
DviPageSpec * | spec, | ||
const char * | file | ||
) |
int mdvi_reload | ( | DviContext * | dvi, |
DviParams * | np | ||
) |
|
static |
void mdvi_setpage | ( | DviContext * | dvi, |
int | pageno | ||
) |
void mdvi_sort_pages | ( | DviContext * | dvi, |
DviPageSort | type | ||
) |
int move_down | ( | DviContext * | dvi, |
int | opcode | ||
) |
|
inlinestatic |
int move_right | ( | DviContext * | dvi, |
int | opcode | ||
) |
|
inlinestatic |
int move_w | ( | DviContext * | dvi, |
int | opcode | ||
) |
int move_x | ( | DviContext * | dvi, |
int | opcode | ||
) |
int move_y | ( | DviContext * | dvi, |
int | opcode | ||
) |
int move_z | ( | DviContext * | dvi, |
int | opcode | ||
) |
int no_op | ( | DviContext * | dvi, |
int | opcode | ||
) |
|
static |
int pop | ( | DviContext * | dvi, |
int | opcode | ||
) |
int push | ( | DviContext * | dvi, |
int | opcode | ||
) |
int sel_font | ( | DviContext * | dvi, |
int | opcode | ||
) |
int sel_fontn | ( | DviContext * | dvi, |
int | opcode | ||
) |
int set_char | ( | DviContext * | dvi, |
int | opcode | ||
) |
int set_rule | ( | DviContext * | dvi, |
int | opcode | ||
) |
|
static |
|
static |
|
static |
|
static |
|
static |
int special | ( | DviContext * | dvi, |
int | opcode | ||
) |
int undefined | ( | DviContext * | dvi, |
int | opcode | ||
) |
int unexpected | ( | DviContext * | dvi, |
int | opcode | ||
) |