Revert "dtudcfonted, dtudcexch: delete from repository"
[oweals/cde.git] / cde / programs / dtudcfonted / libfal / _falomGeneric.h
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
6  * These libraries and programs are free software; you can
7  * redistribute them and/or modify them under the terms of the GNU
8  * Lesser General Public License as published by the Free Software
9  * Foundation; either version 2 of the License, or (at your option)
10  * any later version.
11  *
12  * These libraries and programs are distributed in the hope that
13  * they will be useful, but WITHOUT ANY WARRANTY; without even the
14  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  * PURPOSE. See the GNU Lesser General Public License for more
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with these libraries and programs; if not, write
20  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21  * Floor, Boston, MA 02110-1301 USA
22  */
23 /* XomGeneric.h 1.6 - Fujitsu source for CDEnext    96/02/29 18:02:52   */
24 /* $XConsortium: _falomGeneric.h /main/1 1996/04/08 15:20:29 cde-fuj $ */
25 /*
26  * Copyright 1992, 1993 by TOSHIBA Corp.
27  *
28  * Permission to use, copy, modify, and distribute this software and its
29  * documentation for any purpose and without fee is hereby granted, provided
30  * that the above copyright notice appear in all copies and that both that
31  * copyright notice and this permission notice appear in supporting
32  * documentation, and that the name of TOSHIBA not be used in advertising
33  * or publicity pertaining to distribution of the software without specific,
34  * written prior permission. TOSHIBA make no representations about the
35  * suitability of this software for any purpose.  It is provided "as is"
36  * without express or implied warranty.
37  *
38  * TOSHIBA DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39  * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40  * TOSHIBA BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41  * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42  * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44  * SOFTWARE.
45  *
46  * Author: Katsuhisa Yano       TOSHIBA Corp.
47  *                              mopi@osa.ilab.toshiba.co.jp
48  */
49 /*
50  * Copyright 1995 by FUJITSU LIMITED
51  * This is source code modified by FUJITSU LIMITED under the Joint
52  * Development Agreement for the CDEnext PST.
53  * This is unpublished proprietary source code of FUJITSU LIMITED
54  *
55  * Modifier: Takanori Tateno   FUJITSU LIMITED
56  *
57  */
58
59 #ifndef _XOMGENERIC_H_
60 #define _XOMGENERIC_H_
61
62 #include "_fallcPublic.h"
63
64 #define XOM_GENERIC(om)         (&((XOMGeneric) om)->gen)
65 #define XOC_GENERIC(font_set)   (&((XOCGeneric) font_set)->gen)
66
67 /* For VW/UDC */
68 typedef struct _CodeRangeRec {
69     unsigned long       start;
70     unsigned long       end;
71     unsigned long       dmy1;
72     unsigned long       dmy2;
73 } CodeRangeRec, *CodeRange;
74
75 typedef struct _VRotateRec {
76     char        *charset_name;  /* Charset name                         */
77     XlcSide     side;           /* Encoding side                        */
78     int         num_cr;
79     CodeRange   code_range;
80     char        *xlfd_name;
81     XFontStruct *font;
82 } VRotateRec, *VRotate;
83
84 typedef enum {
85     XOMMultiByte,
86     XOMWideChar
87 } XOMTextType;
88
89 typedef struct _FontDataRec {
90     char        *name;
91     XlcSide     side;
92     /* For VW/UDC */
93     int         scopes_num;
94     FontScope   scopes;
95     char        *xlfd_name;
96     XFontStruct *font;
97 } FontDataRec, *FontData;
98
99 #define VROTATE_NONE   0
100 #define VROTATE_PART   1
101 #define VROTATE_ALL    2
102
103 typedef struct _OMDataRec {
104     int         charset_count;
105     XlcCharSet  *charset_list;
106     int         font_data_count;
107     FontData    font_data;
108     /* For VW/UDC */
109     int substitute_num;
110     FontData substitute;
111     /* Vertical Writing */
112     int         vmap_num;
113     FontData    vmap;
114     int         vrotate_type;
115     int         vrotate_num;
116     CodeRange   vrotate;
117 } OMDataRec, *OMData;
118
119 typedef struct _XOMGenericPart {
120     int         data_num;
121     OMData      data;
122     Bool        on_demand_loading;
123     char        *object_name;
124 } XOMGenericPart;
125
126 typedef struct _XOMGenericRec {
127     XOMMethods          methods;
128     XOMCoreRec          core;
129     XOMGenericPart      gen;
130 } XOMGenericRec, *XOMGeneric;
131
132 /*
133  * XOC dependent data
134  */
135
136 typedef struct _FontSetRec {
137     int                 id;
138     int                 charset_count;
139     XlcCharSet          *charset_list;
140     int                 font_data_count;
141     FontData            font_data;
142     char                *font_name;
143     XFontStruct         *info;
144     XFontStruct         *font;
145     XlcSide             side;
146     Bool                is_xchar2b;
147     /* For VW/UDC */
148     int                 substitute_num;
149     FontData            substitute;
150     /* Vertical Writing */
151     int         vmap_num;
152     FontData    vmap;
153     int         vrotate_num;
154     VRotate     vrotate;
155 } FontSetRec, *FontSet;
156
157 typedef struct _XOCGenericPart {
158     XlcConv             mbs_to_cs;
159     XlcConv             wcs_to_cs;
160     int                 font_set_num;
161     FontSet             font_set;
162 } XOCGenericPart;
163
164 typedef struct _XOCGenericRec {
165     XOCMethods          methods;
166     XOCCoreRec          core;
167     XOCGenericPart      gen;
168 } XOCGenericRec, *XOCGeneric;
169
170 _XFUNCPROTOBEGIN
171
172 extern XOM _falomGenericOpenOM(
173 #if NeedFunctionPrototypes
174     XLCd                /* lcd */,
175     Display*            /* dpy */,
176     XrmDatabase         /* rdb */,
177     _Xconst char*       /* res_name */,
178     _Xconst char*       /* res_class */
179 #endif
180 );
181
182 extern XlcConv _XomInitConverter(
183 #if NeedFunctionPrototypes
184     XOC                 /* oc */,
185     XOMTextType         /* type */
186 #endif
187 );
188
189 extern int _XomConvert(
190 #if NeedFunctionPrototypes
191     XOC                 /* oc */,
192     XlcConv             /* conv */,
193     XPointer*           /* from */,
194     int*                /* from_left */,
195     XPointer*           /* to */,
196     int*                /* to_left */,
197     XPointer*           /* args */,
198     int                 /* num_args */
199 #endif
200 );
201
202 _XFUNCPROTOEND
203
204 #endif  /* _XOMGENERIC_H_ */