Changeset View
Changeset View
Standalone View
Standalone View
screens.h
Show First 20 Lines • Show All 208 Lines • ▼ Show 20 Line(s) | 204 | private: | |||
---|---|---|---|---|---|
209 | KSharedConfig::Ptr m_config; | 209 | KSharedConfig::Ptr m_config; | ||
210 | QSize m_boundingSize; | 210 | QSize m_boundingSize; | ||
211 | OrientationSensor *m_orientationSensor; | 211 | OrientationSensor *m_orientationSensor; | ||
212 | qreal m_maxScale; | 212 | qreal m_maxScale; | ||
213 | 213 | | |||
214 | KWIN_SINGLETON(Screens) | 214 | KWIN_SINGLETON(Screens) | ||
215 | }; | 215 | }; | ||
216 | 216 | | |||
217 | /** | | |||
218 | * @brief A base implementation for backends with just a (nested) window | | |||
219 | **/ | | |||
220 | class KWIN_EXPORT BasicScreens : public Screens | | |||
221 | { | | |||
222 | Q_OBJECT | | |||
223 | public: | | |||
224 | BasicScreens(Platform *backend, QObject *parent = nullptr); | | |||
225 | virtual ~BasicScreens(); | | |||
226 | | ||||
227 | void init() override; | | |||
228 | QRect geometry(int screen) const override; | | |||
229 | int number(const QPoint &pos) const override; | | |||
230 | QSize size(int screen) const override; | | |||
231 | qreal scale(int screen) const override; | | |||
232 | void updateCount() override; | | |||
233 | | ||||
234 | private: | | |||
235 | Platform *m_backend; | | |||
236 | QVector<QRect> m_geometries; | | |||
237 | QVector<qreal> m_scales; | | |||
238 | }; | | |||
239 | | ||||
240 | inline | 217 | inline | ||
241 | int Screens::count() const | 218 | int Screens::count() const | ||
242 | { | 219 | { | ||
243 | return m_count; | 220 | return m_count; | ||
244 | } | 221 | } | ||
245 | 222 | | |||
246 | inline | 223 | inline | ||
247 | bool Screens::isCurrentFollowsMouse() const | 224 | bool Screens::isCurrentFollowsMouse() const | ||
Show All 31 Lines |