home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / evbl0627.zip / everblue_20010627.zip / x11 / XomGeneric.h < prev    next >
C/C++ Source or Header  |  1999-11-02  |  5KB  |  182 lines

  1. /* $XConsortium: XomGeneric.h /main/4 1996/12/05 10:40:15 swick $ */
  2. /*
  3.  * Copyright 1992, 1993 by TOSHIBA Corp.
  4.  *
  5.  * Permission to use, copy, modify, and distribute this software and its
  6.  * documentation for any purpose and without fee is hereby granted, provided
  7.  * that the above copyright notice appear in all copies and that both that
  8.  * copyright notice and this permission notice appear in supporting
  9.  * documentation, and that the name of TOSHIBA not be used in advertising
  10.  * or publicity pertaining to distribution of the software without specific,
  11.  * written prior permission. TOSHIBA make no representations about the
  12.  * suitability of this software for any purpose.  It is provided "as is"
  13.  * without express or implied warranty.
  14.  *
  15.  * TOSHIBA DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  16.  * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  17.  * TOSHIBA BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  18.  * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  19.  * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  20.  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  21.  * SOFTWARE.
  22.  *
  23.  * Author: Katsuhisa Yano    TOSHIBA Corp.
  24.  *                   mopi@osa.ilab.toshiba.co.jp
  25.  */
  26. /*
  27.  * Copyright 1995 by FUJITSU LIMITED
  28.  * This is source code modified by FUJITSU LIMITED under the Joint
  29.  * Development Agreement for the CDE/Motif PST.
  30.  *
  31.  * Modifier: Takanori Tateno   FUJITSU LIMITED
  32.  *
  33.  */
  34.  
  35. #ifndef _XOMGENERIC_H_
  36. #define _XOMGENERIC_H_
  37.  
  38. #include "XlcPublic.h"
  39.  
  40. #define XOM_GENERIC(om)        (&((XOMGeneric) om)->gen)
  41. #define XOC_GENERIC(font_set)    (&((XOCGeneric) font_set)->gen)
  42.  
  43. /* For VW/UDC */
  44. typedef struct _CodeRangeRec {
  45.     unsigned long       start;
  46.     unsigned long       end;
  47.     unsigned long       dmy1;
  48.     unsigned long       dmy2;
  49. } CodeRangeRec, *CodeRange;
  50.  
  51. typedef struct _VRotateRec {
  52.     char        *charset_name;  /* Charset name                         */
  53.     XlcSide     side;           /* Encoding side                        */
  54.     int         num_cr;
  55.     CodeRange   code_range;
  56.     char        *xlfd_name;
  57.     XFontStruct *font;
  58. } VRotateRec, *VRotate;
  59.  
  60. typedef enum {
  61.     XOMMultiByte,
  62.     XOMWideChar
  63. } XOMTextType;
  64.  
  65. typedef struct _FontDataRec {
  66.     char     *name;
  67.     XlcSide     side;
  68.     /* For VW/UDC */
  69.     int           scopes_num;
  70.     FontScope     scopes;
  71.     char          *xlfd_name;
  72.     XFontStruct *font;
  73. } FontDataRec, *FontData;
  74.  
  75. #define VROTATE_NONE   0
  76. #define VROTATE_PART   1
  77. #define VROTATE_ALL    2
  78.  
  79. typedef struct _OMDataRec {
  80.     int     charset_count;
  81.     XlcCharSet     *charset_list;
  82.     int     font_data_count;
  83.     FontData     font_data;
  84.     /* For VW/UDC */
  85.     int substitute_num;
  86.     FontData substitute;
  87.     /* Vertical Writing */
  88.     int         vmap_num;
  89.     FontData    vmap;
  90.     int        vrotate_type;
  91.     int         vrotate_num;
  92.     CodeRange   vrotate;
  93. } OMDataRec, *OMData;
  94.  
  95. typedef struct _XOMGenericPart {
  96.     int     data_num;
  97.     OMData     data;
  98.     Bool     on_demand_loading;
  99.     char     *object_name;
  100. } XOMGenericPart;
  101.  
  102. typedef struct _XOMGenericRec {
  103.     XOMMethods         methods;
  104.     XOMCoreRec         core;
  105.     XOMGenericPart     gen;
  106. } XOMGenericRec, *XOMGeneric;
  107.  
  108. /*
  109.  * XOC dependent data
  110.  */
  111.  
  112. typedef struct _FontSetRec {
  113.     int         id;
  114.     int         charset_count;
  115.     XlcCharSet         *charset_list;
  116.     int         font_data_count;
  117.     FontData         font_data;
  118.     char         *font_name;
  119.     XFontStruct     *info;
  120.     XFontStruct     *font;
  121.     XlcSide         side;
  122.     Bool         is_xchar2b;
  123.     /* For VW/UDC */
  124.     int         substitute_num;
  125.     FontData         substitute;
  126.     /* Vertical Writing */
  127.     int        vpart_initialize;
  128.     int         vmap_num;
  129.     FontData    vmap;
  130.     int         vrotate_num;
  131.     VRotate     vrotate;
  132. } FontSetRec, *FontSet;
  133.  
  134. typedef struct _XOCGenericPart {
  135.     XlcConv         mbs_to_cs;
  136.     XlcConv         wcs_to_cs;
  137.     int         font_set_num;
  138.     FontSet         font_set;
  139. } XOCGenericPart;
  140.  
  141. typedef struct _XOCGenericRec {
  142.     XOCMethods         methods;
  143.     XOCCoreRec         core;    
  144.     XOCGenericPart     gen;
  145. } XOCGenericRec, *XOCGeneric;
  146.  
  147. _XFUNCPROTOBEGIN
  148.  
  149. extern XOM _XomGenericOpenOM(
  150. #if NeedFunctionPrototypes
  151.     XLCd        /* lcd */,
  152.     Display*        /* dpy */,
  153.     XrmDatabase        /* rdb */,
  154.     _Xconst char*    /* res_name */,
  155.     _Xconst char*    /* res_class */
  156. #endif
  157. );
  158.  
  159. extern XlcConv _XomInitConverter(
  160. #if NeedFunctionPrototypes
  161.     XOC            /* oc */,
  162.     XOMTextType        /* type */
  163. #endif
  164. );
  165.  
  166. extern int _XomConvert(
  167. #if NeedFunctionPrototypes
  168.     XOC            /* oc */,
  169.     XlcConv        /* conv */,
  170.     XPointer*        /* from */,
  171.     int*        /* from_left */,
  172.     XPointer*        /* to */,
  173.     int*        /* to_left */,
  174.     XPointer*        /* args */,
  175.     int            /* num_args */
  176. #endif
  177. );
  178.  
  179. _XFUNCPROTOEND
  180.  
  181. #endif  /* _XOMGENERIC_H_ */
  182.