• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

libkworkspace

KWorkSpace Namespace Reference


Enumerations

enum  ShutdownConfirm { ShutdownConfirmDefault = -1, ShutdownConfirmNo = 0, ShutdownConfirmYes = 1 }
enum  ShutdownMode {
  ShutdownModeDefault = -1, ShutdownModeSchedule = 0, ShutdownModeTryNow = 1, ShutdownModeForceNow = 2,
  ShutdownModeInteractive = 3
}
enum  ShutdownType { ShutdownTypeDefault = -1, ShutdownTypeNone = 0, ShutdownTypeReboot = 1, ShutdownTypeHalt = 2 }

Functions

static void cleanup_sm ()
static void dummy_callback (SmcConn, SmPointer)
void propagateSessionManager ()
bool requestShutDown (ShutdownConfirm confirm=ShutdownConfirmDefault, ShutdownType sdtype=ShutdownTypeDefault, ShutdownMode sdmode=ShutdownModeDefault)
static void save_yourself_callback (SmcConn conn_P, SmPointer, int, Bool, int, Bool)

Variables

static KRequestShutdownHelper * helper = NULL
static QTime smModificationTime

Enumeration Type Documentation

enum KWorkSpace::ShutdownConfirm

The possible values for the confirm parameter of requestShutDown().

Enumerator:
ShutdownConfirmDefault  Obey the user's confirmation setting.
ShutdownConfirmNo  Don't confirm, shutdown without asking.
ShutdownConfirmYes  Always confirm, ask even if the user turned it off.

Definition at line 31 of file kworkspace.h.

enum KWorkSpace::ShutdownMode

The possible values for the sdmode parameter of requestShutDown().

Enumerator:
ShutdownModeDefault  Select previous mode or the default if it's the first time.
ShutdownModeSchedule  Schedule a shutdown (halt or reboot) for the time all active sessions have exited.
ShutdownModeTryNow  Shut down, if no sessions are active.

Otherwise do nothing.

ShutdownModeForceNow  Force shutdown.

Kill any possibly active sessions.

ShutdownModeInteractive  Pop up a dialog asking the user what to do if sessions are still active.

Definition at line 71 of file kworkspace.h.

enum KWorkSpace::ShutdownType

The possible values for the sdtype parameter of requestShutDown().

Enumerator:
ShutdownTypeDefault  Select previous action or the default if it's the first time.
ShutdownTypeNone  Only log out.
ShutdownTypeReboot  Log out and reboot the machine.
ShutdownTypeHalt  Log out and halt the machine.

Definition at line 49 of file kworkspace.h.


Function Documentation

static void KWorkSpace::cleanup_sm (  )  [static]

Definition at line 154 of file kworkspace.cpp.

static void KWorkSpace::dummy_callback ( SmcConn  ,
SmPointer   
) [static]

Definition at line 64 of file kworkspace.cpp.

KDE_EXPORT void KWorkSpace::propagateSessionManager (  ) 

Propagates the network address of the session manager in the SESSION_MANAGER environment variable so that child processes can pick it up.

If SESSION_MANAGER isn't defined yet, the address is searched in $HOME/.KSMserver.

This function is called by clients that are started outside the session ( i.e. before ksmserver is started), but want to launch other processes that should participate in the session. Examples are kdesktop or kicker.

Definition at line 182 of file kworkspace.cpp.

KDE_EXPORT bool KWorkSpace::requestShutDown ( ShutdownConfirm  confirm = ShutdownConfirmDefault,
ShutdownType  sdtype = ShutdownTypeDefault,
ShutdownMode  sdmode = ShutdownModeDefault 
)

Asks the session manager to shut the session down.

Using confirm == ShutdownConfirmYes or sdtype != ShutdownTypeDefault or sdmode != ShutdownModeDefault causes the use of ksmserver's DCOP interface. The remaining two combinations use the standard XSMP and will work with any session manager compliant with it.

Parameters:
confirm Whether to ask the user if he really wants to log out. ShutdownConfirm
sdtype The action to take after logging out. ShutdownType
sdmode If/When the action should be taken. ShutdownMode
Returns:
true on success, false if the session manager could not be contacted.

Definition at line 159 of file kworkspace.cpp.

static void KWorkSpace::save_yourself_callback ( SmcConn  conn_P,
SmPointer  ,
int  ,
Bool  ,
int  ,
Bool   
) [static]

Definition at line 59 of file kworkspace.cpp.


Variable Documentation

KRequestShutdownHelper* KWorkSpace::helper = NULL [static]

Definition at line 152 of file kworkspace.cpp.

QTime KWorkSpace::smModificationTime [static]

Definition at line 181 of file kworkspace.cpp.

libkworkspace

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

API Reference

Skip menu "API Reference"
  • KWin
  •   KWin Libraries
  • Libraries
  •   libkworkspace
  •   libplasma
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal