Changeset View
Changeset View
Standalone View
Standalone View
src/private/decoratedclientprivate.h
Show First 20 Lines • Show All 70 Lines • ▼ Show 20 Line(s) | 48 | public: | |||
---|---|---|---|---|---|
71 | virtual WId windowId() const = 0; | 71 | virtual WId windowId() const = 0; | ||
72 | virtual WId decorationId() const = 0; | 72 | virtual WId decorationId() const = 0; | ||
73 | 73 | | |||
74 | virtual int width() const = 0; | 74 | virtual int width() const = 0; | ||
75 | virtual int height() const = 0; | 75 | virtual int height() const = 0; | ||
76 | virtual QPalette palette() const = 0; | 76 | virtual QPalette palette() const = 0; | ||
77 | virtual Qt::Edges adjacentScreenEdges() const = 0; | 77 | virtual Qt::Edges adjacentScreenEdges() const = 0; | ||
78 | 78 | | |||
79 | virtual void requestClose() = 0; | 79 | virtual void requestClose() = 0; | ||
graesslin: As that's adding new virtuals we either need to move that into a subclass or increase the so… | |||||
@sitter with your distro hat on: what do you think works best? We have here a public api with a "private" library which is used by KWin. graesslin: @sitter with your distro hat on: what do you think works best? We have here a public api with a… | |||||
Even if the API is public... plasma libs have no ABI stability promise so I think it's easiest to simply bump the so version. That way distributions can't accidently build kwin against the wrong version of libkdecoration and then have odd vtable crashes. And since this is only BIC but not SIC it's only a minor rebuild inconvenience to anyone who's using libkdecoration's public API. That said, a fully backwards compatible addition using a subclass is of course always nicer :) sitter: Even if the API is public... plasma libs have no ABI stability promise so I think it's easiest… | |||||
80 | virtual void requestToggleMaximization(Qt::MouseButtons buttons) = 0; | 80 | virtual void requestToggleMaximization(Qt::MouseButtons buttons) = 0; | ||
81 | virtual void requestMinimize() = 0; | 81 | virtual void requestMinimize() = 0; | ||
82 | virtual void requestContextHelp() = 0; | 82 | virtual void requestContextHelp() = 0; | ||
83 | virtual void requestToggleOnAllDesktops() = 0; | 83 | virtual void requestToggleOnAllDesktops() = 0; | ||
84 | virtual void requestToggleShade() = 0; | 84 | virtual void requestToggleShade() = 0; | ||
85 | virtual void requestToggleKeepAbove() = 0; | 85 | virtual void requestToggleKeepAbove() = 0; | ||
86 | virtual void requestToggleKeepBelow() = 0; | 86 | virtual void requestToggleKeepBelow() = 0; | ||
87 | virtual void requestShowWindowMenu() = 0; | 87 | virtual void requestShowWindowMenu() = 0; | ||
88 | 88 | | |||
89 | Decoration *decoration(); | 89 | Decoration *decoration(); | ||
90 | Decoration *decoration() const; | 90 | Decoration *decoration() const; | ||
91 | 91 | | |||
92 | virtual QColor color(ColorGroup group, ColorRole role) const; | 92 | virtual QColor color(ColorGroup group, ColorRole role) const; | ||
93 | 93 | | |||
94 | protected: | 94 | protected: | ||
95 | explicit DecoratedClientPrivate(DecoratedClient *client, Decoration *decoration); | 95 | explicit DecoratedClientPrivate(DecoratedClient *client, Decoration *decoration); | ||
96 | DecoratedClient *client(); | 96 | DecoratedClient *client(); | ||
97 | 97 | | |||
98 | private: | 98 | private: | ||
99 | class Private; | 99 | class Private; | ||
100 | const QScopedPointer<Private> d; | 100 | const QScopedPointer<Private> d; | ||
101 | }; | 101 | }; | ||
102 | 102 | | |||
103 | class KDECORATIONS_PRIVATE_EXPORT ApplicationMenuEnabledDecoratedClientPrivate : public DecoratedClientPrivate | ||||
104 | { | ||||
105 | public: | ||||
106 | ~ApplicationMenuEnabledDecoratedClientPrivate() override; | ||||
107 | | ||||
108 | virtual bool hasApplicationMenu() const = 0; | ||||
109 | virtual bool isApplicationMenuActive() const = 0; | ||||
110 | | ||||
111 | virtual void showApplicationMenu(int actionId) = 0; | ||||
112 | virtual void requestShowApplicationMenu(const QRect &rect, int actionId) = 0; | ||||
113 | | ||||
114 | protected: | ||||
115 | explicit ApplicationMenuEnabledDecoratedClientPrivate(DecoratedClient *client, Decoration *decoration); | ||||
116 | }; | ||||
117 | | ||||
103 | } // namespace | 118 | } // namespace | ||
104 | 119 | | |||
105 | #endif | 120 | #endif |
As that's adding new virtuals we either need to move that into a subclass or increase the so version of the private lib (or just ignore, but then distros complain).