src/vflibcap.h
/* [<][>][^][v][top][bottom][index][help] */
FUNCTIONS
This source file includes following functions.
1 /* vflibcap.h
2 *
3 * Programmmed by Hirotsugu Kakugawa
4 * E-Mail: h.kakugawa@computer.org
5 *
6 * Edition History
7 * 18 Nov 1997 for VFlib Version 3.3 List-like syntax
8 * 8 Jan 1998 for VFlib Version 3.4. Changed syntax.
9 */
10
11 /*
12 * Copyright (C) 1993-1998 Hirotsugu Kakugawa.
13 * All rights reserved.
14 *
15 * This file is part of the VFlib Library. This library is free
16 * software; you can redistribute it and/or modify it under the terms of
17 * the GNU Library General Public License as published by the Free
18 * Software Foundation; either version 2 of the License, or (at your
19 * option) any later version. This library is distributed in the hope
20 * that it will be useful, but WITHOUT ANY WARRANTY; without even the
21 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
22 * PURPOSE. See the GNU Library General Public License for more details.
23 * You should have received a copy of the GNU Library General Public
24 * License along with this library; if not, write to the Free Software
25 * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26 */
27
28
29 #ifndef __VFLIB_VFLIBCAP_H__
30 #define __VFLIB_VFLIBCAP_H__
31
32 #include "sexp.h"
33
34
35 /* validation of entry */
36 #define CAPABILITY_LIST 0 /* list, any length */
37 #define CAPABILITY_STRING 1 /* a string */
38 #define CAPABILITY_ALIST 2 /* alist */
39 #define CAPABILITY_VECTOR 3 /* list of two elements */
40 #define CAPABILITY_STRING_LIST0 4 /* a list of strings, including empty */
41 #define CAPABILITY_STRING_LIST1 5 /* a list of strings, at least one */
42 #define CAPABILITY_ESSENTIAL 100 /* essential capability */
43 #define CAPABILITY_OPTIONAL 101 /* optional capability */
44 struct s_capability_table {
45 char *cap;
46 int type; /* LIST, LIST1, ALIST, or ALIST1, etc. */
47 int ess; /* ESSENTIAL or OPTIONAL */
48 SEXP *val; /* pointer to return value */
49 };
50 typedef struct s_capability_table *CAPABILITY_TABLE;
51
52 /* vflibcap file interface */
53 #define VFLIBCAP_PARSED_OK 0
54 #define VFLIBCAP_PARSED_NOT_FOUND 1
55 #define VFLIBCAP_PARSED_ERROR 2
56
57 Glocal int vf_cap_init(char *vflibcap_file);
58 Glocal SEXP vf_cap_GetFontEntry(char *font_name);
59 Glocal int vf_cap_GetParsedClassDefault(char *class_name,
60 CAPABILITY_TABLE et,
61 SEXP_ALIST,SEXP_ALIST);
62 Glocal int vf_cap_GetParsedFontEntry(SEXP entry, char *font_name,
63 CAPABILITY_TABLE ct,
64 SEXP_ALIST,SEXP_ALIST);
65
66
67
68 #define VF_CAPE_VFLIBCAP_CLASS_DEFAULT_DEFINITION "define-default"
69 #define VF_CAPE_VFLIBCAP_FONT_ENTRY_DEFINITION "define-font"
70 #define VF_CAPE_VFLIBCAP_MACRO_DEFINITION "define-macro"
71 #define VF_CAPE_VFLIBCAP_VARIABLE_MARK "$"
72
73
74 #define VF_CAPE_VFLIB_DEFAULTS "VFlib"
75 #define VF_CAPE_IMPLICIT_FONT_CLASSES "implicit-font-classes"
76
77 #define VF_CAPE_FONT_CLASS "font-class"
78 #define VF_CAPE_FONT_FILE "font-file"
79 #define VF_CAPE_FONT_NAME "font-name"
80 #define VF_CAPE_FONT_DIRECTORIES "font-directories"
81 #define VF_CAPE_EXTENSIONS "filename-extensions"
82 #define VF_CAPE_UNCOMPRESSER "uncompression-programs"
83 #define VF_CAPE_COMPRESSION_EXT "compression-extensions"
84 #define VF_CAPE_EXTENSION_HINT "extension-hints"
85 #define VF_CAPE_VARIABLE_VALUES "variable-values"
86 #define VF_CAPE_CODE_CONVERSION_FILES "code-conversion-files"
87 #define VF_CAPE_DEBUG "debug"
88 #define VF_CAPE_KPATHSEA_SWITCH "use-kpathsea"
89 #define VF_CAPE_KPATHSEA_MODE "kpathsea-mode"
90 #define VF_CAPE_KPATHSEA_DPI "kpathsea-dpi"
91 #define VF_CAPE_KPATHSEA_PROG_NAME "kpathsea-program-name"
92
93 #define VF_CAPE_CHARSET "character-set"
94 #define VF_CAPE_ENCODING "encoding"
95 #define VF_CAPE_FONT_CHARSET "font-character-set"
96 #define VF_CAPE_FONT_ENCODING "font-encoding"
97 #define VF_CAPE_PROPERTIES "properties"
98 #define VF_CAPE_POINT_SIZE "point-size"
99 #define VF_CAPE_PIXEL_SIZE "pixel-size"
100 #define VF_CAPE_DPI "dpi"
101 #define VF_CAPE_DPI_X "dpi-x"
102 #define VF_CAPE_DPI_Y "dpi-y"
103 #define VF_CAPE_MAG "magnification"
104 #define VF_CAPE_ASPECT_RATIO "aspect-ratio" /* width/height */
105 #define VF_CAPE_SLANT_FACTOR "slant-factor" /* tan(angle) */
106 #define VF_CAPE_VECTOR_TO_BBX_UL "vector-to-bbx-upper-left"
107 #define VF_CAPE_VECTOR_TO_NEXT "vector-to-next-ref-point"
108 #define VF_CAPE_DIRECTION "writing-direction" /* H or V */
109
110 #endif /*__VFLIB_VFLIBCAP_H__*/
111
112 /*EOF*/