Plasma-workspace

kworkspace.h
1/*
2 SPDX-FileCopyrightText: 1997 Matthias Kalle Dalheimer <kalle@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "kworkspace_export.h"
10
11namespace KWorkSpace
12{
13/**
14 * The possible values for the @p confirm parameter of requestShutDown().
15 */
16enum ShutdownConfirm {
17 /**
18 * Obey the user's confirmation setting.
19 */
20 ShutdownConfirmDefault = -1,
21 /**
22 * Don't confirm, shutdown without asking.
23 */
24 ShutdownConfirmNo = 0,
25 /**
26 * Always confirm, ask even if the user turned it off.
27 */
28 ShutdownConfirmYes = 1,
29};
30
31/**
32 * The possible values for the @p sdtype parameter of requestShutDown().
33 */
34enum ShutdownType {
35 /**
36 * Select previous action or the default if it's the first time.
37 */
38 ShutdownTypeDefault = -1,
39 /**
40 * Only log out
41 */
42 ShutdownTypeNone = 0,
43 /**
44 * Log out and reboot the machine.
45 */
46 ShutdownTypeReboot = 1,
47 /**
48 * Log out and halt the machine.
49 */
50 ShutdownTypeHalt = 2,
51 /**
52 * Temporary brain damage. Don't use. Same as ShutdownTypeNone
53 */
54 // KDE5: kill this
55 ShutdownTypeLogout = 3,
56};
57
58/**
59 * The possible values for the @p sdmode parameter of requestShutDown().
60 */
61// KDE5: this seems fairly useless
62enum ShutdownMode {
63 /**
64 * Select previous mode or the default if it's the first time.
65 */
66 ShutdownModeDefault = -1,
67 /**
68 * Schedule a shutdown (halt or reboot) for the time all active sessions
69 * have exited.
70 */
71 ShutdownModeSchedule = 0,
72 /**
73 * Shut down, if no sessions are active. Otherwise do nothing.
74 */
75 ShutdownModeTryNow = 1,
76 /**
77 * Force shutdown. Kill any possibly active sessions.
78 */
79 ShutdownModeForceNow = 2,
80 /**
81 * Pop up a dialog asking the user what to do if sessions are still active.
82 */
83 ShutdownModeInteractive = 3,
84};
85
86/**
87 * Used to check whether a shutdown is currently in progress
88 */
89KWORKSPACE_EXPORT bool isShuttingDown();
90
91/**
92 * Propagates the network address of the session manager in the
93 * SESSION_MANAGER environment variable so that child processes can
94 * pick it up.
95 *
96 * If SESSION_MANAGER isn't defined yet, the address is searched in
97 * $HOME/.KSMserver.
98 *
99 * This function is called by clients that are started outside the
100 * session ( i.e. before ksmserver is started), but want to launch
101 * other processes that should participate in the session. Examples
102 * are kdesktop or kicker.
103 */
104KWORKSPACE_EXPORT void propagateSessionManager();
105}
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:58:38 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.