diff --git a/src/client/server_decoration_palette.h b/src/client/server_decoration_palette.h --- a/src/client/server_decoration_palette.h +++ b/src/client/server_decoration_palette.h @@ -34,27 +34,27 @@ class EventQueue; class Surface; -class ServerDecorationPalette; +class ServerSideDecorationPalette; /** * @short Wrapper for the org_kde_kwin_server_decoration_palette_manager interface. * * This class provides a convenient wrapper for the org_kde_kwin_server_decoration_palette_manager interface. * * To use this class one needs to interact with the Registry. There are two - * possible ways to create the ServerDecorationPaletteManager interface: + * possible ways to create the ServerSideDecorationPaletteManager interface: * @code - * ServerDecorationPaletteManager *c = registry->createServerDecorationPaletteManager(name, version); + * ServerSideDecorationPaletteManager *c = registry->createServerSideDecorationPaletteManager(name, version); * @endcode * - * This creates the ServerDecorationPaletteManager and sets it up directly. As an alternative this + * This creates the ServerSideDecorationPaletteManager and sets it up directly. As an alternative this * can also be done in a more low level way: * @code - * ServerDecorationPaletteManager *c = new ServerDecorationPaletteManager; - * c->setup(registry->bindServerDecorationPaletteManager(name, version)); + * ServerSideDecorationPaletteManager *c = new ServerSideDecorationPaletteManager; + * c->setup(registry->bindServerSideDecorationPaletteManager(name, version)); * @endcode * - * The ServerDecorationPaletteManager can be used as a drop-in replacement for any org_kde_kwin_server_decoration_palette_manager + * The ServerSideDecorationPaletteManager can be used as a drop-in replacement for any org_kde_kwin_server_decoration_palette_manager * pointer as it provides matching cast operators. * * @see Registry @@ -64,32 +64,32 @@ Q_OBJECT public: /** - * Creates a new ServerDecorationPaletteManager. - * Note: after constructing the ServerDecorationPaletteManager it is not yet valid and one needs - * to call setup. In order to get a ready to use ServerDecorationPaletteManager prefer using - * Registry::createServerDecorationPaletteManager. + * Creates a new ServerSideDecorationPaletteManager. + * Note: after constructing the ServerSideDecorationPaletteManager it is not yet valid and one needs + * to call setup. In order to get a ready to use ServerSideDecorationPaletteManager prefer using + * Registry::createServerSideDecorationPaletteManager. **/ explicit ServerSideDecorationPaletteManager(QObject *parent = nullptr); virtual ~ServerSideDecorationPaletteManager(); /** - * Setup this ServerDecorationPaletteManager to manage the @p serverDecorationPaletteManager. - * When using Registry::createServerDecorationPaletteManager there is no need to call this + * Setup this ServerSideDecorationPaletteManager to manage the @p serverSideDecorationPaletteManager. + * When using Registry::createServerSideDecorationPaletteManager there is no need to call this * method. **/ - void setup(org_kde_kwin_server_decoration_palette_manager *serverDecorationPaletteManager); + void setup(org_kde_kwin_server_decoration_palette_manager *serverSideDecorationPaletteManager); /** * @returns @c true if managing a org_kde_kwin_server_decoration_palette_manager. **/ bool isValid() const; /** * Releases the org_kde_kwin_server_decoration_palette_manager interface. - * After the interface has been released the ServerDecorationPaletteManager instance is no + * After the interface has been released the ServerSideDecorationPaletteManager instance is no * longer valid and can be setup with another org_kde_kwin_server_decoration_palette_manager interface. **/ void release(); /** - * Destroys the data held by this ServerDecorationPaletteManager. + * Destroys the data held by this ServerSideDecorationPaletteManager. * This method is supposed to be used when the connection to the Wayland * server goes away. If the connection is not valid anymore, it's not * possible to call release anymore as that calls into the Wayland @@ -99,50 +99,50 @@ * * It is suggested to connect this method to ConnectionThread::connectionDied: * @code - * connect(connection, &ConnectionThread::connectionDied, palettemanager, &ServerDecorationPaletteManager::destroy); + * connect(connection, &ConnectionThread::connectionDied, palettemanager, &ServerSideDecorationPaletteManager::destroy); * @endcode * * @see release **/ void destroy(); /** - * Sets the @p queue to use for creating objects with this ServerDecorationPaletteManager. + * Sets the @p queue to use for creating objects with this ServerSideDecorationPaletteManager. **/ void setEventQueue(EventQueue *queue); /** - * @returns The event queue to use for creating objects with this ServerDecorationPaletteManager. + * @returns The event queue to use for creating objects with this ServerSideDecorationPaletteManager. **/ EventQueue *eventQueue(); - ServerDecorationPalette *create(Surface *surface, QObject *parent = nullptr); + ServerSideDecorationPalette *create(Surface *surface, QObject *parent = nullptr); operator org_kde_kwin_server_decoration_palette_manager*(); operator org_kde_kwin_server_decoration_palette_manager*() const; Q_SIGNALS: /** * The corresponding global for this interface on the Registry got removed. * - * This signal gets only emitted if the ServerDecorationPaletteManager got created by - * Registry::createServerDecorationPaletteManager + * This signal gets only emitted if the ServerSideDecorationPaletteManager got created by + * Registry::createServerSideDecorationPaletteManager **/ void removed(); private: class Private; QScopedPointer d; }; -class KWAYLANDCLIENT_EXPORT ServerDecorationPalette : public QObject +class KWAYLANDCLIENT_EXPORT ServerSideDecorationPalette : public QObject { Q_OBJECT public: - virtual ~ServerDecorationPalette(); + virtual ~ServerSideDecorationPalette(); /** - * Setup this ServerDecorationPalette to manage the @p serversidedecorationpalette. - * When using ServerDecorationPaletteManager::create there is no need to call this + * Setup this ServerSideDecorationPalette to manage the @p serversidedecorationpalette. + * When using ServerSideDecorationPaletteManager::create there is no need to call this * method. **/ void setup(org_kde_kwin_server_decoration_palette *serversidedecorationpalette); @@ -152,12 +152,12 @@ bool isValid() const; /** * Releases the org_kde_kwin_server_decoration_palette interface. - * After the interface has been released the ServerDecorationPalette instance is no + * After the interface has been released the ServerSideDecorationPalette instance is no * longer valid and can be setup with another org_kde_kwin_server_decoration_palette interface. **/ void release(); /** - * Destroys the data held by this ServerDecorationPalette. + * Destroys the data held by this ServerSideDecorationPalette. * This method is supposed to be used when the connection to the Wayland * server goes away. If the connection is not valid anymore, it's not * possible to call release anymore as that calls into the Wayland @@ -167,7 +167,7 @@ * * It is suggested to connect this method to ConnectionThread::connectionDied: * @code - * connect(connection, &ConnectionThread::connectionDied, palette, &ServerDecorationPalette::destroy); + * connect(connection, &ConnectionThread::connectionDied, palette, &ServerSideDecorationPalette::destroy); * @endcode * * @see release @@ -186,7 +186,7 @@ private: friend class ServerSideDecorationPaletteManager; - explicit ServerDecorationPalette(QObject *parent = nullptr); + explicit ServerSideDecorationPalette(QObject *parent = nullptr); class Private; QScopedPointer d; }; diff --git a/src/client/server_decoration_palette.cpp b/src/client/server_decoration_palette.cpp --- a/src/client/server_decoration_palette.cpp +++ b/src/client/server_decoration_palette.cpp @@ -98,10 +98,10 @@ return d->queue; } -ServerDecorationPalette *ServerSideDecorationPaletteManager::create(Surface *surface, QObject *parent) +ServerSideDecorationPalette *ServerSideDecorationPaletteManager::create(Surface *surface, QObject *parent) { Q_ASSERT(isValid()); - auto p = new ServerDecorationPalette(parent); + auto p = new ServerSideDecorationPalette(parent); auto w = org_kde_kwin_server_decoration_palette_manager_create(d->serverdecomanager, *surface); if (d->queue) { d->queue->addProxy(w); @@ -111,71 +111,71 @@ return p; } -class ServerDecorationPalette::Private +class ServerSideDecorationPalette::Private { public: - Private(ServerDecorationPalette *q); + Private(ServerSideDecorationPalette *q); void setup(org_kde_kwin_server_decoration_palette *arg); WaylandPointer decoration_palette; private: - ServerDecorationPalette *q; + ServerSideDecorationPalette *q; }; -ServerDecorationPalette::Private::Private(ServerDecorationPalette *q) +ServerSideDecorationPalette::Private::Private(ServerSideDecorationPalette *q) : q(q) { } -ServerDecorationPalette::ServerDecorationPalette(QObject *parent) +ServerSideDecorationPalette::ServerSideDecorationPalette(QObject *parent) : QObject(parent) , d(new Private(this)) { } -void ServerDecorationPalette::Private::setup(org_kde_kwin_server_decoration_palette *arg) +void ServerSideDecorationPalette::Private::setup(org_kde_kwin_server_decoration_palette *arg) { Q_ASSERT(arg); Q_ASSERT(!decoration_palette); decoration_palette.setup(arg); } -ServerDecorationPalette::~ServerDecorationPalette() +ServerSideDecorationPalette::~ServerSideDecorationPalette() { release(); } -void ServerDecorationPalette::setup(org_kde_kwin_server_decoration_palette *decoration_palette) +void ServerSideDecorationPalette::setup(org_kde_kwin_server_decoration_palette *decoration_palette) { d->setup(decoration_palette); } -void ServerDecorationPalette::release() +void ServerSideDecorationPalette::release() { d->decoration_palette.release(); } -void ServerDecorationPalette::destroy() +void ServerSideDecorationPalette::destroy() { d->decoration_palette.destroy(); } -ServerDecorationPalette::operator org_kde_kwin_server_decoration_palette*() { +ServerSideDecorationPalette::operator org_kde_kwin_server_decoration_palette*() { return d->decoration_palette; } -ServerDecorationPalette::operator org_kde_kwin_server_decoration_palette*() const { +ServerSideDecorationPalette::operator org_kde_kwin_server_decoration_palette*() const { return d->decoration_palette; } -bool ServerDecorationPalette::isValid() const +bool ServerSideDecorationPalette::isValid() const { return d->decoration_palette.isValid(); } -void ServerDecorationPalette::setPalette(const QString &palette) +void ServerSideDecorationPalette::setPalette(const QString &palette) { Q_ASSERT(isValid()); org_kde_kwin_server_decoration_palette_set_palette(*this, palette.toUtf8());