Graphiteng
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
Log.h
Go to the documentation of this file.
1 /* GRAPHITE2 LICENSING
2 
3  Copyright 2010, SIL International
4  All rights reserved.
5 
6  This library is free software; you can redistribute it and/or modify
7  it under the terms of the GNU Lesser General Public License as published
8  by the Free Software Foundation; either version 2.1 of License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Lesser General Public License for more details.
15 
16  You should also have received a copy of the GNU Lesser General Public
17  License along with this library in the file named "LICENSE".
18  If not, write to the Free Software Foundation, 51 Franklin Street,
19  Suite 500, Boston, MA 02110-1335, USA or visit their web page on the
20  internet at http://www.fsf.org/licenses/lgpl.html.
21 
22  Alternatively, the contents of this file may be used under the terms
23  of the Mozilla Public License (http://mozilla.org/MPL) or the GNU
24  General Public License, as published by the Free Software Foundation,
25  either version 2 of the License or (at your option) any later version.
26 */
27 #pragma once
28 
29 #include <graphite2/Types.h>
30 #include <graphite2/Font.h>
31 #include <stdio.h>
32 
33 #ifdef __cplusplus
34 extern "C"
35 {
36 #endif
37 
39 typedef enum {
40  GRLOG_NONE = 0x0,
41  GRLOG_FACE = 0x01,
42  GRLOG_SEGMENT = 0x02,
43  GRLOG_PASS = 0x04,
44  GRLOG_CACHE = 0x08,
45 
46  GRLOG_OPCODE = 0x80,
47  GRLOG_ALL = 0xFF
48 } GrLogMask;
49 
59 GR2_API bool gr_start_logging(gr_face * face, const char *log_path);
60 
61 
67 GR2_API void gr_stop_logging(gr_face * face);
68 
76 GR2_API bool graphite_start_logging(FILE * logFile, GrLogMask mask); //may not do anthing if disabled in the implementation of the engine.
77 
82 
83 #ifdef __cplusplus
84 }
85 #endif