errors.h

Go to the documentation of this file.
00001 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
00002 
00003 /* Metacity X error handling */
00004 
00005 /* 
00006  * Copyright (C) 2001 Havoc Pennington
00007  * 
00008  * This program is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU General Public License as
00010  * published by the Free Software Foundation; either version 2 of the
00011  * License, or (at your option) any later version.
00012  *
00013  * This program is distributed in the hope that it will be useful, but
00014  * WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016  * General Public License for more details.
00017  * 
00018  * You should have received a copy of the GNU General Public License
00019  * along with this program; if not, write to the Free Software
00020  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
00021  * 02111-1307, USA.
00022  */
00023 
00024 #ifndef META_ERRORS_H
00025 #define META_ERRORS_H
00026 
00027 #include <X11/Xlib.h>
00028 
00029 #include "util.h"
00030 #include "display.h"
00031 
00032 typedef void (* ErrorHandler) (Display *dpy,
00033                                XErrorEvent *error,
00034                                gpointer data);
00035 
00036 void      meta_errors_init     (void);
00037 void      meta_errors_register_foreign_display (Display      *foreign_dpy,
00038                                                 ErrorHandler  handler,
00039                                                 gpointer      data);
00040                                                 
00041 void      meta_error_trap_push (MetaDisplay *display);
00042 void      meta_error_trap_pop  (MetaDisplay *display,
00043                                 gboolean     last_request_was_roundtrip);
00044 
00045 void      meta_error_trap_push_with_return (MetaDisplay *display);
00046 /* returns X error code, or 0 for no error */
00047 int       meta_error_trap_pop_with_return  (MetaDisplay *display,
00048                                             gboolean     last_request_was_roundtrip);
00049 
00050 
00051 #endif

Generated on Sat Aug 23 22:04:18 2008 for metacity by  doxygen 1.5.5