KWin
|
#include <session.h>
Public Types | |
enum class | Type { Noop , ConsoleKit , Logind } |
enum class | Capability : uint { SwitchTerminal = 0x1 } |
Signals | |
void | awoke () |
void | activeChanged (bool active) |
void | deviceResumed (dev_t deviceId) |
void | devicePaused (dev_t deviceId) |
Public Member Functions | |
virtual bool | isActive () const =0 |
virtual Capabilities | capabilities () const =0 |
virtual QString | seat () const =0 |
virtual uint | terminal () const =0 |
virtual int | openRestricted (const QString &fileName)=0 |
virtual void | closeRestricted (int fileDescriptor)=0 |
virtual void | switchTo (uint terminal)=0 |
Static Public Member Functions | |
static std::unique_ptr< Session > | create () |
static std::unique_ptr< Session > | create (Type type) |
Protected Member Functions | |
Session ()=default | |
The Session class represents the session controlled by the compositor.
The Session class provides information about the virtual terminal where the compositor is running and a way to open files that require special privileges, e.g. DRM devices or input devices.
|
strong |
|
strong |
|
explicitprotecteddefault |
|
signal |
This signal is emitted when the active state of the session has changed.
|
signal |
This signal is emitted when the session is resuming from suspend.
|
pure virtual |
Returns the capabilities supported by the session.
Implemented in KWin::ConsoleKitSession, KWin::LogindSession, and KWin::NoopSession.
|
pure virtual |
Closes a file that has been opened using the openRestricted() function.
Implemented in KWin::ConsoleKitSession, KWin::LogindSession, and KWin::NoopSession.
|
static |
Definition at line 25 of file session.cpp.
Definition at line 36 of file session.cpp.
|
signal |
This signal is emitted when the given device cannot be used by the compositor anymore. For example, this normally occurs when switching between VTs.
Note that when this signal is emitted for a DRM device, master permissions can be already revoked.
|
signal |
This signal is emitted when the specified device can be used again.
|
pure virtual |
Returns true
if the session is active; otherwise returns false
.
Implemented in KWin::ConsoleKitSession, KWin::LogindSession, and KWin::NoopSession.
|
pure virtual |
Opens the file with the specified fileName. Returns the file descriptor of the file or -1 if an error has occurred.
Implemented in KWin::ConsoleKitSession, KWin::LogindSession, and KWin::NoopSession.
|
pure virtual |
Returns the seat name for the Session.
Implemented in KWin::ConsoleKitSession, KWin::LogindSession, and KWin::NoopSession.
|
pure virtual |
Switches to the specified virtual terminal. This function does nothing if the Capability::SwitchTerminal capability is unsupported.
Implemented in KWin::ConsoleKitSession, KWin::LogindSession, and KWin::NoopSession.
|
pure virtual |
Returns the terminal controlled by the Session.
Implemented in KWin::ConsoleKitSession, KWin::LogindSession, and KWin::NoopSession.