File: vflibcap.h

package info (click to toggle)
vflib3 3.6.14.dfsg-3+nmu3
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 11,536 kB
  • ctags: 3,710
  • sloc: ansic: 35,811; sh: 10,357; asm: 3,290; makefile: 962; lisp: 123; perl: 109; awk: 43
file content (112 lines) | stat: -rw-r--r-- 4,696 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
/* vflibcap.h 
 *
 *  Programmmed by Hirotsugu Kakugawa
 *  E-Mail:  h.kakugawa@computer.org
 *
 *  Edition History
 *  18 Nov 1997  for VFlib Version 3.3  List-like syntax
 *   8 Jan 1998  for VFlib Version 3.4. Changed syntax.
 */

/*
 * Copyright (C) 1993-1998 Hirotsugu Kakugawa. 
 * All rights reserved.
 *
 * This file is part of the VFlib Library.  This library is free
 * software; you can redistribute it and/or modify it under the terms of
 * the GNU Library General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your
 * option) any later version.  This library is distributed in the hope
 * that it will be useful, but WITHOUT ANY WARRANTY; without even the
 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
 * PURPOSE.  See the GNU Library General Public License for more details.
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */


#ifndef __VFLIB_VFLIBCAP_H__
#define __VFLIB_VFLIBCAP_H__

#include  "sexp.h"


/* validation of entry */
#define CAPABILITY_LIST          0  /* list, any length */
#define CAPABILITY_STRING        1  /* a string */
#define CAPABILITY_ALIST         2  /* alist */
#define CAPABILITY_VECTOR        3  /* list of two elements */
#define CAPABILITY_STRING_LIST0  4  /* a list of strings, including empty */
#define CAPABILITY_STRING_LIST1  5  /* a list of strings, at least one */
#define CAPABILITY_ESSENTIAL   100  /* essential capability */
#define CAPABILITY_OPTIONAL    101  /* optional capability */
struct s_capability_table {
  char  *cap;
  int    type;   /* LIST, LIST1, ALIST, or ALIST1, etc. */
  int    ess;    /* ESSENTIAL or OPTIONAL */ 
  SEXP  *val;    /* pointer to return value */
};
typedef struct s_capability_table   *CAPABILITY_TABLE;

/* vflibcap file interface */
#define VFLIBCAP_PARSED_OK         0
#define VFLIBCAP_PARSED_NOT_FOUND  1
#define VFLIBCAP_PARSED_ERROR      2

Glocal int    vf_cap_init(char *vflibcap_file);
Glocal SEXP   vf_cap_GetFontEntry(char *font_name);
Glocal int    vf_cap_GetParsedClassDefault(char *class_name, 
					   CAPABILITY_TABLE et,
					   SEXP_ALIST,SEXP_ALIST);
Glocal int    vf_cap_GetParsedFontEntry(SEXP entry, char *font_name,
					CAPABILITY_TABLE ct, 
					SEXP_ALIST,SEXP_ALIST);



#define VF_CAPE_VFLIBCAP_CLASS_DEFAULT_DEFINITION   "define-default"
#define VF_CAPE_VFLIBCAP_FONT_ENTRY_DEFINITION      "define-font"
#define VF_CAPE_VFLIBCAP_MACRO_DEFINITION           "define-macro"
#define VF_CAPE_VFLIBCAP_VARIABLE_MARK              "$"


#define VF_CAPE_VFLIB_DEFAULTS           "VFlib"
#define VF_CAPE_IMPLICIT_FONT_CLASSES    "implicit-font-classes"

#define VF_CAPE_FONT_CLASS               "font-class"
#define VF_CAPE_FONT_FILE                "font-file"
#define VF_CAPE_FONT_NAME                "font-name"
#define VF_CAPE_FONT_DIRECTORIES         "font-directories"
#define VF_CAPE_EXTENSIONS               "filename-extensions"
#define VF_CAPE_UNCOMPRESSER             "uncompression-programs"
#define VF_CAPE_COMPRESSION_EXT          "compression-extensions"
#define VF_CAPE_EXTENSION_HINT           "extension-hints"
#define VF_CAPE_VARIABLE_VALUES          "variable-values"
#define VF_CAPE_CODE_CONVERSION_FILES    "code-conversion-files"
#define VF_CAPE_DEBUG                    "debug"
#define VF_CAPE_KPATHSEA_SWITCH          "use-kpathsea"
#define VF_CAPE_KPATHSEA_MODE            "kpathsea-mode"
#define VF_CAPE_KPATHSEA_DPI             "kpathsea-dpi"
#define VF_CAPE_KPATHSEA_PROG_NAME       "kpathsea-program-name" 

#define VF_CAPE_CHARSET                  "character-set"
#define VF_CAPE_ENCODING                 "encoding"
#define VF_CAPE_FONT_CHARSET             "font-character-set"
#define VF_CAPE_FONT_ENCODING            "font-encoding"
#define VF_CAPE_PROPERTIES               "properties"
#define VF_CAPE_POINT_SIZE               "point-size"
#define VF_CAPE_PIXEL_SIZE               "pixel-size"
#define VF_CAPE_DPI                      "dpi"
#define VF_CAPE_DPI_X                    "dpi-x"
#define VF_CAPE_DPI_Y                    "dpi-y"
#define VF_CAPE_MAG                      "magnification"
#define VF_CAPE_ASPECT_RATIO             "aspect-ratio"     /* width/height */
#define VF_CAPE_SLANT_FACTOR             "slant-factor"     /* tan(angle) */
#define VF_CAPE_VECTOR_TO_BBX_UL         "vector-to-bbx-upper-left"
#define VF_CAPE_VECTOR_TO_NEXT           "vector-to-next-ref-point"
#define VF_CAPE_DIRECTION                "writing-direction"   /* H or V */

#endif  /*__VFLIB_VFLIBCAP_H__*/

/*EOF*/