class KStartupInfo

# class KStartupInfo | Class for manipulating the application startup notification. More...
Definition | `#include <kstartupinfo.h>`
Inherits | QObject (qt) [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Types

- enum { CleanOnCantDetect = 1 << 0, DisableKWinModule = 1 << 1, AnnounceSilenceChanges = 1 << 2 }
- enum startup_t { NoMatch, Match, CantDetect }

#### Public Methods

- KStartupInfo ( int flags, QObject* parent = NULL, const char* name = NULL )
- KStartupInfo ( bool clean_on_cantdetect, QObject* parent = 0, const char* name = 0 )
- virtual ~KStartupInfo ()
- startup_t checkStartup ( WId w )
- startup_t checkStartup ( WId w, KStartupInfoId& id )
- startup_t checkStartup ( WId w, KStartupInfoData& data )
- startup_t checkStartup ( WId w, KStartupInfoId& id, KStartupInfoData& data )
- void setTimeout ( unsigned int secs )

#### Signals

- void gotNewStartup ( const KStartupInfoId& id, const KStartupInfoData& data )
- void gotStartupChange ( const KStartupInfoId& id, const KStartupInfoData& data )
- void gotRemoveStartup ( const KStartupInfoId& id, const KStartupInfoData& data )

#### Public Static Methods

- static bool sendStartup ( const KStartupInfoId& id, const KStartupInfoData& data )
- static bool sendStartupX ( Display* dpy, const KStartupInfoId& id, const KStartupInfoData& data )
- static bool sendChange ( const KStartupInfoId& id, const KStartupInfoData& data )
- static bool sendChangeX ( Display* dpy, const KStartupInfoId& id, const KStartupInfoData& data )
- static bool sendFinish ( const KStartupInfoId& id )
- static bool sendFinishX ( Display* dpy, const KStartupInfoId& id )
- static bool sendFinish ( const KStartupInfoId& id, const KStartupInfoData& data )
- static bool sendFinishX ( Display* dpy, const KStartupInfoId& id, const KStartupInfoData& data )
- static KStartupInfoId currentStartupIdEnv ()
- static void resetStartupEnv ()
- static void appStarted ()
- static void setWindowStartupId ( WId window, const QCString& id )
- static QCString windowStartupId ( WId w )

#### Public Members

- Forward Data

#### Protected Methods

- virtual void customEvent ( QCustomEvent* e_P )

## Detailed Description

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.

You usually don't need to use this class for sending the notification information, as KDE libraries should do this when an application is started ( e.g. KRun class ).

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.

See also: KStartupInfoId, KStartupInfoData

enum { CleanOnCantDetect = 1 << 0, DisableKWinModule = 1 << 1, AnnounceSilenceChanges = 1 << 2 } | ###

KStartupInfo ( int flags, QObject* parent = NULL, const char* name = NULL ) | ### KStartupInfo

Creates an instance that will receive the startup notifications. The various flags passed may be

- CleanOnCantDetect - when a new unknown window appears, all startup notifications for applications that are not compliant with the startup protocol are removed
- DisableKWinModule - KWinModule, which is normally used to detect new windows, is disabled. With this flag, checkStartup() must be called in order to check newly mapped windows
- 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 gotStartupChange().

Parameters:

flags | OR-ed combination of flags
parent | the parent of this QObject (can be 0 for no parent)
name | the name of the QObject (can be 0 for no name)

KStartupInfo ( bool clean_on_cantdetect, QObject* parent = 0, const char* name = 0 ) | ### KStartupInfo

Creates an instance that will receive the startup notifications.

@obsolete

Parameters:

clean_on_cantdetect | if true, and a new unknown window appears, removes all notification for applications that are not compliant with the app startup protocol
parent | the parent of this QObject (can be 0 for no parent)
name | the name of the QObject (can be 0 for no name)

~KStartupInfo () | ### ~KStartupInfo

[virtual]

bool sendStartup ( const KStartupInfoId& id, const KStartupInfoData& data ) | ### sendStartup

[static]

Sends given notification data about started application with the given startup identification. If no notification for this identification exists yet, it is created, otherwise it's updated.

Parameters:

id | the id of the application
data | the application's data

Returns: true if successful, false otherwise

See also: KStartupInfoId, KStartupInfoData

bool sendStartupX ( Display* dpy, const KStartupInfoId& id, const KStartupInfoData& data ) | ### sendStartupX

[static]

Like sendStartup , uses dpy instead of qt_x11display() for sending the info.

Parameters:

dpy | the display of the application.
id | the id of the application
data | the application's data

Returns: true if successful, false otherwise

bool sendChange ( const KStartupInfoId& id, const KStartupInfoData& data ) | ### sendChange

[static]

Sends given notification data about started application with the given startup identification. This is used for updating the notification info, if no notification for this identification exists, it's ignored.

Parameters:

id | the id of the application
data | the application's data

Returns: true if successful, false otherwise

See also: KStartupInfoId, KStartupInfoData

bool sendChangeX ( Display* dpy, const KStartupInfoId& id, const KStartupInfoData& data ) | ### sendChangeX

[static]

Like sendChange , uses dpy instead of qt_x11display() for sending the info.

Parameters:

dpy | the display of the application.
id | the id of the application
data | the application's data

Returns: true if successful, false otherwise

bool sendFinish ( const KStartupInfoId& id ) | ### sendFinish

[static]

Ends startup notification with the given identification.

Parameters:

id | the id of the application

Returns: true if successful, false otherwise

bool sendFinishX ( Display* dpy, const KStartupInfoId& id ) | ### sendFinishX

[static]

Like sendFinish , uses dpy instead of qt_x11display() for sending the info.

Parameters:

dpy | the display of the application.
id | the id of the application

Returns: true if successful, false otherwise

bool sendFinish ( const KStartupInfoId& id, const KStartupInfoData& data ) | ### sendFinish

[static]

Ends startup notification with the given identification and the given data ( e.g. PIDs of processes for this startup notification that exited ).

Parameters:

id | the id of the application
data | the application's data

Returns: true if successful, false otherwise

bool sendFinishX ( Display* dpy, const KStartupInfoId& id, const KStartupInfoData& data ) | ### sendFinishX

[static]

Like sendFinish , uses dpy instead of qt_x11display() for sending the info.

Parameters:

dpy | the display of the application.
id | the id of the application
data | the application's data

Returns: true if successful, false otherwise

KStartupInfoId currentStartupIdEnv () | ### currentStartupIdEnv

[static]

Returns the current startup notification identification for the current startup notification environment variable. Note that KApplication constructor unsets the variable and you have to use KApplication::startupId .

Returns: the current startup notification identification

void resetStartupEnv () | ### resetStartupEnv

[static]

Unsets the startup notification environment variable.

void appStarted () | ### appStarted

[static]

Manual notification that the application has started. 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.

enum startup_t { NoMatch, Match, CantDetect } | ### startup_t

- NoMatch - the window doesn't match any existing startup notification
- Match - the window matches an existing startup notification
- CantDetect - unable to detect if the window matches any existing startup notification

startup_t checkStartup ( WId w ) | ### checkStartup

Checks if the given windows matches any existing startup notification. If yes, the startup notification is removed. Prevents emitting gotRemoveStartup() for the window if the window matches.

Parameters:

w | the window id to check

Returns: the result of the operation

startup_t checkStartup ( WId w, KStartupInfoId& id ) | ### checkStartup

Checks if the given windows matches any existing startup notification, and if yes, returns the identification in id, and removes the startup notification. Prevents emitting gotRemoveStartup() for the window if the window matches.

Parameters:

w | the window id to check
id | if found, the id of the startup notification will be written here

Returns: the result of the operation

startup_t checkStartup ( WId w, KStartupInfoData& data ) | ### checkStartup

Checks if the given windows matches any existing startup notification, and if yes, returns the notification data in data, and removes the startup notification. Prevents emitting gotRemoveStartup() for the window if the window matches.

Parameters:

w | the window id to check
data | if found, the data of the startup notification will be written here

Returns: the result of the operation

startup_t checkStartup ( WId w, KStartupInfoId& id, KStartupInfoData& data ) | ### checkStartup

Checks if the given windows matches any existing startup notification, and if yes, returns the identification in id and notification data in data, and removes the startup notification. Prevents emitting gotRemoveStartup() for the window if the window matches.

Parameters:

w | the window id to check
id | if found, the id of the startup notification will be written here
data | if found, the data of the startup notification will be written here

Returns: the result of the operation

void setTimeout ( unsigned int secs ) | ### setTimeout

Sets the timeout for notifications, after this timeout a notification is removed.

Parameters:

secs | the new timeout in seconds

void setWindowStartupId ( WId window, const QCString& id ) | ### setWindowStartupId

[static]

Sets the startup notification window property on the given window.

Parameters:

windows | the id of the window
id | the startup notification id

QCString windowStartupId ( WId w ) | ### windowStartupId

[static]

Returns startup notification identification of the given window.

Parameters:

windows | the id of the window

Returns: the startup notification id. Can be null if not found.

void gotNewStartup ( const KStartupInfoId& id, const KStartupInfoData& data ) | ### gotNewStartup

[signal]

Emitted when a new startup notification is created ( i.e. a new application is being started ).

Parameters:

id | the notification identification
data | the notification data

void gotStartupChange ( const KStartupInfoId& id, const KStartupInfoData& data ) | ### gotStartupChange

[signal]

Emitted when a startup notification changes.

Parameters:

id | the notification identification
data | the notification data

void gotRemoveStartup ( const KStartupInfoId& id, const KStartupInfoData& data ) | ### gotRemoveStartup

[signal]

Emitted when a startup notification is removed ( either because it was detected that the application is ready or because of a timeout ).

Parameters:

id | the notification identification
data | the notification data

void customEvent ( QCustomEvent* e_P ) | ### customEvent

[protected virtual]

Reimplemented from QObject.

- Version: $Id: kstartupinfo.h,v 1.15.2.4 2003/02/25 08:05:13 lunakl Exp $
- Author: Lubos Lunak
- Generated: root on macppc.ports.openbsd.org on Sat Sep 6 10:36:15 2003, using kdoc 2.0a54.