related public APIs. [base] Added a public API to change the levels of tracing components. * src/base/ftdebug.c: Added new variables. (ft_debug_init): Updates to support the change of levels of tracing components of FreeType at run-time. (FT_Trace_Set_Level): New function to change the levels of tracing components at run-time. (FT_Trace_Set_Default_Level): New function to reset the levels of tracing components back to default. * include/freetype/ftchapters.h: Added `debugging_apis' section under `support_api' chapter.GSoC-2020-priyesh
parent
806adbe829
commit
1c095f8174
4 changed files with 128 additions and 1 deletions
@ -0,0 +1,89 @@ |
||||
/****************************************************************************
|
||||
* |
||||
* ftlogging.h |
||||
* |
||||
* Additional debugging APIs. |
||||
* |
||||
* Copyright (C) 2008-2020 by |
||||
* David Turner, Robert Wilhelm, and Werner Lemberg. |
||||
* |
||||
* This file is part of the FreeType project, and may only be used, |
||||
* modified, and distributed under the terms of the FreeType project |
||||
* license, LICENSE.TXT. By continuing to use, modify, or distribute |
||||
* this file you indicate that you have read the license and |
||||
* understand and accept it fully. |
||||
* |
||||
*/ |
||||
|
||||
|
||||
#ifndef FTLOGGING_H_ |
||||
#define FTLOGGING_H_ |
||||
|
||||
#include <ft2build.h> |
||||
#include FT_CONFIG_CONFIG_H |
||||
|
||||
FT_BEGIN_HEADER |
||||
|
||||
/**************************************************************************
|
||||
* |
||||
* @section: |
||||
* debugging_apis |
||||
* |
||||
* @title: |
||||
* External Debugging APIs |
||||
* |
||||
* @abstract: |
||||
* Pubic APIs to use while debugging using `FT_LOGGING' macro |
||||
* |
||||
* @description: |
||||
* This section contains the declaration of the public APIs which can be |
||||
* used to debug an application using `FT_LOGGING'. |
||||
* |
||||
*/ |
||||
|
||||
|
||||
/**************************************************************************
|
||||
* |
||||
* @function: |
||||
* FT_Trace_Set_Level |
||||
* |
||||
* @description: |
||||
* To change the levels of tracing components of FreeType, at run time. |
||||
* |
||||
* @input: |
||||
* |
||||
* tracing_level :: |
||||
* New tracing values of FreeType's components. |
||||
* |
||||
* @example: |
||||
* This function can be used to change the levels of tracing components |
||||
* of FreeType as follows: |
||||
* |
||||
* ``` |
||||
* new_levels = "any:7 memory:0"; |
||||
* FT_Trace_Set_Level( new_levels ); |
||||
* ``` |
||||
*/ |
||||
FT_EXPORT( void ) |
||||
FT_Trace_Set_Level( const char* tracing_level ); |
||||
|
||||
|
||||
/**************************************************************************
|
||||
* |
||||
* @function: |
||||
* FT_Trace_Set_Default_Level |
||||
* |
||||
* @description: |
||||
* If previously, `FT_Trace_Set_Level' functions is used to set new |
||||
* tracing values of FreeType components, this function could be used to |
||||
* reset the tracing values of FreeType's components to the default value. |
||||
* |
||||
*/ |
||||
FT_EXPORT( void ) |
||||
FT_Trace_Set_Default_Level( void ); |
||||
|
||||
/* */ |
||||
|
||||
FT_END_HEADER |
||||
|
||||
#endif /* FTLOGGING_H_ */ |
Loading…
Reference in new issue