KDEUI
kstartupinfo.cpp
Go to the documentation of this file.
104 silent( KStartupInfoData::Unknown ), timestamp( ~0U ), screen( -1 ), xinerama( -1 ), launched_by( 0 ) {}
190 QObject::connect( KWindowSystem::self(), SIGNAL(windowAdded(WId)), q, SLOT(slot_window_added(WId)));
194 //QObject::connect( KWindowSystem::self(), SIGNAL(systemTrayWindowAdded(WId)), q, SLOT(slot_window_added(WId)));
479 QString KStartupInfo::Private::check_required_startup_fields( const QString& msg, const KStartupInfoData& data_P,
591 kapp->clearStartupId(); // reset the id, no longer valid (must use clearStartupId() to avoid infinite loop)
694 KStartupInfo::startup_t KStartupInfo::Private::check_startup_internal( WId w_P, KStartupInfoId* id_O,
802 bool KStartupInfo::Private::find_wclass( const QByteArray &_res_name, const QByteArray &_res_class,
1029 kDebug( 172 ) << "creating: " << id << ":" << (qApp ? qAppName() : QString("unnamed app") /* e.g. kdeinit */);
1199 .arg( desktop == NET::OnAllDesktops ? NET::OnAllDesktops : desktop - 1 ); // spec counts from 0
static void setOnDesktop(WId win, int desktop)
Moves window win to desktop desktop.
Definition: kwindowsystem_mac.cpp:406
void gotNewStartup(const KStartupInfoId &id, const KStartupInfoData &data)
Emitted when a new startup notification is created (i.e.
static QByteArray windowStartupId(WId w)
Returns startup notification identification of the given window.
Definition: kstartupinfo.cpp:852
int timeout
void setApplicationId(const QString &desktop)
Sets the .desktop file that was used to initiate the startup notification.
Definition: kstartupinfo.cpp:1517
QList< pid_t > pids() const
Returns all PIDs for the startup notification.
Definition: kstartupinfo.cpp:1457
const QString & findDescription() const
Returns the description of the startup notification.
Definition: kstartupinfo.cpp:1376
bool setupStartupEnv() const
Sets the startup notification environment variable to this identification.
Definition: kstartupinfo.cpp:1080
int screen() const
The X11 screen on which the startup notification is happening, -1 if unknown.
Definition: kstartupinfo.cpp:1492
static KApplication * kApplication()
Returns the current application object.
Definition: kapplication.cpp:603
void setScreen(int screen)
Sets the X11 screen on which the startup notification should happen.
Definition: kstartupinfo.cpp:1487
const QString & findName() const
Returns the name of the startup notification.
Definition: kstartupinfo.cpp:1359
KStartupInfoData & operator=(const KStartupInfoData &data)
Definition: kstartupinfo.cpp:1288
const QString & bin() const
Returns the binary name of the starting application.
Definition: kstartupinfo.cpp:1344
QByteArray hostname() const
Returns the hostname for the startup notification.
Definition: kstartupinfo.cpp:1441
const QString & icon() const
Returns the icon of the startup notification, or empty if not available.
Definition: kstartupinfo.cpp:1395
static KStartupInfoId currentStartupIdEnv()
Returns the current startup notification identification for the current startup notification environm...
Definition: kstartupinfo.cpp:1090
static void appStarted()
Manual notification that the application has started.
Definition: kstartupinfo.cpp:586
static bool sendStartupX(Display *dpy, const KStartupInfoId &id, const KStartupInfoData &data)
Like sendStartup , uses dpy instead of qt_x11display() for sending the info.
Definition: kstartupinfo.cpp:461
Class for manipulating the application startup notification.
Definition: kstartupinfo.h:64
void setWMClass(const QByteArray &wmclass)
Sets a WM_CLASS value for the startup notification, it may be used for increasing the chance that the...
Definition: kstartupinfo.cpp:1410
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
const QString & name() const
Returns the name of the startup notification, or empty if not available.
Definition: kstartupinfo.cpp:1354
static bool sendChangeX(Display *dpy, const KStartupInfoId &id, const KStartupInfoData &data)
Like sendChange , uses dpy instead of qt_x11display() for sending the info.
Definition: kstartupinfo.cpp:510
static void silenceStartup(bool silence)
If your application shows temporarily some window during its startup, for example a dialog,...
Definition: kstartupinfo.cpp:626
void gotRemoveStartup(const KStartupInfoId &id, const KStartupInfoData &data)
Emitted when a startup notification is removed (either because it was detected that the application i...
bool operator<(const KStartupInfoId &id) const
Definition: kstartupinfo.cpp:1138
static void handleAutoAppStartedSending()
Definition: kstartupinfo.cpp:637
Class representing data about an application startup notification.
Definition: kstartupinfo.h:439
int desktop() const
Returns the desktop for the startup notification.
Definition: kstartupinfo.cpp:1405
KStartupInfoId & operator=(const KStartupInfoId &data)
Definition: kstartupinfo.cpp:1119
void addPid(pid_t pid)
Adds a PID to the list of processes that belong to the startup notification.
Definition: kstartupinfo.cpp:1446
static bool broadcastMessageX(Display *disp, const char *msg_type, const QString &message, int screen, bool obsolete)
Broadcasts the given message with the given message type.
Definition: kxmessages.cpp:125
void setLaunchedBy(WId window)
Sets the toplevel window of the application that caused this startup notification.
Definition: kstartupinfo.cpp:1507
static void forceActiveWindow(WId win, long time=0)
Sets window win to be the active window.
Definition: kwindowsystem_mac.cpp:366
QString applicationId() const
The .desktop file used to initiate this startup notification, or empty.
Definition: kstartupinfo.cpp:1533
static bool sendFinish(const KStartupInfoId &id)
Ends startup notification with the given identification.
Definition: kstartupinfo.cpp:527
void setDesktop(int desktop)
Sets the desktop for the startup notification ( i.e.
Definition: kstartupinfo.cpp:1400
void broadcastMessage(const char *msg_type, const QString &message, int screen, bool obsolete)
Broadcasts the given message with the given message type.
Definition: kxmessages.cpp:96
QByteArray WMClass() const
Returns the WM_CLASS value for the startup notification, or empty if not available.
Definition: kstartupinfo.cpp:1422
unsigned long timestamp() const
Return the user timestamp for the startup notification, or 0 if no timestamp is set.
Definition: kstartupinfo.cpp:1149
static QByteArray createNewStartupId()
Creates and returns new startup id.
Definition: kstartupinfo.cpp:1012
static bool sendChange(const KStartupInfoId &id, const KStartupInfoData &data)
Sends given notification data about started application with the given startup identification.
Definition: kstartupinfo.cpp:496
static void disableAutoAppStartedSending(bool disable=true)
By default, the startup notification is ended for the application after it shows its first toplevel w...
Definition: kstartupinfo.cpp:621
static void setWindowStartupId(WId window, const QByteArray &id)
Sets the startup notification window property on the given window.
Definition: kstartupinfo.cpp:874
static void setNewStartupId(QWidget *window, const QByteArray &startup_id)
Use this function if the application got a request with startup notification from outside (for exampl...
Definition: kstartupinfo.cpp:643
void update(const KStartupInfoData &data)
Updates the notification data from the given data.
Definition: kstartupinfo.cpp:1296
bool is_pid(pid_t pid) const
Checks whether the given pid is in the list of PIDs for starup notification.
Definition: kstartupinfo.cpp:1462
static QString locate(const char *type, const QString &filename, const KComponentData &cData=KGlobal::mainComponent())
static bool sendStartup(const KStartupInfoId &id, const KStartupInfoData &data)
Sends given notification data about started application with the given startup identification.
Definition: kstartupinfo.cpp:445
const QByteArray findWMClass() const
Returns the WM_CLASS value for the startup notification, or binary name if not available.
Definition: kstartupinfo.cpp:1415
KStartupInfo(int flags, QObject *parent=0)
Creates an instance that will receive the startup notifications.
Definition: kstartupinfo.cpp:203
Class representing an identification of application startup notification.
Definition: kstartupinfo.h:368
static bool sendFinishX(Display *dpy, const KStartupInfoId &id)
Like sendFinish , uses dpy instead of qt_x11display() for sending the info.
Definition: kstartupinfo.cpp:540
void setBin(const QString &bin)
Sets the binary name of the application ( e.g.
Definition: kstartupinfo.cpp:1339
bool operator==(const KStartupInfoId &id) const
Overloaded operator.
Definition: kstartupinfo.cpp:1127
void setXinerama(int xinerama)
Sets the Xinerama screen for the startup notification ( i.e.
Definition: kstartupinfo.cpp:1497
const QString & findIcon() const
Returns the icon of the startup notification, and if it's not available, tries to get it from the bin...
Definition: kstartupinfo.cpp:1388
WId launchedBy() const
The toplevel window of the application that caused this startup notification, 0 if unknown.
Definition: kstartupinfo.cpp:1512
const char * name(StandardAction id)
This will return the internal name of a given standard action.
Definition: kstandardaction.cpp:223
void setTimestamp(unsigned long time)
Definition: kstartupinfo.cpp:1477
bool operator!=(const KStartupInfoId &id) const
Overloaded operator.
Definition: kstartupinfo.cpp:1132
const QString & description() const
Returns the name of the startup notification, or empty if not available.
Definition: kstartupinfo.cpp:1371
startup_t checkStartup(WId w)
Checks if the given windows matches any existing startup notification.
Definition: kstartupinfo.cpp:689
static int currentDesktop()
Returns the current virtual desktop.
Definition: kwindowsystem_mac.cpp:384
TriState silent() const
Return the silence status for the startup notification.
Definition: kstartupinfo.cpp:1472
int xinerama() const
The Xinerama screen for the startup notification, -1 if unknown.
Definition: kstartupinfo.cpp:1502
void setDescription(const QString &descr)
Sets the description for the notification (e.g.
Definition: kstartupinfo.cpp:1366
static void resetStartupEnv()
Unsets the startup notification environment variable.
Definition: kstartupinfo.cpp:1101
void initId(const QByteArray &id="")
Initializes this object with the given identification ( which may be also "0" for no notification ),...
Definition: kstartupinfo.cpp:1058
void setName(const QString &name)
Sets the name for the notification (e.g.
Definition: kstartupinfo.cpp:1349
const QByteArray & id() const
Returns the notification identifier as string.
Definition: kstartupinfo.cpp:1034
void gotStartupChange(const KStartupInfoId &id, const KStartupInfoData &data)
Emitted when a startup notification changes.
static QDebug kFatal(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
void setSilent(TriState state)
Sets whether the visual feedback for this startup notification should be silenced (temporarily suspen...
Definition: kstartupinfo.cpp:1467
Type
None
Window
bool isSupported(NET::Property property) const
Returns true if the given property is supported by the window manager.
Definition: netwm.cpp:2640
static QByteArray read_startup_id_property(WId w_P)
Definition: kstartupinfo.cpp:831
void setIcon(const QString &icon)
Sets the icon for the startup notification ( e.g.
Definition: kstartupinfo.cpp:1383
void setTimeout(unsigned int secs)
Sets the timeout for notifications, after this timeout a notification is removed.
Definition: kstartupinfo.cpp:910
void setHostname(const QByteArray &hostname=QByteArray())
Sets the hostname on which the application is starting.
Definition: kstartupinfo.cpp:1427
Sending string messages to other applications using the X Client Messages.
Definition: kxmessages.h:46
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Thu Jan 30 2020 00:00:00 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Thu Jan 30 2020 00:00:00 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.