Add support for monitors "All" to span panel over all monitors.
[lxde/lxpanel.git] / src / dbg.c
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
19 #include "dbg.h"
20
21 #include <glib.h>
22
23 void _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)
27 g_critical("%s:%s:%-5d: cairo had error %d: %s", file, func, line, status,
28 cairo_status_to_string(status));
29 }
30
31 void _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) {
35 g_critical("%s:%s:%-5d: cairo had error %d: %s", file, func, line, status,
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 : */