* include/freetype/ftlogging.h: New header file. * include/freetype/internal/ftdebug.h [FT_LOGGING]: Include `ftlogging.h`. * src/base/ftdebug.c (ft_custom_trace_level): New variable. (ft_debug_init): Update to support 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.wl/meson-logging
parent
d00cbc3f90
commit
5fea76cf0f
5 changed files with 163 additions and 2 deletions
@ -0,0 +1,102 @@ |
||||
/****************************************************************************
|
||||
* |
||||
* ftlogging.h |
||||
* |
||||
* Additional debugging APIs. |
||||
* |
||||
* Copyright (C) 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: |
||||
* Public APIs to control the `FT_LOGGING` macro. |
||||
* |
||||
* @description: |
||||
* This section contains the declarations of public functions that |
||||
* enables fine control of what the `FT_LOGGING` macro outputs. |
||||
* |
||||
*/ |
||||
|
||||
|
||||
/**************************************************************************
|
||||
* |
||||
* @function: |
||||
* FT_Trace_Set_Level |
||||
* |
||||
* @description: |
||||
* Change the levels of tracing components of FreeType at run time. |
||||
* |
||||
* @input: |
||||
* tracing_level :: |
||||
* New tracing value. |
||||
* |
||||
* @example: |
||||
* The following call makes FreeType trace everything but the 'memory' |
||||
* component. |
||||
* |
||||
* ``` |
||||
* FT_Trace_Set_Level( "any:7 memory:0 ); |
||||
* ``` |
||||
* |
||||
* @note: |
||||
* This function is only available if compilation option `@FT_LOGGING` |
||||
* is set. |
||||
*/ |
||||
FT_EXPORT( void ) |
||||
FT_Trace_Set_Level( const char* tracing_level ); |
||||
|
||||
|
||||
/**************************************************************************
|
||||
* |
||||
* @function: |
||||
* FT_Trace_Set_Default_Level |
||||
* |
||||
* @description: |
||||
* Reset tracing value of FreeType's components to the default value |
||||
* (i.e., to the value of the `FT2_DEBUG` environment value or to NULL |
||||
* if `FT2_DEBUG` is not set). |
||||
* |
||||
* |
||||
* @note: |
||||
* This function is only available if compilation option `@FT_LOGGING` |
||||
* is set. |
||||
*/ |
||||
FT_EXPORT( void ) |
||||
FT_Trace_Set_Default_Level( void ); |
||||
|
||||
/* */ |
||||
|
||||
|
||||
FT_END_HEADER |
||||
|
||||
#endif /* FTLOGGING_H_ */ |
||||
|
||||
|
||||
/* END */ |
Loading…
Reference in new issue