.TH "KStartupInfo" kde3 "11 Jun 2005" "Version Version 3.4.1" "kdecore Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KStartupInfo \- Class for manipulating the application startup notification.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kstartupinfo.h>\fP
.PP
Inherits \fBQObject\fP.
.PP
.SS "Public Types"

.in +1c
.ti -1c
.RI "enum { \fBCleanOnCantDetect\fP =  1 << 0, \fBDisableKWinModule\fP =  1 << 1, \fBAnnounceSilenceChanges\fP =  1 << 2 }"
.br
.ti -1c
.RI "enum \fBstartup_t\fP { \fBNoMatch\fP, \fBMatch\fP, \fBCantDetect\fP }"
.br
.in -1c
.SS "Signals"

.in +1c
.ti -1c
.RI "void \fBgotNewStartup\fP (const \fBKStartupInfoId\fP &id, const \fBKStartupInfoData\fP &data)"
.br
.ti -1c
.RI "void \fBgotStartupChange\fP (const \fBKStartupInfoId\fP &id, const \fBKStartupInfoData\fP &data)"
.br
.ti -1c
.RI "void \fBgotRemoveStartup\fP (const \fBKStartupInfoId\fP &id, const \fBKStartupInfoData\fP &data)"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKStartupInfo\fP (int flags, \fBQObject\fP *\fBparent\fP=NULL, const char *\fBname\fP=NULL)"
.br
.ti -1c
.RI "\fBKStartupInfo\fP (bool clean_on_cantdetect, \fBQObject\fP *\fBparent\fP=0, const char *\fBname\fP=0)"
.br
.ti -1c
.RI "\fBstartup_t\fP \fBcheckStartup\fP (WId w)"
.br
.ti -1c
.RI "\fBstartup_t\fP \fBcheckStartup\fP (WId w, \fBKStartupInfoId\fP &id)"
.br
.ti -1c
.RI "\fBstartup_t\fP \fBcheckStartup\fP (WId w, \fBKStartupInfoData\fP &data)"
.br
.ti -1c
.RI "\fBstartup_t\fP \fBcheckStartup\fP (WId w, \fBKStartupInfoId\fP &id, \fBKStartupInfoData\fP &data)"
.br
.ti -1c
.RI "void \fBsetTimeout\fP (unsigned int secs)"
.br
.in -1c
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "static void \fBdisableAutoAppStartedSending\fP (bool disable=true)"
.br
.ti -1c
.RI "static void \fBappStarted\fP ()"
.br
.ti -1c
.RI "static void \fBappStarted\fP (const \fBQCString\fP &startup_id)"
.br
.ti -1c
.RI "static void \fBsetNewStartupId\fP (\fBQWidget\fP *window, const \fBQCString\fP &startup_id)"
.br
.ti -1c
.RI "static void \fBsilenceStartup\fP (bool silence)"
.br
.ti -1c
.RI "static \fBQCString\fP \fBcreateNewStartupId\fP ()"
.br
.ti -1c
.RI "static bool \fBsendStartup\fP (const \fBKStartupInfoId\fP &id, const \fBKStartupInfoData\fP &data)"
.br
.ti -1c
.RI "static bool \fBsendStartupX\fP (Display *dpy, const \fBKStartupInfoId\fP &id, const \fBKStartupInfoData\fP &data)"
.br
.ti -1c
.RI "static bool \fBsendChange\fP (const \fBKStartupInfoId\fP &id, const \fBKStartupInfoData\fP &data)"
.br
.ti -1c
.RI "static bool \fBsendChangeX\fP (Display *dpy, const \fBKStartupInfoId\fP &id, const \fBKStartupInfoData\fP &data)"
.br
.ti -1c
.RI "static bool \fBsendFinish\fP (const \fBKStartupInfoId\fP &id)"
.br
.ti -1c
.RI "static bool \fBsendFinishX\fP (Display *dpy, const \fBKStartupInfoId\fP &id)"
.br
.ti -1c
.RI "static bool \fBsendFinish\fP (const \fBKStartupInfoId\fP &id, const \fBKStartupInfoData\fP &data)"
.br
.ti -1c
.RI "static bool \fBsendFinishX\fP (Display *dpy, const \fBKStartupInfoId\fP &id, const \fBKStartupInfoData\fP &data)"
.br
.ti -1c
.RI "static \fBKStartupInfoId\fP \fBcurrentStartupIdEnv\fP ()"
.br
.ti -1c
.RI "static void \fBresetStartupEnv\fP ()"
.br
.ti -1c
.RI "static void \fBsetWindowStartupId\fP (WId window, const \fBQCString\fP &id)"
.br
.ti -1c
.RI "static \fBQCString\fP \fBwindowStartupId\fP (WId w)"
.br
.ti -1c
.RI "static void \fBhandleAutoAppStartedSending\fP ()"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual void \fBcustomEvent\fP (\fBQCustomEvent\fP *e_P)"
.br
.in -1c
.SS "Friends"

