home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / kstartupinfo.h < prev    next >
Encoding:
C/C++ Source or Header  |  2007-01-15  |  24.2 KB  |  669 lines

  1. /****************************************************************************
  2.  
  3.  Copyright (C) 2001-2003 Lubos Lunak        <l.lunak@kde.org>
  4.  
  5. Permission is hereby granted, free of charge, to any person obtaining a
  6. copy of this software and associated documentation files (the "Software"),
  7. to deal in the Software without restriction, including without limitation
  8. the rights to use, copy, modify, merge, publish, distribute, sublicense,
  9. and/or sell copies of the Software, and to permit persons to whom the
  10. Software is furnished to do so, subject to the following conditions:
  11.  
  12. The above copyright notice and this permission notice shall be included in
  13. all copies or substantial portions of the Software.
  14.  
  15. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  16. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  17. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
  18. THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  19. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  20. FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  21. DEALINGS IN THE SOFTWARE.
  22.  
  23. ****************************************************************************/
  24.  
  25. #ifndef __KSTARTUPINFO_H
  26. #define __KSTARTUPINFO_H
  27.  
  28. #include <sys/types.h>
  29. #include <qobject.h>
  30.  
  31. #ifdef Q_WS_X11 // FIXME(E): Redo in a less X11-specific way
  32.  
  33. #include <qcstring.h>
  34. #include <qstring.h>
  35. #include <qvaluelist.h>
  36. #include "kdelibs_export.h"
  37.  
  38. class KStartupInfoId;
  39. class KStartupInfoData;
  40.  
  41. class KStartupInfoPrivate;
  42.  
  43. /**
  44.  * Class for manipulating the application startup notification.
  45.  *
  46.  * This class can be used to send information about started application,
  47.  * change the information and receive this information. For detailed
  48.  * description, see kdelibs/kdecore/README.kstartupinfo.
  49.  *
  50.  * You usually don't need to use this class for sending the notification
  51.  * information, as KDE libraries should do this when an application is
  52.  * started (e.g. KRun class).
  53.  *
  54.  * For receiving the startup notification info, create an instance and connect
  55.  * to its slots. It will automatically detect started applications and when
  56.  * they are ready.
  57.  *
  58.  * @see KStartupInfoId
  59.  * @see KStartupInfoData
  60.  *
  61.  * @author Lubos Lunak <l.lunak@kde.org>
  62.  */
  63. class KDECORE_EXPORT KStartupInfo
  64.     : public QObject
  65.     {
  66.     Q_OBJECT
  67.     public:
  68.         /**
  69.          * By default, the startup notification is ended for the application
  70.          * after it shows its first toplevel window. If you app e.g. has
  71.          * several toplevel windows after its startup, you can disable
  72.          * the automatic handling, and call appStarted() manually after
  73.          * all toplevel windows have been shown.
  74.          * @since 3.2
  75.          */
  76.         static void disableAutoAppStartedSending( bool disable = true );
  77.  
  78.         /**
  79.          * Manual notification that the application has started.
  80.          * If you do not map a (toplevel) window, then startup
  81.          * notification will not disappear for the application
  82.          * until a timeout. You can use this as an alternative
  83.          * method in this case.
  84.          */
  85.         static void appStarted();
  86.  
  87.         /**
  88.          * Sends explicit notification that the startup notification
  89.          * with id startup_id should end.
  90.          * @since 3.2
  91.          */ 
  92.         static void appStarted( const QCString& startup_id );
  93.         
  94.         /**
  95.          * Use this function if the application got a request with startup
  96.          * notification from outside (for example, when KUniqueApplication::newInstance()
  97.          * is called, or e.g. when khelpcenter opens new URL in its window).
  98.          * The window can be either an already existing and visible window,
  99.          * or a new one, before being shown. Note that this function is usually
  100.          * needed only when a window is reused.
  101.          * @since 3.2
  102.          */
  103.         static void setNewStartupId( QWidget* window, const QCString& startup_id );
  104.  
  105.         /**
  106.          * If your application shows temporarily some window during its startup,
  107.          * for example a dialog, and only after closing it shows the main window,
  108.          * startup notification would normally be shown while the dialog is visible.
  109.          * To temporarily suspend and resume the notification, use this function.
  110.          * Note that this is cumulative, i.e. after suspending twice, you have to
  111.          * resume twice.
  112.          * @since 3.2
  113.          */
  114.         static void silenceStartup( bool silence );
  115.  
  116.         /**
  117.          * Creates and returns new startup id. The id includes properly setup
  118.          * user timestamp.
  119.          * @since 3.3
  120.          */
  121.         static QCString createNewStartupId();
  122.     /**
  123.      *
  124.      */
  125.     enum {
  126.         CleanOnCantDetect        = 1 << 0,
  127.         DisableKWinModule        = 1 << 1,
  128.         AnnounceSilenceChanges    = 1 << 2
  129.         };
  130.     
  131.     /**
  132.      * Creates an instance that will receive the startup notifications.
  133.      * The various flags passed may be
  134.      * @li CleanOnCantDetect - when a new unknown window appears, all startup
  135.      *     notifications for applications that are not compliant with
  136.      *     the startup protocol are removed
  137.      * @li DisableKWinModule - KWinModule, which is normally used to detect
  138.      *     new windows, is disabled. With this flag, checkStartup() must be
  139.      *     called in order to check newly mapped windows.
  140.      * @li AnnounceSilenceChanges - normally, startup notifications are
  141.      *     "removed" when they're silenced, and "recreated" when they're resumed.
  142.      *     With this flag, the change is normally announced with gotStartupChange().
  143.      *
  144.      * @param flags OR-ed combination of flags
  145.      * @param parent the parent of this QObject (can be 0 for no parent)
  146.      * @param name the name of the QObject (can be 0 for no name)
  147.      *
  148.      */
  149.     KStartupInfo( int flags, QObject* parent = NULL, const char* name = NULL );
  150.     /**
  151.      * Creates an instance that will receive the startup notifications.
  152.      *
  153.      * @param clean_on_cantdetect if true, and a new unknown window appears,
  154.      *  removes all notification for applications that are not compliant
  155.      *  with the app startup protocol
  156.      * @param parent the parent of this QObject (can be 0 for no parent)
  157.      * @param name the name of the QObject (can be 0 for no name)
  158.      *
  159.      * @obsolete
  160.      */
  161.         KStartupInfo( bool clean_on_cantdetect, QObject* parent = 0, const char* name = 0 );
  162.         virtual ~KStartupInfo();
  163.     /**
  164.      * Sends given notification data about started application
  165.      * with the given startup identification. If no notification for this identification
  166.      * exists yet, it is created, otherwise it's updated. Note that the name field
  167.          * in data is required.
  168.      * 
  169.      * @param id the id of the application
  170.      * @param data the application's data
  171.      * @return true if successful, false otherwise
  172.      * @see KStartupInfoId
  173.      * @see KStartupInfoData
  174.      */
  175.         static bool sendStartup( const KStartupInfoId& id, const KStartupInfoData& data );
  176.  
  177.     /**
  178.      * Like sendStartup , uses dpy instead of qt_xdisplay() for sending the info.
  179.      * @param dpy the display of the application. Note that the name field
  180.          * in data is required.
  181.      * @param id the id of the application
  182.      * @param data the application's data
  183.      * @return true if successful, false otherwise
  184.      */
  185.         static bool sendStartupX( Display* dpy, const KStartupInfoId& id,
  186.             const KStartupInfoData& data );
  187.  
  188.     /**
  189.      * Sends given notification data about started application
  190.      * with the given startup identification. This is used for updating the notification
  191.      * info, if no notification for this identification exists, it's ignored.
  192.      * @param id the id of the application
  193.      * @param data the application's data
  194.      * @return true if successful, false otherwise
  195.      * @see KStartupInfoId
  196.      * @see KStartupInfoData
  197.      */
  198.         static bool sendChange( const KStartupInfoId& id, const KStartupInfoData& data );
  199.  
  200.     /**
  201.      * Like sendChange , uses dpy instead of qt_xdisplay() for sending the info.
  202.      * @param dpy the display of the application.
  203.      * @param id the id of the application
  204.      * @param data the application's data
  205.      * @return true if successful, false otherwise
  206.      */
  207.         static bool sendChangeX( Display* dpy, const KStartupInfoId& id,
  208.             const KStartupInfoData& data );
  209.  
  210.     /**
  211.      * Ends startup notification with the given identification.
  212.      * @param id the id of the application
  213.      * @return true if successful, false otherwise
  214.      */
  215.         static bool sendFinish( const KStartupInfoId& id );
  216.  
  217.     /**
  218.      * Like sendFinish , uses dpy instead of qt_xdisplay() for sending the info.
  219.      * @param dpy the display of the application.
  220.      * @param id the id of the application
  221.      * @return true if successful, false otherwise
  222.      */
  223.         static bool sendFinishX( Display* dpy, const KStartupInfoId& id );
  224.  
  225.     /**
  226.      * Ends startup notification with the given identification and the given data ( e.g.
  227.      * PIDs of processes for this startup notification that exited ).
  228.      * @param id the id of the application
  229.      * @param data the application's data
  230.      * @return true if successful, false otherwise
  231.      */
  232.         static bool sendFinish( const KStartupInfoId& id, const KStartupInfoData& data );
  233.  
  234.     /**
  235.      * Like sendFinish , uses dpy instead of qt_xdisplay() for sending the info.
  236.      * @param dpy the display of the application.
  237.      * @param id the id of the application
  238.      * @param data the application's data
  239.      * @return true if successful, false otherwise
  240.      */
  241.         static bool sendFinishX( Display* dpy, const KStartupInfoId& id,
  242.             const KStartupInfoData& data );
  243.  
  244.     /**
  245.      * Returns the current startup notification identification for the current
  246.      * startup notification environment variable. Note that KApplication constructor
  247.      * unsets the variable and you have to use KApplication::startupId .
  248.      * @return the current startup notification identification
  249.      */
  250.         static KStartupInfoId currentStartupIdEnv();
  251.     /**
  252.      * Unsets the startup notification environment variable.
  253.      */
  254.         static void resetStartupEnv();
  255.     /**
  256.      * @li NoMatch    - the window doesn't match any existing startup notification
  257.      * @li Match      - the window matches an existing startup notification
  258.      * @li CantDetect - unable to detect if the window matches any existing
  259.      *            startup notification
  260.      */
  261.         enum startup_t { NoMatch, Match, CantDetect };
  262.     /**
  263.      * Checks if the given windows matches any existing startup notification.
  264.      * @param w the window id to check
  265.      * @return the result of the operation
  266.      */
  267.         startup_t checkStartup( WId w );
  268.     /**
  269.      * Checks if the given windows matches any existing startup notification, and
  270.      * if yes, returns the identification in id.
  271.      * @param w the window id to check
  272.      * @param id if found, the id of the startup notification will be written here
  273.      * @return the result of the operation
  274.      */
  275.         startup_t checkStartup( WId w, KStartupInfoId& id );
  276.     /**
  277.      * Checks if the given windows matches any existing startup notification, and
  278.      * if yes, returns the notification data in data.
  279.      * @param w the window id to check
  280.      * @param data if found, the data of the startup notification will be written here
  281.      * @return the result of the operation
  282.      */
  283.         startup_t checkStartup( WId w, KStartupInfoData& data );
  284.     /**
  285.      * Checks if the given windows matches any existing startup notification, and
  286.      * if yes, returns the identification in id and notification data in data.
  287.      * @param w the window id to check
  288.      * @param id if found, the id of the startup notification will be written here
  289.      * @param data if found, the data of the startup notification will be written here
  290.      * @return the result of the operation
  291.      */
  292.         startup_t checkStartup( WId w, KStartupInfoId& id, KStartupInfoData& data );
  293.     /**
  294.      * Sets the timeout for notifications, after this timeout a notification is removed.
  295.      * @param secs the new timeout in seconds
  296.      */
  297.         void setTimeout( unsigned int secs );
  298.     /**
  299.      * Sets the startup notification window property on the given window.
  300.      * @param window the id of the window
  301.      * @param id the startup notification id
  302.      */
  303.         static void setWindowStartupId( WId window, const QCString& id );
  304.     /**
  305.      * Returns startup notification identification of the given window.
  306.      * @param w the id of the window
  307.      * @return the startup notification id. Can be null if not found.
  308.      */
  309.         static QCString windowStartupId( WId w );
  310.         /**
  311.          * @internal
  312.          */
  313.         static void handleAutoAppStartedSending();
  314.     /**
  315.      * @internal
  316.      */
  317.         class Data;
  318.     signals:
  319.     /**
  320.      * Emitted when a new startup notification is created (i.e. a new application is
  321.      * being started).
  322.      * @param id the notification identification
  323.      * @param data the notification data
  324.      */
  325.         void gotNewStartup( const KStartupInfoId& id, const KStartupInfoData& data );
  326.     /**
  327.      * Emitted when a startup notification changes.
  328.      * @param id the notification identification
  329.      * @param data the notification data
  330.      */
  331.         void gotStartupChange( const KStartupInfoId& id, const KStartupInfoData& data );
  332.     /**
  333.      * Emitted when a startup notification is removed (either because it was detected
  334.      * that the application is ready or because of a timeout).
  335.      * @param id the notification identification
  336.      * @param data the notification data
  337.      */
  338.         void gotRemoveStartup( const KStartupInfoId& id, const KStartupInfoData& data );
  339.     protected:
  340.     /**
  341.      * 
  342.      */ 
  343.     virtual void customEvent( QCustomEvent* e_P );
  344.     private slots:
  345.         void startups_cleanup();
  346.         void startups_cleanup_no_age();
  347.         void got_message( const QString& msg );
  348.         void window_added( WId w );
  349.     void slot_window_added( WId w );
  350.     private:
  351.         void init( int flags );
  352.         friend class KStartupInfoPrivate;
  353.         void got_startup_info( const QString& msg_P, bool update_only_P );
  354.         void got_remove_startup_info( const QString& msg_P );
  355.         void new_startup_info_internal( const KStartupInfoId& id_P,
  356.             Data& data_P, bool update_only_P );
  357.         void remove_startup_info_internal( const KStartupInfoId& id_P );
  358.         void remove_startup_pids( const KStartupInfoId& id, const KStartupInfoData& data );
  359.         void remove_startup_pids( const KStartupInfoData& data );
  360.         startup_t check_startup_internal( WId w, KStartupInfoId* id, KStartupInfoData* data );
  361.         bool find_id( const QCString& id_P, KStartupInfoId* id_O,
  362.             KStartupInfoData* data_O );
  363.         bool find_pid( pid_t pid_P, const QCString& hostname, KStartupInfoId* id_O,
  364.             KStartupInfoData* data_O );
  365.         bool find_wclass( QCString res_name_P, QCString res_class_P,
  366.             KStartupInfoId* id_O, KStartupInfoData* data_O );
  367.         static QCString get_window_hostname( WId w_P );
  368.         void startups_cleanup_internal( bool age_P );
  369.         void clean_all_noncompliant();
  370.         static QString check_required_startup_fields( const QString& msg,
  371.             const KStartupInfoData& data, int screen );
  372.         bool clean_on_cantdetect_; // KDE4 remove unused
  373.         unsigned int timeout;
  374.         KStartupInfoPrivate* d;
  375.     };
  376.  
  377. class KStartupInfoIdPrivate;
  378.  
  379. /**
  380.  * Class representing an identification of application startup notification.
  381.  *
  382.  * Every existing notification about a starting application has its own unique
  383.  * identification, that's used to identify and manipulate the notification.
  384.  *
  385.  * @see KStartupInfo
  386.  * @see KStartupInfoData
  387.  *
  388.  * @author Lubos Lunak <l.lunak@kde.org>
  389.  */
  390. class KDECORE_EXPORT KStartupInfoId
  391.     {
  392.     public:
  393.     /**
  394.      * Overloaded operator.
  395.      * @return true if the notification identifications are the same
  396.      */
  397.         bool operator==( const KStartupInfoId& id ) const;
  398.     /**
  399.      * Overloaded operator.
  400.      * @return true if the notification identifications are different
  401.      */
  402.         bool operator!=( const KStartupInfoId& id ) const;
  403.     /**
  404.      * Checks whether the identifier is valid.
  405.      * @return true if this object doesn't represent a valid notification identification
  406.      */
  407.         bool none() const;
  408.     /**
  409.      * Initializes this object with the given identification ( which may be also "0"
  410.      * for no notification ), or if "" is given, tries to read it from the startup
  411.      * notification environment variable, and if it's not set, creates a new one.
  412.      * @param id the new identification, "0" for no notification or "" to read
  413.      *           the environment variable
  414.      */
  415.         void initId( const QCString& id = "" );
  416.     /**
  417.      * Returns the notification identifier as string.
  418.      * @return the identification string for the notification
  419.      */
  420.         const QCString& id() const;
  421.         /**
  422.          * Return the user timestamp for the startup notification, or 0 if no timestamp
  423.          * is set.
  424.          * @since 3.3
  425.          */
  426.         unsigned long timestamp() const;
  427.     /**
  428.      * Sets the startup notification environment variable to this identification.
  429.      * @return true if successful, false otherwise
  430.      */
  431.         bool setupStartupEnv() const;
  432.     /**
  433.      * Creates an empty identification
  434.      */
  435.         KStartupInfoId();
  436.     /**
  437.      * Copy constructor.
  438.      */
  439.         KStartupInfoId( const KStartupInfoId& data );
  440.         ~KStartupInfoId();
  441.         KStartupInfoId& operator=( const KStartupInfoId& data );
  442.         bool operator<( const KStartupInfoId& id ) const;
  443.     private:
  444.         KStartupInfoId( const QString& txt );
  445.         QString to_text() const;
  446.         friend class KStartupInfo;
  447.         KStartupInfoIdPrivate* d;
  448.     };
  449.  
  450. class KStartupInfoDataPrivate;
  451.  
  452. /**
  453.  * Class representing data about an application startup notification.
  454.  *
  455.  * Such data include the icon of the starting application, the desktop on which
  456.  * the application should start, the binary name of the application, etc.
  457.  *
  458.  * @see KStartupInfo
  459.  * @see KStartupInfoId
  460.  *
  461.  * @author Lubos Lunak <l.lunak@kde.org>
  462.  */
  463. class KDECORE_EXPORT KStartupInfoData
  464.     {
  465.     public:
  466.     /**
  467.      * Sets the binary name of the application ( e.g. 'kcontrol' ).
  468.      * @param bin the new binary name of the application
  469.      */
  470.         void setBin( const QString& bin );
  471.     /**
  472.      * Returns the binary name of the starting application
  473.      * @return the new binary name of the application
  474.      */
  475.         const QString& bin() const;
  476.     /**
  477.      * Sets the name for the notification (e.g. 'Control Center')
  478.      */
  479.         void setName( const QString& name );
  480.     /**
  481.      * Returns the name of the startup notification. If it's not available,
  482.          * it tries to use other information (binary name).
  483.      * @return the name of the startup notification
  484.      */
  485.         const QString& findName() const;
  486.     /**
  487.      * Returns the name of the startup notification, or empty if not available.
  488.      * @return the name of the startup notification, or an empty string
  489.      *         if not set.
  490.      */
  491.         const QString& name() const;
  492.     /**
  493.      * Sets the description for the notification (e.g. 'Launching Control Center').
  494.          * I.e. name() describes what is being started, while description() is
  495.          * the actual action performed by the starting.
  496.          * @since 3.2
  497.      */
  498.         void setDescription( const QString& descr );
  499.     /**
  500.      * Returns the description of the startup notification. If it's not available,
  501.          * it returns name().
  502.      * @return the description of the startup notification
  503.          * @since 3.2
  504.      */
  505.         const QString& findDescription() const;
  506.     /**
  507.      * Returns the name of the startup notification, or empty if not available.
  508.      * @return the name of the startup notificaiton, or an empty string
  509.      *         if not set.
  510.          * @since 3.2
  511.      */
  512.         const QString& description() const;
  513.     /**
  514.      * Sets the icon for the startup notification ( e.g. 'kcontrol' )
  515.      * @param icon the name of the icon
  516.      */
  517.         void setIcon( const QString& icon );
  518.     /**
  519.      * Returns the icon of the startup notification, and if it's not available,
  520.      * tries to get it from the binary name.
  521.      * @return the name of the startup notification's icon, or the name of
  522.      *         the binary if not set
  523.      */
  524.         const QString& findIcon() const;
  525.     /**
  526.      * Returns the icon of the startup notification, or empty if not available.
  527.      * @return the name of the icon, or an empty string if not set.
  528.      */
  529.         const QString& icon() const;
  530.     /**
  531.      * Sets the desktop for the startup notification ( i.e. the desktop on which
  532.      * the starting application should appear ).
  533.      * @param desktop the desktop for the startup notification
  534.      */
  535.         void setDesktop( int desktop );
  536.     /**
  537.      * Returns the desktop for the startup notification.
  538.      * @return the desktop for the startup notification
  539.      */
  540.         int desktop() const;
  541.     /**
  542.      * Sets a WM_CLASS value for the startup notification, it may be used for increasing
  543.      * the chance that the windows created by the starting application will be
  544.      * detected correctly.
  545.      * @param wmclass the WM_CLASS value for the startup notification
  546.      */
  547.         void setWMClass( const QCString& wmclass );
  548.     /**
  549.      * Returns the WM_CLASS value for the startup notification, or binary name if not
  550.      * available.
  551.      * @return the WM_CLASS value for the startup notification, or the binary name
  552.      *         if not set
  553.      */
  554.         const QCString findWMClass() const;
  555.     /**
  556.      * Returns the WM_CLASS value for the startup notification, or empty if not available.
  557.      * @return the WM_CLASS value for the startup notification, or empty
  558.      *         if not set
  559.      */
  560.         const QCString& WMClass() const;
  561.     /**
  562.      * Adds a PID to the list of processes that belong to the startup notification. It
  563.      * may be used to increase the chance that the windows created by the starting
  564.      * application will be detected correctly, and also for detecting if the application
  565.      * has quit without creating any window.
  566.      * @param pid the PID to add
  567.      */
  568.         void addPid( pid_t pid );
  569.     /**
  570.      * Returns all PIDs for the startup notification.
  571.      * @return the list of all PIDs
  572.      */
  573.         const QValueList< pid_t >& pids() const;
  574.     /**
  575.      * Checks whether the given @p pid is in the list of PIDs for starup
  576.      * notification.
  577.      * @return true if the given @p pid is in the list of PIDs for the startup notification
  578.      */
  579.         bool is_pid( pid_t pid ) const;
  580.     /**
  581.      * Sets the hostname on which the application is starting. It's necessary to set
  582.      * it if PIDs are set.
  583.      * @param hostname the application's hostname. If it's a null string, the current hostname is used
  584.      */
  585.         void setHostname( const QCString& hostname = QCString());
  586.     /**
  587.      * Returns the hostname for the startup notification.
  588.      * @return the hostname
  589.      */
  590.         const QCString& hostname() const;
  591.     
  592.     /**
  593.      *
  594.      */
  595.     enum TriState { Yes, No, Unknown };
  596.     
  597.     /**
  598.      * Sets whether the visual feedback for this startup notification
  599.      * should be silenced (temporarily suspended).
  600.      * @since 3.1.1
  601.      */
  602.     void setSilent( TriState state );
  603.     
  604.     /**
  605.      * Return the silence status for the startup notification.
  606.      * @return KStartupInfoData::Yes if visual feedback is silenced
  607.      * @since 3.1.1
  608.      */
  609.     TriState silent() const;
  610.         
  611.         /**
  612.          * @obsolete Timestamp is already assigned in KStartupInfoId::initId().
  613.          * Sets timestamp for the startup notification. The timestamp is expressed
  614.          * as XServer time, and is used to prevent activation of the matching
  615.          * window if user interaction took place after this timestamp.
  616.          * Value -1 means no timestamp set, value 0 means that the window should
  617.          * not be activated.
  618.          */
  619.         void setTimestamp( unsigned long time );
  620.         
  621.         /**
  622.          * @obsolete Use KStartupInfoId::timestamp().
  623.          * Return the timestamp for the startup notification, or -1 if no timestamp
  624.          * is set.
  625.          */
  626.         unsigned long timestamp() const;
  627.         
  628.         /**
  629.          * The X11 screen on which the startup notification is happening, -1 if unknown.
  630.          */
  631.         int screen() const;
  632.         
  633.         /**
  634.          * Sets the X11 screen on which the startup notification should happen.
  635.          * This is usually not necessary to set, as it's set by default to qt_xscreen().
  636.          */
  637.         void setScreen( int screen );
  638.  
  639.     /**
  640.      * Updates the notification data from the given data. Some data, such as the desktop
  641.      * or the name, won't be rewritten if already set.
  642.      * @param data the data to update
  643.      */
  644.         void update( const KStartupInfoData& data );
  645.  
  646.     /**
  647.      * Constructor. Initializes all the data to their default empty values.
  648.      */
  649.         KStartupInfoData();
  650.  
  651.     /**
  652.      * Copy constructor.
  653.      */
  654.         KStartupInfoData( const KStartupInfoData& data );
  655.         ~KStartupInfoData();
  656.         KStartupInfoData& operator=( const KStartupInfoData& data );
  657.     private:
  658.         KStartupInfoData( const QString& txt );
  659.         QString to_text() const;
  660.         void remove_pid( pid_t pid );
  661.         friend class KStartupInfo;
  662.         friend class KStartupInfo::Data;
  663.         KStartupInfoDataPrivate* d;
  664.     };
  665.  
  666. #endif //Q_WS_X11
  667.  
  668. #endif
  669.