KDECore
knotifyclient.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
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
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
00213
00229
00230 KDECORE_EXPORT int event( int winId, const QString& message,
00231 const QString& text = QString::null );
00232
00244
00245 KDECORE_EXPORT int event( int winId, StandardEvent event,
00246 const QString& text = QString::null );
00247
00262
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