.in +1c
.ti -1c
.RI "class \fBKStartupInfoPrivate\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
Class for manipulating the application startup notification. 

This class can be used to send information about started application, change the information and receive this information. For detailed description, see kdelibs/kdecore/README.kstartupinfo.
.PP
You usually don't need to use this class for sending the notification information, as \fBKDE\fP libraries should do this when an application is started (e.g. \fBKRun\fP class).
.PP
For receiving the startup notification info, create an instance and connect to its slots. It will automatically detect started applications and when they are ready.
.PP
\fBSee also:\fP
.RS 4
\fBKStartupInfoId\fP 
.PP
\fBKStartupInfoData\fP
.RE
.PP
\fBAuthor:\fP
.RS 4
Lubos Lunak <l.lunak@kde.org> 
.RE
.PP

.PP
Definition at line 63 of file kstartupinfo.h.
.SH "Member Enumeration Documentation"
.PP 
.SS "enum \fBKStartupInfo::startup_t\fP"
.PP
.PD 0
.IP "\(bu" 2
NoMatch - the window doesn't match any existing startup notification 
.IP "\(bu" 2
Match - the window matches an existing startup notification 
.IP "\(bu" 2
CantDetect - unable to detect if the window matches any existing startup notification 
.PP

.PP
Definition at line 261 of file kstartupinfo.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KStartupInfo::KStartupInfo (int flags, \fBQObject\fP * parent = \fCNULL\fP, const char * name = \fCNULL\fP)"
.PP
Creates an instance that will receive the startup notifications. 
.PP
The various flags passed may be 
.PD 0

.IP "\(bu" 2
CleanOnCantDetect - when a new unknown window appears, all startup notifications for applications that are not compliant with the startup protocol are removed 
.IP "\(bu" 2
DisableKWinModule - KWinModule, which is normally used to detect new windows, is disabled. With this flag, \fBcheckStartup()\fP must be called in order to check newly mapped windows. 
.IP "\(bu" 2
AnnounceSilenceChanges - normally, startup notifications are 'removed' when they're silenced, and 'recreated' when they're resumed. With this flag, the change is normally announced with \fBgotStartupChange()\fP.
.PP
\fBParameters:\fP
.RS 4
\fIflags\fP OR-ed combination of flags 
.br
\fIparent\fP the parent of this \fBQObject\fP (can be 0 for no parent) 
.br
\fIname\fP the name of the \fBQObject\fP (can be 0 for no name)
.RE
.PP

.PP
Definition at line 114 of file kstartupinfo.cpp.
.SS "KStartupInfo::KStartupInfo (bool clean_on_cantdetect, \fBQObject\fP * parent = \fC0\fP, const char * name = \fC0\fP)"
.PP
Creates an instance that will receive the startup notifications. 
.PP
\fBParameters:\fP
.RS 4
\fIclean_on_cantdetect\fP if true, and a new unknown window appears, removes all notification for applications that are not compliant with the app startup protocol 
.br
\fIparent\fP the parent of this \fBQObject\fP (can be 0 for no parent) 
.br
\fIname\fP the name of the \fBQObject\fP (can be 0 for no name)
.RE
.PP
.PP
\fBDeprecated\fP
.RS 4
.RE
.PP

.PP
Definition at line 121 of file kstartupinfo.cpp.
.SH "Member Function Documentation"
.PP 
.SS "void KStartupInfo::disableAutoAppStartedSending (bool disable = \fCtrue\fP)\fC [static]\fP"
.PP
By default, the startup notification is ended for the application after it shows its first toplevel window. 
.PP
If you app e.g. has several toplevel windows after its startup, you can disable the automatic handling, and call \fBappStarted()\fP manually after all toplevel windows have been shown. 
.PP
\fBSince:\fP
.RS 4
3.2 
.RE
.PP

.PP
Definition at line 523 of file kstartupinfo.cpp.
.SS "void KStartupInfo::appStarted ()\fC [static]\fP"
.PP
Manual notification that the application has started. 
.PP
If you do not map a (toplevel) window, then startup notification will not disappear for the application until a timeout. You can use this as an alternative method in this case. 
.PP
Definition at line 494 of file kstartupinfo.cpp.
.PP
References currentStartupIdEnv().
.SS "void KStartupInfo::appStarted (const \fBQCString\fP & startup_id)\fC [static]\fP"
.PP
Sends explicit notification that the startup notification with id startup_id should end. 
.PP
\fBSince:\fP
.RS 4
3.2 
.RE
.PP

