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 "kdemacros.h" 00022 00023 class KInstance; 00024 #undef None // X11 headers... 00025 00077 namespace KNotifyClient 00078 { 00079 struct InstancePrivate; 00080 class InstanceStack; 00081 00094 class Instance 00095 { 00096 public: 00102 Instance(KInstance *instance); 00107 ~Instance(); 00113 bool useSystemBell() const; 00118 static KInstance *current(); 00119 00124 static Instance *currentInstance(); 00125 00126 private: 00127 static InstanceStack *instances(); 00128 InstancePrivate *d; 00129 static InstanceStack *s_instances; 00130 }; 00131 00132 00136 enum { 00137 Default = -1, 00138 None = 0, 00139 Sound = 1, 00140 Messagebox = 2, 00141 Logfile = 4, 00142 Stderr = 8, 00143 PassivePopup = 16, 00144 Execute = 32, 00145 Taskbar = 64 00146 }; 00147 00151 enum { 00152 Notification=1, 00153 Warning=2, 00154 Error=4, 00155 Catastrophe=8 00156 }; 00157 00161 enum StandardEvent { 00162 cannotOpenFile, 00163 notification, 00164 warning, 00165 fatalError, 00166 catastrophe 00167 }; 00168 00176 bool startDaemon(); 00177 00178 //#ifndef KDE_NO_COMPAT 00186 int event(const QString &message, const QString &text=QString::null) KDE_DEPRECATED; 00187 00195 int event( StandardEvent event, const QString& text=QString::null ) KDE_DEPRECATED; 00196 00207 int userEvent(const QString &text=QString::null, int present=Default, int level=Default, 00208 const QString &sound=QString::null, const QString &file=QString::null) KDE_DEPRECATED; 00209 00210 //#endif 00211 00227 int event( int winId, const QString& message, 00228 const QString& text = QString::null ); 00229 00241 int event( int winId, StandardEvent event, 00242 const QString& text = QString::null ); 00243 00258 int userEvent(int winId, const QString &text=QString::null, int present=Default, int level=Default, 00259 const QString &sound=QString::null, const QString &file=QString::null); 00260 00269 void beep(const QString& reason=QString::null); 00270 00280 int getPresentation(const QString &eventname); 00281 00290 QString getFile(const QString &eventname, int present); 00291 00300 int getDefaultPresentation(const QString &eventname); 00301 00311 QString getDefaultFile(const QString &eventname, int present); 00312 00317 KInstance * instance(); 00318 } 00319 00320 #endif
KDE Logo
This file is part of the documentation for kdecore Library Version 3.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Sep 29 09:43:10 2004 by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2003