?? ftmodule.h
字號:
/***************************************************************************//* *//* ftmodule.h *//* *//* FreeType modules public interface (specification). *//* *//* Copyright 1996-2001 by *//* David Turner, Robert Wilhelm, and Werner Lemberg. *//* *//* This file is part of the FreeType project, and may only be used, *//* modified, and distributed under the terms of the FreeType project *//* license, LICENSE.TXT. By continuing to use, modify, or distribute *//* this file you indicate that you have read the license and *//* understand and accept it fully. *//* *//***************************************************************************/#ifndef __FTMODULE_H__#define __FTMODULE_H__#include <ft2build.h>#include FT_FREETYPE_HFT_BEGIN_HEADER /*************************************************************************/ /* */ /* <Section> */ /* module_management */ /* */ /* <Title> */ /* Module Management */ /* */ /* <Abstract> */ /* How to add, upgrade, and remove modules from FreeType. */ /* */ /* <Description> */ /* The definitions below are used to manage modules within FreeType. */ /* Modules can be added, upgraded, and removed at runtime. */ /* */ /*************************************************************************/ /* module bit flags */ typedef enum FT_Module_Flags_ { ft_module_font_driver = 1, /* this module is a font driver */ ft_module_renderer = 2, /* this module is a renderer */ ft_module_hinter = 4, /* this module is a glyph hinter */ ft_module_styler = 8, /* this module is a styler */ ft_module_driver_scalable = 0x100, /* the driver supports scalable */ /* fonts */ ft_module_driver_no_outlines = 0x200, /* the driver does not support */ /* vector outlines */ ft_module_driver_has_hinter = 0x400 /* the driver provides its own */ /* hinter */ } FT_Module_Flags; typedef void (*FT_Module_Interface)( void ); typedef FT_Error (*FT_Module_Constructor)( FT_Module module ); typedef void (*FT_Module_Destructor)( FT_Module module ); typedef FT_Module_Interface (*FT_Module_Requester)( FT_Module module, const char* name ); /*************************************************************************/ /* */ /* <Struct> */ /* FT_Module_Class */ /* */ /* <Description> */ /* The module class descriptor. */ /* */ /* <Fields> */ /* module_flags :: Bit flags describing the module. */ /* */ /* module_size :: The size of one module object/instance in */ /* bytes. */ /* */ /* module_name :: The name of the module. */ /* */ /* module_version :: The version, as a 16.16 fixed number */ /* (major.minor). */ /* */ /* module_requires :: The version of FreeType this module requires */ /* (starts at version 2.0, i.e 0x20000) */ /* */ /* module_init :: A function used to initialize (not create) a */ /* new module object. */ /* */ /* module_done :: A function used to finalize (not destroy) a */ /* given module object */ /* */ /* get_interface :: Queries a given module for a specific */ /* interface by name. */ /* */ typedef struct FT_Module_Class_ { FT_ULong module_flags; FT_Int module_size; const FT_String* module_name; FT_Fixed module_version; FT_Fixed module_requires; const void* module_interface; FT_Module_Constructor module_init; FT_Module_Destructor module_done; FT_Module_Requester get_interface; } FT_Module_Class; /*************************************************************************/ /* */ /* <Function> */ /* FT_Add_Module */ /* */ /* <Description> */ /* Adds a new module to a given library instance. */ /* */ /* <InOut> */ /* library :: A handle to the library object. */ /* */ /* <Input> */ /* clazz :: A pointer to class descriptor for the module. */ /* */ /* <Return> */ /* FreeType error code. 0 means success. */ /* */ /* <Note> */ /* An error will be returned if a module already exists by that name, */ /* or if the module requires a version of FreeType that is too great. */ /* */ FT_EXPORT( FT_Error ) FT_Add_Module( FT_Library library, const FT_Module_Class* clazz ); /*************************************************************************/
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -