libt3widget
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Modules
log.h
1 /* Copyright (C) 2011-2012 G.P. Halkes
2  This program is free software: you can redistribute it and/or modify
3  it under the terms of the GNU General Public License version 3, as
4  published by the Free Software Foundation.
5 
6  This program is distributed in the hope that it will be useful,
7  but WITHOUT ANY WARRANTY; without even the implied warranty of
8  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9  GNU General Public License for more details.
10 
11  You should have received a copy of the GNU General Public License
12  along with this program. If not, see <http://www.gnu.org/licenses/>.
13 */
14 #ifndef T3_WIDGET_LOG_H
15 #define T3_WIDGET_LOG_H
16 
17 #ifndef _T3_WIDGET_INTERNAL
18 #error This header file is for internal use _only_!!
19 #endif
20 
21 #ifdef _T3_WIDGET_DEBUG
22 #include <typeinfo>
23 #endif
24 
25 #include <stdio.h>
26 
27 #include "widget_api.h"
28 namespace t3_widget {
29 
30 #ifdef _T3_WIDGET_DEBUG
31 
32 T3_WIDGET_LOCAL void init_log(void);
33 /* Note: these must be declared with T3_WIDGET_API such that they can be accessed
34  from the clipboard modules. */
35 T3_WIDGET_API void lprintf(const char *fmt, ...)
36  #ifdef __GNUC__
37  __attribute__((format(printf, 1, 2)))
38  #endif
39  ;
40 T3_WIDGET_API void ldumpstr(const char *str, int length);
41 T3_WIDGET_API void logkeyseq(const char *keys);
42 #else
43 #define init_log()
44 #define lprintf(fmt, ...)
45 #define ldumpstr(str, length)
46 #define logkeyseq(keys)
47 #endif
48 
49 }; // namespace
50 #endif
The t3_widget namespace is contains all classes, functions and global variables in the libt3widget li...
Definition: autocompleter.cc:18