├── .gitignore ├── README.md ├── cocos2dx └── platform │ └── third_party │ ├── android │ └── prebuilt │ │ └── libfreetype2 │ │ ├── Android.mk │ │ ├── include │ │ ├── freetype │ │ │ ├── config │ │ │ │ ├── ftconfig.h │ │ │ │ ├── ftheader.h │ │ │ │ ├── ftmodule.h │ │ │ │ ├── ftoption.h │ │ │ │ └── ftstdlib.h │ │ │ ├── freetype.h │ │ │ ├── ftadvanc.h │ │ │ ├── ftbbox.h │ │ │ ├── ftbdf.h │ │ │ ├── ftbitmap.h │ │ │ ├── ftbzip2.h │ │ │ ├── ftcache.h │ │ │ ├── ftchapters.h │ │ │ ├── ftcid.h │ │ │ ├── fterrdef.h │ │ │ ├── fterrors.h │ │ │ ├── ftgasp.h │ │ │ ├── ftglyph.h │ │ │ ├── ftgxval.h │ │ │ ├── ftgzip.h │ │ │ ├── ftimage.h │ │ │ ├── ftincrem.h │ │ │ ├── ftlcdfil.h │ │ │ ├── ftlist.h │ │ │ ├── ftlzw.h │ │ │ ├── ftmac.h │ │ │ ├── ftmm.h │ │ │ ├── ftmodapi.h │ │ │ ├── ftmoderr.h │ │ │ ├── ftotval.h │ │ │ ├── ftoutln.h │ │ │ ├── ftpfr.h │ │ │ ├── ftrender.h │ │ │ ├── ftsizes.h │ │ │ ├── ftsnames.h │ │ │ ├── ftstroke.h │ │ │ ├── ftsynth.h │ │ │ ├── ftsystem.h │ │ │ ├── fttrigon.h │ │ │ ├── fttypes.h │ │ │ ├── ftwinfnt.h │ │ │ ├── ftxf86.h │ │ │ ├── internal │ │ │ │ ├── autohint.h │ │ │ │ ├── ftcalc.h │ │ │ │ ├── ftdebug.h │ │ │ │ ├── ftdriver.h │ │ │ │ ├── ftgloadr.h │ │ │ │ ├── ftmemory.h │ │ │ │ ├── ftobjs.h │ │ │ │ ├── ftpic.h │ │ │ │ ├── ftrfork.h │ │ │ │ ├── ftserv.h │ │ │ │ ├── ftstream.h │ │ │ │ ├── fttrace.h │ │ │ │ ├── ftvalid.h │ │ │ │ ├── internal.h │ │ │ │ ├── psaux.h │ │ │ │ ├── pshints.h │ │ │ │ ├── services │ │ │ │ │ ├── svbdf.h │ │ │ │ │ ├── svcid.h │ │ │ │ │ ├── svgldict.h │ │ │ │ │ ├── svgxval.h │ │ │ │ │ ├── svkern.h │ │ │ │ │ ├── svmm.h │ │ │ │ │ ├── svotval.h │ │ │ │ │ ├── svpfr.h │ │ │ │ │ ├── svpostnm.h │ │ │ │ │ ├── svpscmap.h │ │ │ │ │ ├── svpsinfo.h │ │ │ │ │ ├── svsfnt.h │ │ │ │ │ ├── svttcmap.h │ │ │ │ │ ├── svtteng.h │ │ │ │ │ ├── svttglyf.h │ │ │ │ │ ├── svwinfnt.h │ │ │ │ │ └── svxf86nm.h │ │ │ │ ├── sfnt.h │ │ │ │ ├── t1types.h │ │ │ │ └── tttypes.h │ │ │ ├── t1tables.h │ │ │ ├── ttnameid.h │ │ │ ├── tttables.h │ │ │ ├── tttags.h │ │ │ └── ttunpat.h │ │ └── ft2build.h │ │ └── libs │ │ ├── armeabi-v7a │ │ └── libfreetype2.a │ │ └── armeabi │ │ └── libfreetype2.a │ ├── ios │ ├── libfreetype2 │ │ ├── freetype │ │ │ ├── config │ │ │ │ ├── ftconfig.h │ │ │ │ ├── ftheader.h │ │ │ │ ├── ftmodule.h │ │ │ │ ├── ftoption.h │ │ │ │ └── ftstdlib.h │ │ │ ├── freetype.h │ │ │ ├── ftadvanc.h │ │ │ ├── ftbbox.h │ │ │ ├── ftbdf.h │ │ │ ├── ftbitmap.h │ │ │ ├── ftbzip2.h │ │ │ ├── ftcache.h │ │ │ ├── ftchapters.h │ │ │ ├── ftcid.h │ │ │ ├── fterrdef.h │ │ │ ├── fterrors.h │ │ │ ├── ftgasp.h │ │ │ ├── ftglyph.h │ │ │ ├── ftgxval.h │ │ │ ├── ftgzip.h │ │ │ ├── ftimage.h │ │ │ ├── ftincrem.h │ │ │ ├── ftlcdfil.h │ │ │ ├── ftlist.h │ │ │ ├── ftlzw.h │ │ │ ├── ftmac.h │ │ │ ├── ftmm.h │ │ │ ├── ftmodapi.h │ │ │ ├── ftmoderr.h │ │ │ ├── ftotval.h │ │ │ ├── ftoutln.h │ │ │ ├── ftpfr.h │ │ │ ├── ftrender.h │ │ │ ├── ftsizes.h │ │ │ ├── ftsnames.h │ │ │ ├── ftstroke.h │ │ │ ├── ftsynth.h │ │ │ ├── ftsystem.h │ │ │ ├── fttrigon.h │ │ │ ├── fttypes.h │ │ │ ├── ftwinfnt.h │ │ │ ├── ftxf86.h │ │ │ ├── internal │ │ │ │ ├── autohint.h │ │ │ │ ├── ftcalc.h │ │ │ │ ├── ftdebug.h │ │ │ │ ├── ftdriver.h │ │ │ │ ├── ftgloadr.h │ │ │ │ ├── ftmemory.h │ │ │ │ ├── ftobjs.h │ │ │ │ ├── ftpic.h │ │ │ │ ├── ftrfork.h │ │ │ │ ├── ftserv.h │ │ │ │ ├── ftstream.h │ │ │ │ ├── fttrace.h │ │ │ │ ├── ftvalid.h │ │ │ │ ├── internal.h │ │ │ │ ├── psaux.h │ │ │ │ ├── pshints.h │ │ │ │ ├── services │ │ │ │ │ ├── svbdf.h │ │ │ │ │ ├── svcid.h │ │ │ │ │ ├── svgldict.h │ │ │ │ │ ├── svgxval.h │ │ │ │ │ ├── svkern.h │ │ │ │ │ ├── svmm.h │ │ │ │ │ ├── svotval.h │ │ │ │ │ ├── svpfr.h │ │ │ │ │ ├── svpostnm.h │ │ │ │ │ ├── svpscmap.h │ │ │ │ │ ├── svpsinfo.h │ │ │ │ │ ├── svsfnt.h │ │ │ │ │ ├── svttcmap.h │ │ │ │ │ ├── svtteng.h │ │ │ │ │ ├── svttglyf.h │ │ │ │ │ ├── svwinfnt.h │ │ │ │ │ └── svxf86nm.h │ │ │ │ ├── sfnt.h │ │ │ │ ├── t1types.h │ │ │ │ └── tttypes.h │ │ │ ├── t1tables.h │ │ │ ├── ttnameid.h │ │ │ ├── tttables.h │ │ │ ├── tttags.h │ │ │ └── ttunpat.h │ │ └── ft2build.h │ └── libraries │ │ └── libfreetype.a │ └── win32 │ ├── libfreetype2 │ ├── freetype │ │ ├── config │ │ │ ├── ftconfig.h │ │ │ ├── ftheader.h │ │ │ ├── ftmodule.h │ │ │ ├── ftoption.h │ │ │ └── ftstdlib.h │ │ ├── freetype.h │ │ ├── ftadvanc.h │ │ ├── ftbbox.h │ │ ├── ftbdf.h │ │ ├── ftbitmap.h │ │ ├── ftbzip2.h │ │ ├── ftcache.h │ │ ├── ftchapters.h │ │ ├── ftcid.h │ │ ├── fterrdef.h │ │ ├── fterrors.h │ │ ├── ftgasp.h │ │ ├── ftglyph.h │ │ ├── ftgxval.h │ │ ├── ftgzip.h │ │ ├── ftimage.h │ │ ├── ftincrem.h │ │ ├── ftlcdfil.h │ │ ├── ftlist.h │ │ ├── ftlzw.h │ │ ├── ftmac.h │ │ ├── ftmm.h │ │ ├── ftmodapi.h │ │ ├── ftmoderr.h │ │ ├── ftotval.h │ │ ├── ftoutln.h │ │ ├── ftpfr.h │ │ ├── ftrender.h │ │ ├── ftsizes.h │ │ ├── ftsnames.h │ │ ├── ftstroke.h │ │ ├── ftsynth.h │ │ ├── ftsystem.h │ │ ├── fttrigon.h │ │ ├── fttypes.h │ │ ├── ftwinfnt.h │ │ ├── ftxf86.h │ │ ├── internal │ │ │ ├── autohint.h │ │ │ ├── ftcalc.h │ │ │ ├── ftdebug.h │ │ │ ├── ftdriver.h │ │ │ ├── ftgloadr.h │ │ │ ├── ftmemory.h │ │ │ ├── ftobjs.h │ │ │ ├── ftpic.h │ │ │ ├── ftrfork.h │ │ │ ├── ftserv.h │ │ │ ├── ftstream.h │ │ │ ├── fttrace.h │ │ │ ├── ftvalid.h │ │ │ ├── internal.h │ │ │ ├── psaux.h │ │ │ ├── pshints.h │ │ │ ├── services │ │ │ │ ├── svbdf.h │ │ │ │ ├── svcid.h │ │ │ │ ├── svgldict.h │ │ │ │ ├── svgxval.h │ │ │ │ ├── svkern.h │ │ │ │ ├── svmm.h │ │ │ │ ├── svotval.h │ │ │ │ ├── svpfr.h │ │ │ │ ├── svpostnm.h │ │ │ │ ├── svpscmap.h │ │ │ │ ├── svpsinfo.h │ │ │ │ ├── svsfnt.h │ │ │ │ ├── svttcmap.h │ │ │ │ ├── svtteng.h │ │ │ │ ├── svttglyf.h │ │ │ │ ├── svwinfnt.h │ │ │ │ └── svxf86nm.h │ │ │ ├── sfnt.h │ │ │ ├── t1types.h │ │ │ └── tttypes.h │ │ ├── t1tables.h │ │ ├── ttnameid.h │ │ ├── tttables.h │ │ ├── tttags.h │ │ └── ttunpat.h │ └── ft2build.h │ └── libraries │ └── libfreetype2.lib ├── extensions ├── Android.mk ├── RichControls │ ├── CCHTMLLabel.cpp │ ├── CCHTMLLabel.h │ ├── CCRichAtlas.cpp │ ├── CCRichAtlas.h │ ├── CCRichCache.cpp │ ├── CCRichCache.h │ ├── CCRichCompositor.cpp │ ├── CCRichCompositor.h │ ├── CCRichElement.cpp │ ├── CCRichElement.h │ ├── CCRichNode.cpp │ ├── CCRichNode.h │ ├── CCRichOverlay.cpp │ ├── CCRichOverlay.h │ ├── CCRichParser.cpp │ ├── CCRichParser.h │ └── CCRichProtocols.h ├── cells │ ├── CCell.cpp │ ├── CCell.h │ ├── CCells.cpp │ ├── CCells.h │ ├── CContainer.h │ ├── CCreationFactory.cpp │ ├── CCreationFactory.h │ ├── CCreationWorker.cpp │ ├── CCreationWorker.h │ ├── CDownloader.cpp │ ├── CDownloader.h │ ├── CPlatform.h │ ├── CUtils.cpp │ ├── CUtils.h │ ├── cells.cpp │ ├── cells.h │ ├── md5.c │ ├── md5.h │ ├── zpip.c │ └── zpip.h ├── dfont │ ├── dfont_config.h │ ├── dfont_manager.cpp │ ├── dfont_manager.h │ ├── dfont_render.cpp │ ├── dfont_render.h │ ├── dfont_utility.cpp │ └── dfont_utility.h ├── proj.linux │ ├── Makefile │ └── renren-ext.mk └── renren-ext.h └── samples └── Cpp └── HTMLTest ├── Classes ├── AppDelegate.cpp ├── AppDelegate.h ├── AppMacros.h ├── HTMLTest.cpp └── HTMLTest.h ├── Resources ├── fireball.ccbi ├── html.htm ├── htmltest.jpg ├── res │ ├── Marker Felt.ttf │ ├── bg.jpg │ ├── close.png │ ├── scale9.png │ └── smile.png ├── skillFire.plist └── skillFire.png └── proj.win32 ├── HTMLTest.vcxproj ├── HTMLTest.vcxproj.filters ├── HTMLTest.vcxproj.user ├── main.cpp └── main.h /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files 2 | *.slo 3 | *.lo 4 | *.o 5 | 6 | # Compiled Dynamic libraries 7 | *.so 8 | *.dylib 9 | 10 | # Compiled Static libraries 11 | *.lai 12 | *.la 13 | *.a 14 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | cocos2dx-ext 2 | ============ 3 | 4 | Extensions for Cocos2dx: Dynamic Font Management, HTML Widget, Powerful Asset Management... 5 | 6 | * CCHTMLLabel Sample: 7 | 8 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/android/prebuilt/libfreetype2/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | LOCAL_MODULE := cocos_freetype2_static 5 | LOCAL_MODULE_FILENAME := freetype2 6 | LOCAL_SRC_FILES := libs/$(TARGET_ARCH_ABI)/libfreetype2.a 7 | LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include 8 | include $(PREBUILT_STATIC_LIBRARY) 9 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/android/prebuilt/libfreetype2/include/freetype/config/ftmodule.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file registers the FreeType modules compiled into the library. 3 | * 4 | * If you use GNU make, this file IS NOT USED! Instead, it is created in 5 | * the objects directory (normally `/objs/') based on information 6 | * from `/modules.cfg'. 7 | * 8 | * Please read `docs/INSTALL.ANY' and `docs/CUSTOMIZE' how to compile 9 | * FreeType without GNU make. 10 | * 11 | */ 12 | 13 | FT_USE_MODULE( FT_Module_Class, autofit_module_class ) 14 | FT_USE_MODULE( FT_Driver_ClassRec, tt_driver_class ) 15 | FT_USE_MODULE( FT_Driver_ClassRec, t1_driver_class ) 16 | FT_USE_MODULE( FT_Driver_ClassRec, cff_driver_class ) 17 | FT_USE_MODULE( FT_Driver_ClassRec, t1cid_driver_class ) 18 | FT_USE_MODULE( FT_Driver_ClassRec, pfr_driver_class ) 19 | FT_USE_MODULE( FT_Driver_ClassRec, t42_driver_class ) 20 | FT_USE_MODULE( FT_Driver_ClassRec, winfnt_driver_class ) 21 | FT_USE_MODULE( FT_Driver_ClassRec, pcf_driver_class ) 22 | FT_USE_MODULE( FT_Module_Class, psaux_module_class ) 23 | FT_USE_MODULE( FT_Module_Class, psnames_module_class ) 24 | FT_USE_MODULE( FT_Module_Class, pshinter_module_class ) 25 | FT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class ) 26 | FT_USE_MODULE( FT_Module_Class, sfnt_module_class ) 27 | FT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class ) 28 | FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcd_renderer_class ) 29 | FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcdv_renderer_class ) 30 | FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class ) 31 | 32 | /* EOF */ 33 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/android/prebuilt/libfreetype2/include/freetype/internal/ftpic.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ftpic.h */ 4 | /* */ 5 | /* The FreeType position independent code services (declaration). */ 6 | /* */ 7 | /* Copyright 2009 by */ 8 | /* Oran Agra and Mickey Gabel. */ 9 | /* */ 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 */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | /*************************************************************************/ 19 | /* */ 20 | /* Modules that ordinarily have const global data that need address */ 21 | /* can instead define pointers here. */ 22 | /* */ 23 | /*************************************************************************/ 24 | 25 | 26 | #ifndef __FTPIC_H__ 27 | #define __FTPIC_H__ 28 | 29 | 30 | FT_BEGIN_HEADER 31 | 32 | #ifdef FT_CONFIG_OPTION_PIC 33 | 34 | typedef struct FT_PIC_Container_ 35 | { 36 | /* pic containers for base */ 37 | void* base; 38 | /* pic containers for modules */ 39 | void* autofit; 40 | void* cff; 41 | void* pshinter; 42 | void* psnames; 43 | void* raster; 44 | void* sfnt; 45 | void* smooth; 46 | void* truetype; 47 | } FT_PIC_Container; 48 | 49 | /* Initialize the various function tables, structs, etc. stored in the container. */ 50 | FT_BASE( FT_Error ) 51 | ft_pic_container_init( FT_Library library ); 52 | 53 | 54 | /* Destroy the contents of the container. */ 55 | FT_BASE( void ) 56 | ft_pic_container_destroy( FT_Library library ); 57 | 58 | #endif /* FT_CONFIG_OPTION_PIC */ 59 | 60 | /* */ 61 | 62 | FT_END_HEADER 63 | 64 | #endif /* __FTPIC_H__ */ 65 | 66 | 67 | /* END */ 68 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/android/prebuilt/libfreetype2/include/freetype/internal/internal.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* internal.h */ 4 | /* */ 5 | /* Internal header files (specification only). */ 6 | /* */ 7 | /* Copyright 1996-2001, 2002, 2003, 2004 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 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 */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | /*************************************************************************/ 20 | /* */ 21 | /* This file is automatically included by `ft2build.h'. */ 22 | /* Do not include it manually! */ 23 | /* */ 24 | /*************************************************************************/ 25 | 26 | 27 | #define FT_INTERNAL_OBJECTS_H 28 | #define FT_INTERNAL_PIC_H 29 | #define FT_INTERNAL_STREAM_H 30 | #define FT_INTERNAL_MEMORY_H 31 | #define FT_INTERNAL_DEBUG_H 32 | #define FT_INTERNAL_CALC_H 33 | #define FT_INTERNAL_DRIVER_H 34 | #define FT_INTERNAL_TRACE_H 35 | #define FT_INTERNAL_GLYPH_LOADER_H 36 | #define FT_INTERNAL_SFNT_H 37 | #define FT_INTERNAL_SERVICE_H 38 | #define FT_INTERNAL_RFORK_H 39 | #define FT_INTERNAL_VALIDATE_H 40 | 41 | #define FT_INTERNAL_TRUETYPE_TYPES_H 42 | #define FT_INTERNAL_TYPE1_TYPES_H 43 | 44 | #define FT_INTERNAL_POSTSCRIPT_AUX_H 45 | #define FT_INTERNAL_POSTSCRIPT_HINTS_H 46 | #define FT_INTERNAL_POSTSCRIPT_GLOBALS_H 47 | 48 | #define FT_INTERNAL_AUTOHINT_H 49 | 50 | 51 | /* END */ 52 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/android/prebuilt/libfreetype2/include/freetype/internal/services/svbdf.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svbdf.h */ 4 | /* */ 5 | /* The FreeType BDF services (specification). */ 6 | /* */ 7 | /* Copyright 2003 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 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 */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVBDF_H__ 20 | #define __SVBDF_H__ 21 | 22 | #include FT_BDF_H 23 | #include FT_INTERNAL_SERVICE_H 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | 29 | #define FT_SERVICE_ID_BDF "bdf" 30 | 31 | typedef FT_Error 32 | (*FT_BDF_GetCharsetIdFunc)( FT_Face face, 33 | const char* *acharset_encoding, 34 | const char* *acharset_registry ); 35 | 36 | typedef FT_Error 37 | (*FT_BDF_GetPropertyFunc)( FT_Face face, 38 | const char* prop_name, 39 | BDF_PropertyRec *aproperty ); 40 | 41 | 42 | FT_DEFINE_SERVICE( BDF ) 43 | { 44 | FT_BDF_GetCharsetIdFunc get_charset_id; 45 | FT_BDF_GetPropertyFunc get_property; 46 | }; 47 | 48 | #ifndef FT_CONFIG_OPTION_PIC 49 | 50 | #define FT_DEFINE_SERVICE_BDFRec(class_, get_charset_id_, get_property_) \ 51 | static const FT_Service_BDFRec class_ = \ 52 | { \ 53 | get_charset_id_, get_property_ \ 54 | }; 55 | 56 | #else /* FT_CONFIG_OPTION_PIC */ 57 | 58 | #define FT_DEFINE_SERVICE_BDFRec(class_, get_charset_id_, get_property_) \ 59 | void \ 60 | FT_Init_Class_##class_( FT_Service_BDFRec* clazz ) \ 61 | { \ 62 | clazz->get_charset_id = get_charset_id_; \ 63 | clazz->get_property = get_property_; \ 64 | } 65 | 66 | #endif /* FT_CONFIG_OPTION_PIC */ 67 | 68 | /* */ 69 | 70 | 71 | FT_END_HEADER 72 | 73 | 74 | #endif /* __SVBDF_H__ */ 75 | 76 | 77 | /* END */ 78 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/android/prebuilt/libfreetype2/include/freetype/internal/services/svcid.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svcid.h */ 4 | /* */ 5 | /* The FreeType CID font services (specification). */ 6 | /* */ 7 | /* Copyright 2007, 2009 by Derek Clegg, Michael Toftdal. */ 8 | /* */ 9 | /* This file is part of the FreeType project, and may only be used, */ 10 | /* modified, and distributed under the terms of the FreeType project */ 11 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 12 | /* this file you indicate that you have read the license and */ 13 | /* understand and accept it fully. */ 14 | /* */ 15 | /***************************************************************************/ 16 | 17 | 18 | #ifndef __SVCID_H__ 19 | #define __SVCID_H__ 20 | 21 | #include FT_INTERNAL_SERVICE_H 22 | 23 | 24 | FT_BEGIN_HEADER 25 | 26 | 27 | #define FT_SERVICE_ID_CID "CID" 28 | 29 | typedef FT_Error 30 | (*FT_CID_GetRegistryOrderingSupplementFunc)( FT_Face face, 31 | const char* *registry, 32 | const char* *ordering, 33 | FT_Int *supplement ); 34 | typedef FT_Error 35 | (*FT_CID_GetIsInternallyCIDKeyedFunc)( FT_Face face, 36 | FT_Bool *is_cid ); 37 | typedef FT_Error 38 | (*FT_CID_GetCIDFromGlyphIndexFunc)( FT_Face face, 39 | FT_UInt glyph_index, 40 | FT_UInt *cid ); 41 | 42 | FT_DEFINE_SERVICE( CID ) 43 | { 44 | FT_CID_GetRegistryOrderingSupplementFunc get_ros; 45 | FT_CID_GetIsInternallyCIDKeyedFunc get_is_cid; 46 | FT_CID_GetCIDFromGlyphIndexFunc get_cid_from_glyph_index; 47 | }; 48 | 49 | #ifndef FT_CONFIG_OPTION_PIC 50 | 51 | #define FT_DEFINE_SERVICE_CIDREC(class_, get_ros_, \ 52 | get_is_cid_, get_cid_from_glyph_index_ ) \ 53 | static const FT_Service_CIDRec class_ = \ 54 | { \ 55 | get_ros_, get_is_cid_, get_cid_from_glyph_index_ \ 56 | }; 57 | 58 | #else /* FT_CONFIG_OPTION_PIC */ 59 | 60 | #define FT_DEFINE_SERVICE_CIDREC(class_, get_ros_, \ 61 | get_is_cid_, get_cid_from_glyph_index_ ) \ 62 | void \ 63 | FT_Init_Class_##class_( FT_Library library, \ 64 | FT_Service_CIDRec* clazz) \ 65 | { \ 66 | FT_UNUSED(library); \ 67 | clazz->get_ros = get_ros_; \ 68 | clazz->get_is_cid = get_is_cid_; \ 69 | clazz->get_cid_from_glyph_index = get_cid_from_glyph_index_; \ 70 | } 71 | 72 | #endif /* FT_CONFIG_OPTION_PIC */ 73 | 74 | /* */ 75 | 76 | 77 | FT_END_HEADER 78 | 79 | 80 | #endif /* __SVCID_H__ */ 81 | 82 | 83 | /* END */ 84 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/android/prebuilt/libfreetype2/include/freetype/internal/services/svgldict.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svgldict.h */ 4 | /* */ 5 | /* The FreeType glyph dictionary services (specification). */ 6 | /* */ 7 | /* Copyright 2003 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 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 */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVGLDICT_H__ 20 | #define __SVGLDICT_H__ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | 24 | 25 | FT_BEGIN_HEADER 26 | 27 | 28 | /* 29 | * A service used to retrieve glyph names, as well as to find the 30 | * index of a given glyph name in a font. 31 | * 32 | */ 33 | 34 | #define FT_SERVICE_ID_GLYPH_DICT "glyph-dict" 35 | 36 | 37 | typedef FT_Error 38 | (*FT_GlyphDict_GetNameFunc)( FT_Face face, 39 | FT_UInt glyph_index, 40 | FT_Pointer buffer, 41 | FT_UInt buffer_max ); 42 | 43 | typedef FT_UInt 44 | (*FT_GlyphDict_NameIndexFunc)( FT_Face face, 45 | FT_String* glyph_name ); 46 | 47 | 48 | FT_DEFINE_SERVICE( GlyphDict ) 49 | { 50 | FT_GlyphDict_GetNameFunc get_name; 51 | FT_GlyphDict_NameIndexFunc name_index; /* optional */ 52 | }; 53 | 54 | #ifndef FT_CONFIG_OPTION_PIC 55 | 56 | #define FT_DEFINE_SERVICE_GLYPHDICTREC(class_, get_name_, name_index_) \ 57 | static const FT_Service_GlyphDictRec class_ = \ 58 | { \ 59 | get_name_, name_index_ \ 60 | }; 61 | 62 | #else /* FT_CONFIG_OPTION_PIC */ 63 | 64 | #define FT_DEFINE_SERVICE_GLYPHDICTREC(class_, get_name_, name_index_) \ 65 | void \ 66 | FT_Init_Class_##class_( FT_Library library, \ 67 | FT_Service_GlyphDictRec* clazz) \ 68 | { \ 69 | FT_UNUSED(library); \ 70 | clazz->get_name = get_name_; \ 71 | clazz->name_index = name_index_; \ 72 | } 73 | 74 | #endif /* FT_CONFIG_OPTION_PIC */ 75 | 76 | /* */ 77 | 78 | 79 | FT_END_HEADER 80 | 81 | 82 | #endif /* __SVGLDICT_H__ */ 83 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/android/prebuilt/libfreetype2/include/freetype/internal/services/svgxval.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svgxval.h */ 4 | /* */ 5 | /* FreeType API for validating TrueTypeGX/AAT tables (specification). */ 6 | /* */ 7 | /* Copyright 2004, 2005 by */ 8 | /* Masatake YAMATO, Red Hat K.K., */ 9 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 10 | /* */ 11 | /* This file is part of the FreeType project, and may only be used, */ 12 | /* modified, and distributed under the terms of the FreeType project */ 13 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 14 | /* this file you indicate that you have read the license and */ 15 | /* understand and accept it fully. */ 16 | /* */ 17 | /***************************************************************************/ 18 | 19 | /***************************************************************************/ 20 | /* */ 21 | /* gxvalid is derived from both gxlayout module and otvalid module. */ 22 | /* Development of gxlayout is supported by the Information-technology */ 23 | /* Promotion Agency(IPA), Japan. */ 24 | /* */ 25 | /***************************************************************************/ 26 | 27 | 28 | #ifndef __SVGXVAL_H__ 29 | #define __SVGXVAL_H__ 30 | 31 | #include FT_GX_VALIDATE_H 32 | #include FT_INTERNAL_VALIDATE_H 33 | 34 | FT_BEGIN_HEADER 35 | 36 | 37 | #define FT_SERVICE_ID_GX_VALIDATE "truetypegx-validate" 38 | #define FT_SERVICE_ID_CLASSICKERN_VALIDATE "classickern-validate" 39 | 40 | typedef FT_Error 41 | (*gxv_validate_func)( FT_Face face, 42 | FT_UInt gx_flags, 43 | FT_Bytes tables[FT_VALIDATE_GX_LENGTH], 44 | FT_UInt table_length ); 45 | 46 | 47 | typedef FT_Error 48 | (*ckern_validate_func)( FT_Face face, 49 | FT_UInt ckern_flags, 50 | FT_Bytes *ckern_table ); 51 | 52 | 53 | FT_DEFINE_SERVICE( GXvalidate ) 54 | { 55 | gxv_validate_func validate; 56 | }; 57 | 58 | FT_DEFINE_SERVICE( CKERNvalidate ) 59 | { 60 | ckern_validate_func validate; 61 | }; 62 | 63 | /* */ 64 | 65 | 66 | FT_END_HEADER 67 | 68 | 69 | #endif /* __SVGXVAL_H__ */ 70 | 71 | 72 | /* END */ 73 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/android/prebuilt/libfreetype2/include/freetype/internal/services/svkern.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svkern.h */ 4 | /* */ 5 | /* The FreeType Kerning service (specification). */ 6 | /* */ 7 | /* Copyright 2006 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 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 */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVKERN_H__ 20 | #define __SVKERN_H__ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | #include FT_TRUETYPE_TABLES_H 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | #define FT_SERVICE_ID_KERNING "kerning" 29 | 30 | 31 | typedef FT_Error 32 | (*FT_Kerning_TrackGetFunc)( FT_Face face, 33 | FT_Fixed point_size, 34 | FT_Int degree, 35 | FT_Fixed* akerning ); 36 | 37 | FT_DEFINE_SERVICE( Kerning ) 38 | { 39 | FT_Kerning_TrackGetFunc get_track; 40 | }; 41 | 42 | /* */ 43 | 44 | 45 | FT_END_HEADER 46 | 47 | 48 | #endif /* __SVKERN_H__ */ 49 | 50 | 51 | /* END */ 52 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/android/prebuilt/libfreetype2/include/freetype/internal/services/svotval.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svotval.h */ 4 | /* */ 5 | /* The FreeType OpenType validation service (specification). */ 6 | /* */ 7 | /* Copyright 2004, 2006 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 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 */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVOTVAL_H__ 20 | #define __SVOTVAL_H__ 21 | 22 | #include FT_OPENTYPE_VALIDATE_H 23 | #include FT_INTERNAL_VALIDATE_H 24 | 25 | FT_BEGIN_HEADER 26 | 27 | 28 | #define FT_SERVICE_ID_OPENTYPE_VALIDATE "opentype-validate" 29 | 30 | 31 | typedef FT_Error 32 | (*otv_validate_func)( FT_Face volatile face, 33 | FT_UInt ot_flags, 34 | FT_Bytes *base, 35 | FT_Bytes *gdef, 36 | FT_Bytes *gpos, 37 | FT_Bytes *gsub, 38 | FT_Bytes *jstf ); 39 | 40 | 41 | FT_DEFINE_SERVICE( OTvalidate ) 42 | { 43 | otv_validate_func validate; 44 | }; 45 | 46 | /* */ 47 | 48 | 49 | FT_END_HEADER 50 | 51 | 52 | #endif /* __SVOTVAL_H__ */ 53 | 54 | 55 | /* END */ 56 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/android/prebuilt/libfreetype2/include/freetype/internal/services/svpfr.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svpfr.h */ 4 | /* */ 5 | /* Internal PFR service functions (specification). */ 6 | /* */ 7 | /* Copyright 2003, 2006 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 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 */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVPFR_H__ 20 | #define __SVPFR_H__ 21 | 22 | #include FT_PFR_H 23 | #include FT_INTERNAL_SERVICE_H 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | 29 | #define FT_SERVICE_ID_PFR_METRICS "pfr-metrics" 30 | 31 | 32 | typedef FT_Error 33 | (*FT_PFR_GetMetricsFunc)( FT_Face face, 34 | FT_UInt *aoutline, 35 | FT_UInt *ametrics, 36 | FT_Fixed *ax_scale, 37 | FT_Fixed *ay_scale ); 38 | 39 | typedef FT_Error 40 | (*FT_PFR_GetKerningFunc)( FT_Face face, 41 | FT_UInt left, 42 | FT_UInt right, 43 | FT_Vector *avector ); 44 | 45 | typedef FT_Error 46 | (*FT_PFR_GetAdvanceFunc)( FT_Face face, 47 | FT_UInt gindex, 48 | FT_Pos *aadvance ); 49 | 50 | 51 | FT_DEFINE_SERVICE( PfrMetrics ) 52 | { 53 | FT_PFR_GetMetricsFunc get_metrics; 54 | FT_PFR_GetKerningFunc get_kerning; 55 | FT_PFR_GetAdvanceFunc get_advance; 56 | 57 | }; 58 | 59 | /* */ 60 | 61 | FT_END_HEADER 62 | 63 | #endif /* __SVPFR_H__ */ 64 | 65 | 66 | /* END */ 67 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/android/prebuilt/libfreetype2/include/freetype/internal/services/svpostnm.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svpostnm.h */ 4 | /* */ 5 | /* The FreeType PostScript name services (specification). */ 6 | /* */ 7 | /* Copyright 2003, 2007 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 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 */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVPOSTNM_H__ 20 | #define __SVPOSTNM_H__ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | 24 | 25 | FT_BEGIN_HEADER 26 | 27 | /* 28 | * A trivial service used to retrieve the PostScript name of a given 29 | * font when available. The `get_name' field should never be NULL. 30 | * 31 | * The corresponding function can return NULL to indicate that the 32 | * PostScript name is not available. 33 | * 34 | * The name is owned by the face and will be destroyed with it. 35 | */ 36 | 37 | #define FT_SERVICE_ID_POSTSCRIPT_FONT_NAME "postscript-font-name" 38 | 39 | 40 | typedef const char* 41 | (*FT_PsName_GetFunc)( FT_Face face ); 42 | 43 | 44 | FT_DEFINE_SERVICE( PsFontName ) 45 | { 46 | FT_PsName_GetFunc get_ps_font_name; 47 | }; 48 | 49 | #ifndef FT_CONFIG_OPTION_PIC 50 | 51 | #define FT_DEFINE_SERVICE_PSFONTNAMEREC(class_, get_ps_font_name_) \ 52 | static const FT_Service_PsFontNameRec class_ = \ 53 | { \ 54 | get_ps_font_name_ \ 55 | }; 56 | 57 | #else /* FT_CONFIG_OPTION_PIC */ 58 | 59 | #define FT_DEFINE_SERVICE_PSFONTNAMEREC(class_, get_ps_font_name_) \ 60 | void \ 61 | FT_Init_Class_##class_( FT_Library library, \ 62 | FT_Service_PsFontNameRec* clazz) \ 63 | { \ 64 | FT_UNUSED(library); \ 65 | clazz->get_ps_font_name = get_ps_font_name_; \ 66 | } 67 | 68 | #endif /* FT_CONFIG_OPTION_PIC */ 69 | 70 | /* */ 71 | 72 | 73 | FT_END_HEADER 74 | 75 | 76 | #endif /* __SVPOSTNM_H__ */ 77 | 78 | 79 | /* END */ 80 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/android/prebuilt/libfreetype2/include/freetype/internal/services/svpsinfo.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svpsinfo.h */ 4 | /* */ 5 | /* The FreeType PostScript info service (specification). */ 6 | /* */ 7 | /* Copyright 2003, 2004, 2009 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 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 */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVPSINFO_H__ 20 | #define __SVPSINFO_H__ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | #include FT_INTERNAL_TYPE1_TYPES_H 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | 29 | #define FT_SERVICE_ID_POSTSCRIPT_INFO "postscript-info" 30 | 31 | 32 | typedef FT_Error 33 | (*PS_GetFontInfoFunc)( FT_Face face, 34 | PS_FontInfoRec* afont_info ); 35 | 36 | typedef FT_Error 37 | (*PS_GetFontExtraFunc)( FT_Face face, 38 | PS_FontExtraRec* afont_extra ); 39 | 40 | typedef FT_Int 41 | (*PS_HasGlyphNamesFunc)( FT_Face face ); 42 | 43 | typedef FT_Error 44 | (*PS_GetFontPrivateFunc)( FT_Face face, 45 | PS_PrivateRec* afont_private ); 46 | 47 | 48 | FT_DEFINE_SERVICE( PsInfo ) 49 | { 50 | PS_GetFontInfoFunc ps_get_font_info; 51 | PS_GetFontExtraFunc ps_get_font_extra; 52 | PS_HasGlyphNamesFunc ps_has_glyph_names; 53 | PS_GetFontPrivateFunc ps_get_font_private; 54 | }; 55 | 56 | #ifndef FT_CONFIG_OPTION_PIC 57 | 58 | #define FT_DEFINE_SERVICE_PSINFOREC(class_, get_font_info_, \ 59 | ps_get_font_extra_, has_glyph_names_, get_font_private_) \ 60 | static const FT_Service_PsInfoRec class_ = \ 61 | { \ 62 | get_font_info_, ps_get_font_extra_, has_glyph_names_, \ 63 | get_font_private_ \ 64 | }; 65 | 66 | #else /* FT_CONFIG_OPTION_PIC */ 67 | 68 | #define FT_DEFINE_SERVICE_PSINFOREC(class_, get_font_info_, \ 69 | ps_get_font_extra_, has_glyph_names_, get_font_private_) \ 70 | void \ 71 | FT_Init_Class_##class_( FT_Library library, \ 72 | FT_Service_PsInfoRec* clazz) \ 73 | { \ 74 | FT_UNUSED(library); \ 75 | clazz->ps_get_font_info = get_font_info_; \ 76 | clazz->ps_get_font_extra = ps_get_font_extra_; \ 77 | clazz->ps_has_glyph_names = has_glyph_names_; \ 78 | clazz->ps_get_font_private = get_font_private_; \ 79 | } 80 | 81 | #endif /* FT_CONFIG_OPTION_PIC */ 82 | 83 | /* */ 84 | 85 | 86 | FT_END_HEADER 87 | 88 | 89 | #endif /* __SVPSINFO_H__ */ 90 | 91 | 92 | /* END */ 93 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/android/prebuilt/libfreetype2/include/freetype/internal/services/svtteng.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svtteng.h */ 4 | /* */ 5 | /* The FreeType TrueType engine query service (specification). */ 6 | /* */ 7 | /* Copyright 2006 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 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 */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVTTENG_H__ 20 | #define __SVTTENG_H__ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | #include FT_MODULE_H 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | 29 | /* 30 | * SFNT table loading service. 31 | */ 32 | 33 | #define FT_SERVICE_ID_TRUETYPE_ENGINE "truetype-engine" 34 | 35 | /* 36 | * Used to implement FT_Get_TrueType_Engine_Type 37 | */ 38 | 39 | FT_DEFINE_SERVICE( TrueTypeEngine ) 40 | { 41 | FT_TrueTypeEngineType engine_type; 42 | }; 43 | 44 | /* */ 45 | 46 | 47 | FT_END_HEADER 48 | 49 | 50 | #endif /* __SVTTENG_H__ */ 51 | 52 | 53 | /* END */ 54 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/android/prebuilt/libfreetype2/include/freetype/internal/services/svttglyf.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svttglyf.h */ 4 | /* */ 5 | /* The FreeType TrueType glyph service. */ 6 | /* */ 7 | /* Copyright 2007 by David Turner. */ 8 | /* */ 9 | /* This file is part of the FreeType project, and may only be used, */ 10 | /* modified, and distributed under the terms of the FreeType project */ 11 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 12 | /* this file you indicate that you have read the license and */ 13 | /* understand and accept it fully. */ 14 | /* */ 15 | /***************************************************************************/ 16 | 17 | #ifndef __SVTTGLYF_H__ 18 | #define __SVTTGLYF_H__ 19 | 20 | #include FT_INTERNAL_SERVICE_H 21 | #include FT_TRUETYPE_TABLES_H 22 | 23 | 24 | FT_BEGIN_HEADER 25 | 26 | 27 | #define FT_SERVICE_ID_TT_GLYF "tt-glyf" 28 | 29 | 30 | typedef FT_ULong 31 | (*TT_Glyf_GetLocationFunc)( FT_Face face, 32 | FT_UInt gindex, 33 | FT_ULong *psize ); 34 | 35 | FT_DEFINE_SERVICE( TTGlyf ) 36 | { 37 | TT_Glyf_GetLocationFunc get_location; 38 | }; 39 | 40 | #ifndef FT_CONFIG_OPTION_PIC 41 | 42 | #define FT_DEFINE_SERVICE_TTGLYFREC(class_, get_location_ ) \ 43 | static const FT_Service_TTGlyfRec class_ = \ 44 | { \ 45 | get_location_ \ 46 | }; 47 | 48 | #else /* FT_CONFIG_OPTION_PIC */ 49 | 50 | #define FT_DEFINE_SERVICE_TTGLYFREC(class_, get_location_ ) \ 51 | void \ 52 | FT_Init_Class_##class_( FT_Service_TTGlyfRec* clazz ) \ 53 | { \ 54 | clazz->get_location = get_location_; \ 55 | } 56 | 57 | #endif /* FT_CONFIG_OPTION_PIC */ 58 | 59 | /* */ 60 | 61 | 62 | FT_END_HEADER 63 | 64 | #endif /* __SVTTGLYF_H__ */ 65 | 66 | 67 | /* END */ 68 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/android/prebuilt/libfreetype2/include/freetype/internal/services/svwinfnt.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svwinfnt.h */ 4 | /* */ 5 | /* The FreeType Windows FNT/FONT service (specification). */ 6 | /* */ 7 | /* Copyright 2003 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 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 */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVWINFNT_H__ 20 | #define __SVWINFNT_H__ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | #include FT_WINFONTS_H 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | 29 | #define FT_SERVICE_ID_WINFNT "winfonts" 30 | 31 | typedef FT_Error 32 | (*FT_WinFnt_GetHeaderFunc)( FT_Face face, 33 | FT_WinFNT_HeaderRec *aheader ); 34 | 35 | 36 | FT_DEFINE_SERVICE( WinFnt ) 37 | { 38 | FT_WinFnt_GetHeaderFunc get_header; 39 | }; 40 | 41 | /* */ 42 | 43 | 44 | FT_END_HEADER 45 | 46 | 47 | #endif /* __SVWINFNT_H__ */ 48 | 49 | 50 | /* END */ 51 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/android/prebuilt/libfreetype2/include/freetype/internal/services/svxf86nm.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svxf86nm.h */ 4 | /* */ 5 | /* The FreeType XFree86 services (specification only). */ 6 | /* */ 7 | /* Copyright 2003 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 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 */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVXF86NM_H__ 20 | #define __SVXF86NM_H__ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | 24 | 25 | FT_BEGIN_HEADER 26 | 27 | 28 | /* 29 | * A trivial service used to return the name of a face's font driver, 30 | * according to the XFree86 nomenclature. Note that the service data 31 | * is a simple constant string pointer. 32 | */ 33 | 34 | #define FT_SERVICE_ID_XF86_NAME "xf86-driver-name" 35 | 36 | #define FT_XF86_FORMAT_TRUETYPE "TrueType" 37 | #define FT_XF86_FORMAT_TYPE_1 "Type 1" 38 | #define FT_XF86_FORMAT_BDF "BDF" 39 | #define FT_XF86_FORMAT_PCF "PCF" 40 | #define FT_XF86_FORMAT_TYPE_42 "Type 42" 41 | #define FT_XF86_FORMAT_CID "CID Type 1" 42 | #define FT_XF86_FORMAT_CFF "CFF" 43 | #define FT_XF86_FORMAT_PFR "PFR" 44 | #define FT_XF86_FORMAT_WINFNT "Windows FNT" 45 | 46 | /* */ 47 | 48 | 49 | FT_END_HEADER 50 | 51 | 52 | #endif /* __SVXF86NM_H__ */ 53 | 54 | 55 | /* END */ 56 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/android/prebuilt/libfreetype2/include/freetype/ttunpat.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ttunpat.h */ 4 | /* */ 5 | /* Definitions for the unpatented TrueType hinting system */ 6 | /* */ 7 | /* Copyright 2003, 2006 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* Written by Graham Asher */ 11 | /* */ 12 | /* This file is part of the FreeType project, and may only be used, */ 13 | /* modified, and distributed under the terms of the FreeType project */ 14 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 15 | /* this file you indicate that you have read the license and */ 16 | /* understand and accept it fully. */ 17 | /* */ 18 | /***************************************************************************/ 19 | 20 | 21 | #ifndef __TTUNPAT_H__ 22 | #define __TTUNPAT_H__ 23 | 24 | 25 | #include 26 | #include FT_FREETYPE_H 27 | 28 | #ifdef FREETYPE_H 29 | #error "freetype.h of FreeType 1 has been loaded!" 30 | #error "Please fix the directory search order for header files" 31 | #error "so that freetype.h of FreeType 2 is found first." 32 | #endif 33 | 34 | 35 | FT_BEGIN_HEADER 36 | 37 | 38 | /*************************************************************************** 39 | * 40 | * @constant: 41 | * FT_PARAM_TAG_UNPATENTED_HINTING 42 | * 43 | * @description: 44 | * A constant used as the tag of an @FT_Parameter structure to indicate 45 | * that unpatented methods only should be used by the TrueType bytecode 46 | * interpreter for a typeface opened by @FT_Open_Face. 47 | * 48 | */ 49 | #define FT_PARAM_TAG_UNPATENTED_HINTING FT_MAKE_TAG( 'u', 'n', 'p', 'a' ) 50 | 51 | /* */ 52 | 53 | FT_END_HEADER 54 | 55 | 56 | #endif /* __TTUNPAT_H__ */ 57 | 58 | 59 | /* END */ 60 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/android/prebuilt/libfreetype2/include/ft2build.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ft2build.h */ 4 | /* */ 5 | /* FreeType 2 build and setup macros. */ 6 | /* (Generic version) */ 7 | /* */ 8 | /* Copyright 1996-2001, 2006 by */ 9 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 10 | /* */ 11 | /* This file is part of the FreeType project, and may only be used, */ 12 | /* modified, and distributed under the terms of the FreeType project */ 13 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 14 | /* this file you indicate that you have read the license and */ 15 | /* understand and accept it fully. */ 16 | /* */ 17 | /***************************************************************************/ 18 | 19 | 20 | /*************************************************************************/ 21 | /* */ 22 | /* This file corresponds to the default `ft2build.h' file for */ 23 | /* FreeType 2. It uses the `freetype' include root. */ 24 | /* */ 25 | /* Note that specific platforms might use a different configuration. */ 26 | /* See builds/unix/ft2unix.h for an example. */ 27 | /* */ 28 | /*************************************************************************/ 29 | 30 | 31 | #ifndef __FT2_BUILD_GENERIC_H__ 32 | #define __FT2_BUILD_GENERIC_H__ 33 | 34 | #include 35 | 36 | #endif /* __FT2_BUILD_GENERIC_H__ */ 37 | 38 | 39 | /* END */ 40 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/android/prebuilt/libfreetype2/libs/armeabi-v7a/libfreetype2.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/happykevins/cocos2dx-ext/de5facfd03581963194f77f665098dfadb2bb05b/cocos2dx/platform/third_party/android/prebuilt/libfreetype2/libs/armeabi-v7a/libfreetype2.a -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/android/prebuilt/libfreetype2/libs/armeabi/libfreetype2.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/happykevins/cocos2dx-ext/de5facfd03581963194f77f665098dfadb2bb05b/cocos2dx/platform/third_party/android/prebuilt/libfreetype2/libs/armeabi/libfreetype2.a -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/ios/libfreetype2/freetype/config/ftmodule.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file registers the FreeType modules compiled into the library. 3 | * 4 | * If you use GNU make, this file IS NOT USED! Instead, it is created in 5 | * the objects directory (normally `/objs/') based on information 6 | * from `/modules.cfg'. 7 | * 8 | * Please read `docs/INSTALL.ANY' and `docs/CUSTOMIZE' how to compile 9 | * FreeType without GNU make. 10 | * 11 | */ 12 | 13 | FT_USE_MODULE( FT_Module_Class, autofit_module_class ) 14 | FT_USE_MODULE( FT_Driver_ClassRec, tt_driver_class ) 15 | FT_USE_MODULE( FT_Driver_ClassRec, t1_driver_class ) 16 | FT_USE_MODULE( FT_Driver_ClassRec, cff_driver_class ) 17 | FT_USE_MODULE( FT_Driver_ClassRec, t1cid_driver_class ) 18 | FT_USE_MODULE( FT_Driver_ClassRec, pfr_driver_class ) 19 | FT_USE_MODULE( FT_Driver_ClassRec, t42_driver_class ) 20 | FT_USE_MODULE( FT_Driver_ClassRec, winfnt_driver_class ) 21 | FT_USE_MODULE( FT_Driver_ClassRec, pcf_driver_class ) 22 | FT_USE_MODULE( FT_Module_Class, psaux_module_class ) 23 | FT_USE_MODULE( FT_Module_Class, psnames_module_class ) 24 | FT_USE_MODULE( FT_Module_Class, pshinter_module_class ) 25 | FT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class ) 26 | FT_USE_MODULE( FT_Module_Class, sfnt_module_class ) 27 | FT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class ) 28 | FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcd_renderer_class ) 29 | FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcdv_renderer_class ) 30 | FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class ) 31 | 32 | /* EOF */ 33 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/ios/libfreetype2/freetype/internal/ftpic.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ftpic.h */ 4 | /* */ 5 | /* The FreeType position independent code services (declaration). */ 6 | /* */ 7 | /* Copyright 2009 by */ 8 | /* Oran Agra and Mickey Gabel. */ 9 | /* */ 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 */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | /*************************************************************************/ 19 | /* */ 20 | /* Modules that ordinarily have const global data that need address */ 21 | /* can instead define pointers here. */ 22 | /* */ 23 | /*************************************************************************/ 24 | 25 | 26 | #ifndef __FTPIC_H__ 27 | #define __FTPIC_H__ 28 | 29 | 30 | FT_BEGIN_HEADER 31 | 32 | #ifdef FT_CONFIG_OPTION_PIC 33 | 34 | typedef struct FT_PIC_Container_ 35 | { 36 | /* pic containers for base */ 37 | void* base; 38 | /* pic containers for modules */ 39 | void* autofit; 40 | void* cff; 41 | void* pshinter; 42 | void* psnames; 43 | void* raster; 44 | void* sfnt; 45 | void* smooth; 46 | void* truetype; 47 | } FT_PIC_Container; 48 | 49 | /* Initialize the various function tables, structs, etc. stored in the container. */ 50 | FT_BASE( FT_Error ) 51 | ft_pic_container_init( FT_Library library ); 52 | 53 | 54 | /* Destroy the contents of the container. */ 55 | FT_BASE( void ) 56 | ft_pic_container_destroy( FT_Library library ); 57 | 58 | #endif /* FT_CONFIG_OPTION_PIC */ 59 | 60 | /* */ 61 | 62 | FT_END_HEADER 63 | 64 | #endif /* __FTPIC_H__ */ 65 | 66 | 67 | /* END */ 68 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/ios/libfreetype2/freetype/internal/internal.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* internal.h */ 4 | /* */ 5 | /* Internal header files (specification only). */ 6 | /* */ 7 | /* Copyright 1996-2001, 2002, 2003, 2004 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 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 */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | /*************************************************************************/ 20 | /* */ 21 | /* This file is automatically included by `ft2build.h'. */ 22 | /* Do not include it manually! */ 23 | /* */ 24 | /*************************************************************************/ 25 | 26 | 27 | #define FT_INTERNAL_OBJECTS_H 28 | #define FT_INTERNAL_PIC_H 29 | #define FT_INTERNAL_STREAM_H 30 | #define FT_INTERNAL_MEMORY_H 31 | #define FT_INTERNAL_DEBUG_H 32 | #define FT_INTERNAL_CALC_H 33 | #define FT_INTERNAL_DRIVER_H 34 | #define FT_INTERNAL_TRACE_H 35 | #define FT_INTERNAL_GLYPH_LOADER_H 36 | #define FT_INTERNAL_SFNT_H 37 | #define FT_INTERNAL_SERVICE_H 38 | #define FT_INTERNAL_RFORK_H 39 | #define FT_INTERNAL_VALIDATE_H 40 | 41 | #define FT_INTERNAL_TRUETYPE_TYPES_H 42 | #define FT_INTERNAL_TYPE1_TYPES_H 43 | 44 | #define FT_INTERNAL_POSTSCRIPT_AUX_H 45 | #define FT_INTERNAL_POSTSCRIPT_HINTS_H 46 | #define FT_INTERNAL_POSTSCRIPT_GLOBALS_H 47 | 48 | #define FT_INTERNAL_AUTOHINT_H 49 | 50 | 51 | /* END */ 52 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/ios/libfreetype2/freetype/internal/services/svbdf.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svbdf.h */ 4 | /* */ 5 | /* The FreeType BDF services (specification). */ 6 | /* */ 7 | /* Copyright 2003 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 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 */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVBDF_H__ 20 | #define __SVBDF_H__ 21 | 22 | #include FT_BDF_H 23 | #include FT_INTERNAL_SERVICE_H 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | 29 | #define FT_SERVICE_ID_BDF "bdf" 30 | 31 | typedef FT_Error 32 | (*FT_BDF_GetCharsetIdFunc)( FT_Face face, 33 | const char* *acharset_encoding, 34 | const char* *acharset_registry ); 35 | 36 | typedef FT_Error 37 | (*FT_BDF_GetPropertyFunc)( FT_Face face, 38 | const char* prop_name, 39 | BDF_PropertyRec *aproperty ); 40 | 41 | 42 | FT_DEFINE_SERVICE( BDF ) 43 | { 44 | FT_BDF_GetCharsetIdFunc get_charset_id; 45 | FT_BDF_GetPropertyFunc get_property; 46 | }; 47 | 48 | #ifndef FT_CONFIG_OPTION_PIC 49 | 50 | #define FT_DEFINE_SERVICE_BDFRec(class_, get_charset_id_, get_property_) \ 51 | static const FT_Service_BDFRec class_ = \ 52 | { \ 53 | get_charset_id_, get_property_ \ 54 | }; 55 | 56 | #else /* FT_CONFIG_OPTION_PIC */ 57 | 58 | #define FT_DEFINE_SERVICE_BDFRec(class_, get_charset_id_, get_property_) \ 59 | void \ 60 | FT_Init_Class_##class_( FT_Service_BDFRec* clazz ) \ 61 | { \ 62 | clazz->get_charset_id = get_charset_id_; \ 63 | clazz->get_property = get_property_; \ 64 | } 65 | 66 | #endif /* FT_CONFIG_OPTION_PIC */ 67 | 68 | /* */ 69 | 70 | 71 | FT_END_HEADER 72 | 73 | 74 | #endif /* __SVBDF_H__ */ 75 | 76 | 77 | /* END */ 78 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/ios/libfreetype2/freetype/internal/services/svcid.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svcid.h */ 4 | /* */ 5 | /* The FreeType CID font services (specification). */ 6 | /* */ 7 | /* Copyright 2007, 2009 by Derek Clegg, Michael Toftdal. */ 8 | /* */ 9 | /* This file is part of the FreeType project, and may only be used, */ 10 | /* modified, and distributed under the terms of the FreeType project */ 11 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 12 | /* this file you indicate that you have read the license and */ 13 | /* understand and accept it fully. */ 14 | /* */ 15 | /***************************************************************************/ 16 | 17 | 18 | #ifndef __SVCID_H__ 19 | #define __SVCID_H__ 20 | 21 | #include FT_INTERNAL_SERVICE_H 22 | 23 | 24 | FT_BEGIN_HEADER 25 | 26 | 27 | #define FT_SERVICE_ID_CID "CID" 28 | 29 | typedef FT_Error 30 | (*FT_CID_GetRegistryOrderingSupplementFunc)( FT_Face face, 31 | const char* *registry, 32 | const char* *ordering, 33 | FT_Int *supplement ); 34 | typedef FT_Error 35 | (*FT_CID_GetIsInternallyCIDKeyedFunc)( FT_Face face, 36 | FT_Bool *is_cid ); 37 | typedef FT_Error 38 | (*FT_CID_GetCIDFromGlyphIndexFunc)( FT_Face face, 39 | FT_UInt glyph_index, 40 | FT_UInt *cid ); 41 | 42 | FT_DEFINE_SERVICE( CID ) 43 | { 44 | FT_CID_GetRegistryOrderingSupplementFunc get_ros; 45 | FT_CID_GetIsInternallyCIDKeyedFunc get_is_cid; 46 | FT_CID_GetCIDFromGlyphIndexFunc get_cid_from_glyph_index; 47 | }; 48 | 49 | #ifndef FT_CONFIG_OPTION_PIC 50 | 51 | #define FT_DEFINE_SERVICE_CIDREC(class_, get_ros_, \ 52 | get_is_cid_, get_cid_from_glyph_index_ ) \ 53 | static const FT_Service_CIDRec class_ = \ 54 | { \ 55 | get_ros_, get_is_cid_, get_cid_from_glyph_index_ \ 56 | }; 57 | 58 | #else /* FT_CONFIG_OPTION_PIC */ 59 | 60 | #define FT_DEFINE_SERVICE_CIDREC(class_, get_ros_, \ 61 | get_is_cid_, get_cid_from_glyph_index_ ) \ 62 | void \ 63 | FT_Init_Class_##class_( FT_Library library, \ 64 | FT_Service_CIDRec* clazz) \ 65 | { \ 66 | FT_UNUSED(library); \ 67 | clazz->get_ros = get_ros_; \ 68 | clazz->get_is_cid = get_is_cid_; \ 69 | clazz->get_cid_from_glyph_index = get_cid_from_glyph_index_; \ 70 | } 71 | 72 | #endif /* FT_CONFIG_OPTION_PIC */ 73 | 74 | /* */ 75 | 76 | 77 | FT_END_HEADER 78 | 79 | 80 | #endif /* __SVCID_H__ */ 81 | 82 | 83 | /* END */ 84 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/ios/libfreetype2/freetype/internal/services/svgldict.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svgldict.h */ 4 | /* */ 5 | /* The FreeType glyph dictionary services (specification). */ 6 | /* */ 7 | /* Copyright 2003 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 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 */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVGLDICT_H__ 20 | #define __SVGLDICT_H__ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | 24 | 25 | FT_BEGIN_HEADER 26 | 27 | 28 | /* 29 | * A service used to retrieve glyph names, as well as to find the 30 | * index of a given glyph name in a font. 31 | * 32 | */ 33 | 34 | #define FT_SERVICE_ID_GLYPH_DICT "glyph-dict" 35 | 36 | 37 | typedef FT_Error 38 | (*FT_GlyphDict_GetNameFunc)( FT_Face face, 39 | FT_UInt glyph_index, 40 | FT_Pointer buffer, 41 | FT_UInt buffer_max ); 42 | 43 | typedef FT_UInt 44 | (*FT_GlyphDict_NameIndexFunc)( FT_Face face, 45 | FT_String* glyph_name ); 46 | 47 | 48 | FT_DEFINE_SERVICE( GlyphDict ) 49 | { 50 | FT_GlyphDict_GetNameFunc get_name; 51 | FT_GlyphDict_NameIndexFunc name_index; /* optional */ 52 | }; 53 | 54 | #ifndef FT_CONFIG_OPTION_PIC 55 | 56 | #define FT_DEFINE_SERVICE_GLYPHDICTREC(class_, get_name_, name_index_) \ 57 | static const FT_Service_GlyphDictRec class_ = \ 58 | { \ 59 | get_name_, name_index_ \ 60 | }; 61 | 62 | #else /* FT_CONFIG_OPTION_PIC */ 63 | 64 | #define FT_DEFINE_SERVICE_GLYPHDICTREC(class_, get_name_, name_index_) \ 65 | void \ 66 | FT_Init_Class_##class_( FT_Library library, \ 67 | FT_Service_GlyphDictRec* clazz) \ 68 | { \ 69 | FT_UNUSED(library); \ 70 | clazz->get_name = get_name_; \ 71 | clazz->name_index = name_index_; \ 72 | } 73 | 74 | #endif /* FT_CONFIG_OPTION_PIC */ 75 | 76 | /* */ 77 | 78 | 79 | FT_END_HEADER 80 | 81 | 82 | #endif /* __SVGLDICT_H__ */ 83 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/ios/libfreetype2/freetype/internal/services/svgxval.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svgxval.h */ 4 | /* */ 5 | /* FreeType API for validating TrueTypeGX/AAT tables (specification). */ 6 | /* */ 7 | /* Copyright 2004, 2005 by */ 8 | /* Masatake YAMATO, Red Hat K.K., */ 9 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 10 | /* */ 11 | /* This file is part of the FreeType project, and may only be used, */ 12 | /* modified, and distributed under the terms of the FreeType project */ 13 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 14 | /* this file you indicate that you have read the license and */ 15 | /* understand and accept it fully. */ 16 | /* */ 17 | /***************************************************************************/ 18 | 19 | /***************************************************************************/ 20 | /* */ 21 | /* gxvalid is derived from both gxlayout module and otvalid module. */ 22 | /* Development of gxlayout is supported by the Information-technology */ 23 | /* Promotion Agency(IPA), Japan. */ 24 | /* */ 25 | /***************************************************************************/ 26 | 27 | 28 | #ifndef __SVGXVAL_H__ 29 | #define __SVGXVAL_H__ 30 | 31 | #include FT_GX_VALIDATE_H 32 | #include FT_INTERNAL_VALIDATE_H 33 | 34 | FT_BEGIN_HEADER 35 | 36 | 37 | #define FT_SERVICE_ID_GX_VALIDATE "truetypegx-validate" 38 | #define FT_SERVICE_ID_CLASSICKERN_VALIDATE "classickern-validate" 39 | 40 | typedef FT_Error 41 | (*gxv_validate_func)( FT_Face face, 42 | FT_UInt gx_flags, 43 | FT_Bytes tables[FT_VALIDATE_GX_LENGTH], 44 | FT_UInt table_length ); 45 | 46 | 47 | typedef FT_Error 48 | (*ckern_validate_func)( FT_Face face, 49 | FT_UInt ckern_flags, 50 | FT_Bytes *ckern_table ); 51 | 52 | 53 | FT_DEFINE_SERVICE( GXvalidate ) 54 | { 55 | gxv_validate_func validate; 56 | }; 57 | 58 | FT_DEFINE_SERVICE( CKERNvalidate ) 59 | { 60 | ckern_validate_func validate; 61 | }; 62 | 63 | /* */ 64 | 65 | 66 | FT_END_HEADER 67 | 68 | 69 | #endif /* __SVGXVAL_H__ */ 70 | 71 | 72 | /* END */ 73 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/ios/libfreetype2/freetype/internal/services/svkern.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svkern.h */ 4 | /* */ 5 | /* The FreeType Kerning service (specification). */ 6 | /* */ 7 | /* Copyright 2006 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 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 */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVKERN_H__ 20 | #define __SVKERN_H__ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | #include FT_TRUETYPE_TABLES_H 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | #define FT_SERVICE_ID_KERNING "kerning" 29 | 30 | 31 | typedef FT_Error 32 | (*FT_Kerning_TrackGetFunc)( FT_Face face, 33 | FT_Fixed point_size, 34 | FT_Int degree, 35 | FT_Fixed* akerning ); 36 | 37 | FT_DEFINE_SERVICE( Kerning ) 38 | { 39 | FT_Kerning_TrackGetFunc get_track; 40 | }; 41 | 42 | /* */ 43 | 44 | 45 | FT_END_HEADER 46 | 47 | 48 | #endif /* __SVKERN_H__ */ 49 | 50 | 51 | /* END */ 52 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/ios/libfreetype2/freetype/internal/services/svotval.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svotval.h */ 4 | /* */ 5 | /* The FreeType OpenType validation service (specification). */ 6 | /* */ 7 | /* Copyright 2004, 2006 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 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 */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVOTVAL_H__ 20 | #define __SVOTVAL_H__ 21 | 22 | #include FT_OPENTYPE_VALIDATE_H 23 | #include FT_INTERNAL_VALIDATE_H 24 | 25 | FT_BEGIN_HEADER 26 | 27 | 28 | #define FT_SERVICE_ID_OPENTYPE_VALIDATE "opentype-validate" 29 | 30 | 31 | typedef FT_Error 32 | (*otv_validate_func)( FT_Face volatile face, 33 | FT_UInt ot_flags, 34 | FT_Bytes *base, 35 | FT_Bytes *gdef, 36 | FT_Bytes *gpos, 37 | FT_Bytes *gsub, 38 | FT_Bytes *jstf ); 39 | 40 | 41 | FT_DEFINE_SERVICE( OTvalidate ) 42 | { 43 | otv_validate_func validate; 44 | }; 45 | 46 | /* */ 47 | 48 | 49 | FT_END_HEADER 50 | 51 | 52 | #endif /* __SVOTVAL_H__ */ 53 | 54 | 55 | /* END */ 56 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/ios/libfreetype2/freetype/internal/services/svpfr.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svpfr.h */ 4 | /* */ 5 | /* Internal PFR service functions (specification). */ 6 | /* */ 7 | /* Copyright 2003, 2006 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 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 */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVPFR_H__ 20 | #define __SVPFR_H__ 21 | 22 | #include FT_PFR_H 23 | #include FT_INTERNAL_SERVICE_H 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | 29 | #define FT_SERVICE_ID_PFR_METRICS "pfr-metrics" 30 | 31 | 32 | typedef FT_Error 33 | (*FT_PFR_GetMetricsFunc)( FT_Face face, 34 | FT_UInt *aoutline, 35 | FT_UInt *ametrics, 36 | FT_Fixed *ax_scale, 37 | FT_Fixed *ay_scale ); 38 | 39 | typedef FT_Error 40 | (*FT_PFR_GetKerningFunc)( FT_Face face, 41 | FT_UInt left, 42 | FT_UInt right, 43 | FT_Vector *avector ); 44 | 45 | typedef FT_Error 46 | (*FT_PFR_GetAdvanceFunc)( FT_Face face, 47 | FT_UInt gindex, 48 | FT_Pos *aadvance ); 49 | 50 | 51 | FT_DEFINE_SERVICE( PfrMetrics ) 52 | { 53 | FT_PFR_GetMetricsFunc get_metrics; 54 | FT_PFR_GetKerningFunc get_kerning; 55 | FT_PFR_GetAdvanceFunc get_advance; 56 | 57 | }; 58 | 59 | /* */ 60 | 61 | FT_END_HEADER 62 | 63 | #endif /* __SVPFR_H__ */ 64 | 65 | 66 | /* END */ 67 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/ios/libfreetype2/freetype/internal/services/svpostnm.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svpostnm.h */ 4 | /* */ 5 | /* The FreeType PostScript name services (specification). */ 6 | /* */ 7 | /* Copyright 2003, 2007 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 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 */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVPOSTNM_H__ 20 | #define __SVPOSTNM_H__ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | 24 | 25 | FT_BEGIN_HEADER 26 | 27 | /* 28 | * A trivial service used to retrieve the PostScript name of a given 29 | * font when available. The `get_name' field should never be NULL. 30 | * 31 | * The corresponding function can return NULL to indicate that the 32 | * PostScript name is not available. 33 | * 34 | * The name is owned by the face and will be destroyed with it. 35 | */ 36 | 37 | #define FT_SERVICE_ID_POSTSCRIPT_FONT_NAME "postscript-font-name" 38 | 39 | 40 | typedef const char* 41 | (*FT_PsName_GetFunc)( FT_Face face ); 42 | 43 | 44 | FT_DEFINE_SERVICE( PsFontName ) 45 | { 46 | FT_PsName_GetFunc get_ps_font_name; 47 | }; 48 | 49 | #ifndef FT_CONFIG_OPTION_PIC 50 | 51 | #define FT_DEFINE_SERVICE_PSFONTNAMEREC(class_, get_ps_font_name_) \ 52 | static const FT_Service_PsFontNameRec class_ = \ 53 | { \ 54 | get_ps_font_name_ \ 55 | }; 56 | 57 | #else /* FT_CONFIG_OPTION_PIC */ 58 | 59 | #define FT_DEFINE_SERVICE_PSFONTNAMEREC(class_, get_ps_font_name_) \ 60 | void \ 61 | FT_Init_Class_##class_( FT_Library library, \ 62 | FT_Service_PsFontNameRec* clazz) \ 63 | { \ 64 | FT_UNUSED(library); \ 65 | clazz->get_ps_font_name = get_ps_font_name_; \ 66 | } 67 | 68 | #endif /* FT_CONFIG_OPTION_PIC */ 69 | 70 | /* */ 71 | 72 | 73 | FT_END_HEADER 74 | 75 | 76 | #endif /* __SVPOSTNM_H__ */ 77 | 78 | 79 | /* END */ 80 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/ios/libfreetype2/freetype/internal/services/svpsinfo.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svpsinfo.h */ 4 | /* */ 5 | /* The FreeType PostScript info service (specification). */ 6 | /* */ 7 | /* Copyright 2003, 2004, 2009 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 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 */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVPSINFO_H__ 20 | #define __SVPSINFO_H__ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | #include FT_INTERNAL_TYPE1_TYPES_H 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | 29 | #define FT_SERVICE_ID_POSTSCRIPT_INFO "postscript-info" 30 | 31 | 32 | typedef FT_Error 33 | (*PS_GetFontInfoFunc)( FT_Face face, 34 | PS_FontInfoRec* afont_info ); 35 | 36 | typedef FT_Error 37 | (*PS_GetFontExtraFunc)( FT_Face face, 38 | PS_FontExtraRec* afont_extra ); 39 | 40 | typedef FT_Int 41 | (*PS_HasGlyphNamesFunc)( FT_Face face ); 42 | 43 | typedef FT_Error 44 | (*PS_GetFontPrivateFunc)( FT_Face face, 45 | PS_PrivateRec* afont_private ); 46 | 47 | 48 | FT_DEFINE_SERVICE( PsInfo ) 49 | { 50 | PS_GetFontInfoFunc ps_get_font_info; 51 | PS_GetFontExtraFunc ps_get_font_extra; 52 | PS_HasGlyphNamesFunc ps_has_glyph_names; 53 | PS_GetFontPrivateFunc ps_get_font_private; 54 | }; 55 | 56 | #ifndef FT_CONFIG_OPTION_PIC 57 | 58 | #define FT_DEFINE_SERVICE_PSINFOREC(class_, get_font_info_, \ 59 | ps_get_font_extra_, has_glyph_names_, get_font_private_) \ 60 | static const FT_Service_PsInfoRec class_ = \ 61 | { \ 62 | get_font_info_, ps_get_font_extra_, has_glyph_names_, \ 63 | get_font_private_ \ 64 | }; 65 | 66 | #else /* FT_CONFIG_OPTION_PIC */ 67 | 68 | #define FT_DEFINE_SERVICE_PSINFOREC(class_, get_font_info_, \ 69 | ps_get_font_extra_, has_glyph_names_, get_font_private_) \ 70 | void \ 71 | FT_Init_Class_##class_( FT_Library library, \ 72 | FT_Service_PsInfoRec* clazz) \ 73 | { \ 74 | FT_UNUSED(library); \ 75 | clazz->ps_get_font_info = get_font_info_; \ 76 | clazz->ps_get_font_extra = ps_get_font_extra_; \ 77 | clazz->ps_has_glyph_names = has_glyph_names_; \ 78 | clazz->ps_get_font_private = get_font_private_; \ 79 | } 80 | 81 | #endif /* FT_CONFIG_OPTION_PIC */ 82 | 83 | /* */ 84 | 85 | 86 | FT_END_HEADER 87 | 88 | 89 | #endif /* __SVPSINFO_H__ */ 90 | 91 | 92 | /* END */ 93 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/ios/libfreetype2/freetype/internal/services/svtteng.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svtteng.h */ 4 | /* */ 5 | /* The FreeType TrueType engine query service (specification). */ 6 | /* */ 7 | /* Copyright 2006 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 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 */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVTTENG_H__ 20 | #define __SVTTENG_H__ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | #include FT_MODULE_H 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | 29 | /* 30 | * SFNT table loading service. 31 | */ 32 | 33 | #define FT_SERVICE_ID_TRUETYPE_ENGINE "truetype-engine" 34 | 35 | /* 36 | * Used to implement FT_Get_TrueType_Engine_Type 37 | */ 38 | 39 | FT_DEFINE_SERVICE( TrueTypeEngine ) 40 | { 41 | FT_TrueTypeEngineType engine_type; 42 | }; 43 | 44 | /* */ 45 | 46 | 47 | FT_END_HEADER 48 | 49 | 50 | #endif /* __SVTTENG_H__ */ 51 | 52 | 53 | /* END */ 54 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/ios/libfreetype2/freetype/internal/services/svttglyf.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svttglyf.h */ 4 | /* */ 5 | /* The FreeType TrueType glyph service. */ 6 | /* */ 7 | /* Copyright 2007 by David Turner. */ 8 | /* */ 9 | /* This file is part of the FreeType project, and may only be used, */ 10 | /* modified, and distributed under the terms of the FreeType project */ 11 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 12 | /* this file you indicate that you have read the license and */ 13 | /* understand and accept it fully. */ 14 | /* */ 15 | /***************************************************************************/ 16 | 17 | #ifndef __SVTTGLYF_H__ 18 | #define __SVTTGLYF_H__ 19 | 20 | #include FT_INTERNAL_SERVICE_H 21 | #include FT_TRUETYPE_TABLES_H 22 | 23 | 24 | FT_BEGIN_HEADER 25 | 26 | 27 | #define FT_SERVICE_ID_TT_GLYF "tt-glyf" 28 | 29 | 30 | typedef FT_ULong 31 | (*TT_Glyf_GetLocationFunc)( FT_Face face, 32 | FT_UInt gindex, 33 | FT_ULong *psize ); 34 | 35 | FT_DEFINE_SERVICE( TTGlyf ) 36 | { 37 | TT_Glyf_GetLocationFunc get_location; 38 | }; 39 | 40 | #ifndef FT_CONFIG_OPTION_PIC 41 | 42 | #define FT_DEFINE_SERVICE_TTGLYFREC(class_, get_location_ ) \ 43 | static const FT_Service_TTGlyfRec class_ = \ 44 | { \ 45 | get_location_ \ 46 | }; 47 | 48 | #else /* FT_CONFIG_OPTION_PIC */ 49 | 50 | #define FT_DEFINE_SERVICE_TTGLYFREC(class_, get_location_ ) \ 51 | void \ 52 | FT_Init_Class_##class_( FT_Service_TTGlyfRec* clazz ) \ 53 | { \ 54 | clazz->get_location = get_location_; \ 55 | } 56 | 57 | #endif /* FT_CONFIG_OPTION_PIC */ 58 | 59 | /* */ 60 | 61 | 62 | FT_END_HEADER 63 | 64 | #endif /* __SVTTGLYF_H__ */ 65 | 66 | 67 | /* END */ 68 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/ios/libfreetype2/freetype/internal/services/svwinfnt.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svwinfnt.h */ 4 | /* */ 5 | /* The FreeType Windows FNT/FONT service (specification). */ 6 | /* */ 7 | /* Copyright 2003 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 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 */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVWINFNT_H__ 20 | #define __SVWINFNT_H__ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | #include FT_WINFONTS_H 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | 29 | #define FT_SERVICE_ID_WINFNT "winfonts" 30 | 31 | typedef FT_Error 32 | (*FT_WinFnt_GetHeaderFunc)( FT_Face face, 33 | FT_WinFNT_HeaderRec *aheader ); 34 | 35 | 36 | FT_DEFINE_SERVICE( WinFnt ) 37 | { 38 | FT_WinFnt_GetHeaderFunc get_header; 39 | }; 40 | 41 | /* */ 42 | 43 | 44 | FT_END_HEADER 45 | 46 | 47 | #endif /* __SVWINFNT_H__ */ 48 | 49 | 50 | /* END */ 51 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/ios/libfreetype2/freetype/internal/services/svxf86nm.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svxf86nm.h */ 4 | /* */ 5 | /* The FreeType XFree86 services (specification only). */ 6 | /* */ 7 | /* Copyright 2003 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 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 */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVXF86NM_H__ 20 | #define __SVXF86NM_H__ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | 24 | 25 | FT_BEGIN_HEADER 26 | 27 | 28 | /* 29 | * A trivial service used to return the name of a face's font driver, 30 | * according to the XFree86 nomenclature. Note that the service data 31 | * is a simple constant string pointer. 32 | */ 33 | 34 | #define FT_SERVICE_ID_XF86_NAME "xf86-driver-name" 35 | 36 | #define FT_XF86_FORMAT_TRUETYPE "TrueType" 37 | #define FT_XF86_FORMAT_TYPE_1 "Type 1" 38 | #define FT_XF86_FORMAT_BDF "BDF" 39 | #define FT_XF86_FORMAT_PCF "PCF" 40 | #define FT_XF86_FORMAT_TYPE_42 "Type 42" 41 | #define FT_XF86_FORMAT_CID "CID Type 1" 42 | #define FT_XF86_FORMAT_CFF "CFF" 43 | #define FT_XF86_FORMAT_PFR "PFR" 44 | #define FT_XF86_FORMAT_WINFNT "Windows FNT" 45 | 46 | /* */ 47 | 48 | 49 | FT_END_HEADER 50 | 51 | 52 | #endif /* __SVXF86NM_H__ */ 53 | 54 | 55 | /* END */ 56 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/ios/libfreetype2/freetype/ttunpat.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ttunpat.h */ 4 | /* */ 5 | /* Definitions for the unpatented TrueType hinting system */ 6 | /* */ 7 | /* Copyright 2003, 2006 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* Written by Graham Asher */ 11 | /* */ 12 | /* This file is part of the FreeType project, and may only be used, */ 13 | /* modified, and distributed under the terms of the FreeType project */ 14 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 15 | /* this file you indicate that you have read the license and */ 16 | /* understand and accept it fully. */ 17 | /* */ 18 | /***************************************************************************/ 19 | 20 | 21 | #ifndef __TTUNPAT_H__ 22 | #define __TTUNPAT_H__ 23 | 24 | 25 | #include 26 | #include FT_FREETYPE_H 27 | 28 | #ifdef FREETYPE_H 29 | #error "freetype.h of FreeType 1 has been loaded!" 30 | #error "Please fix the directory search order for header files" 31 | #error "so that freetype.h of FreeType 2 is found first." 32 | #endif 33 | 34 | 35 | FT_BEGIN_HEADER 36 | 37 | 38 | /*************************************************************************** 39 | * 40 | * @constant: 41 | * FT_PARAM_TAG_UNPATENTED_HINTING 42 | * 43 | * @description: 44 | * A constant used as the tag of an @FT_Parameter structure to indicate 45 | * that unpatented methods only should be used by the TrueType bytecode 46 | * interpreter for a typeface opened by @FT_Open_Face. 47 | * 48 | */ 49 | #define FT_PARAM_TAG_UNPATENTED_HINTING FT_MAKE_TAG( 'u', 'n', 'p', 'a' ) 50 | 51 | /* */ 52 | 53 | FT_END_HEADER 54 | 55 | 56 | #endif /* __TTUNPAT_H__ */ 57 | 58 | 59 | /* END */ 60 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/ios/libfreetype2/ft2build.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ft2build.h */ 4 | /* */ 5 | /* FreeType 2 build and setup macros. */ 6 | /* (Generic version) */ 7 | /* */ 8 | /* Copyright 1996-2001, 2006 by */ 9 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 10 | /* */ 11 | /* This file is part of the FreeType project, and may only be used, */ 12 | /* modified, and distributed under the terms of the FreeType project */ 13 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 14 | /* this file you indicate that you have read the license and */ 15 | /* understand and accept it fully. */ 16 | /* */ 17 | /***************************************************************************/ 18 | 19 | 20 | /*************************************************************************/ 21 | /* */ 22 | /* This file corresponds to the default `ft2build.h' file for */ 23 | /* FreeType 2. It uses the `freetype' include root. */ 24 | /* */ 25 | /* Note that specific platforms might use a different configuration. */ 26 | /* See builds/unix/ft2unix.h for an example. */ 27 | /* */ 28 | /*************************************************************************/ 29 | 30 | 31 | #ifndef __FT2_BUILD_GENERIC_H__ 32 | #define __FT2_BUILD_GENERIC_H__ 33 | 34 | #include 35 | 36 | #endif /* __FT2_BUILD_GENERIC_H__ */ 37 | 38 | 39 | /* END */ 40 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/ios/libraries/libfreetype.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/happykevins/cocos2dx-ext/de5facfd03581963194f77f665098dfadb2bb05b/cocos2dx/platform/third_party/ios/libraries/libfreetype.a -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/win32/libfreetype2/freetype/config/ftmodule.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file registers the FreeType modules compiled into the library. 3 | * 4 | * If you use GNU make, this file IS NOT USED! Instead, it is created in 5 | * the objects directory (normally `/objs/') based on information 6 | * from `/modules.cfg'. 7 | * 8 | * Please read `docs/INSTALL.ANY' and `docs/CUSTOMIZE' how to compile 9 | * FreeType without GNU make. 10 | * 11 | */ 12 | 13 | FT_USE_MODULE( FT_Module_Class, autofit_module_class ) 14 | FT_USE_MODULE( FT_Driver_ClassRec, tt_driver_class ) 15 | FT_USE_MODULE( FT_Driver_ClassRec, t1_driver_class ) 16 | FT_USE_MODULE( FT_Driver_ClassRec, cff_driver_class ) 17 | FT_USE_MODULE( FT_Driver_ClassRec, t1cid_driver_class ) 18 | FT_USE_MODULE( FT_Driver_ClassRec, pfr_driver_class ) 19 | FT_USE_MODULE( FT_Driver_ClassRec, t42_driver_class ) 20 | FT_USE_MODULE( FT_Driver_ClassRec, winfnt_driver_class ) 21 | FT_USE_MODULE( FT_Driver_ClassRec, pcf_driver_class ) 22 | FT_USE_MODULE( FT_Module_Class, psaux_module_class ) 23 | FT_USE_MODULE( FT_Module_Class, psnames_module_class ) 24 | FT_USE_MODULE( FT_Module_Class, pshinter_module_class ) 25 | FT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class ) 26 | FT_USE_MODULE( FT_Module_Class, sfnt_module_class ) 27 | FT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class ) 28 | FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcd_renderer_class ) 29 | FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcdv_renderer_class ) 30 | FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class ) 31 | 32 | /* EOF */ 33 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/win32/libfreetype2/freetype/internal/ftpic.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ftpic.h */ 4 | /* */ 5 | /* The FreeType position independent code services (declaration). */ 6 | /* */ 7 | /* Copyright 2009 by */ 8 | /* Oran Agra and Mickey Gabel. */ 9 | /* */ 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 */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | /*************************************************************************/ 19 | /* */ 20 | /* Modules that ordinarily have const global data that need address */ 21 | /* can instead define pointers here. */ 22 | /* */ 23 | /*************************************************************************/ 24 | 25 | 26 | #ifndef __FTPIC_H__ 27 | #define __FTPIC_H__ 28 | 29 | 30 | FT_BEGIN_HEADER 31 | 32 | #ifdef FT_CONFIG_OPTION_PIC 33 | 34 | typedef struct FT_PIC_Container_ 35 | { 36 | /* pic containers for base */ 37 | void* base; 38 | /* pic containers for modules */ 39 | void* autofit; 40 | void* cff; 41 | void* pshinter; 42 | void* psnames; 43 | void* raster; 44 | void* sfnt; 45 | void* smooth; 46 | void* truetype; 47 | } FT_PIC_Container; 48 | 49 | /* Initialize the various function tables, structs, etc. stored in the container. */ 50 | FT_BASE( FT_Error ) 51 | ft_pic_container_init( FT_Library library ); 52 | 53 | 54 | /* Destroy the contents of the container. */ 55 | FT_BASE( void ) 56 | ft_pic_container_destroy( FT_Library library ); 57 | 58 | #endif /* FT_CONFIG_OPTION_PIC */ 59 | 60 | /* */ 61 | 62 | FT_END_HEADER 63 | 64 | #endif /* __FTPIC_H__ */ 65 | 66 | 67 | /* END */ 68 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/win32/libfreetype2/freetype/internal/internal.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* internal.h */ 4 | /* */ 5 | /* Internal header files (specification only). */ 6 | /* */ 7 | /* Copyright 1996-2001, 2002, 2003, 2004 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 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 */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | /*************************************************************************/ 20 | /* */ 21 | /* This file is automatically included by `ft2build.h'. */ 22 | /* Do not include it manually! */ 23 | /* */ 24 | /*************************************************************************/ 25 | 26 | 27 | #define FT_INTERNAL_OBJECTS_H 28 | #define FT_INTERNAL_PIC_H 29 | #define FT_INTERNAL_STREAM_H 30 | #define FT_INTERNAL_MEMORY_H 31 | #define FT_INTERNAL_DEBUG_H 32 | #define FT_INTERNAL_CALC_H 33 | #define FT_INTERNAL_DRIVER_H 34 | #define FT_INTERNAL_TRACE_H 35 | #define FT_INTERNAL_GLYPH_LOADER_H 36 | #define FT_INTERNAL_SFNT_H 37 | #define FT_INTERNAL_SERVICE_H 38 | #define FT_INTERNAL_RFORK_H 39 | #define FT_INTERNAL_VALIDATE_H 40 | 41 | #define FT_INTERNAL_TRUETYPE_TYPES_H 42 | #define FT_INTERNAL_TYPE1_TYPES_H 43 | 44 | #define FT_INTERNAL_POSTSCRIPT_AUX_H 45 | #define FT_INTERNAL_POSTSCRIPT_HINTS_H 46 | #define FT_INTERNAL_POSTSCRIPT_GLOBALS_H 47 | 48 | #define FT_INTERNAL_AUTOHINT_H 49 | 50 | 51 | /* END */ 52 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/win32/libfreetype2/freetype/internal/services/svbdf.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svbdf.h */ 4 | /* */ 5 | /* The FreeType BDF services (specification). */ 6 | /* */ 7 | /* Copyright 2003 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 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 */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVBDF_H__ 20 | #define __SVBDF_H__ 21 | 22 | #include FT_BDF_H 23 | #include FT_INTERNAL_SERVICE_H 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | 29 | #define FT_SERVICE_ID_BDF "bdf" 30 | 31 | typedef FT_Error 32 | (*FT_BDF_GetCharsetIdFunc)( FT_Face face, 33 | const char* *acharset_encoding, 34 | const char* *acharset_registry ); 35 | 36 | typedef FT_Error 37 | (*FT_BDF_GetPropertyFunc)( FT_Face face, 38 | const char* prop_name, 39 | BDF_PropertyRec *aproperty ); 40 | 41 | 42 | FT_DEFINE_SERVICE( BDF ) 43 | { 44 | FT_BDF_GetCharsetIdFunc get_charset_id; 45 | FT_BDF_GetPropertyFunc get_property; 46 | }; 47 | 48 | #ifndef FT_CONFIG_OPTION_PIC 49 | 50 | #define FT_DEFINE_SERVICE_BDFRec(class_, get_charset_id_, get_property_) \ 51 | static const FT_Service_BDFRec class_ = \ 52 | { \ 53 | get_charset_id_, get_property_ \ 54 | }; 55 | 56 | #else /* FT_CONFIG_OPTION_PIC */ 57 | 58 | #define FT_DEFINE_SERVICE_BDFRec(class_, get_charset_id_, get_property_) \ 59 | void \ 60 | FT_Init_Class_##class_( FT_Service_BDFRec* clazz ) \ 61 | { \ 62 | clazz->get_charset_id = get_charset_id_; \ 63 | clazz->get_property = get_property_; \ 64 | } 65 | 66 | #endif /* FT_CONFIG_OPTION_PIC */ 67 | 68 | /* */ 69 | 70 | 71 | FT_END_HEADER 72 | 73 | 74 | #endif /* __SVBDF_H__ */ 75 | 76 | 77 | /* END */ 78 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/win32/libfreetype2/freetype/internal/services/svcid.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svcid.h */ 4 | /* */ 5 | /* The FreeType CID font services (specification). */ 6 | /* */ 7 | /* Copyright 2007, 2009 by Derek Clegg, Michael Toftdal. */ 8 | /* */ 9 | /* This file is part of the FreeType project, and may only be used, */ 10 | /* modified, and distributed under the terms of the FreeType project */ 11 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 12 | /* this file you indicate that you have read the license and */ 13 | /* understand and accept it fully. */ 14 | /* */ 15 | /***************************************************************************/ 16 | 17 | 18 | #ifndef __SVCID_H__ 19 | #define __SVCID_H__ 20 | 21 | #include FT_INTERNAL_SERVICE_H 22 | 23 | 24 | FT_BEGIN_HEADER 25 | 26 | 27 | #define FT_SERVICE_ID_CID "CID" 28 | 29 | typedef FT_Error 30 | (*FT_CID_GetRegistryOrderingSupplementFunc)( FT_Face face, 31 | const char* *registry, 32 | const char* *ordering, 33 | FT_Int *supplement ); 34 | typedef FT_Error 35 | (*FT_CID_GetIsInternallyCIDKeyedFunc)( FT_Face face, 36 | FT_Bool *is_cid ); 37 | typedef FT_Error 38 | (*FT_CID_GetCIDFromGlyphIndexFunc)( FT_Face face, 39 | FT_UInt glyph_index, 40 | FT_UInt *cid ); 41 | 42 | FT_DEFINE_SERVICE( CID ) 43 | { 44 | FT_CID_GetRegistryOrderingSupplementFunc get_ros; 45 | FT_CID_GetIsInternallyCIDKeyedFunc get_is_cid; 46 | FT_CID_GetCIDFromGlyphIndexFunc get_cid_from_glyph_index; 47 | }; 48 | 49 | #ifndef FT_CONFIG_OPTION_PIC 50 | 51 | #define FT_DEFINE_SERVICE_CIDREC(class_, get_ros_, \ 52 | get_is_cid_, get_cid_from_glyph_index_ ) \ 53 | static const FT_Service_CIDRec class_ = \ 54 | { \ 55 | get_ros_, get_is_cid_, get_cid_from_glyph_index_ \ 56 | }; 57 | 58 | #else /* FT_CONFIG_OPTION_PIC */ 59 | 60 | #define FT_DEFINE_SERVICE_CIDREC(class_, get_ros_, \ 61 | get_is_cid_, get_cid_from_glyph_index_ ) \ 62 | void \ 63 | FT_Init_Class_##class_( FT_Library library, \ 64 | FT_Service_CIDRec* clazz) \ 65 | { \ 66 | FT_UNUSED(library); \ 67 | clazz->get_ros = get_ros_; \ 68 | clazz->get_is_cid = get_is_cid_; \ 69 | clazz->get_cid_from_glyph_index = get_cid_from_glyph_index_; \ 70 | } 71 | 72 | #endif /* FT_CONFIG_OPTION_PIC */ 73 | 74 | /* */ 75 | 76 | 77 | FT_END_HEADER 78 | 79 | 80 | #endif /* __SVCID_H__ */ 81 | 82 | 83 | /* END */ 84 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/win32/libfreetype2/freetype/internal/services/svgldict.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svgldict.h */ 4 | /* */ 5 | /* The FreeType glyph dictionary services (specification). */ 6 | /* */ 7 | /* Copyright 2003 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 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 */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVGLDICT_H__ 20 | #define __SVGLDICT_H__ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | 24 | 25 | FT_BEGIN_HEADER 26 | 27 | 28 | /* 29 | * A service used to retrieve glyph names, as well as to find the 30 | * index of a given glyph name in a font. 31 | * 32 | */ 33 | 34 | #define FT_SERVICE_ID_GLYPH_DICT "glyph-dict" 35 | 36 | 37 | typedef FT_Error 38 | (*FT_GlyphDict_GetNameFunc)( FT_Face face, 39 | FT_UInt glyph_index, 40 | FT_Pointer buffer, 41 | FT_UInt buffer_max ); 42 | 43 | typedef FT_UInt 44 | (*FT_GlyphDict_NameIndexFunc)( FT_Face face, 45 | FT_String* glyph_name ); 46 | 47 | 48 | FT_DEFINE_SERVICE( GlyphDict ) 49 | { 50 | FT_GlyphDict_GetNameFunc get_name; 51 | FT_GlyphDict_NameIndexFunc name_index; /* optional */ 52 | }; 53 | 54 | #ifndef FT_CONFIG_OPTION_PIC 55 | 56 | #define FT_DEFINE_SERVICE_GLYPHDICTREC(class_, get_name_, name_index_) \ 57 | static const FT_Service_GlyphDictRec class_ = \ 58 | { \ 59 | get_name_, name_index_ \ 60 | }; 61 | 62 | #else /* FT_CONFIG_OPTION_PIC */ 63 | 64 | #define FT_DEFINE_SERVICE_GLYPHDICTREC(class_, get_name_, name_index_) \ 65 | void \ 66 | FT_Init_Class_##class_( FT_Library library, \ 67 | FT_Service_GlyphDictRec* clazz) \ 68 | { \ 69 | FT_UNUSED(library); \ 70 | clazz->get_name = get_name_; \ 71 | clazz->name_index = name_index_; \ 72 | } 73 | 74 | #endif /* FT_CONFIG_OPTION_PIC */ 75 | 76 | /* */ 77 | 78 | 79 | FT_END_HEADER 80 | 81 | 82 | #endif /* __SVGLDICT_H__ */ 83 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/win32/libfreetype2/freetype/internal/services/svgxval.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svgxval.h */ 4 | /* */ 5 | /* FreeType API for validating TrueTypeGX/AAT tables (specification). */ 6 | /* */ 7 | /* Copyright 2004, 2005 by */ 8 | /* Masatake YAMATO, Red Hat K.K., */ 9 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 10 | /* */ 11 | /* This file is part of the FreeType project, and may only be used, */ 12 | /* modified, and distributed under the terms of the FreeType project */ 13 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 14 | /* this file you indicate that you have read the license and */ 15 | /* understand and accept it fully. */ 16 | /* */ 17 | /***************************************************************************/ 18 | 19 | /***************************************************************************/ 20 | /* */ 21 | /* gxvalid is derived from both gxlayout module and otvalid module. */ 22 | /* Development of gxlayout is supported by the Information-technology */ 23 | /* Promotion Agency(IPA), Japan. */ 24 | /* */ 25 | /***************************************************************************/ 26 | 27 | 28 | #ifndef __SVGXVAL_H__ 29 | #define __SVGXVAL_H__ 30 | 31 | #include FT_GX_VALIDATE_H 32 | #include FT_INTERNAL_VALIDATE_H 33 | 34 | FT_BEGIN_HEADER 35 | 36 | 37 | #define FT_SERVICE_ID_GX_VALIDATE "truetypegx-validate" 38 | #define FT_SERVICE_ID_CLASSICKERN_VALIDATE "classickern-validate" 39 | 40 | typedef FT_Error 41 | (*gxv_validate_func)( FT_Face face, 42 | FT_UInt gx_flags, 43 | FT_Bytes tables[FT_VALIDATE_GX_LENGTH], 44 | FT_UInt table_length ); 45 | 46 | 47 | typedef FT_Error 48 | (*ckern_validate_func)( FT_Face face, 49 | FT_UInt ckern_flags, 50 | FT_Bytes *ckern_table ); 51 | 52 | 53 | FT_DEFINE_SERVICE( GXvalidate ) 54 | { 55 | gxv_validate_func validate; 56 | }; 57 | 58 | FT_DEFINE_SERVICE( CKERNvalidate ) 59 | { 60 | ckern_validate_func validate; 61 | }; 62 | 63 | /* */ 64 | 65 | 66 | FT_END_HEADER 67 | 68 | 69 | #endif /* __SVGXVAL_H__ */ 70 | 71 | 72 | /* END */ 73 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/win32/libfreetype2/freetype/internal/services/svkern.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svkern.h */ 4 | /* */ 5 | /* The FreeType Kerning service (specification). */ 6 | /* */ 7 | /* Copyright 2006 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 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 */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVKERN_H__ 20 | #define __SVKERN_H__ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | #include FT_TRUETYPE_TABLES_H 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | #define FT_SERVICE_ID_KERNING "kerning" 29 | 30 | 31 | typedef FT_Error 32 | (*FT_Kerning_TrackGetFunc)( FT_Face face, 33 | FT_Fixed point_size, 34 | FT_Int degree, 35 | FT_Fixed* akerning ); 36 | 37 | FT_DEFINE_SERVICE( Kerning ) 38 | { 39 | FT_Kerning_TrackGetFunc get_track; 40 | }; 41 | 42 | /* */ 43 | 44 | 45 | FT_END_HEADER 46 | 47 | 48 | #endif /* __SVKERN_H__ */ 49 | 50 | 51 | /* END */ 52 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/win32/libfreetype2/freetype/internal/services/svotval.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svotval.h */ 4 | /* */ 5 | /* The FreeType OpenType validation service (specification). */ 6 | /* */ 7 | /* Copyright 2004, 2006 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 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 */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVOTVAL_H__ 20 | #define __SVOTVAL_H__ 21 | 22 | #include FT_OPENTYPE_VALIDATE_H 23 | #include FT_INTERNAL_VALIDATE_H 24 | 25 | FT_BEGIN_HEADER 26 | 27 | 28 | #define FT_SERVICE_ID_OPENTYPE_VALIDATE "opentype-validate" 29 | 30 | 31 | typedef FT_Error 32 | (*otv_validate_func)( FT_Face volatile face, 33 | FT_UInt ot_flags, 34 | FT_Bytes *base, 35 | FT_Bytes *gdef, 36 | FT_Bytes *gpos, 37 | FT_Bytes *gsub, 38 | FT_Bytes *jstf ); 39 | 40 | 41 | FT_DEFINE_SERVICE( OTvalidate ) 42 | { 43 | otv_validate_func validate; 44 | }; 45 | 46 | /* */ 47 | 48 | 49 | FT_END_HEADER 50 | 51 | 52 | #endif /* __SVOTVAL_H__ */ 53 | 54 | 55 | /* END */ 56 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/win32/libfreetype2/freetype/internal/services/svpfr.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svpfr.h */ 4 | /* */ 5 | /* Internal PFR service functions (specification). */ 6 | /* */ 7 | /* Copyright 2003, 2006 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 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 */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVPFR_H__ 20 | #define __SVPFR_H__ 21 | 22 | #include FT_PFR_H 23 | #include FT_INTERNAL_SERVICE_H 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | 29 | #define FT_SERVICE_ID_PFR_METRICS "pfr-metrics" 30 | 31 | 32 | typedef FT_Error 33 | (*FT_PFR_GetMetricsFunc)( FT_Face face, 34 | FT_UInt *aoutline, 35 | FT_UInt *ametrics, 36 | FT_Fixed *ax_scale, 37 | FT_Fixed *ay_scale ); 38 | 39 | typedef FT_Error 40 | (*FT_PFR_GetKerningFunc)( FT_Face face, 41 | FT_UInt left, 42 | FT_UInt right, 43 | FT_Vector *avector ); 44 | 45 | typedef FT_Error 46 | (*FT_PFR_GetAdvanceFunc)( FT_Face face, 47 | FT_UInt gindex, 48 | FT_Pos *aadvance ); 49 | 50 | 51 | FT_DEFINE_SERVICE( PfrMetrics ) 52 | { 53 | FT_PFR_GetMetricsFunc get_metrics; 54 | FT_PFR_GetKerningFunc get_kerning; 55 | FT_PFR_GetAdvanceFunc get_advance; 56 | 57 | }; 58 | 59 | /* */ 60 | 61 | FT_END_HEADER 62 | 63 | #endif /* __SVPFR_H__ */ 64 | 65 | 66 | /* END */ 67 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/win32/libfreetype2/freetype/internal/services/svpostnm.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svpostnm.h */ 4 | /* */ 5 | /* The FreeType PostScript name services (specification). */ 6 | /* */ 7 | /* Copyright 2003, 2007 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 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 */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVPOSTNM_H__ 20 | #define __SVPOSTNM_H__ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | 24 | 25 | FT_BEGIN_HEADER 26 | 27 | /* 28 | * A trivial service used to retrieve the PostScript name of a given 29 | * font when available. The `get_name' field should never be NULL. 30 | * 31 | * The corresponding function can return NULL to indicate that the 32 | * PostScript name is not available. 33 | * 34 | * The name is owned by the face and will be destroyed with it. 35 | */ 36 | 37 | #define FT_SERVICE_ID_POSTSCRIPT_FONT_NAME "postscript-font-name" 38 | 39 | 40 | typedef const char* 41 | (*FT_PsName_GetFunc)( FT_Face face ); 42 | 43 | 44 | FT_DEFINE_SERVICE( PsFontName ) 45 | { 46 | FT_PsName_GetFunc get_ps_font_name; 47 | }; 48 | 49 | #ifndef FT_CONFIG_OPTION_PIC 50 | 51 | #define FT_DEFINE_SERVICE_PSFONTNAMEREC(class_, get_ps_font_name_) \ 52 | static const FT_Service_PsFontNameRec class_ = \ 53 | { \ 54 | get_ps_font_name_ \ 55 | }; 56 | 57 | #else /* FT_CONFIG_OPTION_PIC */ 58 | 59 | #define FT_DEFINE_SERVICE_PSFONTNAMEREC(class_, get_ps_font_name_) \ 60 | void \ 61 | FT_Init_Class_##class_( FT_Library library, \ 62 | FT_Service_PsFontNameRec* clazz) \ 63 | { \ 64 | FT_UNUSED(library); \ 65 | clazz->get_ps_font_name = get_ps_font_name_; \ 66 | } 67 | 68 | #endif /* FT_CONFIG_OPTION_PIC */ 69 | 70 | /* */ 71 | 72 | 73 | FT_END_HEADER 74 | 75 | 76 | #endif /* __SVPOSTNM_H__ */ 77 | 78 | 79 | /* END */ 80 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/win32/libfreetype2/freetype/internal/services/svpsinfo.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svpsinfo.h */ 4 | /* */ 5 | /* The FreeType PostScript info service (specification). */ 6 | /* */ 7 | /* Copyright 2003, 2004, 2009 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 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 */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVPSINFO_H__ 20 | #define __SVPSINFO_H__ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | #include FT_INTERNAL_TYPE1_TYPES_H 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | 29 | #define FT_SERVICE_ID_POSTSCRIPT_INFO "postscript-info" 30 | 31 | 32 | typedef FT_Error 33 | (*PS_GetFontInfoFunc)( FT_Face face, 34 | PS_FontInfoRec* afont_info ); 35 | 36 | typedef FT_Error 37 | (*PS_GetFontExtraFunc)( FT_Face face, 38 | PS_FontExtraRec* afont_extra ); 39 | 40 | typedef FT_Int 41 | (*PS_HasGlyphNamesFunc)( FT_Face face ); 42 | 43 | typedef FT_Error 44 | (*PS_GetFontPrivateFunc)( FT_Face face, 45 | PS_PrivateRec* afont_private ); 46 | 47 | 48 | FT_DEFINE_SERVICE( PsInfo ) 49 | { 50 | PS_GetFontInfoFunc ps_get_font_info; 51 | PS_GetFontExtraFunc ps_get_font_extra; 52 | PS_HasGlyphNamesFunc ps_has_glyph_names; 53 | PS_GetFontPrivateFunc ps_get_font_private; 54 | }; 55 | 56 | #ifndef FT_CONFIG_OPTION_PIC 57 | 58 | #define FT_DEFINE_SERVICE_PSINFOREC(class_, get_font_info_, \ 59 | ps_get_font_extra_, has_glyph_names_, get_font_private_) \ 60 | static const FT_Service_PsInfoRec class_ = \ 61 | { \ 62 | get_font_info_, ps_get_font_extra_, has_glyph_names_, \ 63 | get_font_private_ \ 64 | }; 65 | 66 | #else /* FT_CONFIG_OPTION_PIC */ 67 | 68 | #define FT_DEFINE_SERVICE_PSINFOREC(class_, get_font_info_, \ 69 | ps_get_font_extra_, has_glyph_names_, get_font_private_) \ 70 | void \ 71 | FT_Init_Class_##class_( FT_Library library, \ 72 | FT_Service_PsInfoRec* clazz) \ 73 | { \ 74 | FT_UNUSED(library); \ 75 | clazz->ps_get_font_info = get_font_info_; \ 76 | clazz->ps_get_font_extra = ps_get_font_extra_; \ 77 | clazz->ps_has_glyph_names = has_glyph_names_; \ 78 | clazz->ps_get_font_private = get_font_private_; \ 79 | } 80 | 81 | #endif /* FT_CONFIG_OPTION_PIC */ 82 | 83 | /* */ 84 | 85 | 86 | FT_END_HEADER 87 | 88 | 89 | #endif /* __SVPSINFO_H__ */ 90 | 91 | 92 | /* END */ 93 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/win32/libfreetype2/freetype/internal/services/svtteng.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svtteng.h */ 4 | /* */ 5 | /* The FreeType TrueType engine query service (specification). */ 6 | /* */ 7 | /* Copyright 2006 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 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 */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVTTENG_H__ 20 | #define __SVTTENG_H__ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | #include FT_MODULE_H 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | 29 | /* 30 | * SFNT table loading service. 31 | */ 32 | 33 | #define FT_SERVICE_ID_TRUETYPE_ENGINE "truetype-engine" 34 | 35 | /* 36 | * Used to implement FT_Get_TrueType_Engine_Type 37 | */ 38 | 39 | FT_DEFINE_SERVICE( TrueTypeEngine ) 40 | { 41 | FT_TrueTypeEngineType engine_type; 42 | }; 43 | 44 | /* */ 45 | 46 | 47 | FT_END_HEADER 48 | 49 | 50 | #endif /* __SVTTENG_H__ */ 51 | 52 | 53 | /* END */ 54 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/win32/libfreetype2/freetype/internal/services/svttglyf.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svttglyf.h */ 4 | /* */ 5 | /* The FreeType TrueType glyph service. */ 6 | /* */ 7 | /* Copyright 2007 by David Turner. */ 8 | /* */ 9 | /* This file is part of the FreeType project, and may only be used, */ 10 | /* modified, and distributed under the terms of the FreeType project */ 11 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 12 | /* this file you indicate that you have read the license and */ 13 | /* understand and accept it fully. */ 14 | /* */ 15 | /***************************************************************************/ 16 | 17 | #ifndef __SVTTGLYF_H__ 18 | #define __SVTTGLYF_H__ 19 | 20 | #include FT_INTERNAL_SERVICE_H 21 | #include FT_TRUETYPE_TABLES_H 22 | 23 | 24 | FT_BEGIN_HEADER 25 | 26 | 27 | #define FT_SERVICE_ID_TT_GLYF "tt-glyf" 28 | 29 | 30 | typedef FT_ULong 31 | (*TT_Glyf_GetLocationFunc)( FT_Face face, 32 | FT_UInt gindex, 33 | FT_ULong *psize ); 34 | 35 | FT_DEFINE_SERVICE( TTGlyf ) 36 | { 37 | TT_Glyf_GetLocationFunc get_location; 38 | }; 39 | 40 | #ifndef FT_CONFIG_OPTION_PIC 41 | 42 | #define FT_DEFINE_SERVICE_TTGLYFREC(class_, get_location_ ) \ 43 | static const FT_Service_TTGlyfRec class_ = \ 44 | { \ 45 | get_location_ \ 46 | }; 47 | 48 | #else /* FT_CONFIG_OPTION_PIC */ 49 | 50 | #define FT_DEFINE_SERVICE_TTGLYFREC(class_, get_location_ ) \ 51 | void \ 52 | FT_Init_Class_##class_( FT_Service_TTGlyfRec* clazz ) \ 53 | { \ 54 | clazz->get_location = get_location_; \ 55 | } 56 | 57 | #endif /* FT_CONFIG_OPTION_PIC */ 58 | 59 | /* */ 60 | 61 | 62 | FT_END_HEADER 63 | 64 | #endif /* __SVTTGLYF_H__ */ 65 | 66 | 67 | /* END */ 68 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/win32/libfreetype2/freetype/internal/services/svwinfnt.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svwinfnt.h */ 4 | /* */ 5 | /* The FreeType Windows FNT/FONT service (specification). */ 6 | /* */ 7 | /* Copyright 2003 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 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 */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVWINFNT_H__ 20 | #define __SVWINFNT_H__ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | #include FT_WINFONTS_H 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | 29 | #define FT_SERVICE_ID_WINFNT "winfonts" 30 | 31 | typedef FT_Error 32 | (*FT_WinFnt_GetHeaderFunc)( FT_Face face, 33 | FT_WinFNT_HeaderRec *aheader ); 34 | 35 | 36 | FT_DEFINE_SERVICE( WinFnt ) 37 | { 38 | FT_WinFnt_GetHeaderFunc get_header; 39 | }; 40 | 41 | /* */ 42 | 43 | 44 | FT_END_HEADER 45 | 46 | 47 | #endif /* __SVWINFNT_H__ */ 48 | 49 | 50 | /* END */ 51 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/win32/libfreetype2/freetype/internal/services/svxf86nm.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svxf86nm.h */ 4 | /* */ 5 | /* The FreeType XFree86 services (specification only). */ 6 | /* */ 7 | /* Copyright 2003 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 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 */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVXF86NM_H__ 20 | #define __SVXF86NM_H__ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | 24 | 25 | FT_BEGIN_HEADER 26 | 27 | 28 | /* 29 | * A trivial service used to return the name of a face's font driver, 30 | * according to the XFree86 nomenclature. Note that the service data 31 | * is a simple constant string pointer. 32 | */ 33 | 34 | #define FT_SERVICE_ID_XF86_NAME "xf86-driver-name" 35 | 36 | #define FT_XF86_FORMAT_TRUETYPE "TrueType" 37 | #define FT_XF86_FORMAT_TYPE_1 "Type 1" 38 | #define FT_XF86_FORMAT_BDF "BDF" 39 | #define FT_XF86_FORMAT_PCF "PCF" 40 | #define FT_XF86_FORMAT_TYPE_42 "Type 42" 41 | #define FT_XF86_FORMAT_CID "CID Type 1" 42 | #define FT_XF86_FORMAT_CFF "CFF" 43 | #define FT_XF86_FORMAT_PFR "PFR" 44 | #define FT_XF86_FORMAT_WINFNT "Windows FNT" 45 | 46 | /* */ 47 | 48 | 49 | FT_END_HEADER 50 | 51 | 52 | #endif /* __SVXF86NM_H__ */ 53 | 54 | 55 | /* END */ 56 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/win32/libfreetype2/freetype/ttunpat.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ttunpat.h */ 4 | /* */ 5 | /* Definitions for the unpatented TrueType hinting system */ 6 | /* */ 7 | /* Copyright 2003, 2006 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* Written by Graham Asher */ 11 | /* */ 12 | /* This file is part of the FreeType project, and may only be used, */ 13 | /* modified, and distributed under the terms of the FreeType project */ 14 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 15 | /* this file you indicate that you have read the license and */ 16 | /* understand and accept it fully. */ 17 | /* */ 18 | /***************************************************************************/ 19 | 20 | 21 | #ifndef __TTUNPAT_H__ 22 | #define __TTUNPAT_H__ 23 | 24 | 25 | #include 26 | #include FT_FREETYPE_H 27 | 28 | #ifdef FREETYPE_H 29 | #error "freetype.h of FreeType 1 has been loaded!" 30 | #error "Please fix the directory search order for header files" 31 | #error "so that freetype.h of FreeType 2 is found first." 32 | #endif 33 | 34 | 35 | FT_BEGIN_HEADER 36 | 37 | 38 | /*************************************************************************** 39 | * 40 | * @constant: 41 | * FT_PARAM_TAG_UNPATENTED_HINTING 42 | * 43 | * @description: 44 | * A constant used as the tag of an @FT_Parameter structure to indicate 45 | * that unpatented methods only should be used by the TrueType bytecode 46 | * interpreter for a typeface opened by @FT_Open_Face. 47 | * 48 | */ 49 | #define FT_PARAM_TAG_UNPATENTED_HINTING FT_MAKE_TAG( 'u', 'n', 'p', 'a' ) 50 | 51 | /* */ 52 | 53 | FT_END_HEADER 54 | 55 | 56 | #endif /* __TTUNPAT_H__ */ 57 | 58 | 59 | /* END */ 60 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/win32/libfreetype2/ft2build.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ft2build.h */ 4 | /* */ 5 | /* FreeType 2 build and setup macros. */ 6 | /* (Generic version) */ 7 | /* */ 8 | /* Copyright 1996-2001, 2006 by */ 9 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 10 | /* */ 11 | /* This file is part of the FreeType project, and may only be used, */ 12 | /* modified, and distributed under the terms of the FreeType project */ 13 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 14 | /* this file you indicate that you have read the license and */ 15 | /* understand and accept it fully. */ 16 | /* */ 17 | /***************************************************************************/ 18 | 19 | 20 | /*************************************************************************/ 21 | /* */ 22 | /* This file corresponds to the default `ft2build.h' file for */ 23 | /* FreeType 2. It uses the `freetype' include root. */ 24 | /* */ 25 | /* Note that specific platforms might use a different configuration. */ 26 | /* See builds/unix/ft2unix.h for an example. */ 27 | /* */ 28 | /*************************************************************************/ 29 | 30 | 31 | #ifndef __FT2_BUILD_GENERIC_H__ 32 | #define __FT2_BUILD_GENERIC_H__ 33 | 34 | #include 35 | 36 | #endif /* __FT2_BUILD_GENERIC_H__ */ 37 | 38 | 39 | /* END */ 40 | -------------------------------------------------------------------------------- /cocos2dx/platform/third_party/win32/libraries/libfreetype2.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/happykevins/cocos2dx-ext/de5facfd03581963194f77f665098dfadb2bb05b/cocos2dx/platform/third_party/win32/libraries/libfreetype2.lib -------------------------------------------------------------------------------- /extensions/RichControls/CCRichAtlas.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | Copyright (c) 2013 Kevin Sun and RenRen Games 3 | 4 | email:happykevins@gmail.com 5 | http://wan.renren.com 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. 24 | ****************************************************************************/ 25 | #ifndef __CC_RICHATLAS_H__ 26 | #define __CC_RICHATLAS_H__ 27 | 28 | #include "CCRichProtocols.h" 29 | 30 | #include 31 | 32 | 33 | NS_CC_EXT_BEGIN; 34 | 35 | // 36 | // a atlas node for rendering batched rich elements 37 | // 38 | class CCRichAtlas : public CCAtlasNode, public IRichAtlas 39 | { 40 | public: 41 | static CCRichAtlas* create(class IRichNode* container, CCTexture2D* texture, size_t capacity); 42 | 43 | bool initWithTexture(CCTexture2D* texture, size_t capacity); 44 | 45 | // from IRichAtlas protocol 46 | virtual void appendRichElement(IRichElement* element); 47 | virtual void resetRichElements(); 48 | virtual void updateRichRenderData(); 49 | 50 | void resizeCapacity(size_t ns); 51 | void reset(); 52 | 53 | // super methods 54 | virtual void updateAtlasValues(); 55 | virtual void draw(); 56 | 57 | CCRichAtlas(class IRichNode* container); 58 | virtual ~CCRichAtlas(); 59 | 60 | protected: 61 | class IRichNode* m_container; 62 | bool m_dirty; 63 | std::list m_elements; 64 | }; 65 | 66 | NS_CC_EXT_END; 67 | 68 | #endif//__CC_RICHATLAS_H__ 69 | 70 | -------------------------------------------------------------------------------- /extensions/RichControls/CCRichCache.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | Copyright (c) 2013 Kevin Sun and RenRen Games 3 | 4 | email:happykevins@gmail.com 5 | http://wan.renren.com 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. 24 | ****************************************************************************/ 25 | #ifndef __CC_RICHCACHE_H__ 26 | #define __CC_RICHCACHE_H__ 27 | 28 | #include "CCRichProtocols.h" 29 | 30 | NS_CC_EXT_BEGIN; 31 | 32 | class RCacheBase : public ICompositCache 33 | { 34 | public: 35 | // alignments properties 36 | virtual EAlignment getHAlign() { return m_rHAlign; } 37 | virtual EAlignment getVAlign() { return m_rVAlign; } 38 | virtual void setHAlign(EAlignment align) { m_rHAlign = align; } 39 | virtual void setVAlign(EAlignment align) { m_rVAlign = align; } 40 | 41 | // line height 42 | virtual short getLineHeight() { return m_rLineHeight; } 43 | virtual void setLineHeight(short v) { m_rLineHeight = v; } 44 | 45 | // margin&padding properties 46 | virtual void setSpacing(short v) { m_rSpacing = v; } 47 | virtual void setPadding(short v) { m_rPadding = v; } 48 | virtual short getSpacing() { return m_rSpacing; } 49 | virtual short getPadding() { return m_rPadding; } 50 | 51 | // line wrap 52 | virtual void setWrapline(bool wrap) { m_rWrapLine = wrap; } 53 | virtual bool isWrapline() { return m_rWrapLine; } 54 | 55 | RCacheBase(); 56 | 57 | protected: 58 | EAlignment m_rHAlign; 59 | EAlignment m_rVAlign; 60 | short m_rLineHeight; 61 | short m_rSpacing; 62 | short m_rPadding; 63 | bool m_rWrapLine; 64 | }; 65 | 66 | // 67 | // a line-cached compositor 68 | // 69 | class RLineCache : public RCacheBase 70 | { 71 | public: 72 | virtual void appendElement(IRichElement* ele); 73 | virtual element_list_t* getCachedElements(); 74 | virtual RRect flush(class IRichCompositor* compositor); 75 | virtual void clear(); 76 | 77 | RLineCache(); 78 | 79 | protected: 80 | element_list_t m_rCachedLine; 81 | 82 | short m_rBaselinePos; 83 | }; 84 | 85 | 86 | // 87 | // a table row cached compositor 88 | // 89 | class RHTMLTableCache : public RCacheBase 90 | { 91 | public: 92 | virtual void appendElement(IRichElement* ele); 93 | virtual element_list_t* getCachedElements(); 94 | virtual void clear(); 95 | virtual RRect flush(class IRichCompositor* compositor); 96 | void setTable(class REleHTMLTable* table); 97 | 98 | RHTMLTableCache(); 99 | 100 | private: 101 | void recompositCell(class REleHTMLCell* cell); 102 | void travesalRecompositChildren(element_list_t* eles, short x_fixed, short y_fixed); 103 | 104 | protected: 105 | element_list_t m_rCached; 106 | class REleHTMLTable* m_rTable; 107 | }; 108 | 109 | NS_CC_EXT_END; 110 | 111 | #endif//__CC_RICHCACHE_H__ 112 | -------------------------------------------------------------------------------- /extensions/RichControls/CCRichCompositor.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | Copyright (c) 2013 Kevin Sun and RenRen Games 3 | 4 | email:happykevins@gmail.com 5 | http://wan.renren.com 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. 24 | ****************************************************************************/ 25 | #ifndef __CC_RICHCOMPOSITOR_H__ 26 | #define __CC_RICHCOMPOSITOR_H__ 27 | 28 | #include "CCRichProtocols.h" 29 | #include "CCRichCache.h" 30 | 31 | #include 32 | 33 | NS_CC_EXT_BEGIN; 34 | 35 | class RBaseCompositor : public IRichCompositor 36 | { 37 | public: 38 | // get rect 39 | virtual const RRect& getRect() const { return m_rRect; } 40 | // get current composit state 41 | virtual RMetricsState* getMetricsState(); 42 | // return new top state 43 | virtual RMetricsState* pushMetricsState(); 44 | // return popped state 45 | virtual void popMetricsState(); 46 | // initialize state 47 | virtual RMetricsState* initMetricsState(const RMetricsState* new_init_state = NULL); 48 | 49 | // get current composit state 50 | virtual RRenderState* getRenderState(); 51 | // return new top state 52 | virtual RRenderState* pushRenderState(); 53 | // return popped state 54 | virtual void popRenderState(); 55 | // initialize state 56 | virtual RRenderState* initRenderState(const RRenderState* new_init_state = NULL); 57 | // get current cached font 58 | virtual class dfont::FontCatalog* getFont(); 59 | 60 | // reset all state & cached data 61 | virtual void reset(); 62 | virtual class IRichNode* getContainer(); 63 | 64 | RBaseCompositor(IRichNode* container); 65 | virtual ~RBaseCompositor(); 66 | 67 | protected: 68 | IRichNode* m_rContainer; 69 | 70 | RMetricsState m_rInitMetricsState; 71 | std::stack m_rMetricsStack; 72 | RRenderState m_rInitRenderState; 73 | std::stack m_rRenderStack; 74 | 75 | RRect m_rRect; 76 | 77 | class dfont::FontCatalog* m_rFontCache; 78 | const char* m_rFontCacheAlias; 79 | }; 80 | 81 | // 82 | // Simple Compositor for tree structured HTML elements 83 | // 84 | class RSimpleHTMLCompositor : public RBaseCompositor 85 | { 86 | public: 87 | virtual bool composit(IRichElement* root); 88 | virtual class ICompositCache* getRootCache() { return &m_rLineCache; } 89 | 90 | RSimpleHTMLCompositor(IRichNode* container); 91 | 92 | private: 93 | RLineCache m_rLineCache; 94 | }; 95 | 96 | NS_CC_EXT_END; 97 | 98 | #endif//__CC_RICHCOMPOSITOR_H__ 99 | -------------------------------------------------------------------------------- /extensions/RichControls/CCRichOverlay.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | Copyright (c) 2013 Kevin Sun and RenRen Games 3 | 4 | email:happykevins@gmail.com 5 | http://wan.renren.com 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. 24 | ****************************************************************************/ 25 | #ifndef __CC_RICHOVERLAY_H__ 26 | #define __CC_RICHOVERLAY_H__ 27 | 28 | #include "CCRichProtocols.h" 29 | 30 | NS_CC_EXT_BEGIN; 31 | 32 | class CCRichOverlay : public CCLayer 33 | { 34 | public: 35 | static CCRichOverlay* create(); 36 | 37 | virtual bool init(); 38 | virtual void append(class IRichElement* ele); 39 | virtual void reset(); 40 | 41 | // from CCLayer 42 | virtual void draw(); 43 | virtual bool ccTouchBegan(cocos2d::CCTouch *pTouch, cocos2d::CCEvent *pEvent); 44 | virtual void ccTouchMoved(cocos2d::CCTouch *pTouch, cocos2d::CCEvent *pEvent); 45 | virtual void ccTouchEnded(cocos2d::CCTouch *pTouch, cocos2d::CCEvent *pEvent); 46 | virtual void ccTouchCancelled(cocos2d::CCTouch *pTouch, cocos2d::CCEvent *pEvent); 47 | 48 | // register listener 49 | virtual void registerListener(void* target, IRichEventHandler* listener); 50 | virtual void removeListener(void* target); 51 | 52 | CCRichOverlay(); 53 | virtual ~CCRichOverlay(); 54 | 55 | private: 56 | IRichNode* getContainer(); 57 | 58 | std::list m_elements; 59 | std::list m_touchables; 60 | 61 | std::map m_eventhandlers; 62 | class REleHTMLTouchable* m_touched; 63 | class IRichNode* m_container; 64 | }; 65 | 66 | 67 | NS_CC_EXT_END; 68 | 69 | 70 | #endif//__CC_RICHOVERLAY_H__ 71 | 72 | -------------------------------------------------------------------------------- /extensions/RichControls/CCRichParser.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | Copyright (c) 2013 Kevin Sun and RenRen Games 3 | 4 | email:happykevins@gmail.com 5 | http://wan.renren.com 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. 24 | ****************************************************************************/ 25 | #ifndef __CC_RICHPARSER_H__ 26 | #define __CC_RICHPARSER_H__ 27 | 28 | #include "CCRichProtocols.h" 29 | 30 | NS_CC_EXT_BEGIN; 31 | 32 | class RSimpleHTMLParser : public IRichParser, public CCSAXDelegator 33 | { 34 | public: 35 | // from IRichParser protocol 36 | virtual element_list_t* parseString(const char* utf8_str); 37 | virtual element_list_t* parseFile(const char* filename); 38 | virtual class IRichNode* getContainer() { return m_rContainer; } 39 | 40 | virtual bool isPlainMode() { return m_rPlainModeON; } 41 | virtual void setPlainMode(bool on) { m_rPlainModeON = on; } 42 | 43 | RSimpleHTMLParser(IRichNode* container); 44 | 45 | protected: 46 | virtual void startElement(void *ctx, const char *name, const char **atts); 47 | virtual void endElement(void *ctx, const char *name); 48 | virtual void textHandler(void *ctx, const char *s, int len); 49 | 50 | private: 51 | element_list_t* parseHTMLString(const char* utf8_str); 52 | 53 | IRichNode* m_rContainer; 54 | element_list_t* m_rElements; 55 | IRichElement* m_rCurrentElement; 56 | bool m_rPlainModeON; 57 | }; 58 | 59 | NS_CC_EXT_END; 60 | 61 | #endif//__CC_RICHPARSER_H__ 62 | -------------------------------------------------------------------------------- /extensions/cells/CCell.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | Copyright (c) 2012-2013 Kevin Sun and RenRen Games 3 | 4 | email:happykevins@gmail.com 5 | http://wan.renren.com 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. 24 | ****************************************************************************/ 25 | 26 | #include "CCell.h" 27 | 28 | #include 29 | 30 | namespace cells 31 | { 32 | 33 | CCell::CCell(const std::string& _name, const std::string& _hash /*= NULL*/, 34 | estatetype_t _celltype /*= common*/) : 35 | m_name(_name), m_hash(_hash), m_cellstate(unknow), m_celltype(_celltype), 36 | m_download_times(0), m_errorno(e_loaderr_ok), m_ziptype(e_zip_none), m_cdf(NULL), 37 | m_watcher(NULL) 38 | { 39 | } 40 | 41 | CCell::~CCell() 42 | { 43 | if (m_cdf) 44 | { 45 | delete m_cdf; 46 | m_cdf = NULL; 47 | } 48 | } 49 | 50 | CCDF::CCDF(const CCell* _cell) : 51 | m_hostcell(_cell) 52 | { 53 | } 54 | CCDF::~CCDF() 55 | { 56 | } 57 | 58 | } /* namespace cells */ 59 | -------------------------------------------------------------------------------- /extensions/cells/CCell.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | Copyright (c) 2012-2013 Kevin Sun and RenRen Games 3 | 4 | email:happykevins@gmail.com 5 | http://wan.renren.com 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. 24 | ****************************************************************************/ 25 | 26 | #ifndef CCELL_H_ 27 | #define CCELL_H_ 28 | 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include "cells.h" 34 | 35 | namespace cells 36 | { 37 | 38 | class CCDF; 39 | 40 | typedef std::list celllist_t; 41 | 42 | 43 | /* 44 | * CCell 45 | * cells的最小管理单元 46 | * 1.单元名字 47 | * 2.单元hash 48 | * 3.单元类型 49 | * 4.单元状态 50 | */ 51 | class CCell 52 | { 53 | public: 54 | enum ecellstate_t 55 | { 56 | unknow, loading, verified, error 57 | }; 58 | 59 | CCell(const std::string& _name, const std::string& _hash, estatetype_t _celltype = e_state_file_common); 60 | ~CCell(); 61 | 62 | const std::string m_name; 63 | std::string m_hash; 64 | std::string m_zhash; 65 | props_t m_props; 66 | volatile int m_cellstate; 67 | estatetype_t m_celltype; 68 | 69 | size_t m_download_times; 70 | eloaderror_t m_errorno; 71 | eziptype_t m_ziptype; 72 | 73 | CCDF* m_cdf; 74 | CProgressWatcher* m_watcher; 75 | }; 76 | 77 | /* 78 | * CCDF - Cell Description File 79 | * 1. 记载描述表内部元素 80 | * 2. 可以嵌套CDF类型的cell 81 | */ 82 | class CCDF 83 | { 84 | public: 85 | CCDF(const CCell* _cell); 86 | ~CCDF(); 87 | 88 | bool serialize(); 89 | bool deserialize(); 90 | 91 | const CCell* m_hostcell; 92 | celllist_t m_subcells; 93 | props_t m_props; 94 | }; 95 | 96 | } /* namespace cells */ 97 | #endif /* CCELL_H_ */ 98 | -------------------------------------------------------------------------------- /extensions/cells/CCreationFactory.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | Copyright (c) 2012-2013 Kevin Sun and RenRen Games 3 | 4 | email:happykevins@gmail.com 5 | http://wan.renren.com 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. 24 | ****************************************************************************/ 25 | 26 | #ifndef CCREATIONFACTORY_H_ 27 | #define CCREATIONFACTORY_H_ 28 | 29 | #include 30 | #include 31 | 32 | #include "CContainer.h" 33 | 34 | namespace cells 35 | { 36 | 37 | class CCells; 38 | class CCell; 39 | class CCellTask; 40 | class CCreationWorker; 41 | 42 | /* 43 | * 创建cell的工厂类 44 | * 1.多工作线程 45 | * 2.任务分派,负载平衡 46 | * 3.下载速度控制,拥塞控制 47 | * 4.回调及事件通知 48 | * 5.*非线程安全 49 | * 6.*确保对于每一个cell,从post_work到dispatch_result结束过程中cellstate都处于loading状态,只有loading状态,才允许修改cell内容 50 | */ 51 | class CCreationFactory 52 | { 53 | public: 54 | CCreationFactory(CCells* host, size_t worker_num); 55 | virtual ~CCreationFactory(); 56 | 57 | // 投递一个任务 58 | void post_work(CCell* cell, bool ghost = false); 59 | 60 | // 获得一个任务结果,如果没有返回NULL 61 | CCell* pop_result(); 62 | 63 | // 获得负载 64 | size_t count_workload(); 65 | 66 | // 获得工作worker的数量 67 | size_t count_workingworks(); 68 | 69 | // 获得当前下载的字节数 70 | size_t count_downloadbytes(); 71 | 72 | // 设置下载速度控制系数 0.0~1.0 73 | void set_speedfactor(float f); 74 | 75 | protected: 76 | // worker thread callback 77 | void notify_work_finished(CCell* cell); 78 | // worker thread require speed suggestion 79 | size_t suggest_maxspeed(); 80 | 81 | private: 82 | CCells* m_host; 83 | const size_t m_worknum; 84 | std::vector m_workers; 85 | CCreationWorker* m_ghostworker; 86 | size_t m_task_counter; // 处理过的任务计数器 87 | volatile float m_speedfactor; 88 | 89 | CQueue m_finished; 90 | 91 | friend class CCreationWorker; 92 | friend class CGhostWorker; 93 | }; 94 | 95 | } /* namespace cells */ 96 | #endif /* CCREATIONFACTORY_H_ */ 97 | -------------------------------------------------------------------------------- /extensions/cells/CCreationWorker.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | Copyright (c) 2012-2013 Kevin Sun and RenRen Games 3 | 4 | email:happykevins@gmail.com 5 | http://wan.renren.com 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. 24 | ****************************************************************************/ 25 | 26 | #ifndef CCREATIONWORKER_H_ 27 | #define CCREATIONWORKER_H_ 28 | 29 | #include "CContainer.h" 30 | #include "CCell.h" 31 | #include "CDownloader.h" 32 | 33 | namespace cells 34 | { 35 | 36 | class CCreationFactory; 37 | 38 | #define CWORKER_BUFFER_SIZE 16384 39 | 40 | /* 41 | * CCreationWorker 42 | * 创造cell工作线程 43 | * 1.验证本地cell是否合法 44 | * 2.在指定的url下载cell 45 | */ 46 | class CCreationWorker 47 | { 48 | public: 49 | CCreationWorker(CCreationFactory* host, size_t no); 50 | virtual ~CCreationWorker(); 51 | 52 | public: 53 | virtual void post_work(CCell* cell); 54 | virtual void do_work(); 55 | virtual size_t workload(); // 负载情况 56 | size_t get_downloadbytes(); 57 | virtual const char* get_local_path(); 58 | 59 | protected: 60 | virtual bool work_verify_local(CCell* cell, FILE* fp); 61 | virtual eloaderror_t work_download_remote(CCell* cell, bool zip_mark, const char* localurl, const char* localhashurl); 62 | virtual bool work_decompress(const char* tmplocalurl, const char* localurl, struct CProgressWatcher* watcher, bool pkg=false); 63 | virtual bool work_patchup_cell(CCell* cell, const char* localurl); 64 | virtual void work_finished(CCell* cell); 65 | 66 | virtual size_t calc_maxspeed(); 67 | 68 | private: 69 | static void* working(void* context); 70 | 71 | // downloader callback 72 | // @return - should flush to disk 73 | bool on_download_bytes(size_t bytes); 74 | 75 | protected: 76 | CCreationFactory* m_host; 77 | const size_t m_workno; 78 | 79 | private: 80 | volatile bool m_working; 81 | pthread_t m_thread; 82 | sem_t* m_psem; 83 | sem_t m_sem; 84 | CQueue m_queue; 85 | CDownloader m_downloadhandle; 86 | char m_databuf[CWORKER_BUFFER_SIZE]; 87 | 88 | // congestion stat. 89 | volatile size_t m_downloadbytes; 90 | size_t m_cachedbytes; // no flush bytes 91 | 92 | friend class CDownloader; 93 | friend class CDFParser; 94 | }; 95 | 96 | /* 97 | * CGhostWorker - ghost模式的工作线程 98 | */ 99 | class CGhostWorker : public CCreationWorker 100 | { 101 | public: 102 | CGhostWorker(CCreationFactory* host, size_t no); 103 | virtual ~CGhostWorker(); 104 | 105 | protected: 106 | virtual size_t calc_maxspeed(); 107 | }; 108 | 109 | } /* namespace cells */ 110 | #endif /* CCREATIONWORKER_H_ */ 111 | -------------------------------------------------------------------------------- /extensions/cells/CDownloader.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | Copyright (c) 2012-2013 Kevin Sun and RenRen Games 3 | 4 | email:happykevins@gmail.com 5 | http://wan.renren.com 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. 24 | ****************************************************************************/ 25 | 26 | #ifndef CDOWNLOADER_H_ 27 | #define CDOWNLOADER_H_ 28 | 29 | #include 30 | #include 31 | 32 | namespace cells 33 | { 34 | 35 | class CCell; 36 | class CCreationWorker; 37 | struct CProgressWatcher; 38 | 39 | typedef void download_handle_t; 40 | 41 | class CDownloader 42 | { 43 | public: 44 | enum edownloaderr_t 45 | { 46 | e_downloaderr_ok = 0, 47 | e_downloaderr_connect, 48 | e_downloaderr_timeout, 49 | e_downloaderr_notfound, 50 | e_downloaderr_other_nobp, 51 | }; 52 | public: 53 | CDownloader(CCreationWorker* host); 54 | ~CDownloader(); 55 | 56 | edownloaderr_t download(const char* url, FILE* fp, bool bp_resume, size_t bp_range_begin, CProgressWatcher* watcher = NULL); 57 | 58 | private: 59 | static size_t process_data(void* buffer, size_t size, size_t nmemb, void* context); 60 | static int progress(void *ctx, double dlTotal, double dlNow, double upTotal, double upNow); 61 | 62 | CCreationWorker* m_host; 63 | download_handle_t* m_handle; 64 | FILE* m_stream; 65 | }; 66 | 67 | } /* namespace cells */ 68 | #endif /* CDOWNLOADER_H_ */ 69 | -------------------------------------------------------------------------------- /extensions/cells/CPlatform.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | Copyright (c) 2012-2013 Kevin Sun and RenRen Games 3 | 4 | email:happykevins@gmail.com 5 | http://wan.renren.com 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. 24 | ****************************************************************************/ 25 | 26 | #ifndef CPLATFORM_H_ 27 | #define CPLATFORM_H_ 28 | 29 | #include 30 | #include 31 | #include 32 | 33 | #if defined(_WIN32) 34 | # include 35 | # include 36 | # include 37 | #else // __linux__ 38 | # include 39 | # include 40 | # include 41 | # include 42 | # include 43 | #endif 44 | 45 | // if using cocos2dx 46 | #define USING_COCOS2DX 1 47 | 48 | #if USING_COCOS2DX 49 | # include 50 | # define PRINT_LOG cocos2d::CCLog 51 | #else 52 | # define PRINT_LOG printf 53 | #endif 54 | 55 | // log interface 56 | #ifdef _DUMP_DEBUG 57 | #define CLogD(format, ...) PRINT_LOG(format, ##__VA_ARGS__) // log dump debug 58 | #define CLogI(format, ...) PRINT_LOG(format, ##__VA_ARGS__) // log info 59 | #define CLogE(format, ...) PRINT_LOG(format, ##__VA_ARGS__) // log error 60 | #define CLog(format, ...) CLogI(format, ##__VA_ARGS__) // shortcut for log info 61 | #elif defined(_DEBUG) || defined(_DUMP_LOG) 62 | #define CLogD(format, ...) 63 | #define CLogI(format, ...) PRINT_LOG(format, ##__VA_ARGS__) 64 | #define CLogE(format, ...) PRINT_LOG(format, ##__VA_ARGS__) 65 | #define CLog(format, ...) CLogI(format, ##__VA_ARGS__) 66 | #else // release 67 | #define CLogD(format, ...) 68 | #define CLogI(format, ...) PRINT_LOG(format, ##__VA_ARGS__) 69 | #define CLogE(format, ...) PRINT_LOG(format, ##__VA_ARGS__) 70 | #define CLog(format, ...) CLogI(format, ##__VA_ARGS__) 71 | #endif 72 | 73 | #if defined(_WIN32) 74 | 75 | // struct for gettimeofday 76 | struct timeval_t 77 | { 78 | long tv_sec; // seconds 79 | long tv_usec; // microSeconds 80 | }; 81 | #else // __linux__ 82 | 83 | typedef timeval timeval_t; 84 | 85 | #endif // defined(_WIN32) 86 | 87 | 88 | 89 | #endif /* CPLATFORM_H_ */ 90 | -------------------------------------------------------------------------------- /extensions/cells/CUtils.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | Copyright (c) 2012-2013 Kevin Sun and RenRen Games 3 | 4 | email:happykevins@gmail.com 5 | http://wan.renren.com 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. 24 | ****************************************************************************/ 25 | 26 | #ifndef CUTILS_H_ 27 | #define CUTILS_H_ 28 | 29 | #include "CPlatform.h" 30 | #include "md5.h" 31 | #include "zpip.h" 32 | 33 | namespace cells 34 | { 35 | 36 | class CUtils 37 | { 38 | public: 39 | #if defined(_WIN32) 40 | inline static void sleep(unsigned int millisec) 41 | { 42 | Sleep(millisec); 43 | } 44 | inline static void yield() 45 | { 46 | Sleep(0); 47 | } 48 | #else // __linux__ 49 | inline static void sleep(unsigned int millisec) 50 | { 51 | usleep(millisec * 1000); 52 | } 53 | inline static void yield() 54 | { 55 | //pthread_yield(); 56 | usleep(0); 57 | } 58 | #endif 59 | 60 | inline static int atoi(const char* str) 61 | { 62 | //return 0; 63 | return str == NULL ? 0 : ::atoi(str); 64 | } 65 | 66 | // get time of day 67 | static bool gettimeofday(timeval_t* tv, void* tz); 68 | 69 | // get elapsed seconds quickly 70 | static double gettime_seconds(); 71 | 72 | // zlib compress & decompress 73 | static int compress(const char* file_in, const char* file_out, int level = -1); 74 | static int compress_fd(FILE* fin, FILE* fout, int level = -1); 75 | static int decompress(const char* file_in, const char* file_out, double* pnow = NULL, double* ptotal = NULL); 76 | static bool decompress_pkg(const char* filename, const char* outpath, double* pnow = NULL, double* ptotal = NULL); 77 | //static int decompress_fd(FILE* fin, FILE* fout); 78 | 79 | // hash utils 80 | static std::string filehash_md5str(FILE* fp, char* buf, size_t buf_size, double* pnow = NULL, double* ptotal = NULL); 81 | 82 | // directory access 83 | static bool access(const char* path, int mode); 84 | 85 | // make directory 86 | static bool mkdir(const char* path); 87 | 88 | // build path directorys 89 | static bool builddir(const char* path); 90 | 91 | // rename file 92 | static bool rename(const char* from, const char* to); 93 | 94 | // remove file 95 | static bool remove(const char* path); 96 | 97 | // trim 98 | static std::string str_trim(std::string s); 99 | 100 | // replace char 101 | static size_t str_replace_ch(std::string& str, char which, char to); 102 | 103 | 104 | }; 105 | 106 | } /* namespace cells */ 107 | #endif /* CUTILS_H_ */ 108 | -------------------------------------------------------------------------------- /extensions/cells/cells.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | Copyright (c) 2012-2013 Kevin Sun and RenRen Games 3 | 4 | email:happykevins@gmail.com 5 | http://wan.renren.com 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. 24 | ****************************************************************************/ 25 | 26 | #include "cells.h" 27 | #include "CCells.h" 28 | 29 | 30 | namespace cells 31 | { 32 | 33 | const char* CDF_VERSION = "version"; 34 | const char* CDF_LOADALL = "loadall"; 35 | const char* CDF_CELL_CDF = "cdf"; 36 | const char* CDF_CELL_NAME = "name"; 37 | const char* CDF_CELL_LOAD = "load"; 38 | const char* CDF_CELL_HASH = "hash"; 39 | const char* CDF_CELL_SIZE = "size"; 40 | const char* CDF_CELL_ZHASH = "zhash"; 41 | const char* CDF_CELL_ZSIZE = "zsize"; 42 | const char* CDF_CELL_ZIP = "zip"; 43 | const char* CDF_TAG_PKG = "pkg"; 44 | const char* CDF_TAG_CELL = "cell"; 45 | 46 | // default value 47 | CRegulation::CRegulation() : 48 | worker_thread_num(CELLS_DEFAULT_WORKERNUM), max_download_speed(CELLS_DOWNLOAD_SPEED_NOLIMIT), 49 | auto_dispatch(true), only_local_mode(false), 50 | enable_ghost_mode(false), max_ghost_download_speed(CELLS_GHOST_DOWNLOAD_SPEED), 51 | enable_free_download(false), 52 | //zip_type(e_zip_none), zip_cdf(false), 53 | remote_zipfile_suffix(CELLS_REMOTE_ZIPFILE_SUFFIX), 54 | tempfile_suffix(CELLS_DEFAULT_TEMP_SUFFIX), temphash_suffix(CELLS_DEFAULT_HASH_SUFFIX) 55 | { 56 | } 57 | 58 | float CProgressWatcher::progress() 59 | { 60 | switch ( step ) 61 | { 62 | case e_initial: 63 | case e_error: 64 | return .0f; 65 | case e_finish: 66 | return 100.0f; 67 | case e_verify_local: 68 | case e_verify_download: 69 | case e_unzip: 70 | case e_download: 71 | break; 72 | } 73 | 74 | if ( total > 0 ) 75 | { 76 | return int((now / total) * 10000) * 0.01f; 77 | } 78 | 79 | return .0f; 80 | } 81 | 82 | void CProgressWatcher::set_step(estep_t _step) 83 | { 84 | step = _step; 85 | now = .0f; 86 | total = .0f; 87 | } 88 | 89 | CProgressWatcher::CProgressWatcher() 90 | : step(e_initial), now(.0f), total(.0f) 91 | { 92 | } 93 | 94 | CellsHandler* cells_create(const CRegulation& rule) 95 | { 96 | CCells* handler = new CCells; 97 | if ( handler->initialize(rule) ) 98 | { 99 | return handler; 100 | } 101 | delete handler; 102 | return NULL; 103 | } 104 | 105 | void cells_destroy(CellsHandler* handler) 106 | { 107 | if ( !handler ) 108 | return; 109 | 110 | CCells* impl = dynamic_cast(handler); 111 | if ( impl ) 112 | { 113 | impl->destroy(); 114 | } 115 | 116 | delete handler; 117 | } 118 | 119 | }//namespace cells -------------------------------------------------------------------------------- /extensions/cells/md5.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1999, 2002 Aladdin Enterprises. All rights reserved. 3 | 4 | This software is provided 'as-is', without any express or implied 5 | warranty. In no event will the authors be held liable for any damages 6 | arising from the use of this software. 7 | 8 | Permission is granted to anyone to use this software for any purpose, 9 | including commercial applications, and to alter it and redistribute it 10 | freely, subject to the following restrictions: 11 | 12 | 1. The origin of this software must not be misrepresented; you must not 13 | claim that you wrote the original software. If you use this software 14 | in a product, an acknowledgment in the product documentation would be 15 | appreciated but is not required. 16 | 2. Altered source versions must be plainly marked as such, and must not be 17 | misrepresented as being the original software. 18 | 3. This notice may not be removed or altered from any source distribution. 19 | 20 | L. Peter Deutsch 21 | ghost@aladdin.com 22 | 23 | */ 24 | /* $Id: md5.h,v 1.4 2002/04/13 19:20:28 lpd Exp $ */ 25 | /* 26 | Independent implementation of MD5 (RFC 1321). 27 | 28 | This code implements the MD5 Algorithm defined in RFC 1321, whose 29 | text is available at 30 | http://www.ietf.org/rfc/rfc1321.txt 31 | The code is derived from the text of the RFC, including the test suite 32 | (section A.5) but excluding the rest of Appendix A. It does not include 33 | any code or documentation that is identified in the RFC as being 34 | copyrighted. 35 | 36 | The original and principal author of md5.h is L. Peter Deutsch 37 | . Other authors are noted in the change history 38 | that follows (in reverse chronological order): 39 | 40 | 2002-04-13 lpd Removed support for non-ANSI compilers; removed 41 | references to Ghostscript; clarified derivation from RFC 1321; 42 | now handles byte order either statically or dynamically. 43 | 1999-11-04 lpd Edited comments slightly for automatic TOC extraction. 44 | 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5); 45 | added conditionalization for C++ compilation from Martin 46 | Purschke . 47 | 1999-05-03 lpd Original version. 48 | */ 49 | 50 | #ifndef md5_INCLUDED 51 | # define md5_INCLUDED 52 | 53 | /* 54 | * This package supports both compile-time and run-time determination of CPU 55 | * byte order. If ARCH_IS_BIG_ENDIAN is defined as 0, the code will be 56 | * compiled to run only on little-endian CPUs; if ARCH_IS_BIG_ENDIAN is 57 | * defined as non-zero, the code will be compiled to run only on big-endian 58 | * CPUs; if ARCH_IS_BIG_ENDIAN is not defined, the code will be compiled to 59 | * run on either big- or little-endian CPUs, but will run slightly less 60 | * efficiently on either one than if ARCH_IS_BIG_ENDIAN is defined. 61 | */ 62 | 63 | typedef unsigned char md5_byte_t; /* 8-bit byte */ 64 | typedef unsigned int md5_word_t; /* 32-bit word */ 65 | 66 | /* Define the state of the MD5 Algorithm. */ 67 | typedef struct md5_state_s { 68 | md5_word_t count[2]; /* message length in bits, lsw first */ 69 | md5_word_t abcd[4]; /* digest buffer */ 70 | md5_byte_t buf[64]; /* accumulate block */ 71 | } md5_state_t; 72 | 73 | #ifdef __cplusplus 74 | extern "C" 75 | { 76 | #endif 77 | 78 | /* Initialize the algorithm. */ 79 | void md5_init(md5_state_t *pms); 80 | 81 | /* Append a string to the message. */ 82 | void md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes); 83 | 84 | /* Finish the message and return the digest. */ 85 | void md5_finish(md5_state_t *pms, md5_byte_t digest[16]); 86 | 87 | #ifdef __cplusplus 88 | } /* end extern "C" */ 89 | #endif 90 | 91 | #endif /* md5_INCLUDED */ 92 | -------------------------------------------------------------------------------- /extensions/cells/zpip.h: -------------------------------------------------------------------------------- 1 | /* zpipe.h: example of proper use of zlib's inflate() and deflate() 2 | Not copyrighted -- provided to the public domain 3 | Version 1.4 11 December 2005 Mark Adler */ 4 | 5 | #ifndef ZPIP_H_ 6 | #define ZPIP_H_ 7 | 8 | #if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__CYGWIN__) 9 | # include 10 | # include 11 | # define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY) 12 | #else 13 | # define SET_BINARY_MODE(file) 14 | #endif 15 | 16 | extern "C" int def(FILE *source, FILE *dest, int level); 17 | extern "C" int inf(FILE *source, FILE *dest, double* progress = NULL); 18 | extern "C" void zerr(int ret); 19 | 20 | #endif /* ZPIP_H_ */ 21 | -------------------------------------------------------------------------------- /extensions/dfont/dfont_config.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/happykevins/cocos2dx-ext/de5facfd03581963194f77f665098dfadb2bb05b/extensions/dfont/dfont_config.h -------------------------------------------------------------------------------- /extensions/dfont/dfont_utility.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | Copyright (c) 2013 Kevin Sun and RenRen Games 3 | 4 | email:happykevins@gmail.com 5 | http://wan.renren.com 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. 24 | ****************************************************************************/ 25 | #ifndef __DFONT_UTILITY_H__ 26 | #define __DFONT_UTILITY_H__ 27 | 28 | #include "dfont_config.h" 29 | 30 | #include 31 | 32 | namespace dfont 33 | { 34 | // get system font directory 35 | extern const char* get_systemfont_path(); 36 | 37 | // get system default ppi 38 | extern int get_system_default_ppi(); 39 | 40 | // get system default font size 41 | extern int get_prefered_default_fontsize(); 42 | 43 | // get system_default font 44 | extern const char* get_system_default_fontfile(); 45 | 46 | // get system default latin font 47 | extern const char* get_system_default_hacklatin_fontfile(); 48 | 49 | // default initializer for dfont 50 | extern void dfont_default_initialize(); 51 | 52 | // latin charactor set 53 | extern std::set* latin_charset(); 54 | 55 | // dump to tga file 56 | #if _DFONT_DEBUG 57 | typedef unsigned char uint8; 58 | typedef unsigned short uint16; 59 | typedef unsigned int uint32; 60 | 61 | bool dump2tga(const std::string &filename, const unsigned int *pxl, uint16 width, uint16 height); 62 | #endif//_DFONT_DEBUG 63 | } 64 | 65 | #endif//__DFONT_UTILITY_H__ 66 | -------------------------------------------------------------------------------- /extensions/proj.linux/Makefile: -------------------------------------------------------------------------------- 1 | TARGET = libextension.a 2 | 3 | COCOS_ROOT=../.. 4 | 5 | INCLUDES = -I$(COCOS_ROOT)/external \ 6 | -I$(COCOS_ROOT)/external/chipmunk/include/chipmunk \ 7 | -I$(COCOS_ROOT)/CocosDenshion/include \ 8 | -I.. \ 9 | -I../CCBReader \ 10 | -I../GUI/CCControlExtension \ 11 | -I../network 12 | 13 | SOURCES = ../CCBReader/CCBFileLoader.cpp \ 14 | ../CCBReader/CCMenuItemImageLoader.cpp \ 15 | ../CCBReader/CCBReader.cpp \ 16 | ../CCBReader/CCMenuItemLoader.cpp \ 17 | ../CCBReader/CCControlButtonLoader.cpp \ 18 | ../CCBReader/CCNodeLoader.cpp \ 19 | ../CCBReader/CCControlLoader.cpp \ 20 | ../CCBReader/CCNodeLoaderLibrary.cpp \ 21 | ../CCBReader/CCLabelBMFontLoader.cpp \ 22 | ../CCBReader/CCParticleSystemQuadLoader.cpp \ 23 | ../CCBReader/CCLabelTTFLoader.cpp \ 24 | ../CCBReader/CCScale9SpriteLoader.cpp \ 25 | ../CCBReader/CCLayerColorLoader.cpp \ 26 | ../CCBReader/CCScrollViewLoader.cpp \ 27 | ../CCBReader/CCLayerGradientLoader.cpp \ 28 | ../CCBReader/CCSpriteLoader.cpp \ 29 | ../CCBReader/CCLayerLoader.cpp \ 30 | ../CCBReader/CCBAnimationManager.cpp \ 31 | ../CCBReader/CCBKeyframe.cpp \ 32 | ../CCBReader/CCBSequence.cpp \ 33 | ../CCBReader/CCBSequenceProperty.cpp \ 34 | ../CCBReader/CCBValue.cpp \ 35 | ../CCBReader/CCData.cpp \ 36 | ../CCBReader/CCNode+CCBRelativePositioning.cpp \ 37 | ../GUI/CCScrollView/CCScrollView.cpp \ 38 | ../GUI/CCScrollView/CCSorting.cpp \ 39 | ../GUI/CCScrollView/CCTableView.cpp \ 40 | ../GUI/CCScrollView/CCTableViewCell.cpp \ 41 | ../GUI/CCControlExtension/CCControlButton.cpp \ 42 | ../GUI/CCControlExtension/CCControlColourPicker.cpp \ 43 | ../GUI/CCControlExtension/CCControl.cpp \ 44 | ../GUI/CCControlExtension/CCControlHuePicker.cpp \ 45 | ../GUI/CCControlExtension/CCControlSaturationBrightnessPicker.cpp \ 46 | ../GUI/CCControlExtension/CCControlSlider.cpp \ 47 | ../GUI/CCControlExtension/CCControlSwitch.cpp \ 48 | ../GUI/CCControlExtension/CCControlUtils.cpp \ 49 | ../GUI/CCControlExtension/CCInvocation.cpp \ 50 | ../GUI/CCControlExtension/CCScale9Sprite.cpp \ 51 | ../GUI/CCControlExtension/CCControlPotentiometer.cpp \ 52 | ../GUI/CCControlExtension/CCControlStepper.cpp \ 53 | ../network/HttpClient.cpp \ 54 | ../physics_nodes/CCPhysicsDebugNode.cpp \ 55 | ../physics_nodes/CCPhysicsSprite.cpp \ 56 | ../spine/Animation.cpp \ 57 | ../spine/AnimationState.cpp \ 58 | ../spine/AnimationStateData.cpp \ 59 | ../spine/Atlas.cpp \ 60 | ../spine/AtlasAttachmentLoader.cpp \ 61 | ../spine/Attachment.cpp \ 62 | ../spine/AttachmentLoader.cpp \ 63 | ../spine/Bone.cpp \ 64 | ../spine/BoneData.cpp \ 65 | ../spine/Json.cpp \ 66 | ../spine/RegionAttachment.cpp \ 67 | ../spine/Skeleton.cpp \ 68 | ../spine/SkeletonData.cpp \ 69 | ../spine/SkeletonJson.cpp \ 70 | ../spine/Skin.cpp \ 71 | ../spine/Slot.cpp \ 72 | ../spine/SlotData.cpp \ 73 | ../spine/extension.cpp \ 74 | ../spine/spine-cocos2dx.cpp 75 | 76 | include ./renren-ext.mk 77 | 78 | include $(COCOS_ROOT)/cocos2dx/proj.linux/cocos2dx.mk 79 | 80 | CXXFLAGS += -Wno-multichar 81 | 82 | TARGET := $(LIB_DIR)/$(TARGET) 83 | 84 | all: $(TARGET) 85 | 86 | $(TARGET): $(OBJECTS) $(CORE_MAKEFILE_LIST) 87 | @mkdir -p $(@D) 88 | $(LOG_AR)$(AR) $(ARFLAGS) $@ $(OBJECTS) 89 | 90 | $(OBJ_DIR)/%.o: ../%.cpp $(CORE_MAKEFILE_LIST) 91 | @mkdir -p $(@D) 92 | $(LOG_CXX)$(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@ 93 | 94 | $(OBJ_DIR)/%.o: ../%.c $(CORE_MAKEFILE_LIST) 95 | @mkdir -p $(@D) 96 | $(LOG_CC)$(CC) $(CCFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@ 97 | -------------------------------------------------------------------------------- /extensions/proj.linux/renren-ext.mk: -------------------------------------------------------------------------------- 1 | #include this file in Makefile 2 | INCLUDES += -I$(COCOS_ROOT)/cocos2dx/platform/third_party/linux/libfreetype2 3 | 4 | SOURCES += \ 5 | ../dfont/dfont_utility.cpp \ 6 | ../dfont/dfont_render.cpp \ 7 | ../dfont/dfont_manager.cpp \ 8 | ../RichControls/CCHTMLLabel.cpp \ 9 | ../RichControls/CCRichAtlas.cpp \ 10 | ../RichControls/CCRichCache.cpp \ 11 | ../RichControls/CCRichCompositor.cpp \ 12 | ../RichControls/CCRichElement.cpp \ 13 | ../RichControls/CCRichNode.cpp \ 14 | ../RichControls/CCRichOverlay.cpp \ 15 | ../RichControls/CCRichParser.cpp \ 16 | ../cells/CCell.cpp \ 17 | ../cells/CCells.cpp \ 18 | ../cells/CCreationFactory.cpp \ 19 | ../cells/CCreationWorker.cpp \ 20 | ../cells/CDownloader.cpp \ 21 | ../cells/CUtils.cpp \ 22 | ../cells/cells.cpp \ 23 | ../cells/md5.c \ 24 | ../cells/zpip.c 25 | -------------------------------------------------------------------------------- /extensions/renren-ext.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | Copyright (c) 2013 Kevin Sun and RenRen Games 3 | 4 | email:happykevins@gmail.com 5 | http://wan.renren.com 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. 24 | ****************************************************************************/ 25 | #ifndef __RENREN_EXT_H__ 26 | #define __RENREN_EXT_H__ 27 | 28 | #include "dfont/dfont_manager.h" 29 | #include "dfont/dfont_utility.h" 30 | 31 | #include "RichControls/CCHTMLLabel.h" 32 | 33 | #include "cells/cells.h" 34 | 35 | #endif//__RENREN_EXT_H__ 36 | -------------------------------------------------------------------------------- /samples/Cpp/HTMLTest/Classes/AppDelegate.cpp: -------------------------------------------------------------------------------- 1 | #include "AppDelegate.h" 2 | 3 | #include 4 | #include 5 | 6 | #include "HTMLTest.h" 7 | #include "AppMacros.h" 8 | 9 | USING_NS_CC; 10 | using namespace std; 11 | 12 | AppDelegate::AppDelegate() { 13 | 14 | } 15 | 16 | AppDelegate::~AppDelegate() 17 | { 18 | } 19 | 20 | bool AppDelegate::applicationDidFinishLaunching() { 21 | // initialize director 22 | CCDirector* pDirector = CCDirector::sharedDirector(); 23 | CCEGLView* pEGLView = CCEGLView::sharedOpenGLView(); 24 | 25 | pDirector->setOpenGLView(pEGLView); 26 | 27 | // Set the design resolution 28 | pEGLView->setDesignResolutionSize(designResolutionSize.width, designResolutionSize.height, kResolutionNoBorder); 29 | 30 | CCSize frameSize = pEGLView->getFrameSize(); 31 | 32 | vector searchPath; 33 | 34 | // In this demo, we select resource according to the frame's height. 35 | // If the resource size is different from design resolution size, you need to set contentScaleFactor. 36 | // We use the ratio of resource's height to the height of design resolution, 37 | // this can make sure that the resource's height could fit for the height of design resolution. 38 | 39 | // if the frame's height is larger than the height of medium resource size, select large resource. 40 | if (frameSize.height > mediumResource.size.height) 41 | { 42 | searchPath.push_back(largeResource.directory); 43 | 44 | pDirector->setContentScaleFactor(MIN(largeResource.size.height/designResolutionSize.height, largeResource.size.width/designResolutionSize.width)); 45 | } 46 | // if the frame's height is larger than the height of small resource size, select medium resource. 47 | else if (frameSize.height > smallResource.size.height) 48 | { 49 | searchPath.push_back(mediumResource.directory); 50 | 51 | pDirector->setContentScaleFactor(MIN(mediumResource.size.height/designResolutionSize.height, mediumResource.size.width/designResolutionSize.width)); 52 | } 53 | // if the frame's height is smaller than the height of medium resource size, select small resource. 54 | else 55 | { 56 | searchPath.push_back(smallResource.directory); 57 | 58 | pDirector->setContentScaleFactor(MIN(smallResource.size.height/designResolutionSize.height, smallResource.size.width/designResolutionSize.width)); 59 | } 60 | 61 | // set searching path 62 | CCFileUtils::sharedFileUtils()->setSearchPaths(searchPath); 63 | 64 | // turn on display FPS 65 | pDirector->setDisplayStats(true); 66 | 67 | // set FPS. the default value is 1.0/60 if you don't call this 68 | pDirector->setAnimationInterval(1.0 / 60); 69 | 70 | // create a scene. it's an autorelease object 71 | CCScene *pScene = HTMLTest::scene(); 72 | 73 | // run 74 | pDirector->runWithScene(pScene); 75 | 76 | return true; 77 | } 78 | 79 | // This function will be called when the app is inactive. When comes a phone call,it's be invoked too 80 | void AppDelegate::applicationDidEnterBackground() { 81 | CCDirector::sharedDirector()->stopAnimation(); 82 | 83 | // if you use SimpleAudioEngine, it must be pause 84 | // SimpleAudioEngine::sharedEngine()->pauseBackgroundMusic(); 85 | } 86 | 87 | // this function will be called when the app is active again 88 | void AppDelegate::applicationWillEnterForeground() { 89 | CCDirector::sharedDirector()->startAnimation(); 90 | 91 | // if you use SimpleAudioEngine, it must resume here 92 | // SimpleAudioEngine::sharedEngine()->resumeBackgroundMusic(); 93 | } 94 | -------------------------------------------------------------------------------- /samples/Cpp/HTMLTest/Classes/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #ifndef _APP_DELEGATE_H_ 2 | #define _APP_DELEGATE_H_ 3 | 4 | #include "cocos2d.h" 5 | 6 | /** 7 | @brief The cocos2d Application. 8 | 9 | The reason for implement as private inheritance is to hide some interface call by CCDirector. 10 | */ 11 | class AppDelegate : private cocos2d::CCApplication 12 | { 13 | public: 14 | AppDelegate(); 15 | virtual ~AppDelegate(); 16 | 17 | /** 18 | @brief Implement CCDirector and CCScene init code here. 19 | @return true Initialize success, app continue. 20 | @return false Initialize failed, app terminate. 21 | */ 22 | virtual bool applicationDidFinishLaunching(); 23 | 24 | /** 25 | @brief The function be called when the application enter background 26 | @param the pointer of the application 27 | */ 28 | virtual void applicationDidEnterBackground(); 29 | 30 | /** 31 | @brief The function be called when the application enter foreground 32 | @param the pointer of the application 33 | */ 34 | virtual void applicationWillEnterForeground(); 35 | }; 36 | 37 | #endif // _APP_DELEGATE_H_ 38 | 39 | -------------------------------------------------------------------------------- /samples/Cpp/HTMLTest/Classes/AppMacros.h: -------------------------------------------------------------------------------- 1 | #ifndef __APPMACROS_H__ 2 | #define __APPMACROS_H__ 3 | 4 | #include "cocos2d.h" 5 | 6 | /* For demonstrating using one design resolution to match different resources, 7 | or one resource to match different design resolutions. 8 | 9 | [Situation 1] Using one design resolution to match different resources. 10 | Please look into Appdelegate::applicationDidFinishLaunching. 11 | We check current device frame size to decide which resource need to be selected. 12 | So if you want to test this situation which said in title '[Situation 1]', 13 | you should change ios simulator to different device(e.g. iphone, iphone-retina3.5, iphone-retina4.0, ipad, ipad-retina), 14 | or change the window size in "proj.XXX/main.cpp" by "CCEGLView::setFrameSize" if you are using win32 or linux plaform 15 | and modify "proj.mac/AppController.mm" by changing the window rectangle. 16 | 17 | [Situation 2] Using one resource to match different design resolutions. 18 | The coordinates in your codes is based on your current design resolution rather than resource size. 19 | Therefore, your design resolution could be very large and your resource size could be small. 20 | To test this, just define the marco 'TARGET_DESIGN_RESOLUTION_SIZE' to 'DESIGN_RESOLUTION_2048X1536' 21 | and open iphone simulator or create a window of 480x320 size. 22 | 23 | [Note] Normally, developer just need to define one design resolution(e.g. 960x640) with one or more resources. 24 | */ 25 | 26 | #define DESIGN_RESOLUTION_480X320 0 27 | #define DESIGN_RESOLUTION_1024X768 1 28 | #define DESIGN_RESOLUTION_2048X1536 2 29 | 30 | /* If you want to switch design resolution, change next line */ 31 | #define TARGET_DESIGN_RESOLUTION_SIZE DESIGN_RESOLUTION_1024X768 32 | 33 | typedef struct tagResource 34 | { 35 | cocos2d::CCSize size; 36 | char directory[100]; 37 | }Resource; 38 | 39 | static Resource smallResource = { cocos2d::CCSizeMake(480, 320), "iphone" }; 40 | static Resource mediumResource = { cocos2d::CCSizeMake(1024, 768), "ipad" }; 41 | static Resource largeResource = { cocos2d::CCSizeMake(2048, 1536), "ipadhd" }; 42 | 43 | #if (TARGET_DESIGN_RESOLUTION_SIZE == DESIGN_RESOLUTION_480X320) 44 | static cocos2d::CCSize designResolutionSize = cocos2d::CCSizeMake(480, 320); 45 | #elif (TARGET_DESIGN_RESOLUTION_SIZE == DESIGN_RESOLUTION_1024X768) 46 | static cocos2d::CCSize designResolutionSize = cocos2d::CCSizeMake(800, 600); 47 | #elif (TARGET_DESIGN_RESOLUTION_SIZE == DESIGN_RESOLUTION_2048X1536) 48 | static cocos2d::CCSize designResolutionSize = cocos2d::CCSizeMake(2048, 1536); 49 | #else 50 | #error unknown target design resolution! 51 | #endif 52 | 53 | // The font size 24 is designed for small resolution, so we should change it to fit for current design resolution 54 | #define TITLE_FONT_SIZE (cocos2d::CCEGLView::sharedOpenGLView()->getDesignResolutionSize().width / smallResource.size.width * 24) 55 | 56 | #endif /* __APPMACROS_H__ */ 57 | -------------------------------------------------------------------------------- /samples/Cpp/HTMLTest/Classes/HTMLTest.h: -------------------------------------------------------------------------------- 1 | #ifndef __HTMLTEST_H__ 2 | #define __HTMLTEST_H__ 3 | 4 | #include "cocos2d.h" 5 | #include 6 | 7 | USING_NS_CC; 8 | USING_NS_CC_EXT; 9 | 10 | class HTMLTest : public cocos2d::CCLayer 11 | { 12 | public: 13 | // Here's a difference. Method 'init' in cocos2d-x returns bool, instead of returning 'id' in cocos2d-iphone 14 | virtual bool init(); 15 | 16 | // there's no 'id' in cpp, so we recommend returning the class instance pointer 17 | static cocos2d::CCScene* scene(); 18 | 19 | // a selector callback 20 | void menuCloseCallback(CCObject* pSender); 21 | 22 | bool ccTouchBegan(CCTouch *pTouch, CCEvent *pEvent); 23 | void ccTouchMoved(CCTouch* pTouch, CCEvent* pEvent); 24 | 25 | // HTML events 26 | void onHTMLClicked( 27 | IRichNode* root, IRichElement* ele, int _id); 28 | void onHTMLMoved( 29 | IRichNode* root, IRichElement* ele, int _id, 30 | const CCPoint& location, const CCPoint& delta); 31 | 32 | // implement the "static node()" method manually 33 | CREATE_FUNC(HTMLTest); 34 | }; 35 | 36 | #endif // __HTMLTEST_H__ 37 | -------------------------------------------------------------------------------- /samples/Cpp/HTMLTest/Resources/fireball.ccbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/happykevins/cocos2dx-ext/de5facfd03581963194f77f665098dfadb2bb05b/samples/Cpp/HTMLTest/Resources/fireball.ccbi -------------------------------------------------------------------------------- /samples/Cpp/HTMLTest/Resources/html.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 19 | 20 | 61 |
4 | 5 | 6 | 13 | 16 | 17 |
7 | 8 | 9 | 10 |
窗口(drag me!)
11 |
12 |
14 | 15 |
18 |
21 |

