src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svmm.h
changeset 54876 da3834261f0c
parent 49234 3375a8039fde
equal deleted inserted replaced
54875:bcfedddcf4ce 54876:da3834261f0c
     1 /***************************************************************************/
     1 /****************************************************************************
     2 /*                                                                         */
     2  *
     3 /*  svmm.h                                                                 */
     3  * svmm.h
     4 /*                                                                         */
     4  *
     5 /*    The FreeType Multiple Masters and GX var services (specification).   */
     5  *   The FreeType Multiple Masters and GX var services (specification).
     6 /*                                                                         */
     6  *
     7 /*  Copyright 2003-2018 by                                                 */
     7  * Copyright (C) 2003-2019 by
     8 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
     8  * David Turner, Robert Wilhelm, and Werner Lemberg.
     9 /*                                                                         */
     9  *
    10 /*  This file is part of the FreeType project, and may only be used,       */
    10  * This file is part of the FreeType project, and may only be used,
    11 /*  modified, and distributed under the terms of the FreeType project      */
    11  * modified, and distributed under the terms of the FreeType project
    12 /*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
    12  * license, LICENSE.TXT.  By continuing to use, modify, or distribute
    13 /*  this file you indicate that you have read the license and              */
    13  * this file you indicate that you have read the license and
    14 /*  understand and accept it fully.                                        */
    14  * understand and accept it fully.
    15 /*                                                                         */
    15  *
    16 /***************************************************************************/
    16  */
    17 
    17 
    18 
    18 
    19 #ifndef SVMM_H_
    19 #ifndef SVMM_H_
    20 #define SVMM_H_
    20 #define SVMM_H_
    21 
    21 
    24 
    24 
    25 FT_BEGIN_HEADER
    25 FT_BEGIN_HEADER
    26 
    26 
    27 
    27 
    28   /*
    28   /*
    29    *  A service used to manage multiple-masters data in a given face.
    29    * A service used to manage multiple-masters data in a given face.
    30    *
    30    *
    31    *  See the related APIs in `ftmm.h' (FT_MULTIPLE_MASTERS_H).
    31    * See the related APIs in `ftmm.h' (FT_MULTIPLE_MASTERS_H).
    32    *
    32    *
    33    */
    33    */
    34 
    34 
    35 #define FT_SERVICE_ID_MULTI_MASTERS  "multi-masters"
    35 #define FT_SERVICE_ID_MULTI_MASTERS  "multi-masters"
    36 
    36 
    84                             FT_MM_Var*  *mm_var );
    84                             FT_MM_Var*  *mm_var );
    85 
    85 
    86   typedef void
    86   typedef void
    87   (*FT_Done_Blend_Func)( FT_Face );
    87   (*FT_Done_Blend_Func)( FT_Face );
    88 
    88 
       
    89   typedef FT_Error
       
    90   (*FT_Set_MM_WeightVector_Func)( FT_Face    face,
       
    91                                   FT_UInt    len,
       
    92                                   FT_Fixed*  weight_vector );
       
    93 
       
    94   typedef FT_Error
       
    95   (*FT_Get_MM_WeightVector_Func)( FT_Face    face,
       
    96                                   FT_UInt*   len,
       
    97                                   FT_Fixed*  weight_vector );
       
    98 
    89 
    99 
    90   FT_DEFINE_SERVICE( MultiMasters )
   100   FT_DEFINE_SERVICE( MultiMasters )
    91   {
   101   {
    92     FT_Get_MM_Func          get_mm;
   102     FT_Get_MM_Func               get_mm;
    93     FT_Set_MM_Design_Func   set_mm_design;
   103     FT_Set_MM_Design_Func        set_mm_design;
    94     FT_Set_MM_Blend_Func    set_mm_blend;
   104     FT_Set_MM_Blend_Func         set_mm_blend;
    95     FT_Get_MM_Blend_Func    get_mm_blend;
   105     FT_Get_MM_Blend_Func         get_mm_blend;
    96     FT_Get_MM_Var_Func      get_mm_var;
   106     FT_Get_MM_Var_Func           get_mm_var;
    97     FT_Set_Var_Design_Func  set_var_design;
   107     FT_Set_Var_Design_Func       set_var_design;
    98     FT_Get_Var_Design_Func  get_var_design;
   108     FT_Get_Var_Design_Func       get_var_design;
    99     FT_Set_Instance_Func    set_instance;
   109     FT_Set_Instance_Func         set_instance;
       
   110     FT_Set_MM_WeightVector_Func  set_mm_weightvector;
       
   111     FT_Get_MM_WeightVector_Func  get_mm_weightvector;
   100 
   112 
   101     /* for internal use; only needed for code sharing between modules */
   113     /* for internal use; only needed for code sharing between modules */
   102     FT_Get_Var_Blend_Func   get_var_blend;
   114     FT_Get_Var_Blend_Func  get_var_blend;
   103     FT_Done_Blend_Func      done_blend;
   115     FT_Done_Blend_Func     done_blend;
   104   };
   116   };
   105 
   117 
   106 
   118 
   107 #ifndef FT_CONFIG_OPTION_PIC
   119 #define FT_DEFINE_SERVICE_MULTIMASTERSREC( class_,            \
   108 
   120                                            get_mm_,           \
   109 #define FT_DEFINE_SERVICE_MULTIMASTERSREC( class_,          \
   121                                            set_mm_design_,    \
   110                                            get_mm_,         \
   122                                            set_mm_blend_,     \
   111                                            set_mm_design_,  \
   123                                            get_mm_blend_,     \
   112                                            set_mm_blend_,   \
   124                                            get_mm_var_,       \
   113                                            get_mm_blend_,   \
   125                                            set_var_design_,   \
   114                                            get_mm_var_,     \
   126                                            get_var_design_,   \
   115                                            set_var_design_, \
   127                                            set_instance_,     \
   116                                            get_var_design_, \
   128                                            set_weightvector_, \
   117                                            set_instance_,   \
   129                                            get_weightvector_, \
   118                                            get_var_blend_,  \
   130                                            get_var_blend_,    \
   119                                            done_blend_ )    \
   131                                            done_blend_ )      \
   120   static const FT_Service_MultiMastersRec  class_ =         \
   132   static const FT_Service_MultiMastersRec  class_ =           \
   121   {                                                         \
   133   {                                                           \
   122     get_mm_,                                                \
   134     get_mm_,                                                  \
   123     set_mm_design_,                                         \
   135     set_mm_design_,                                           \
   124     set_mm_blend_,                                          \
   136     set_mm_blend_,                                            \
   125     get_mm_blend_,                                          \
   137     get_mm_blend_,                                            \
   126     get_mm_var_,                                            \
   138     get_mm_var_,                                              \
   127     set_var_design_,                                        \
   139     set_var_design_,                                          \
   128     get_var_design_,                                        \
   140     get_var_design_,                                          \
   129     set_instance_,                                          \
   141     set_instance_,                                            \
   130     get_var_blend_,                                         \
   142     set_weightvector_,                                        \
   131     done_blend_                                             \
   143     get_weightvector_,                                        \
       
   144     get_var_blend_,                                           \
       
   145     done_blend_                                               \
   132   };
   146   };
   133 
       
   134 #else /* FT_CONFIG_OPTION_PIC */
       
   135 
       
   136 #define FT_DEFINE_SERVICE_MULTIMASTERSREC( class_,               \
       
   137                                            get_mm_,              \
       
   138                                            set_mm_design_,       \
       
   139                                            set_mm_blend_,        \
       
   140                                            get_mm_blend_,        \
       
   141                                            get_mm_var_,          \
       
   142                                            set_var_design_,      \
       
   143                                            get_var_design_,      \
       
   144                                            set_instance_,        \
       
   145                                            get_var_blend_,       \
       
   146                                            done_blend_ )         \
       
   147   void                                                           \
       
   148   FT_Init_Class_ ## class_( FT_Service_MultiMastersRec*  clazz ) \
       
   149   {                                                              \
       
   150     clazz->get_mm         = get_mm_;                             \
       
   151     clazz->set_mm_design  = set_mm_design_;                      \
       
   152     clazz->set_mm_blend   = set_mm_blend_;                       \
       
   153     clazz->get_mm_blend   = get_mm_blend_;                       \
       
   154     clazz->get_mm_var     = get_mm_var_;                         \
       
   155     clazz->set_var_design = set_var_design_;                     \
       
   156     clazz->get_var_design = get_var_design_;                     \
       
   157     clazz->set_instance   = set_instance_;                       \
       
   158     clazz->get_var_blend  = get_var_blend_;                      \
       
   159     clazz->done_blend     = done_blend_;                         \
       
   160   }
       
   161 
       
   162 #endif /* FT_CONFIG_OPTION_PIC */
       
   163 
   147 
   164   /* */
   148   /* */
   165 
   149 
   166 
   150 
   167 FT_END_HEADER
   151 FT_END_HEADER