Add support for monitors "All" to span panel over all monitors.
[lxde/lxpanel.git] / src / dbg.c
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
HJYP
19#include "dbg.h"
20
06e29ce1 21#include <glib.h>
e4f8b15f
HG
22
23void _check_cairo_status(cairo_t* cr, char const* file, char const* func, int line)
24{
25 cairo_status_t status = cairo_status(cr);
26 if (status != CAIRO_STATUS_SUCCESS)
06e29ce1 27 g_critical("%s:%s:%-5d: cairo had error %d: %s", file, func, line, status,
e4f8b15f
HG
28 cairo_status_to_string(status));
29}
30
31void _check_cairo_surface_status(cairo_surface_t** surf, char const* file, char const* func, int line)
32{
33 cairo_status_t status = cairo_surface_status(*surf);
34 if (status != CAIRO_STATUS_SUCCESS) {
06e29ce1 35 g_critical("%s:%s:%-5d: cairo had error %d: %s", file, func, line, status,
e4f8b15f
HG
36 cairo_status_to_string(status));
37 cairo_surface_destroy(*surf);
38 *surf = NULL;
39 }
40}
41
42/* vim: set sw=4 et sts=4 : */