# kdecore Library API Documentation

Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Namespaces | Source Files

# kxerrorhandler.h

    00001 /*
    00002
    00003   Copyright (c) 2003 Lubos Lunak <l.lunak@kde.org>
    00004
    00005   Permission is hereby granted, free of charge, to any person obtaining a
    00006   copy of this software and associated documentation files (the "Software"),
    00007   to deal in the Software without restriction, including without limitation
    00008   the rights to use, copy, modify, merge, publish, distribute, sublicense,
    00009   and/or sell copies of the Software, and to permit persons to whom the
    00010   Software is furnished to do so, subject to the following conditions:
    00011
    00012   The above copyright notice and this permission notice shall be included in
    00013   all copies or substantial portions of the Software.
    00014
    00015   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    00016   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    00017   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
    00018   THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    00019   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    00020   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
    00021   DEALINGS IN THE SOFTWARE.
    00022
    00023 */
    00024
    00025 #ifndef KXERRORHANDLER_H
    00026 #define KXERRORHANDLER_H
    00027
    00028 #include <qvaluelist.h>
    00029 #include <qwindowdefs.h>
    00030 #include <kdelibs_export.h>
    00031 #include <X11/Xlib.h>
    00032
    00057 class KDECORE_EXPORT KXErrorHandler
    00058     {
    00059     public:
    00064         KXErrorHandler( Display* dpy = qt_xdisplay());
    00070         KXErrorHandler( bool (*handler)( int request, int error_code, unsigned long resource_id ), Display* dpy = qt_xdisplay());
    00077         KXErrorHandler( int (*handler)( Display*, XErrorEvent* ), Display* dpy = qt_xdisplay());
    00086         bool error( bool sync ) const;
    00087         ~KXErrorHandler();
    00088     private:
    00089         void addHandler();
    00090         int handle( Display* dpy, XErrorEvent* e );
    00091         bool (*user_handler1)( int request, int error_code, unsigned long resource_id );
    00092         int (*user_handler2)( Display*, XErrorEvent* );
    00093         int (*old_handler)( Display*, XErrorEvent* );
    00094         unsigned long first_request;
    00095         Display* display;
    00096         bool was_error;
    00097         static int handler_wrapper( Display*, XErrorEvent* );
    00098         static KXErrorHandler** handlers;
    00099         static int pos;
    00100         static int size;
    00101         class KXErrorHandlerPrivate* d;
    00102     };
    00103
    00104 #endif

This file is part of the documentation for kdecore Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Jun 11 20:18:12 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003