1 /* 2 * Copyright (C) 2010 Nick Schermer <nick@xfce.org> 3 * 4 * This library is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Lesser General Public 6 * License as published by the Free Software Foundation; either 7 * version 2.1 of the License, or (at your option) any later version. 8 * 9 * This library is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * Lesser General Public License for more details. 13 * 14 * You should have received a copy of the GNU Lesser General Public 15 * License along with this library; if not, write to the Free Software 16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 */ 18 19 #ifndef __PANEL_DEBUG_H__ 20 #define __PANEL_DEBUG_H__ 21 22 #define PANEL_DEBUG_BOOL(bool) ((bool) ? "true" : "false") 23 24 typedef enum 25 { 26 PANEL_DEBUG_YES = 1 << 0, /* always enabled if PANEL_DEBUG is not %NULL */ 27 28 /* external plugin proxy modes */ 29 PANEL_DEBUG_GDB = 1 << 1, /* run external plugins in gdb */ 30 PANEL_DEBUG_VALGRIND = 1 << 2, /* run external plugins in valgrind */ 31 32 /* filter domains */ 33 PANEL_DEBUG_APPLICATION = 1 << 3, 34 PANEL_DEBUG_APPLICATIONSMENU = 1 << 4, 35 PANEL_DEBUG_BASE_WINDOW = 1 << 5, 36 PANEL_DEBUG_DISPLAY_LAYOUT = 1 << 6, 37 PANEL_DEBUG_EXTERNAL = 1 << 7, 38 PANEL_DEBUG_MAIN = 1 << 8, 39 PANEL_DEBUG_MODULE = 1 << 9, 40 PANEL_DEBUG_MODULE_FACTORY = 1 << 10, 41 PANEL_DEBUG_POSITIONING = 1 << 11, 42 PANEL_DEBUG_STRUTS = 1 << 12, 43 PANEL_DEBUG_SYSTRAY = 1 << 13, 44 PANEL_DEBUG_TASKLIST = 1 << 14, 45 PANEL_DEBUG_PAGER = 1 << 15 46 } 47 PanelDebugFlag; 48 49 gboolean panel_debug_has_domain (PanelDebugFlag domain); 50 51 void panel_debug (PanelDebugFlag domain, 52 const gchar *message, 53 ...) G_GNUC_PRINTF (2, 3); 54 55 void panel_debug_filtered (PanelDebugFlag domain, 56 const gchar *message, 57 ...) G_GNUC_PRINTF (2, 3); 58 59 #endif /* !__PANEL_DEBUG_H__ */ 60