kdecore Library API Documentation

knotifyclient.h

00001 /* This file is part of the KDE libraries 00002 Copyright (C) 2000 Charles Samuels <charles@kde.org> 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Library General Public 00006 License version 2 as published by the Free Software Foundation. 00007 00008 This library is distributed in the hope that it will be useful, 00009 but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 Library General Public License for more details. 00012 00013 You should have received a copy of the GNU Library General Public License 00014 along with this library; see the file COPYING.LIB. If not, write to 00015 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00016 Boston, MA 02111-1307, USA. 00017 */ 00018 #ifndef _KNOTIFY_CLIENT 00019 #define _KNOTIFY_CLIENT 00020 #include <qstring.h> 00021 #include "kdelibs_export.h" 00022 00023 class KInstance; 00024 #undef None // X11 headers... 00025 00079 namespace KNotifyClient 00080 { 00081 struct InstancePrivate; 00082 class InstanceStack; 00083 00096 class KDECORE_EXPORT Instance 00097 { 00098 public: 00104 Instance(KInstance *instance); 00109 ~Instance(); 00115 bool useSystemBell() const; 00120 static KInstance *current(); 00121 00126 static Instance *currentInstance(); 00127 00128 private: 00129 static InstanceStack *instances(); 00130 InstancePrivate *d; 00131 static InstanceStack *s_instances; 00132 }; 00133 00134 00138 enum { 00139 Default = -1, 00140 None = 0, 00141 Sound = 1, 00142 Messagebox = 2, 00143 Logfile = 4, 00144 Stderr = 8, 00145 PassivePopup = 16, 00146 Execute = 32, 00147 Taskbar = 64 00148 }; 00149 00153 enum { 00154 Notification=1, 00155 Warning=2, 00156 Error=4, 00157 Catastrophe=8 00158 }; 00159 00163 enum StandardEvent { 00164 cannotOpenFile, 00165 notification, 00166 warning, 00167 fatalError, 00168 catastrophe 00169 }; 00170 00178 KDECORE_EXPORT bool startDaemon(); 00179 00180 //#ifndef KDE_NO_COMPAT 00188 KDECORE_EXPORT int event(const QString &message, const QString &text=QString::null) KDE_DEPRECATED; 00189 00197 KDECORE_EXPORT int event( StandardEvent event, const QString& text=QString::null ) KDE_DEPRECATED; 00198 00209 KDECORE_EXPORT int userEvent(const QString &text=QString::null, int present=Default, int level=Default, 00210 const QString &sound=QString::null, const QString &file=QString::null) KDE_DEPRECATED; 00211 00212 //#endif 00213 00229 // KDE4: use WId instead of int 00230 KDECORE_EXPORT int event( int winId, const QString& message, 00231 const QString& text = QString::null ); 00232 00244 // KDE4: use WId instead of int 00245 KDECORE_EXPORT int event( int winId, StandardEvent event, 00246 const QString& text = QString::null ); 00247 00262 // KDE4: use WId instead of int 00263 KDECORE_EXPORT int userEvent(int winId, const QString &text=QString::null, int present=Default, int level=Default, 00264 const QString &sound=QString::null, const QString &file=QString::null); 00265 00274 KDECORE_EXPORT void beep(const QString& reason=QString::null); 00275 00285 KDECORE_EXPORT int getPresentation(const QString &eventname); 00286 00295 KDECORE_EXPORT QString getFile(const QString &eventname, int present); 00296 00305 KDECORE_EXPORT int getDefaultPresentation(const QString &eventname); 00306 00316 KDECORE_EXPORT QString getDefaultFile(const QString &eventname, int present); 00317 00322 KDECORE_EXPORT KInstance * instance(); 00323 } 00324 00325 #endif
KDE Logo
This file is part of the documentation for kdecore Library Version 3.4.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Apr 12 22:47:37 2005 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003