.PP
Definition at line 502 of file kstartupinfo.cpp.
.PP
References sendFinish(), and sendFinishX().
.SS "void KStartupInfo::setNewStartupId (\fBQWidget\fP * window, const \fBQCString\fP & startup_id)\fC [static]\fP"
.PP
Use this function if the application got a request with startup notification from outside (for example, when \fBKUniqueApplication::newInstance()\fP is called, or e.g. 
.PP
when khelpcenter opens new URL in its window). The window can be either an already existing and visible window, or a new one, before being shown. Note that this function is usually needed only when a window is reused. 
.PP
\fBSince:\fP
.RS 4
3.2 
.RE
.PP

.PP
Definition at line 545 of file kstartupinfo.cpp.
.PP
References NETRootInfo::isSupported(), and setWindowStartupId().
.PP
Referenced by KUniqueApplication::newInstance().
.SS "void KStartupInfo::silenceStartup (bool silence)\fC [static]\fP"
.PP
If your application shows temporarily some window during its startup, for example a dialog, and only after closing it shows the main window, startup notification would normally be shown while the dialog is visible. 
.PP
To temporarily suspend and resume the notification, use this function. Note that this is cumulative, i.e. after suspending twice, you have to resume twice. 
.PP
\fBSince:\fP
.RS 4
3.2 
.RE
.PP

.PP
Definition at line 528 of file kstartupinfo.cpp.
.PP
References sendChange(), and KStartupInfoData::setSilent().
.SS "\fBQCString\fP KStartupInfo::createNewStartupId ()\fC [static]\fP"
.PP
Creates and returns new startup id. 
.PP
The id includes properly setup user timestamp. 
.PP
\fBSince:\fP
.RS 4
3.3 
.RE
.PP

.PP
Definition at line 923 of file kstartupinfo.cpp.
.PP
References endl().
.PP
Referenced by KStartupInfoId::initId().
.SS "bool KStartupInfo::sendStartup (const \fBKStartupInfoId\fP & id, const \fBKStartupInfoData\fP & data)\fC [static]\fP"
.PP
Sends given notification data about started application with the given startup identification. 
.PP
If no notification for this identification exists yet, it is created, otherwise it's updated. Note that the name field in data is required.
.PP
\fBParameters:\fP
.RS 4
\fIid\fP the id of the application 
.br
\fIdata\fP the application's data 
.RE
.PP
\fBReturns:\fP
.RS 4
true if successful, false otherwise 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBKStartupInfoId\fP 
.PP
\fBKStartupInfoData\fP
.RE
.PP

.PP
Definition at line 378 of file kstartupinfo.cpp.
.PP
References KXMessages::broadcastMessage(), endl(), and QString::fromLatin1().
.SS "bool KStartupInfo::sendStartupX (Display * dpy, const \fBKStartupInfoId\fP & id, const \fBKStartupInfoData\fP & data)\fC [static]\fP"
.PP
Like sendStartup , uses dpy instead of qt_x11display() for sending the info. 
.PP
\fBParameters:\fP
.RS 4
\fIdpy\fP the display of the application. Note that the name field in data is required. 
.br
\fIid\fP the id of the application 
.br
\fIdata\fP the application's data 
.RE
.PP
\fBReturns:\fP
.RS 4
true if successful, false otherwise
.RE
.PP

.PP
Definition at line 391 of file kstartupinfo.cpp.
.PP
References KXMessages::broadcastMessageX(), endl(), and QString::fromLatin1().
.SS "bool KStartupInfo::sendChange (const \fBKStartupInfoId\fP & id, const \fBKStartupInfoData\fP & data)\fC [static]\fP"
.PP
Sends given notification data about started application with the given startup identification. 
.PP
This is used for updating the notification info, if no notification for this identification exists, it's ignored. 
.PP
\fBParameters:\fP
.RS 4
\fIid\fP the id of the application 
.br
\fIdata\fP the application's data 
.RE
.PP
\fBReturns:\fP
.RS 4
true if successful, false otherwise 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBKStartupInfoId\fP 
.PP
\fBKStartupInfoData\fP
.RE
.PP

