]> git.sur5r.net Git - glabels/blob - glabels2/src/debug.h
Initial revision
[glabels] / glabels2 / src / debug.h
1 /*
2  *  (GLABELS) Label and Business Card Creation program for GNOME
3  *
4  *  debug.h:  GLabels debug module
5  *
6  *  Copyright (C) 2001-2002  Jim Evins <evins@snaught.com>.
7  *
8  *  This program is free software; you can redistribute it and/or modify
9  *  it under the terms of the GNU General Public License as published by
10  *  the Free Software Foundation; either version 2 of the License, or
11  *  (at your option) any later version.
12  *
13  *  This program is distributed in the hope that it will be useful,
14  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  *  GNU General Public License for more details.
17  *
18  *  You should have received a copy of the GNU General Public License
19  *  along with this program; if not, write to the Free Software
20  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
21  */
22
23 /*
24  * This file is based on gedit-debug.h from gedit2:
25  *
26  * Copyright (C) 1998, 1999 Alex Roberts, Evan Lawrence
27  * Copyright (C) 2000, 2001 Chema Celorio, Paolo Maggi 
28  *
29  */
30 #ifndef __DEBUG_H__
31 #define __DEBUG_H__
32
33 typedef enum {
34         GL_DEBUG_VIEW,
35         GL_DEBUG_ITEM,
36         GL_DEBUG_PRINT,
37         GL_DEBUG_PREFS,
38         GL_DEBUG_FILE,
39         GL_DEBUG_LABEL,
40         GL_DEBUG_TEMPLATE,
41         GL_DEBUG_XML,
42         GL_DEBUG_MERGE,
43         GL_DEBUG_UNDO,
44         GL_DEBUG_RECENT,
45         GL_DEBUG_COMMANDS,
46         GL_DEBUG_MDI,
47         GL_DEBUG_MEDIA_SELECT,
48         GL_DEBUG_MINI_PREVIEW,
49         GL_DEBUG_WDGT,
50 } glDebugSection;
51
52 extern gint gl_debug_all;
53 extern gint gl_debug_view;
54 extern gint gl_debug_item;
55 extern gint gl_debug_print;
56 extern gint gl_debug_prefs;
57 extern gint gl_debug_file;
58 extern gint gl_debug_label;
59 extern gint gl_debug_template;
60 extern gint gl_debug_xml;
61 extern gint gl_debug_merge;
62 extern gint gl_debug_commands;
63 extern gint gl_debug_undo;
64 extern gint gl_debug_recent;
65 extern gint gl_debug_mdi;
66 extern gint gl_debug_media_select;
67 extern gint gl_debug_mini_preview;
68 extern gint gl_debug_wdgt;
69
70 #ifndef __GNUC__
71 #define __FUNCTION__   ""
72 #endif
73
74 #define DEBUG_VIEW      GL_DEBUG_VIEW,    __FILE__, __LINE__, __FUNCTION__
75 #define DEBUG_ITEM      GL_DEBUG_ITEM,    __FILE__, __LINE__, __FUNCTION__
76 #define DEBUG_PRINT     GL_DEBUG_PRINT,   __FILE__, __LINE__, __FUNCTION__
77 #define DEBUG_PREFS     GL_DEBUG_PREFS,   __FILE__, __LINE__, __FUNCTION__
78 #define DEBUG_FILE      GL_DEBUG_FILE,    __FILE__, __LINE__, __FUNCTION__
79 #define DEBUG_LABEL     GL_DEBUG_LABEL,   __FILE__, __LINE__, __FUNCTION__
80 #define DEBUG_TEMPLATE  GL_DEBUG_TEMPLATE,__FILE__, __LINE__, __FUNCTION__
81 #define DEBUG_XML       GL_DEBUG_XML,     __FILE__, __LINE__, __FUNCTION__
82 #define DEBUG_MERGE     GL_DEBUG_MERGE,   __FILE__, __LINE__, __FUNCTION__
83 #define DEBUG_UNDO      GL_DEBUG_UNDO,    __FILE__, __LINE__, __FUNCTION__
84 #define DEBUG_RECENT    GL_DEBUG_RECENT,  __FILE__, __LINE__, __FUNCTION__
85 #define DEBUG_COMMANDS  GL_DEBUG_COMMANDS,__FILE__, __LINE__, __FUNCTION__
86 #define DEBUG_MDI       GL_DEBUG_MDI,     __FILE__, __LINE__, __FUNCTION__
87 #define DEBUG_MEDIA_SELECT      GL_DEBUG_MEDIA_SELECT,     __FILE__, __LINE__, __FUNCTION__
88 #define DEBUG_MINI_PREVIEW      GL_DEBUG_MINI_PREVIEW,     __FILE__, __LINE__, __FUNCTION__
89 #define DEBUG_WDGT      GL_DEBUG_WDGT,    __FILE__, __LINE__, __FUNCTION__
90
91 extern void gl_debug (gint section, gchar *file,
92                       gint line, gchar* function, gchar* format, ...);
93
94 #endif /* __DEBUG_H__ */