Add support for monitors "All" to span panel over all monitors.
[lxde/lxpanel.git] / src / dbg.h
CommitLineData
5d344669
AL
1/**
2 * Copyright (c) 2006 LxDE Developers, see the file AUTHORS for details.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program 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
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software Foundation,
16 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 */
18
a52c2257 19#include <stdio.h>
e4f8b15f 20#include <cairo/cairo.h>
a52c2257 21
06e29ce1
AG
22/*
23 * Macros ENTER, RET(), and DBG() are for low-level debug. Use them in
24 * combination with defining DEBUG to add some messages that normally
25 * would never be shown. Usually those messages will spam your console
26 * and are just for finding problem, not for production usage.
27 */
82ca42af 28
a52c2257
HJYP
29#ifdef DEBUG
30
31#define ENTER do { fprintf(stderr, "%s:%s:%-5d: ENTER\n", __FILE__,__FUNCTION__, __LINE__); } while(0)
32#define RET(args...) do { fprintf(stderr, "%s:%s:%-5d: RETURN\n", __FILE__, __FUNCTION__, __LINE__);\
33return args; } while(0)
34#define DBG(fmt, args...) fprintf(stderr, "%s:%s:%-5d: " fmt, __FILE__,__FUNCTION__, __LINE__, ## args)
a52c2257
HJYP
35
36#else
37
a52c2257
HJYP
38#define ENTER do { } while(0)
39#define RET(args...) return args
40#define DBG(fmt, args...) do { } while(0)
a52c2257
HJYP
41
42#endif
43
e4f8b15f
HG
44
45void _check_cairo_status(cairo_t* cr, char const* file, char const* func, int line);
46void _check_cairo_surface_status(cairo_surface_t** surf, char const* file, char const* func, int line);
47
48#define check_cairo_status(cr) _check_cairo_status(cr, __FILE__, __FUNCTION__, __LINE__)
49#define check_cairo_surface_status(surf) _check_cairo_surface_status(surf, __FILE__, __FUNCTION__, __LINE__)