.PP
Definition at line 422 of file kstartupinfo.cpp.
.PP
References QString::arg(), KXMessages::broadcastMessage(), endl(), and QString::fromLatin1().
.PP
Referenced by silenceStartup().
.SS "bool KStartupInfo::sendChangeX (Display * dpy, const \fBKStartupInfoId\fP & id, const \fBKStartupInfoData\fP & data)\fC [static]\fP"
.PP
Like sendChange , uses dpy instead of qt_x11display() for sending the info. 
.PP
\fBParameters:\fP
.RS 4
\fIdpy\fP the display of the application. 
.br
\fIid\fP the id of the application 
.br
\fIdata\fP the application's data 
.RE
.PP
\fBReturns:\fP
.RS 4
true if successful, false otherwise
.RE
.PP

.PP
Definition at line 434 of file kstartupinfo.cpp.
.PP
References KXMessages::broadcastMessageX(), endl(), and QString::fromLatin1().
.PP
Referenced by KUniqueApplication::start().
.SS "bool KStartupInfo::sendFinish (const \fBKStartupInfoId\fP & id)\fC [static]\fP"
.PP
Ends startup notification with the given identification. 
.PP
\fBParameters:\fP
.RS 4
\fIid\fP the id of the application 
.RE
.PP
\fBReturns:\fP
.RS 4
true if successful, false otherwise
.RE
.PP

.PP
Definition at line 447 of file kstartupinfo.cpp.
.PP
References KXMessages::broadcastMessage(), endl(), and QString::fromLatin1().
.PP
Referenced by appStarted().
.SS "bool KStartupInfo::sendFinishX (Display * dpy, const \fBKStartupInfoId\fP & id)\fC [static]\fP"
.PP
Like sendFinish , uses dpy instead of qt_x11display() for sending the info. 
.PP
\fBParameters:\fP
.RS 4
\fIdpy\fP the display of the application. 
.br
\fIid\fP the id of the application 
.RE
.PP
\fBReturns:\fP
.RS 4
true if successful, false otherwise
.RE
.PP

.PP
Definition at line 458 of file kstartupinfo.cpp.
.PP
References KXMessages::broadcastMessageX(), endl(), and QString::fromLatin1().
.PP
Referenced by appStarted(), and KUniqueApplication::start().
.SS "bool KStartupInfo::sendFinish (const \fBKStartupInfoId\fP & id, const \fBKStartupInfoData\fP & data)\fC [static]\fP"
.PP
Ends startup notification with the given identification and the given data ( e.g. 
.PP
PIDs of processes for this startup notification that exited ). 
.PP
\fBParameters:\fP
.RS 4
\fIid\fP the id of the application 
.br
\fIdata\fP the application's data 
.RE
.PP
\fBReturns:\fP
.RS 4
true if successful, false otherwise
.RE
.PP

.PP
Definition at line 469 of file kstartupinfo.cpp.
.PP
References KXMessages::broadcastMessage(), endl(), and QString::fromLatin1().
.SS "bool KStartupInfo::sendFinishX (Display * dpy, const \fBKStartupInfoId\fP & id, const \fBKStartupInfoData\fP & data)\fC [static]\fP"
.PP
Like sendFinish , uses dpy instead of qt_x11display() for sending the info. 
.PP
\fBParameters:\fP
.RS 4
\fIdpy\fP the display of the application. 
.br
\fIid\fP the id of the application 
.br
\fIdata\fP the application's data 
.RE
.PP
\fBReturns:\fP
.RS 4
true if successful, false otherwise
.RE
.PP

.PP
Definition at line 481 of file kstartupinfo.cpp.
.PP
References KXMessages::broadcastMessageX(), endl(), and QString::fromLatin1().
.SS "\fBKStartupInfoId\fP KStartupInfo::currentStartupIdEnv ()\fC [static]\fP"
.PP
Returns the current startup notification identification for the current startup notification environment variable. 
.PP
Note that \fBKApplication\fP constructor unsets the variable and you have to use \fBKApplication::startupId\fP . 
.PP
\fBReturns:\fP
.RS 4
the current startup notification identification
.RE
.PP

.PP
Definition at line 1008 of file kstartupinfo.cpp.
.PP
Referenced by appStarted(), and KUniqueApplication::start().
.SS "void KStartupInfo::resetStartupEnv ()\fC [static]\fP"
.PP
Unsets the startup notification environment variable. 
.PP

.PP
Definition at line 1019 of file kstartupinfo.cpp.
.SS "\fBKStartupInfo::startup_t\fP KStartupInfo::checkStartup (WId w)"
.PP
Checks if the given windows matches any existing startup notification. 
.PP
\fBParameters:\fP
.RS 4
\fIw\fP the window id to check 
.RE
.PP
\fBReturns:\fP
.RS 4
the result of the operation
.RE
.PP

