• Skip to content
  • Skip to link menu
KDE 4.3 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KDEUI

kxerrorhandler.h

Go to the documentation of this file.
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 <QtGui/QWidget>
00029 #include <QtGui/QWidgetList>
00030 
00031 #ifdef Q_WS_X11
00032 
00033 #include <kdeui_export.h>
00034 #include <QtGui/QX11Info>
00035 #include <X11/Xlib.h>
00036 
00037 class KXErrorHandlerPrivate;
00062 class KDEUI_EXPORT KXErrorHandler
00063     {
00064     public:
00069         explicit KXErrorHandler( Display* dpy = QX11Info::display());
00076         explicit KXErrorHandler( int (*handler)( Display*, XErrorEvent* ), Display* dpy = QX11Info::display());
00083         explicit KXErrorHandler( bool (*handler)( int request, int error_code, unsigned long resource_id ), Display* dpy = QX11Info::display()) KDE_DEPRECATED;
00092         bool error( bool sync ) const;
00098         XErrorEvent errorEvent() const;
00104         static QByteArray errorMessage( const XErrorEvent& e, Display* dpy = QX11Info::display());
00105         ~KXErrorHandler();
00106     private:
00107         void addHandler();
00108         int handle( Display* dpy, XErrorEvent* e );
00109         bool (*user_handler1)( int request, int error_code, unsigned long resource_id );
00110         int (*user_handler2)( Display*, XErrorEvent* );
00111         int (*old_handler)( Display*, XErrorEvent* );
00112         static int handler_wrapper( Display*, XErrorEvent* );
00113         static KXErrorHandler** handlers;
00114         static int pos;
00115         static int size;
00116         Q_DISABLE_COPY( KXErrorHandler )
00117         KXErrorHandlerPrivate * const d;
00118     };
00119 
00120 #endif // Q_WS_X11
00121 
00122 #endif

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal