/usr/include/kworkspace/kworkspace.h is in kde-workspace-dev 4:4.8.5-0ubuntu0.4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 | /* This file is part of the KDE libraries
Copyright (C) 1997 Matthias Kalle Dalheimer (kalle@kde.org)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef KWORKSPACE_H
#define KWORKSPACE_H
#include "kworkspace_export.h"
namespace KWorkSpace
{
/**
* The possible values for the @p confirm parameter of requestShutDown().
*/
enum ShutdownConfirm {
/**
* Obey the user's confirmation setting.
*/
ShutdownConfirmDefault = -1,
/**
* Don't confirm, shutdown without asking.
*/
ShutdownConfirmNo = 0,
/**
* Always confirm, ask even if the user turned it off.
*/
ShutdownConfirmYes = 1
};
/**
* The possible values for the @p sdtype parameter of requestShutDown().
*/
enum ShutdownType {
/**
* Select previous action or the default if it's the first time.
*/
ShutdownTypeDefault = -1,
/**
* Only log out
*/
ShutdownTypeNone = 0,
/**
* Log out and reboot the machine.
*/
ShutdownTypeReboot = 1,
/**
* Log out and halt the machine.
*/
ShutdownTypeHalt = 2,
/**
* Temporary brain damage. Don't use. Same as ShutdownTypeNone
*/
// KDE5: kill this
ShutdownTypeLogout = 3
};
/**
* The possible values for the @p sdmode parameter of requestShutDown().
*/
// KDE5: this seems fairly useless
enum ShutdownMode {
/**
* Select previous mode or the default if it's the first time.
*/
ShutdownModeDefault = -1,
/**
* Schedule a shutdown (halt or reboot) for the time all active sessions
* have exited.
*/
ShutdownModeSchedule = 0,
/**
* Shut down, if no sessions are active. Otherwise do nothing.
*/
ShutdownModeTryNow = 1,
/**
* Force shutdown. Kill any possibly active sessions.
*/
ShutdownModeForceNow = 2,
/**
* Pop up a dialog asking the user what to do if sessions are still active.
*/
ShutdownModeInteractive = 3
};
/**
* Asks the session manager to shut the session down.
*
* Using @p confirm == ShutdownConfirmYes or @p sdtype != ShutdownTypeDefault or
* @p 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.
*
* @param confirm Whether to ask the user if he really wants to log out.
* ShutdownConfirm
* @param sdtype The action to take after logging out. ShutdownType
* @param sdmode If/When the action should be taken. ShutdownMode
*/
KWORKSPACE_EXPORT void requestShutDown( ShutdownConfirm confirm = ShutdownConfirmDefault,
ShutdownType sdtype = ShutdownTypeDefault,
ShutdownMode sdmode = ShutdownModeDefault );
/**
* Used to check whether a requestShutDown call with the same arguments
* has any chance of succeeding.
*
* For example, if KDE's own session manager cannot be contacted, we can't
* demand that the computer be shutdown, or force a confirmation dialog.
*
* Even if we can access the KDE session manager, the system or user
* configuration may prevent the user from requesting a shutdown or
* reboot.
*/
KWORKSPACE_EXPORT bool canShutDown( ShutdownConfirm confirm = ShutdownConfirmDefault,
ShutdownType sdtype = ShutdownTypeDefault,
ShutdownMode sdmode = ShutdownModeDefault );
/**
* 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.
*/
KWORKSPACE_EXPORT void propagateSessionManager();
/**
* This function should be called at startup to prevent heap fragmentation
* in applications that perform many low-level pixmap operations (e.g. kwin).
*
* It lowers the threshold above which the glibc returns the memory to the kernel
* from 120 kB of free space at the end of the heap to 5*pagesize (= 20 kB for x86-64).
*/
KWORKSPACE_EXPORT void trimMalloc();
}
#endif
|