.PP
Definition at line 586 of file kstartupinfo.cpp.
.SS "\fBKStartupInfo::startup_t\fP KStartupInfo::checkStartup (WId w, \fBKStartupInfoId\fP & id)"
.PP
Checks if the given windows matches any existing startup notification, and if yes, returns the identification in id. 
.PP
\fBParameters:\fP
.RS 4
\fIw\fP the window id to check 
.br
\fIid\fP if found, the id of the startup notification will be written here 
.RE
.PP
\fBReturns:\fP
.RS 4
the result of the operation
.RE
.PP

.PP
Definition at line 576 of file kstartupinfo.cpp.
.SS "\fBKStartupInfo::startup_t\fP KStartupInfo::checkStartup (WId w, \fBKStartupInfoData\fP & data)"
.PP
Checks if the given windows matches any existing startup notification, and if yes, returns the notification data in data. 
.PP
\fBParameters:\fP
.RS 4
\fIw\fP the window id to check 
.br
\fIdata\fP if found, the data of the startup notification will be written here 
.RE
.PP
\fBReturns:\fP
.RS 4
the result of the operation
.RE
.PP

.PP
Definition at line 581 of file kstartupinfo.cpp.
.SS "\fBKStartupInfo::startup_t\fP KStartupInfo::checkStartup (WId w, \fBKStartupInfoId\fP & id, \fBKStartupInfoData\fP & data)"
.PP
Checks if the given windows matches any existing startup notification, and if yes, returns the identification in id and notification data in data. 
.PP
\fBParameters:\fP
.RS 4
\fIw\fP the window id to check 
.br
\fIid\fP if found, the id of the startup notification will be written here 
.br
\fIdata\fP if found, the data of the startup notification will be written here 
.RE
.PP
\fBReturns:\fP
.RS 4
the result of the operation
.RE
.PP

.PP
Definition at line 570 of file kstartupinfo.cpp.
.SS "void KStartupInfo::setTimeout (unsigned int secs)"
.PP
Sets the timeout for notifications, after this timeout a notification is removed. 
.PP
\fBParameters:\fP
.RS 4
\fIsecs\fP the new timeout in seconds
.RE
.PP

.PP
Definition at line 815 of file kstartupinfo.cpp.
.PP
References QTimer::singleShot().
.SS "void KStartupInfo::setWindowStartupId (WId window, const \fBQCString\fP & id)\fC [static]\fP"
.PP
Sets the startup notification window property on the given window. 
.PP
\fBParameters:\fP
.RS 4
\fIwindow\fP the id of the window 
.br
\fIid\fP the startup notification id
.RE
.PP

.PP
Definition at line 779 of file kstartupinfo.cpp.
.PP
Referenced by setNewStartupId(), and KApplication::setTopWidget().
.SS "\fBQCString\fP KStartupInfo::windowStartupId (WId w)\fC [static]\fP"
.PP
Returns startup notification identification of the given window. 
.PP
\fBParameters:\fP
.RS 4
\fIw\fP the id of the window 
.RE
.PP
\fBReturns:\fP
.RS 4
the startup notification id. Can be null if not found.
.RE
.PP

.PP
Definition at line 757 of file kstartupinfo.cpp.
.PP
References QCString::isEmpty().
.SS "void KStartupInfo::gotNewStartup (const \fBKStartupInfoId\fP & id, const \fBKStartupInfoData\fP & data)\fC [signal]\fP"
.PP
Emitted when a new startup notification is created (i.e. 
.PP
a new application is being started). 
.PP
\fBParameters:\fP
.RS 4
\fIid\fP the notification identification 
.br
\fIdata\fP the notification data
.RE
.PP

.SS "void KStartupInfo::gotStartupChange (const \fBKStartupInfoId\fP & id, const \fBKStartupInfoData\fP & data)\fC [signal]\fP"
.PP
Emitted when a startup notification changes. 
.PP
\fBParameters:\fP
.RS 4
\fIid\fP the notification identification 
.br
\fIdata\fP the notification data
.RE
.PP

.SS "void KStartupInfo::gotRemoveStartup (const \fBKStartupInfoId\fP & id, const \fBKStartupInfoData\fP & data)\fC [signal]\fP"
.PP
Emitted when a startup notification is removed (either because it was detected that the application is ready or because of a timeout). 
.PP
\fBParameters:\fP
.RS 4
\fIid\fP the notification identification 
.br
\fIdata\fP the notification data
.RE
.PP


.SH "Author"
.PP 
Generated automatically by Doxygen for kdecore Library from the source code.
