• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdecore
 

tdecore

  • tdecore
knotifyclient.h
1/* This file is part of the KDE libraries
2 Copyright (C) 2000 Charles Samuels <charles@kde.org>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License version 2 as published by the Free Software Foundation.
7
8 This library is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
12
13 You should have received a copy of the GNU Library General Public License
14 along with this library; see the file COPYING.LIB. If not, write to
15 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 Boston, MA 02110-1301, USA.
17*/
18#ifndef _KNOTIFY_CLIENT
19#define _KNOTIFY_CLIENT
20#include <tqstring.h>
21#include "tdelibs_export.h"
22
23class TDEInstance;
24#undef None // X11 headers...
25
79namespace KNotifyClient
80{
81 struct InstancePrivate;
82 class InstanceStack;
83
96 class TDECORE_EXPORT Instance
97 {
98 public:
104 Instance(TDEInstance *instance);
109 ~Instance();
115 bool useSystemBell() const;
120 static TDEInstance *current();
121
126 static Instance *currentInstance();
127
128 private:
129 static InstanceStack *instances();
130 InstancePrivate *d;
131 static InstanceStack *s_instances;
132 };
133
134
138 enum {
139 Default = -1,
140 None = 0,
141 Sound = 1,
142 Messagebox = 2,
143 Logfile = 4,
144 Stderr = 8,
145 PassivePopup = 16,
146 Execute = 32,
147 Taskbar = 64
148 };
149
153 enum {
154 Notification=1,
155 Warning=2,
156 Error=4,
157 Catastrophe=8
158 };
159
163 enum StandardEvent {
164 cannotOpenFile,
165 notification,
166 warning,
167 fatalError,
168 catastrophe
169 };
170
178 TDECORE_EXPORT bool startDaemon();
179
180//#ifndef KDE_NO_COMPAT
188 TDECORE_EXPORT int event(const TQString &message, const TQString &text=TQString::null) TDE_DEPRECATED;
189
197 TDECORE_EXPORT int event( StandardEvent event, const TQString& text=TQString::null ) TDE_DEPRECATED;
198
209 TDECORE_EXPORT int userEvent(const TQString &text=TQString::null, int present=Default, int level=Default,
210 const TQString &sound=TQString::null, const TQString &file=TQString::null) TDE_DEPRECATED;
211
212//#endif
213
229 // KDE4: use WId instead of int
230 TDECORE_EXPORT int event( int winId, const TQString& message,
231 const TQString& text = TQString::null );
232
244 // KDE4: use WId instead of int
245 TDECORE_EXPORT int event( int winId, StandardEvent event,
246 const TQString& text = TQString::null );
247
262 // KDE4: use WId instead of int
263 TDECORE_EXPORT int userEvent(int winId, const TQString &text=TQString::null, int present=Default, int level=Default,
264 const TQString &sound=TQString::null, const TQString &file=TQString::null);
265
274 TDECORE_EXPORT void beep(const TQString& reason=TQString::null);
275
285 TDECORE_EXPORT int getPresentation(const TQString &eventname);
286
295 TDECORE_EXPORT TQString getFile(const TQString &eventname, int present);
296
305 TDECORE_EXPORT int getDefaultPresentation(const TQString &eventname);
306
316 TDECORE_EXPORT TQString getDefaultFile(const TQString &eventname, int present);
317
322 TDECORE_EXPORT TDEInstance * instance();
323}
324
325#endif
KNotifyClient::Instance
Makes it possible to use KNotifyClient with a TDEInstance that is not the application.
Definition: knotifyclient.h:97
TDEInstance
Access to KDE global objects for use in shared libraries.
Definition: kinstance.h:48
KNotifyClient
This namespace provides a method for issuing events to a KNotifyServer call KNotifyClient::event("eve...
Definition: knotifyclient.h:80
KNotifyClient::getDefaultFile
TQString getDefaultFile(const TQString &eventname, int present)
Gets the default File for the event of this program.
Definition: knotifyclient.cpp:220
KNotifyClient::event
int event(const TQString &message, const TQString &text=TQString::null) TDE_DEPRECATED
Definition: knotifyclient.cpp:125
KNotifyClient::getDefaultPresentation
int getDefaultPresentation(const TQString &eventname)
Gets the default presentation for the event of this program.
Definition: knotifyclient.cpp:207
KNotifyClient::startDaemon
bool startDaemon()
This starts the KNotify Daemon, if it's not already started.
Definition: knotifyclient.cpp:238
KNotifyClient::Execute
@ Execute
Definition: knotifyclient.h:146
KNotifyClient::Taskbar
@ Taskbar
Definition: knotifyclient.h:147
KNotifyClient::PassivePopup
@ PassivePopup
Definition: knotifyclient.h:145
KNotifyClient::instance
TDEInstance * instance()
Shortcut to KNotifyClient::Instance::current() :)
Definition: knotifyclient.cpp:280
KNotifyClient::beep
void beep(const TQString &reason=TQString::null)
This is a simple substitution for TQApplication::beep().
Definition: knotifyclient.cpp:252
KNotifyClient::getPresentation
int getPresentation(const TQString &eventname)
Gets the presentation associated with a certain event name Remeber that they may be ORed:
Definition: knotifyclient.cpp:176
KNotifyClient::getFile
TQString getFile(const TQString &eventname, int present)
Gets the default file associated with a certain event name The control panel module will list all the...
Definition: knotifyclient.cpp:189
KNotifyClient::userEvent
int userEvent(const TQString &text=TQString::null, int present=Default, int level=Default, const TQString &sound=TQString::null, const TQString &file=TQString::null) TDE_DEPRECATED
Definition: knotifyclient.cpp:130
KNotifyClient::StandardEvent
StandardEvent
default events you can use
Definition: knotifyclient.h:163

tdecore

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

tdecore

Skip menu "tdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.9.4
This website is maintained by Timothy Pearson.