22 |

23 | 24 | [LEFT]研表究明,汉字的序顺并不定一能1234567890,abcdefg.ABCDEFG_[~!@#$%^&*()-=+] 25 | 26 |

27 |

28 | 29 | [CENTER]阅响读,比如当你看完这句话后,1234567890,abcdefg.ABCDEFG_[~!@#$%^&*()-=+] 30 | 31 |

32 |

33 | 34 | [RIGHT]才发这现里的字 全是都乱的1234567890,abcdefg.ABCDEFG_[~!@#$%^&*()-=+] 35 | 36 |

37 |
38 | 39 | 40 | 41 | 42 | 43 | Color 44 | Test 45 |
46 |

Touch Reload!

47 |

48 |
49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 |
111213
212223
313233
60 |
-------------------------------------------------------------------------------- /samples/Cpp/HTMLTest/Resources/htmltest.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/happykevins/cocos2dx-ext/de5facfd03581963194f77f665098dfadb2bb05b/samples/Cpp/HTMLTest/Resources/htmltest.jpg -------------------------------------------------------------------------------- /samples/Cpp/HTMLTest/Resources/res/Marker Felt.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/happykevins/cocos2dx-ext/de5facfd03581963194f77f665098dfadb2bb05b/samples/Cpp/HTMLTest/Resources/res/Marker Felt.ttf -------------------------------------------------------------------------------- /samples/Cpp/HTMLTest/Resources/res/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/happykevins/cocos2dx-ext/de5facfd03581963194f77f665098dfadb2bb05b/samples/Cpp/HTMLTest/Resources/res/bg.jpg -------------------------------------------------------------------------------- /samples/Cpp/HTMLTest/Resources/res/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/happykevins/cocos2dx-ext/de5facfd03581963194f77f665098dfadb2bb05b/samples/Cpp/HTMLTest/Resources/res/close.png -------------------------------------------------------------------------------- /samples/Cpp/HTMLTest/Resources/res/scale9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/happykevins/cocos2dx-ext/de5facfd03581963194f77f665098dfadb2bb05b/samples/Cpp/HTMLTest/Resources/res/scale9.png -------------------------------------------------------------------------------- /samples/Cpp/HTMLTest/Resources/res/smile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/happykevins/cocos2dx-ext/de5facfd03581963194f77f665098dfadb2bb05b/samples/Cpp/HTMLTest/Resources/res/smile.png -------------------------------------------------------------------------------- /samples/Cpp/HTMLTest/Resources/skillFire.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | frames 6 | 7 | spirit_13_01@2x.png 8 | 9 | frame 10 | {{2,2},{42,50}} 11 | offset 12 | {0,0} 13 | rotated 14 | 15 | sourceColorRect 16 | {{4,0},{42,50}} 17 | sourceSize 18 | {50,50} 19 | 20 | spirit_13_02@2x.png 21 | 22 | frame 23 | {{2,54},{36,50}} 24 | offset 25 | {0,0} 26 | rotated 27 | 28 | sourceColorRect 29 | {{7,0},{36,50}} 30 | sourceSize 31 | {50,50} 32 | 33 | spirit_13_03@2x.png 34 | 35 | frame 36 | {{40,54},{36,48}} 37 | offset 38 | {1,-1} 39 | rotated 40 | 41 | sourceColorRect 42 | {{8,2},{36,48}} 43 | sourceSize 44 | {50,50} 45 | 46 | spirit_13_04@2x.png 47 | 48 | frame 49 | {{78,44},{40,46}} 50 | offset 51 | {1,-2} 52 | rotated 53 | 54 | sourceColorRect 55 | {{6,4},{40,46}} 56 | sourceSize 57 | {50,50} 58 | 59 | spirit_13_05@2x.png 60 | 61 | frame 62 | {{78,2},{40,46}} 63 | offset 64 | {1,-2} 65 | rotated 66 | 67 | sourceColorRect 68 | {{6,4},{40,46}} 69 | sourceSize 70 | {50,50} 71 | 72 | 73 | metadata 74 | 75 | format 76 | 2 77 | realTextureFileName 78 | skillFire.png 79 | size 80 | {128,128} 81 | smartupdate 82 | $TexturePacker:SmartUpdate:9c79bbd4f1e1f22648a656f054ebf510$ 83 | textureFileName 84 | skillFire.png 85 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /samples/Cpp/HTMLTest/Resources/skillFire.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/happykevins/cocos2dx-ext/de5facfd03581963194f77f665098dfadb2bb05b/samples/Cpp/HTMLTest/Resources/skillFire.png -------------------------------------------------------------------------------- /samples/Cpp/HTMLTest/proj.win32/HTMLTest.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | 14 | 15 | Classes 16 | 17 | 18 | win32 19 | 20 | 21 | Classes 22 | 23 | 24 | 25 | 26 | Classes 27 | 28 | 29 | win32 30 | 31 | 32 | Classes 33 | 34 | 35 | Classes 36 | 37 | 38 | -------------------------------------------------------------------------------- /samples/Cpp/HTMLTest/proj.win32/HTMLTest.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | $(ProjectDir)..\Resources 5 | WindowsLocalDebugger 6 | 7 | 8 | $(ProjectDir)..\Resources 9 | WindowsLocalDebugger 10 | 11 | -------------------------------------------------------------------------------- /samples/Cpp/HTMLTest/proj.win32/main.cpp: -------------------------------------------------------------------------------- 1 | #include "main.h" 2 | #include "../Classes/AppDelegate.h" 3 | #include "CCEGLView.h" 4 | 5 | USING_NS_CC; 6 | 7 | int APIENTRY _tWinMain(HINSTANCE hInstance, 8 | HINSTANCE hPrevInstance, 9 | LPTSTR lpCmdLine, 10 | int nCmdShow) 11 | { 12 | UNREFERENCED_PARAMETER(hPrevInstance); 13 | UNREFERENCED_PARAMETER(lpCmdLine); 14 | 15 | #define USE_WIN32_CONSOLE 1 16 | #ifdef USE_WIN32_CONSOLE 17 | AllocConsole(); 18 | freopen("CONIN$", "r", stdin); 19 | freopen("CONOUT$", "w", stdout); 20 | freopen("CONOUT$", "w", stderr); 21 | #endif 22 | 23 | // create the application instance 24 | AppDelegate app; 25 | CCEGLView* eglView = CCEGLView::sharedOpenGLView(); 26 | eglView->setViewName("HTML Test"); 27 | eglView->setFrameSize(800, 600); 28 | // The resolution of ipad3 is very large. In general, PC's resolution is smaller than it. 29 | // So we need to invoke 'setFrameZoomFactor'(only valid on desktop(win32, mac, linux)) to make the window smaller. 30 | //eglView->setFrameZoomFactor(0.8f); 31 | return CCApplication::sharedApplication()->run(); 32 | } 33 | -------------------------------------------------------------------------------- /samples/Cpp/HTMLTest/proj.win32/main.h: -------------------------------------------------------------------------------- 1 | #ifndef __MAIN_H__ 2 | #define __MAIN_H__ 3 | 4 | #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers 5 | 6 | // Windows Header Files: 7 | #include 8 | #include 9 | 10 | // C RunTime Header Files 11 | #include "CCStdC.h" 12 | 13 | #endif // __MAIN_H__ 14 | --------------------------------------------------------------------------------