2009-04-05 16:59:26 +02:00
|
|
|
/***************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* basepic.h */
|
|
|
|
/* */
|
|
|
|
/* The FreeType position independent code services for base. */
|
|
|
|
/* */
|
2017-01-04 20:16:34 +01:00
|
|
|
/* Copyright 2009-2017 by */
|
2009-04-05 16:59:26 +02:00
|
|
|
/* Oran Agra and Mickey Gabel. */
|
|
|
|
/* */
|
|
|
|
/* 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. */
|
|
|
|
/* */
|
|
|
|
/***************************************************************************/
|
|
|
|
|
|
|
|
|
2016-01-12 21:37:13 +01:00
|
|
|
#ifndef BASEPIC_H_
|
|
|
|
#define BASEPIC_H_
|
2009-04-05 16:59:26 +02:00
|
|
|
|
2012-01-16 18:00:24 +01:00
|
|
|
|
2009-04-05 16:59:26 +02:00
|
|
|
#include FT_INTERNAL_PIC_H
|
|
|
|
|
Better support of user-supplied C++ namespaces.
See
http://lists.nongnu.org/archive/html/freetype-devel/2015-07/msg00008.html
for a rationale.
* src/autofit/afpic.h, src/base/basepic.h, src/cff/cffpic.h,
src/pshinter/pshpic.h, src/psnames/pspic.h, src/raster/rastpic.h,
src/sfnt/sfntpic.h, src/smooth/ftspic.h, src/truetype/ttpic.h
(FT_BEGIN_HEADER, FT_END_HEADER): Move macro calls to not enclose
header files that contain FT_{BEGIN,END}_HEADER macros by
themselves.
* src/autofit/aftypes.h [FT_DEBUG_AUTOFIT]: Include
FT_CONFIG_STANDARD_LIBRARY_H earlier.
* src/truetype/ttpic.h: Include FT_INTERNL_PIC_H.
2015-07-09 15:10:31 +02:00
|
|
|
|
2009-04-05 16:59:26 +02:00
|
|
|
#ifndef FT_CONFIG_OPTION_PIC
|
2013-03-17 08:14:46 +01:00
|
|
|
|
|
|
|
#define FT_OUTLINE_GLYPH_CLASS_GET &ft_outline_glyph_class
|
|
|
|
#define FT_BITMAP_GLYPH_CLASS_GET &ft_bitmap_glyph_class
|
|
|
|
#define FT_DEFAULT_MODULES_GET ft_default_modules
|
|
|
|
|
2012-01-17 07:13:50 +01:00
|
|
|
#ifdef FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK
|
2013-03-17 08:14:46 +01:00
|
|
|
#define FT_RACCESS_GUESS_TABLE_GET ft_raccess_guess_table
|
2012-01-17 07:13:50 +01:00
|
|
|
#endif
|
2009-04-05 16:59:26 +02:00
|
|
|
|
|
|
|
#else /* FT_CONFIG_OPTION_PIC */
|
|
|
|
|
|
|
|
#include FT_GLYPH_H
|
|
|
|
|
2012-01-17 07:13:50 +01:00
|
|
|
#ifdef FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK
|
|
|
|
#include FT_INTERNAL_RFORK_H
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
Better support of user-supplied C++ namespaces.
See
http://lists.nongnu.org/archive/html/freetype-devel/2015-07/msg00008.html
for a rationale.
* src/autofit/afpic.h, src/base/basepic.h, src/cff/cffpic.h,
src/pshinter/pshpic.h, src/psnames/pspic.h, src/raster/rastpic.h,
src/sfnt/sfntpic.h, src/smooth/ftspic.h, src/truetype/ttpic.h
(FT_BEGIN_HEADER, FT_END_HEADER): Move macro calls to not enclose
header files that contain FT_{BEGIN,END}_HEADER macros by
themselves.
* src/autofit/aftypes.h [FT_DEBUG_AUTOFIT]: Include
FT_CONFIG_STANDARD_LIBRARY_H earlier.
* src/truetype/ttpic.h: Include FT_INTERNL_PIC_H.
2015-07-09 15:10:31 +02:00
|
|
|
FT_BEGIN_HEADER
|
|
|
|
|
2013-03-17 08:14:46 +01:00
|
|
|
typedef struct BasePIC_
|
2009-04-05 16:59:26 +02:00
|
|
|
{
|
2013-03-17 08:14:46 +01:00
|
|
|
FT_Module_Class** default_module_classes;
|
|
|
|
FT_Glyph_Class ft_outline_glyph_class;
|
|
|
|
FT_Glyph_Class ft_bitmap_glyph_class;
|
|
|
|
|
2012-01-17 07:13:50 +01:00
|
|
|
#ifdef FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK
|
2013-03-17 08:14:46 +01:00
|
|
|
ft_raccess_guess_rec ft_raccess_guess_table[FT_RACCESS_N_RULES];
|
2012-01-17 07:13:50 +01:00
|
|
|
#endif
|
2013-03-17 08:14:46 +01:00
|
|
|
|
2009-04-05 16:59:26 +02:00
|
|
|
} BasePIC;
|
|
|
|
|
2013-03-17 08:14:46 +01:00
|
|
|
|
|
|
|
#define GET_PIC( lib ) ( (BasePIC*)( (lib)->pic_container.base ) )
|
|
|
|
|
|
|
|
#define FT_OUTLINE_GLYPH_CLASS_GET \
|
|
|
|
( &GET_PIC( library )->ft_outline_glyph_class )
|
|
|
|
#define FT_BITMAP_GLYPH_CLASS_GET \
|
|
|
|
( &GET_PIC( library )->ft_bitmap_glyph_class )
|
|
|
|
#define FT_DEFAULT_MODULES_GET \
|
|
|
|
( GET_PIC( library )->default_module_classes )
|
|
|
|
|
2012-01-17 07:13:50 +01:00
|
|
|
#ifdef FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK
|
2013-03-17 08:14:46 +01:00
|
|
|
#define FT_RACCESS_GUESS_TABLE_GET \
|
|
|
|
( GET_PIC( library )->ft_raccess_guess_table )
|
2012-01-17 07:13:50 +01:00
|
|
|
#endif
|
2009-04-05 16:59:26 +02:00
|
|
|
|
2013-03-17 08:14:46 +01:00
|
|
|
|
|
|
|
/* see basepic.c for the implementation */
|
2009-04-05 16:59:26 +02:00
|
|
|
void
|
Fix redundant declaration warning in PIC mode.
Originally FT_DEFINE_{DRIVER,MODULE,RENDERER}() macros were
designed to declare xxx_pic_{free,init} by themselves.
Because these macros are used at the end of the module
interface (e.g. ttdriver.c) and the wrapper source to build
a module as a single object (e.g. truetype.c) includes
the PIC file (e.g. ttpic.c) before the module interface,
these macros are expanded AFTER xxx_pic_{free,init} body
when the modules are built as single object.
The declaration after the implementation causes the redundant
declaration warnings, so the declarations are moved to module
PIC headers (e.g. ttpic.h). Separating to other header files
are needed for multi build.
* include/freetype/internal/ftdriver.h (FT_DEFINE_DRIVER):
Remove class_##_pic_free and class_##_pic_init declarations.
* include/freetype/internal/ftobjs.h (FT_DEFINE_RENDERER,
FT_DEFINE_MODULE): Ditto.
* src/base/basepic.h: Insert a comment and fix coding style.
* src/autofit/afpic.h: Declare autofit_module_class_pic_{free,
init}.
* src/cff/cffpic.h: Declare cff_driver_class_pic_{free,init}.
* src/pshinter/pshpic.h: Declare pshinter_module_class_pic_{free,
init}.
* src/psnames/pspic.h: Declare psnames_module_class_pic_{free,
init}.
* src/raster/rastpic.h: Declare
ft_raster{1,5}_renderer_class_pic_{free,init}
* src/sfnt/sfntpic.h: Declare sfnt_module_class_pic_{free,init}.
* src/smooth/ftspic.h: Declare
ft_smooth_{,lcd_,lcdv_}renderer_class_pic_{free,init}.
* src/truetype/ttpic.h: Declare tt_driver_class_pic_{free,init}.
2012-01-15 15:35:31 +01:00
|
|
|
ft_base_pic_free( FT_Library library );
|
2009-04-05 16:59:26 +02:00
|
|
|
|
|
|
|
FT_Error
|
Fix redundant declaration warning in PIC mode.
Originally FT_DEFINE_{DRIVER,MODULE,RENDERER}() macros were
designed to declare xxx_pic_{free,init} by themselves.
Because these macros are used at the end of the module
interface (e.g. ttdriver.c) and the wrapper source to build
a module as a single object (e.g. truetype.c) includes
the PIC file (e.g. ttpic.c) before the module interface,
these macros are expanded AFTER xxx_pic_{free,init} body
when the modules are built as single object.
The declaration after the implementation causes the redundant
declaration warnings, so the declarations are moved to module
PIC headers (e.g. ttpic.h). Separating to other header files
are needed for multi build.
* include/freetype/internal/ftdriver.h (FT_DEFINE_DRIVER):
Remove class_##_pic_free and class_##_pic_init declarations.
* include/freetype/internal/ftobjs.h (FT_DEFINE_RENDERER,
FT_DEFINE_MODULE): Ditto.
* src/base/basepic.h: Insert a comment and fix coding style.
* src/autofit/afpic.h: Declare autofit_module_class_pic_{free,
init}.
* src/cff/cffpic.h: Declare cff_driver_class_pic_{free,init}.
* src/pshinter/pshpic.h: Declare pshinter_module_class_pic_{free,
init}.
* src/psnames/pspic.h: Declare psnames_module_class_pic_{free,
init}.
* src/raster/rastpic.h: Declare
ft_raster{1,5}_renderer_class_pic_{free,init}
* src/sfnt/sfntpic.h: Declare sfnt_module_class_pic_{free,init}.
* src/smooth/ftspic.h: Declare
ft_smooth_{,lcd_,lcdv_}renderer_class_pic_{free,init}.
* src/truetype/ttpic.h: Declare tt_driver_class_pic_{free,init}.
2012-01-15 15:35:31 +01:00
|
|
|
ft_base_pic_init( FT_Library library );
|
2009-04-05 16:59:26 +02:00
|
|
|
|
Better support of user-supplied C++ namespaces.
See
http://lists.nongnu.org/archive/html/freetype-devel/2015-07/msg00008.html
for a rationale.
* src/autofit/afpic.h, src/base/basepic.h, src/cff/cffpic.h,
src/pshinter/pshpic.h, src/psnames/pspic.h, src/raster/rastpic.h,
src/sfnt/sfntpic.h, src/smooth/ftspic.h, src/truetype/ttpic.h
(FT_BEGIN_HEADER, FT_END_HEADER): Move macro calls to not enclose
header files that contain FT_{BEGIN,END}_HEADER macros by
themselves.
* src/autofit/aftypes.h [FT_DEBUG_AUTOFIT]: Include
FT_CONFIG_STANDARD_LIBRARY_H earlier.
* src/truetype/ttpic.h: Include FT_INTERNL_PIC_H.
2015-07-09 15:10:31 +02:00
|
|
|
FT_END_HEADER
|
|
|
|
|
2009-04-05 16:59:26 +02:00
|
|
|
#endif /* FT_CONFIG_OPTION_PIC */
|
2013-03-17 08:14:46 +01:00
|
|
|
|
|
|
|
/* */
|
2009-04-05 16:59:26 +02:00
|
|
|
|
2016-01-12 21:37:13 +01:00
|
|
|
#endif /* BASEPIC_H_ */
|
2009-04-05 16:59:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
/* END */
|