Changeset View
Changeset View
Standalone View
Standalone View
libkwineffects/kwinglobals.h
Show All 30 Lines | |||||
31 | #include <xcb/xcb.h> | 31 | #include <xcb/xcb.h> | ||
32 | 32 | | |||
33 | #include <kwinconfig.h> | 33 | #include <kwinconfig.h> | ||
34 | 34 | | |||
35 | #define KWIN_QT5_PORTING 0 | 35 | #define KWIN_QT5_PORTING 0 | ||
36 | 36 | | |||
37 | namespace KWin | 37 | namespace KWin | ||
38 | { | 38 | { | ||
39 | 39 | KWIN_EXPORT Q_NAMESPACE | |||
40 | 40 | | |||
41 | enum CompositingType { | 41 | enum CompositingType { | ||
42 | NoCompositing = 0, | 42 | NoCompositing = 0, | ||
43 | /** | 43 | /** | ||
44 | * Used as a flag whether OpenGL based compositing is used. | 44 | * Used as a flag whether OpenGL based compositing is used. | ||
45 | * The flag is or-ed to the enum values of the specific OpenGL types. | 45 | * The flag is or-ed to the enum values of the specific OpenGL types. | ||
46 | * The actual Compositors use the or @c OpenGL2Compositing | 46 | * The actual Compositors use the or @c OpenGL2Compositing | ||
47 | * flags. If you need to know whether OpenGL is used, either and the flag or | 47 | * flags. If you need to know whether OpenGL is used, either and the flag or | ||
▲ Show 20 Lines • Show All 94 Lines • ▼ Show 20 Line(s) | |||||
142 | * Represents the state of the session running outside kwin | 142 | * Represents the state of the session running outside kwin | ||
143 | * Under Plasma this is managed by ksmserver | 143 | * Under Plasma this is managed by ksmserver | ||
144 | */ | 144 | */ | ||
145 | enum class SessionState { | 145 | enum class SessionState { | ||
146 | Normal, | 146 | Normal, | ||
147 | Saving, | 147 | Saving, | ||
148 | Quitting | 148 | Quitting | ||
149 | }; | 149 | }; | ||
150 | Q_ENUM_NS(SessionState) | ||||
150 | 151 | | |||
zzag: Matter of personal choice: I'd prefer to keep Q_ENUM_NS as close as possible to the enum… | |||||
zzag: s/choice/taste/ :-) | |||||
151 | inline | 152 | inline | ||
152 | KWIN_EXPORT xcb_connection_t *connection() | 153 | KWIN_EXPORT xcb_connection_t *connection() | ||
153 | { | 154 | { | ||
154 | static xcb_connection_t *s_con = nullptr; | 155 | static xcb_connection_t *s_con = nullptr; | ||
155 | if (!s_con) { | 156 | if (!s_con) { | ||
156 | s_con = reinterpret_cast<xcb_connection_t*>(qApp->property("x11Connection").value<void*>()); | 157 | s_con = reinterpret_cast<xcb_connection_t*>(qApp->property("x11Connection").value<void*>()); | ||
157 | } | 158 | } | ||
158 | Q_ASSERT(qApp); | 159 | Q_ASSERT(qApp); | ||
▲ Show 20 Lines • Show All 107 Lines • Show Last 20 Lines |
Matter of personal choice: I'd prefer to keep Q_ENUM_NS as close as possible to the enum, without introducing empty lines in between.