diff --git a/abstract_client.h b/abstract_client.h --- a/abstract_client.h +++ b/abstract_client.h @@ -264,19 +264,19 @@ /** * Whether an application menu is available for this Client - */ + **/ Q_PROPERTY(bool hasApplicationMenu READ hasApplicationMenu NOTIFY hasApplicationMenuChanged) /** * Whether the application menu for this Client is currently opened - */ + **/ Q_PROPERTY(bool applicationMenuActive READ applicationMenuActive NOTIFY applicationMenuActiveChanged) /** * Whether this client is unresponsive. * * When an application failed to react on a ping request in time, it is * considered unresponsive. This usually indicates that the application froze or crashed. - */ + **/ Q_PROPERTY(bool unresponsive READ unresponsive NOTIFY unresponsiveChanged) /** * The "Window Tabs" Group this Client belongs to. @@ -288,7 +288,7 @@ * Absolute file path, or name of palette in the user's config directory following KColorSchemes format. * An empty string indicates the default palette from kdeglobals is used. * @note this indicates the colour scheme requested, which might differ from the theme applied if the colorScheme cannot be found - */ + **/ Q_PROPERTY(QString colorScheme READ colorScheme NOTIFY colorSchemeChanged) public: @@ -418,7 +418,7 @@ * (normal=window which has a border, can be moved by the user, can be closed, etc.) * true for Desktop, Dock, Splash, Override and TopMenu (and Toolbar??? - for now) * false for Normal, Dialog, Utility and Menu (and Toolbar??? - not yet) TODO - */ + **/ bool isSpecialWindow() const; void sendToScreen(int screen); const QKeySequence &shortcut() const { @@ -434,7 +434,7 @@ /** * Set the window as being on the attached list of desktops * On X11 it will be set to the last entry - */ + **/ void setDesktops(QVector desktops); int desktop() const override { @@ -447,8 +447,8 @@ void setMinimized(bool set); /** - * Minimizes this client plus its transients - */ + * Minimizes this client plus its transients + **/ void minimize(bool avoid_animation = false); void unminimize(bool avoid_animation = false); bool isMinimized() const { @@ -470,41 +470,53 @@ * all clients in this tabGroup will have property("kwin_tiling_floats").toBool() == true * * WARNING: non dynamic properties are ignored - you're not supposed to alter/update such explicitly - */ + **/ Q_INVOKABLE void syncTabGroupFor(QString property, bool fromThisClient = false); TabGroup *tabGroup() const; /** * Set tab group - this is to be invoked by TabGroup::add/remove(client) and NO ONE ELSE - */ + **/ void setTabGroup(TabGroup* group); virtual void setClientShown(bool shown); Q_INVOKABLE bool untab(const QRect &toGeometry = QRect(), bool clientRemoved = false); - /* - * When a click is done in the decoration and it calls the group - * to change the visible client it starts to move-resize the new - * client, this function stops it. - */ + /** + * When a click is done in the decoration and it calls the group + * to change the visible client it starts to move-resize the new + * client, this function stops it. + **/ bool isCurrentTab() const; virtual QRect geometryRestore() const = 0; /** * The currently applied maximize mode - */ + **/ virtual MaximizeMode maximizeMode() const = 0; /** * The maximise mode requested by the server. * For X this always matches maximizeMode, for wayland clients it * is asyncronous - */ + **/ virtual MaximizeMode requestedMaximizeMode() const; void maximize(MaximizeMode); + /** + * Sets the maximization according to @p vertically and @p horizontally. + **/ void setMaximize(bool vertically, bool horizontally); virtual bool noBorder() const = 0; virtual void setNoBorder(bool set) = 0; virtual void blockActivityUpdates(bool b = true) = 0; QPalette palette() const; const Decoration::DecorationPalette *decorationPalette() const; + /** + * Returns whether the window is resizable or has a fixed size. + **/ virtual bool isResizable() const = 0; + /** + * Returns whether the window is moveable or has a fixed position. + **/ virtual bool isMovable() const = 0; + /** + * Returns whether the window can be moved to another screen. + **/ virtual bool isMovableAcrossScreens() const = 0; /** * @c true only for @c ShadeNormal @@ -525,6 +537,9 @@ * Whether the Client can be shaded. Default implementation returns @c false. **/ virtual bool isShadeable() const; + /** + * Returns whether the window is maximizable or not. + **/ virtual bool isMaximizable() const = 0; virtual bool isMinimizable() const = 0; virtual QRect iconGeometry() const; @@ -574,7 +589,7 @@ /** * These values represent positions inside an area - */ + **/ enum Position { // without prefix, they'd conflict with Qt::TopLeftCorner etc. :( PositionCenter = 0x00, @@ -593,11 +608,12 @@ // a helper for the workspace window packing. tests for screen validity and updates since in maximization case as with normal moving void packTo(int left, int top); - /** Set the quick tile mode ("snap") of this window. + /** + * Sets the quick tile mode ("snap") of this window. * This will also handle preserving and restoring of window geometry as necessary. * @param mode The tile mode (left/right) to give this window. * @param keyboard Defines whether to take keyboard cursor into account. - */ + **/ void setQuickTileMode(QuickTileMode mode, bool keyboard = false); QuickTileMode quickTileMode() const { return QuickTileMode(m_quickTileMode); @@ -623,14 +639,17 @@ SizemodeMax ///< Try not to make it larger in either direction }; /** - *Calculate the appropriate frame size for the given client size @p wsize. + * Calculates the appropriate frame size for the given client size @p wsize. * * @p wsize is adapted according to the window's size hints (minimum, maximum and incremental size changes). * * Default implementation returns the passed in @p wsize. - */ + **/ virtual QSize sizeForClientSize(const QSize &wsize, Sizemode mode = SizemodeAny, bool noframe = false) const; + /** + * Adjust the frame size @p frame according to the window's size hints. + **/ QSize adjustedSize(const QSize&, Sizemode mode = SizemodeAny) const; QSize adjustedSize() const; @@ -687,23 +706,23 @@ virtual void updateDecoration(bool check_workspace_pos, bool force = false) = 0; /** - * Returns whether the window provides context help or not. If it does, - * you should show a help menu item or a help button like '?' and call - * contextHelp() if this is invoked. - * - * Default implementation returns @c false. - * @see showContextHelp; - */ + * Returns whether the window provides context help or not. If it does, + * you should show a help menu item or a help button like '?' and call + * contextHelp() if this is invoked. + * + * Default implementation returns @c false. + * @see showContextHelp; + **/ virtual bool providesContextHelp() const; /** - * Invokes context help on the window. Only works if the window - * actually provides context help. - * - * Default implementation does nothing. - * - * @see providesContextHelp() - */ + * Invokes context help on the window. Only works if the window + * actually provides context help. + * + * Default implementation does nothing. + * + * @see providesContextHelp() + **/ virtual void showContextHelp(); QRect inputGeometry() const override; @@ -752,7 +771,7 @@ /** * Request showing the application menu bar * @param actionId The DBus menu ID of the action that should be highlighted, 0 for the root menu - */ + **/ void showApplicationMenu(int actionId); bool unresponsive() const; @@ -1038,8 +1057,8 @@ } void checkUnrestrictedMoveResize(); /** - * Sets an appropriate cursor shape for the logical mouse position. - */ + * Sets an appropriate cursor shape for the logical mouse position. + **/ void updateCursor(); void startDelayedMoveResize(); void stopDelayedMoveResize(); @@ -1073,7 +1092,7 @@ /* * Checks if the mouse cursor is near the edge of the screen and if so * activates quick tiling or maximization - */ + **/ void checkQuickTilingMaximizationZones(int xroot, int yroot); /** * Whether a sync request is still pending. @@ -1172,8 +1191,7 @@ // electric border/quick tiling QuickTileMode m_electricMode = QuickTileFlag::None; bool m_electricMaximizing = false; - /** The quick tile mode of this window. - */ + // The quick tile mode of this window. int m_quickTileMode = int(QuickTileFlag::None); QTimer *m_electricMaximizingDelay = nullptr; @@ -1221,7 +1239,7 @@ /** * Helper for AbstractClient::blockGeometryUpdates() being called in pairs (true/false) - */ + **/ class GeometryUpdatesBlocker { public: diff --git a/abstract_output.h b/abstract_output.h --- a/abstract_output.h +++ b/abstract_output.h @@ -71,18 +71,18 @@ qreal scale() const { return m_scale; } - /* + /** * The geometry of this output in global compositor co-ordinates (i.e scaled) - */ + **/ QRect geometry() const; QSize physicalSize() const; Qt::ScreenOrientation orientation() const { return m_orientation; } - /* - * Current refresh rate in 1/ms - */ + /** + * Current refresh rate in 1/ms. + **/ int refreshRate() const; bool isInternal() const { @@ -93,20 +93,20 @@ void setScale(qreal scale); /** - * This sets the changes and tests them against the specific output - */ + * This sets the changes and tests them against the specific output. + **/ void setChanges(KWayland::Server::OutputChangeSet *changeset); QPointer waylandOutput() const { return m_waylandOutput; } /** * Enable or disable the output. - * This differs from updateDpms as it also - * removes the wl_output. + * + * This differs from updateDpms as it also removes the wl_output. * The default is on. - */ + **/ void setEnabled(bool enable); virtual int getGammaRampSize() const { diff --git a/activation.cpp b/activation.cpp --- a/activation.cpp +++ b/activation.cpp @@ -219,14 +219,14 @@ //**************************************** -/*! - Informs the workspace about the active client, i.e. the client that - has the focus (or None if no client has the focus). This functions - is called by the client itself that gets focus. It has no other - effect than fixing the focus chain and the return value of - activeClient(). And of course, to propagate the active client to the - world. - */ +/** + * Informs the workspace about the active client, i.e. the client that + * has the focus (or None if no client has the focus). This functions + * is called by the client itself that gets focus. It has no other + * effect than fixing the focus chain and the return value of + * activeClient(). And of course, to propagate the active client to the + * world. + **/ void Workspace::setActiveClient(AbstractClient* c) { if (active_client == c) @@ -278,17 +278,18 @@ --set_active_client_recursion; } -/*! - Tries to activate the client \a c. This function performs what you - expect when clicking the respective entry in a taskbar: showing and - raising the client (this may imply switching to the another virtual - desktop) and putting the focus onto it. Once X really gave focus to - the client window as requested, the client itself will call - setActiveClient() and the operation is complete. This may not happen - with certain focus policies, though. - - \sa stActiveClient(), requestFocus() - */ +/** + * Tries to activate the client \a c. This function performs what you + * expect when clicking the respective entry in a taskbar: showing and + * raising the client (this may imply switching to the another virtual + * desktop) and putting the focus onto it. Once X really gave focus to + * the client window as requested, the client itself will call + * setActiveClient() and the operation is complete. This may not happen + * with certain focus policies, though. + * + * @see setActiveClient + * @see requestFocus + **/ void Workspace::activateClient(AbstractClient* c, bool force) { if (c == NULL) { @@ -333,13 +334,13 @@ } } -/*! - Tries to activate the client by asking X for the input focus. This - function does not perform any show, raise or desktop switching. See - Workspace::activateClient() instead. - - \sa Workspace::activateClient() - */ +/** + * Tries to activate the client by asking X for the input focus. This + * function does not perform any show, raise or desktop switching. See + * Workspace::activateClient() instead. + * + * @see activateClient + **/ void Workspace::requestFocus(AbstractClient* c, bool force) { takeActivity(c, force ? ActivityFocusForce : ActivityFocus); @@ -404,13 +405,13 @@ screens()->setCurrent(c->screen()); } -/*! - Informs the workspace that the client \a c has been hidden. If it - was the active client (or to-become the active client), - the workspace activates another one. - - \a c may already be destroyed - */ +/** + * Informs the workspace that the client \a c has been hidden. If it + * was the active client (or to-become the active client), + * the workspace activates another one. + * + * @note @p c may already be destroyed. + **/ void Workspace::clientHidden(AbstractClient* c) { assert(!c->isShown(true) || !c->isOnCurrentDesktop() || !c->isOnCurrentActivity()); @@ -700,12 +701,12 @@ // Client //******************************************** -/*! - Updates the user time (time of last action in the active window). - This is called inside kwin for every action with the window - that qualifies for user interaction (clicking on it, activate it - externally, etc.). - */ +/** + * Updates the user time (time of last action in the active window). + * This is called inside kwin for every action with the window + * that qualifies for user interaction (clicking on it, activate it + * externally, etc.). + **/ void Client::updateUserTime(xcb_timestamp_t time) { // copied in Group::updateUserTime diff --git a/activities.h b/activities.h --- a/activities.h +++ b/activities.h @@ -46,10 +46,10 @@ bool start(const QString &id); void setCurrent(const QString &activity); /** - * Adds/removes client \a c to/from \a activity. - * - * Takes care of transients as well. - */ + * Adds/removes client \a c to/from \a activity. + * + * Takes care of transients as well. + **/ void toggleClientOnActivity(Client* c, const QString &activity, bool dont_activate); QStringList running() const; @@ -66,18 +66,18 @@ * This signal is emitted when the global * activity is changed * @param id id of the new current activity - */ + **/ void currentChanged(const QString &id); /** * This signal is emitted when a new activity is added * @param id id of the new activity - */ + **/ void added(const QString &id); /** * This signal is emitted when the activity * is removed * @param id id of the removed activity - */ + **/ void removed(const QString &id); private Q_SLOTS: diff --git a/client.h b/client.h --- a/client.h +++ b/client.h @@ -51,7 +51,7 @@ * @brief Defines Predicates on how to search for a Client. * * Used by Workspace::findClient. - */ + **/ enum class Predicate { WindowMatch, WrapperIdMatch, @@ -68,7 +68,7 @@ * MAY BE DISOBEYED BY THE WM! It's only for information, do NOT rely on it at all. * The value is evaluated each time the getter is called. * Because of that no changed signal is provided. - */ + **/ Q_PROPERTY(QSize basicUnit READ basicUnit) /** * A client can block compositing. That is while the Client is alive and the state is set, @@ -247,18 +247,18 @@ StrutRects strutRects() const; bool hasStrut() const override; - /* - * If shown is true the client is mapped and raised, if false - * the client is unmapped and hidden, this function is called - * when the tabbing group of the client switches its visible - * client. - */ + /** + * If shown is true the client is mapped and raised, if false + * the client is unmapped and hidden, this function is called + * when the tabbing group of the client switches its visible + * client. + **/ void setClientShown(bool shown) override; /** * Whether or not the window has a strut that expands through the invisible area of * an xinerama setup where the monitors are not the same resolution. - */ + **/ bool hasOffscreenXineramaStrut() const; // Decorations <-> Effects @@ -380,19 +380,19 @@ /** * Emitted whenever the Client want to show it menu - */ + **/ void showRequest(); /** * Emitted whenever the Client's menu is closed - */ + **/ void menuHidden(); /** * Emitted whenever the Client's menu is available **/ void appMenuAvailable(); /** * Emitted whenever the Client's menu is unavailable - */ + **/ void appMenuUnavailable(); /** diff --git a/client.cpp b/client.cpp --- a/client.cpp +++ b/client.cpp @@ -86,12 +86,12 @@ /** * \class Client client.h * \brief The Client class encapsulates a window decoration frame. - */ + **/ /** * This ctor is "dumb" - it only initializes data. All the real initialization * is done in manage(). - */ + **/ Client::Client() : AbstractClient() , m_client() @@ -184,7 +184,7 @@ /** * "Dumb" destructor. - */ + **/ Client::~Client() { if (m_killHelperPID && !::kill(m_killHelperPID, 0)) { // means the process is alive @@ -212,7 +212,7 @@ /** * Releases the window. The client has done its job and the window is still existing. - */ + **/ void Client::releaseWindow(bool on_shutdown) { assert(!deleting); @@ -282,7 +282,7 @@ /** * Like releaseWindow(), but this one is called when the window has been already destroyed * (E.g. The application closed it) - */ + **/ void Client::destroyClient() { assert(!deleting); @@ -567,7 +567,7 @@ * re-layouts (e.g. when maximization state changes, * the decoration may alter some borders, but the actual size * of the decoration stays the same). - */ + **/ void Client::resizeDecoration() { triggerDecorationRepaint(); @@ -690,7 +690,7 @@ /** * Returns whether the window is minimizable or not - */ + **/ bool Client::isMinimizable() const { if (isSpecialWindow() && !isTransient()) @@ -930,7 +930,7 @@ /** * Sets the client window's mapping state. Possible values are * WithdrawnState, IconicState, NormalState. - */ + **/ void Client::exportMappingState(int s) { assert(m_client != XCB_WINDOW_NONE); @@ -998,7 +998,7 @@ * Maps (shows) the client. Note that it is mapping state of the frame, * not necessarily the client window itself (i.e. a shaded window is here * considered mapped, even though it is in IconicState). - */ + **/ void Client::map() { // XComposite invalidates backing pixmaps on unmap (minimize, different @@ -1019,7 +1019,7 @@ /** * Unmaps the client. Again, this is about the frame. - */ + **/ void Client::unmap() { // Here it may look like a race condition, as some other client might try to unmap @@ -1047,7 +1047,7 @@ * then it's hoped that there will be some other desktop above it *shrug*. * Using normal shape would be better, but that'd affect other things, e.g. painting * of the actual preview. - */ + **/ void Client::updateHiddenPreview() { if (hiddenPreview()) { @@ -1085,15 +1085,15 @@ /** * Returns whether the window may be closed (have a close button) - */ + **/ bool Client::isCloseable() const { return rules()->checkCloseable(m_motif.close() && !isSpecialWindow()); } /** * Closes the window by either sending a delete_window message or using XKill. - */ + **/ void Client::closeWindow() { if (!isCloseable()) @@ -1113,7 +1113,7 @@ /** * Kills the window via XKill - */ + **/ void Client::killWindow() { qCDebug(KWIN_CORE) << "Client::killWindow():" << caption(); @@ -1125,7 +1125,7 @@ /** * Send a ping to the window using _NET_WM_PING if possible if it * doesn't respond within a reasonable time, it will be killed. - */ + **/ void Client::pingWindow() { if (!info->supportsProtocol(NET::PingProtocol)) @@ -1237,7 +1237,7 @@ * * Note: If it was on all activities and you try to remove it from one, nothing will happen; * I don't think that's an important enough use case to handle here. - */ + **/ void Client::setOnActivity(const QString &activity, bool enable) { #ifdef KWIN_BUILD_ACTIVITIES @@ -1263,7 +1263,7 @@ /** * set exactly which activities this client is on - */ + **/ void Client::setOnActivities(QStringList newActivitiesList) { #ifdef KWIN_BUILD_ACTIVITIES @@ -1320,7 +1320,7 @@ /** * update after activities changed - */ + **/ void Client::updateActivities(bool includeTransients) { if (m_activityUpdatesBlocked) { @@ -1342,7 +1342,7 @@ * Returns the list of activities the client window is on. * if it's on all activities, the list will be empty. * Don't use this, use isOnActivity() and friends (from class Toplevel) - */ + **/ QStringList Client::activities() const { if (sessionActivityOverride) { @@ -1354,7 +1354,7 @@ /** * if @p on is true, sets on all activities. * if it's false, sets it to only be on the current activity - */ + **/ void Client::setOnAllActivities(bool on) { #ifdef KWIN_BUILD_ACTIVITIES @@ -1373,7 +1373,7 @@ /** * Performs the actual focusing of the window using XSetInputFocus and WM_TAKE_FOCUS - */ + **/ void Client::takeFocus() { if (rules()->checkAcceptFocus(info->input())) @@ -1404,7 +1404,7 @@ * contextHelp() if this is invoked. * * \sa contextHelp() - */ + **/ bool Client::providesContextHelp() const { return info->supportsProtocol(NET::ContextHelpProtocol); @@ -1415,7 +1415,7 @@ * actually provides context help. * * \sa providesContextHelp() - */ + **/ void Client::showContextHelp() { if (info->supportsProtocol(NET::ContextHelpProtocol)) { @@ -1426,7 +1426,7 @@ /** * Fetches the window's caption (WM_NAME property). It will be * stored in the client's caption(). - */ + **/ void Client::fetchName() { setCaption(readName()); @@ -1669,7 +1669,7 @@ /** * Send the client a _NET_SYNC_REQUEST - */ + **/ void Client::sendSyncRequest() { if (syncRequest.counter == XCB_NONE || syncRequest.isPending) diff --git a/colorcorrection/constants.h b/colorcorrection/constants.h --- a/colorcorrection/constants.h +++ b/colorcorrection/constants.h @@ -31,12 +31,13 @@ static const int DEFAULT_NIGHT_TEMPERATURE = 4500; static const int FALLBACK_SLOW_UPDATE_TIME = 1800000; /* 30 minutes */ -/* Whitepoint values for temperatures at 100K intervals. +/** + * Whitepoint values for temperatures at 100K intervals. * These will be interpolated for the actual temperature. * This table was provided by Ingo Thies, 2013. * See the following file for more information: * https://github.com/jonls/redshift/blob/master/README-colorramp - */ + **/ static const float blackbodyColor[] = { 1.00000000, 0.18172716, 0.00000000, /* 1000K */ 1.00000000, 0.25503671, 0.00000000, /* 1100K */ diff --git a/composite.h b/composite.h --- a/composite.h +++ b/composite.h @@ -165,12 +165,12 @@ * Notifies the compositor that SwapBuffers() is about to be called. * Rendering of the next frame will be deferred until bufferSwapComplete() * is called. - */ + **/ void aboutToSwapBuffers(); /** * Notifies the compositor that a pending buffer swap has completed. - */ + **/ void bufferSwapComplete(); Q_SIGNALS: diff --git a/cursor.h b/cursor.h --- a/cursor.h +++ b/cursor.h @@ -51,7 +51,7 @@ /** * @brief Wrapper round Qt::CursorShape with extensions enums into a single entity - */ + **/ class KWIN_EXPORT CursorShape { public: CursorShape() = default; @@ -69,7 +69,7 @@ } /** * @brief The name of a cursor shape in the theme. - */ + **/ QByteArray name() const; private: int m_shape = Qt::ArrowCursor; @@ -112,28 +112,28 @@ * This tracking is not about pointer position tracking. * @see stopCursorTracking * @see cursorChanged - */ + **/ void startCursorTracking(); /** * @brief Disables tracking changes of cursor images. * * Only call after using startCursorTracking. * * @see startCursorTracking - */ + **/ void stopCursorTracking(); /** * @brief The name of the currently used Cursor theme. * * @return const QString& - */ + **/ const QString &themeName() const; /** * @brief The size of the currently used Cursor theme. * * @return int - */ + **/ int themeSize() const; /** * @return list of alternative names for the cursor with @p name @@ -172,7 +172,7 @@ * * @see startCursorTracking * @see stopCursorTracking - */ + **/ void cursorChanged(); void themeChanged(); @@ -211,12 +211,12 @@ /** * Called from startCursorTracking when cursor image tracking gets activated. Inheriting class needs * to overwrite to enable platform specific code for the tracking. - */ + **/ virtual void doStartCursorTracking(); /** * Called from stopCursorTracking when cursor image tracking gets deactivated. Inheriting class needs * to overwrite to disable platform specific code for the tracking. - */ + **/ virtual void doStopCursorTracking(); bool isCursorTracking() const; /** @@ -252,8 +252,7 @@ * @brief Implementation using the InputRedirection framework to get pointer positions. * * Does not support warping of cursor. - * - */ + **/ class InputRedirectionCursor : public Cursor { Q_OBJECT diff --git a/dbusinterface.h b/dbusinterface.h --- a/dbusinterface.h +++ b/dbusinterface.h @@ -200,7 +200,7 @@ /** * list of key/value pairs which every one of them is representing a desktop - */ + **/ Q_PROPERTY(KWin::DBusDesktopDataVector desktops READ desktops NOTIFY desktopsChanged); public: @@ -234,7 +234,7 @@ /** * Create a desktop with a new name at a given position * note: the position starts from 1 - */ + **/ void createDesktop(uint position, const QString &name); void setDesktopName(const QString &id, const QString &name); void removeDesktop(const QString &id); diff --git a/effectloader.h b/effectloader.h --- a/effectloader.h +++ b/effectloader.h @@ -43,7 +43,7 @@ * an Effect should be loaded. * * @see AbstractEffectLoader::readConfig() - */ + **/ enum class LoadEffectFlag { Load = 1 << 0, ///< Effect should be loaded CheckDefaultFunction = 1 << 2 ///< The Check Default Function needs to be invoked if the Effect provides it @@ -65,7 +65,7 @@ * Serving all of them with one Effect Loader is rather complex given that different stores need * to be queried at the same time. Thus the idea is to have one implementation per type and one * implementation which makes use of all of them and combines the loading. - */ + **/ class KWIN_EXPORT AbstractEffectLoader : public QObject { Q_OBJECT @@ -79,7 +79,7 @@ * * @param config * @internal - */ + **/ virtual void setConfig(KSharedConfig::Ptr config); /** @@ -90,7 +90,7 @@ * * @param name The name of the Effect to look for. * @return bool @c true if the Effect Loader knows this effect, false otherwise - */ + **/ virtual bool hasEffect(const QString &name) const = 0; /** @@ -100,7 +100,7 @@ * It's possible that the store of effects changed (e.g. a new one got installed) * * @return QStringList The internal names of the known Effects - */ + **/ virtual QStringList listOfKnownEffects() const = 0; /** @@ -124,7 +124,7 @@ * @return bool @c true if the effect could be loaded, @c false in error case * @see queryAndLoadAll() * @see effectLoaded(KWin::Effect*,const QString&) - */ + **/ virtual bool loadEffect(const QString &name) = 0; /** @@ -152,15 +152,15 @@ * * @see loadEffect(const QString &) * @see effectLoaded(KWin::Effect*,const QString&) - */ + **/ virtual void queryAndLoadAll() = 0; /** * @brief Whether the Effect with the given @p name is supported by the compositing backend. * * @param name The name of the Effect to check. * @return bool @c true if it is supported, @c false otherwise - */ + **/ virtual bool isEffectSupported(const QString &name) const = 0; /** @@ -175,7 +175,7 @@ * @param effect The created Effect * @param name The internal name of the loaded Effect * @return void - */ + **/ void effectLoaded(KWin::Effect *effect, const QString &name); protected: @@ -191,7 +191,7 @@ * @param effectName The name of the Effect to look for in the configuration * @param defaultValue Whether the Effect is enabled by default or not. * @returns Flags indicating whether the Effect should be loaded and how it should be loaded - */ + **/ LoadEffectFlags readConfig(const QString &effectName, bool defaultValue) const; private: @@ -214,7 +214,7 @@ * * The queue operates like a normal queue providing enqueue and a scheduleDequeue instead of dequeue. * - */ + **/ class AbstractEffectLoadQueue : public QObject { Q_OBJECT @@ -274,8 +274,7 @@ /** * @brief Can load the Built-In-Effects - * - */ + **/ class BuiltInEffectLoader : public AbstractEffectLoader { Q_OBJECT @@ -301,8 +300,7 @@ /** * @brief Can load scripted Effects - * - */ + **/ class KWIN_EXPORT ScriptedEffectLoader : public AbstractEffectLoader { Q_OBJECT diff --git a/effects.h b/effects.h --- a/effects.h +++ b/effects.h @@ -574,7 +574,7 @@ } /** * The foreground text color as specified by the default Plasma theme. - */ + **/ QColor styledTextColor(); private Q_SLOTS: diff --git a/effects/slide/slide.cpp b/effects/slide/slide.cpp --- a/effects/slide/slide.cpp +++ b/effects/slide/slide.cpp @@ -93,7 +93,7 @@ * @param diff Vector between two points * @param w Width of the desktop grid * @param h Height of the desktop grid - */ + **/ inline void wrapDiff(QPoint &diff, int w, int h) { if (diff.x() > w/2) { @@ -200,7 +200,7 @@ /** * Decide whether given window @p w should be transformed/translated. * @returns @c true if given window @p w should be transformed, otherwise @c false - */ + **/ bool SlideEffect::isTranslated(const EffectWindow *w) const { if (w->isOnAllDesktops()) { @@ -222,7 +222,7 @@ /** * Decide whether given window @p w should be painted. * @returns @c true if given window @p w should be painted, otherwise @c false - */ + **/ bool SlideEffect::isPainted(const EffectWindow *w) const { if (w->isOnAllDesktops()) { @@ -295,7 +295,7 @@ /** * Get position of the top-left corner of desktop @p id within desktop grid with gaps. * @param id ID of a virtual desktop - */ + **/ QPoint SlideEffect::desktopCoords(int id) const { QPoint c = effects->desktopCoords(id); @@ -308,7 +308,7 @@ /** * Get geometry of desktop @p id within desktop grid with gaps. * @param id ID of a virtual desktop - */ + **/ QRect SlideEffect::desktopGeometry(int id) const { QRect g = effects->virtualScreenGeometry(); @@ -318,7 +318,7 @@ /** * Get width of a virtual desktop grid. - */ + **/ int SlideEffect::workspaceWidth() const { int w = effects->workspaceWidth(); @@ -328,7 +328,7 @@ /** * Get height of a virtual desktop grid. - */ + **/ int SlideEffect::workspaceHeight() const { int h = effects->workspaceHeight(); diff --git a/events.cpp b/events.cpp --- a/events.cpp +++ b/events.cpp @@ -191,9 +191,9 @@ } -/*! - Handles workspace specific XCB event - */ +/** + * Handles workspace specific XCB event + **/ bool Workspace::workspaceEvent(xcb_generic_event_t *e) { const uint8_t eventType = e->response_type & ~0x80; @@ -408,9 +408,9 @@ // Client // **************************************** -/*! - General handler for XEvents concerning the client window - */ +/** + * General handler for XEvents concerning the client window + **/ bool Client::windowEvent(xcb_generic_event_t *e) { if (findEventWindow(e) == window()) { // avoid doing stuff on frame or wrapper @@ -576,9 +576,9 @@ return true; // eat all events } -/*! - Handles map requests of the client window - */ +/** + * Handles map requests of the client window + **/ bool Client::mapRequestEvent(xcb_map_request_event_t *e) { if (e->window != window()) { @@ -612,9 +612,9 @@ return true; } -/*! - Handles unmap notify events of the client window - */ +/** + * Handles unmap notify events of the client window + **/ void Client::unmapNotifyEvent(xcb_unmap_notify_event_t *e) { if (e->window != window()) @@ -648,9 +648,9 @@ } -/*! - Handles client messages for the client window -*/ +/** + * Handles client messages for the client window + **/ void Client::clientMessageEvent(xcb_client_message_event_t *e) { Toplevel::clientMessageEvent(e); @@ -665,9 +665,9 @@ } -/*! - Handles configure requests of the client window - */ +/** + * Handles configure requests of the client window + **/ void Client::configureRequestEvent(xcb_configure_request_event_t *e) { if (e->window != window()) @@ -708,9 +708,9 @@ } -/*! - Handles property changes of the client window - */ +/** + * Handles property changes of the client window + **/ void Client::propertyNotifyEvent(xcb_property_notify_event_t *e) { Toplevel::propertyNotifyEvent(e); @@ -859,12 +859,12 @@ #undef XNumL #undef XScrL -/* - Releases the passive grab for some modifier combinations when a - window becomes active. This helps broken X programs that - missinterpret LeaveNotify events in grab mode to work properly - (Motif, AWT, Tk, ...) - */ +/** + * Releases the passive grab for some modifier combinations when a + * window becomes active. This helps broken X programs that + * missinterpret LeaveNotify events in grab mode to work properly + * (Motif, AWT, Tk, ...) + **/ void Client::updateMouseGrab() { if (workspace()->globalShortcutsDisabled()) { diff --git a/geometry.cpp b/geometry.cpp --- a/geometry.cpp +++ b/geometry.cpp @@ -64,9 +64,9 @@ extern int screen_number; extern bool is_multihead; -/*! - Resizes the workspace after an XRANDR screen size change - */ +/** + * Resizes the workspace after an XRANDR screen size change + **/ void Workspace::desktopResized() { QRect geom = screens()->geometry(); @@ -98,18 +98,17 @@ oldscreensizes.append( screens()->geometry( i )); } -/*! - Updates the current client areas according to the current clients. - - If the area changes or force is true, the new areas are propagated to the world. - - The client area is the area that is available for clients (that - which is not taken by windows like panels, the top-of-screen menu - etc). - - \sa clientArea() - */ - +/** + * Updates the current client areas according to the current clients. + * + * If the area changes or force is @c true, the new areas are propagated to the world. + * + * The client area is the area that is available for clients (that + * which is not taken by windows like panels, the top-of-screen menu + * etc). + * + * @see clientArea() + **/ void Workspace::updateClientArea(bool force) { const Screens *s = Screens::self(); @@ -341,14 +340,11 @@ } -/*! - returns the area available for clients. This is the desktop - geometry minus windows on the dock. Placement algorithms should - refer to this rather than geometry(). - - \sa geometry() - */ - +/** + * Returns the area available for clients. This is the desktop + * geometry minus windows on the dock. Placement algorithms should + * refer to this rather than Screens::geometry. + **/ QRect Workspace::clientArea(clientAreaOption opt, int screen, int desktop) const { if (desktop == NETWinInfo::OnAllDesktops || desktop == 0) @@ -453,15 +449,15 @@ return olddisplaysize.height(); } -/*! - Client \a c is moved around to position \a pos. This gives the - workspace the opportunity to interveniate and to implement - snap-to-windows functionality. - - The parameter \a snapAdjust is a multiplier used to calculate the - effective snap zones. When 1.0, it means that the snap zones will be - used without change. - */ +/** + * Client \a c is moved around to position \a pos. This gives the + * workspace the opportunity to interveniate and to implement + * snap-to-windows functionality. + * + * The parameter \a snapAdjust is a multiplier used to calculate the + * effective snap zones. When 1.0, it means that the snap zones will be + * used without change. + **/ QPoint Workspace::adjustClientPosition(AbstractClient* c, QPoint pos, bool unrestricted, double snapAdjust) { QSize borderSnapZone(options->borderSnapZone(), options->borderSnapZone()); @@ -885,9 +881,9 @@ return moveResizeGeom; } -/*! - Marks the client as being moved around by the user. - */ +/** + * Marks the client as being moved around by the user. + **/ void Workspace::setClientIsMoving(AbstractClient *c) { Q_ASSERT(!c || !movingClient); // Catch attempts to move a second @@ -920,11 +916,11 @@ // Client //******************************************** -/*! - Returns \a area with the client's strut taken into account. - - Used from Workspace in updateClientArea. - */ +/** + * Returns \a area with the client's strut taken into account. + * + * Used from Workspace in updateClientArea. + **/ // TODO move to Workspace? QRect Client::adjustedClientArea(const QRect &desktopArea, const QRect& area) const @@ -1336,9 +1332,6 @@ } } -/*! - Adjust the frame size \a frame according to he window's size hints. - */ QSize AbstractClient::adjustedSize(const QSize& frame, Sizemode mode) const { // first, get the window size for the given frame size s @@ -1357,14 +1350,13 @@ return sizeForClientSize(clientSize()); } -/*! - Calculate the appropriate frame size for the given client size \a - wsize. - - \a wsize is adapted according to the window's size hints (minimum, - maximum and incremental size changes). - - */ +/** + * Calculate the appropriate frame size for the given client size \a + * wsize. + * + * \a wsize is adapted according to the window's size hints (minimum, + * maximum and incremental size changes). + **/ QSize Client::sizeForClientSize(const QSize& wsize, Sizemode mode, bool noframe) const { int w = wsize.width(); @@ -1534,9 +1526,9 @@ return rules()->checkSize(QSize(w, h)); } -/*! - Gets the client's normal WM hints and reconfigures itself respectively. - */ +/** + * Gets the client's normal WM hints and reconfigures itself respectively. + **/ void Client::getWmNormalHints() { const bool hadFixedAspect = m_geometryHints.hasAspect(); @@ -1588,11 +1580,10 @@ return m_geometryHints.resizeIncrements(); } -/*! - Auxiliary function to inform the client about the current window - configuration. - - */ +/** + * Auxiliary function to inform the client about the current window + * configuration. + **/ void Client::sendSyntheticConfigureNotify() { xcb_configure_notify_event_t c; @@ -1878,10 +1869,6 @@ configureRequest(value_mask, x, y, width, height, gravity, true); } -/*! - Returns whether the window is moveable or has a fixed - position. - */ bool Client::isMovable() const { if (!hasNETSupport() && !m_motif.move()) { @@ -1896,9 +1883,6 @@ return true; } -/*! - Returns whether the window is moveable across Xinerama screens - */ bool Client::isMovableAcrossScreens() const { if (!hasNETSupport() && !m_motif.move()) { @@ -1911,9 +1895,6 @@ return true; } -/*! - Returns whether the window is resizable or has a fixed size. - */ bool Client::isResizable() const { if (!hasNETSupport() && !m_motif.resize()) { @@ -1935,9 +1916,6 @@ return min.width() < max.width() || min.height() < max.height(); } -/* - Returns whether the window is maximizable or not - */ bool Client::isMaximizable() const { if (!isResizable() || isToolbar()) // SELI isToolbar() ? @@ -1948,9 +1926,9 @@ } -/*! - Reimplemented to inform the client about the new window position. - */ +/** + * Reimplemented to inform the client about the new window position. + **/ void Client::setGeometry(int x, int y, int w, int h, ForceGeometry_t force) { // this code is also duplicated in Client::plainResize() @@ -2110,9 +2088,9 @@ emit geometryChanged(); } -/*! - Reimplemented to inform the client about the new window position. - */ +/** + * Reimplemented to inform the client about the new window position. + **/ void AbstractClient::move(int x, int y, ForceGeometry_t force) { // resuming geometry updates is handled only in setGeometry() @@ -2179,9 +2157,6 @@ setMaximize(m & MaximizeVertical, m & MaximizeHorizontal); } -/*! - Sets the maximization according to \a vertically and \a horizontally - */ void AbstractClient::setMaximize(bool vertically, bool horizontally) { // changeMaximize() flips the state, so change from set->flip @@ -2587,11 +2562,10 @@ setGeometry(fullscreenMonitorsArea(topology)); } - -/*! - Calculates the bounding rectangle defined by the 4 monitor indices indicating the - top, bottom, left, and right edges of the window when the fullscreen state is enabled. - */ +/** + * Calculates the bounding rectangle defined by the 4 monitor indices indicating the + * top, bottom, left, and right edges of the window when the fullscreen state is enabled. + **/ QRect Client::fullscreenMonitorsArea(NETFullscreenMonitors requestedTopology) const { QRect top, bottom, left, right, total; diff --git a/globalshortcuts.h b/globalshortcuts.h --- a/globalshortcuts.h +++ b/globalshortcuts.h @@ -58,15 +58,15 @@ * @param action The action to trigger if the shortcut is pressed * @param modifiers The modifiers which need to be hold to trigger the action * @param pointerButtons The pointer button which needs to be pressed - */ + **/ void registerPointerShortcut(QAction *action, Qt::KeyboardModifiers modifiers, Qt::MouseButtons pointerButtons); /** * @brief Registers an internal global axis shortcut * * @param action The action to trigger if the shortcut is triggered * @param modifiers The modifiers which need to be hold to trigger the action * @param axis The pointer axis - */ + **/ void registerAxisShortcut(QAction *action, Qt::KeyboardModifiers modifiers, PointerAxisDirection axis); void registerTouchpadSwipe(QAction *action, SwipeDirection direction); @@ -81,7 +81,7 @@ * @param modifiers The current hold modifiers * @param keyQt The Qt::Key which got pressed * @return @c true if a shortcut triggered, @c false otherwise - */ + **/ bool processKey(Qt::KeyboardModifiers modifiers, int keyQt); bool processPointerPressed(Qt::KeyboardModifiers modifiers, Qt::MouseButtons pointerButtons); /** @@ -94,7 +94,7 @@ * @param modifiers The current hold modifiers * @param axis The axis direction which has triggered this event * @return @c true if a shortcut triggered, @c false otherwise - */ + **/ bool processAxis(Qt::KeyboardModifiers modifiers, PointerAxisDirection axis); void processSwipeStart(uint fingerCount); diff --git a/group.cpp b/group.cpp --- a/group.cpp +++ b/group.cpp @@ -234,9 +234,9 @@ } -/*! - Sets the client \a c's transient windows' on_all_desktops property to \a on_all_desktops. - */ +/** + * Sets the client \a c's transient windows' on_all_desktops property to \a on_all_desktops. + **/ void Workspace::updateOnAllDesktopsOfTransients(AbstractClient* c) { for (auto it = c->transients().constBegin(); @@ -581,9 +581,9 @@ } } -/*! - Check that the window is not transient for itself, and similar nonsense. - */ +/** + * Check that the window is not transient for itself, and similar nonsense. + **/ xcb_window_t Client::verifyTransientFor(xcb_window_t new_transient_for, bool set) { xcb_window_t new_property_value = new_transient_for; diff --git a/input.h b/input.h --- a/input.h +++ b/input.h @@ -66,8 +66,7 @@ * In addition input is intercepted before passed to the surfaces to have KWin internal areas * getting input first (e.g. screen edges) and filter the input event out if we currently have * a full input grab. - * - */ + **/ class KWIN_EXPORT InputRedirection : public QObject { Q_OBJECT @@ -90,7 +89,7 @@ /** * @return const QPointF& The current global pointer position - */ + **/ QPointF globalPointer() const; Qt::MouseButtons qtButtonStates() const; Qt::KeyboardModifiers keyboardModifiers() const; @@ -114,23 +113,23 @@ /** * @internal - */ + **/ void processPointerMotion(const QPointF &pos, uint32_t time); /** * @internal - */ + **/ void processPointerButton(uint32_t button, PointerButtonState state, uint32_t time); /** * @internal - */ + **/ void processPointerAxis(PointerAxis axis, qreal delta, uint32_t time); /** * @internal - */ + **/ void processKeyboardKey(uint32_t key, KeyboardKeyState state, uint32_t time); /** * @internal - */ + **/ void processKeyboardModifiers(uint32_t modsDepressed, uint32_t modsLatched, uint32_t modsLocked, uint32_t group); /** * @internal @@ -229,21 +228,21 @@ * @brief Emitted when the global pointer position changed * * @param pos The new global pointer position. - */ + **/ void globalPointerChanged(const QPointF &pos); /** * @brief Emitted when the state of a pointer button changed. * * @param button The button which changed * @param state The new button state - */ + **/ void pointerButtonStateChanged(uint32_t button, InputRedirection::PointerButtonState state); /** * @brief Emitted when a pointer axis changed * * @param axis The axis on which the even occurred * @param delta The delta of the event. - */ + **/ void pointerAxisChanged(InputRedirection::PointerAxis axis, qreal delta); /** * @brief Emitted when the modifiers changes. @@ -253,14 +252,14 @@ * * @param newMods The new modifiers state * @param oldMods The previous modifiers state - */ + **/ void keyboardModifiersChanged(Qt::KeyboardModifiers newMods, Qt::KeyboardModifiers oldMods); /** * @brief Emitted when the state of a key changed. * * @param keyCode The keycode of the key which changed * @param state The new key state - */ + **/ void keyStateChanged(quint32 keyCode, InputRedirection::KeyboardKeyState state); void hasAlphaNumericKeyboardChanged(bool set); @@ -379,15 +378,15 @@ * @brief First Toplevel currently at the position of the input device * according to the stacking order. * @return Toplevel* at device position. - */ + **/ QPointer at() const { return m_at; } /** * @brief Toplevel currently having pointer input focus (this might * be different from the Toplevel at the position of the pointer). * @return Toplevel* with pointer focus. - */ + **/ QPointer focus() const { return m_focus.focus; } @@ -424,10 +423,11 @@ virtual void focusUpdate(Toplevel *old, Toplevel *now) = 0; - /* Certain input devices can be in a state of having no valid + /** + * Certain input devices can be in a state of having no valid * position. An example are touch screens when no finger/pen * is resting on the surface (no touch point). - */ + **/ virtual bool positionValid() const { return false; } diff --git a/kcmkwin/kwinscripts/module.h b/kcmkwin/kwinscripts/module.h --- a/kcmkwin/kwinscripts/module.h +++ b/kcmkwin/kwinscripts/module.h @@ -38,12 +38,12 @@ * * @param parent Parent widget of the module * @param args Arguments for the module - */ + **/ explicit Module(QWidget *parent, const QVariantList &args = QVariantList()); /** * Destructor. - */ + **/ ~Module(); virtual void load(); virtual void save(); @@ -53,19 +53,19 @@ /** * Called when the import script button is clicked. - */ + **/ void importScript(); void importScriptInstallFinished(KJob *job); private: /** * UI - */ + **/ Ui::Module *ui; /** * Updates the contents of the list view. - */ + **/ void updateListViewContents(); KSharedConfigPtr m_kwinConfig; }; diff --git a/kcmkwin/kwintabbox/layoutpreview.h b/kcmkwin/kwintabbox/layoutpreview.h --- a/kcmkwin/kwintabbox/layoutpreview.h +++ b/kcmkwin/kwintabbox/layoutpreview.h @@ -77,7 +77,7 @@ /** * The main QML item that will be displayed in the Dialog - */ + **/ Q_PROPERTY(QObject *item READ item WRITE setItem NOTIFY itemChanged) Q_CLASSINFO("DefaultProperty", "item") diff --git a/keyboard_input.h b/keyboard_input.h --- a/keyboard_input.h +++ b/keyboard_input.h @@ -66,11 +66,11 @@ /** * @internal - */ + **/ void processKey(uint32_t key, InputRedirection::KeyboardKeyState state, uint32_t time, LibInput::Device *device = nullptr); /** * @internal - */ + **/ void processModifiers(uint32_t modsDepressed, uint32_t modsLatched, uint32_t modsLocked, uint32_t group); /** * @internal diff --git a/layers.cpp b/layers.cpp --- a/layers.cpp +++ b/layers.cpp @@ -133,25 +133,25 @@ } } -/*! +/** * Some fullscreen effects have to raise the screenedge on top of an input window, thus all windows * this function puts them back where they belong for regular use and is some cheap variant of * the regular propagateClients function in that it completely ignores managed clients and everything * else and also does not update the NETWM property. * Called from Effects::destroyInputWindow so far. - */ + **/ void Workspace::stackScreenEdgesUnderOverrideRedirect() { if (!rootInfo()) { return; } Xcb::restackWindows(QVector() << rootInfo()->supportWindow() << ScreenEdges::self()->windows()); } -/*! - Propagates the managed clients to the world. - Called ONLY from updateStackingOrder(). - */ +/** + * Propagates the managed clients to the world. + * Called ONLY from updateStackingOrder(). + **/ void Workspace::propagateClients(bool propagate_new_clients) { if (!rootInfo()) { @@ -226,11 +226,11 @@ markXStackingOrderAsDirty(); } -/*! - Returns topmost visible client. Windows on the dock, the desktop - or of any other special kind are excluded. Also if the window - doesn't accept focus it's excluded. - */ +/** + * Returns topmost visible client. Windows on the dock, the desktop + * or of any other special kind are excluded. Also if the window + * doesn't accept focus it's excluded. + **/ // TODO misleading name for this method, too many slightly different ways to use it AbstractClient* Workspace::topClientOnDesktop(int desktop, int screen, bool unconstrained, bool only_normal) const { @@ -490,9 +490,9 @@ unconstrained_stacking_order.append(c); } -/*! - Returns a stacking order based upon \a list that fulfills certain contained. - */ +/** + * Returns a stacking order based upon \a list that fulfills certain contained. + **/ ToplevelList Workspace::constrainedStackingOrder() { ToplevelList layer[ NumLayers ]; diff --git a/libkwineffects/anidata_p.h b/libkwineffects/anidata_p.h --- a/libkwineffects/anidata_p.h +++ b/libkwineffects/anidata_p.h @@ -30,7 +30,7 @@ /** * Wraps effects->setActiveFullScreenEffect for the duration of it's lifespan - */ + **/ class FullScreenEffectLock { public: diff --git a/libkwineffects/kwineffects.h b/libkwineffects/kwineffects.h --- a/libkwineffects/kwineffects.h +++ b/libkwineffects/kwineffects.h @@ -212,7 +212,7 @@ /** * EffectWindow::setData() and EffectWindow::data() global roles. * All values between 0 and 999 are reserved for global roles. - */ + **/ enum DataRole { // Grab roles are used to force all other animations to ignore the window. // The value of the data is set to the Effect's `this` value. @@ -230,16 +230,16 @@ /** * Style types used by @ref EffectFrame. * @since 4.6 - */ + **/ enum EffectFrameStyle { EffectFrameNone, ///< Displays no frame around the contents. EffectFrameUnstyled, ///< Displays a basic box around the contents. EffectFrameStyled ///< Displays a Plasma-styled frame around the contents. }; /** * Infinite region (i.e. a special region type saying that everything needs to be painted). - */ + **/ KWINEFFECTS_EXPORT inline QRect infiniteRegion() { @@ -386,7 +386,7 @@ /** * Flags describing which parts of configuration have changed. - */ + **/ enum ReconfigureFlag { ReconfigureAll = 1 << 0 /// Everything needs to be reconfigured. }; @@ -398,12 +398,12 @@ * In OpenGL based compositing, the frameworks ensures that the context is current * when the Effect is reconfigured. If this method is called from within the Effect it is * required to ensure that the context is current if the implementation does OpenGL calls. - */ + **/ virtual void reconfigure(ReconfigureFlags flags); /** * Called when another effect requests the proxy for this effect. - */ + **/ virtual void* proxy(); /** @@ -492,7 +492,7 @@ /** * Called on Transparent resizes. * return true if your effect substitutes questioned feature - */ + **/ virtual bool provides(Feature); /** @@ -554,7 +554,7 @@ * object - signalling "let me alone, i know what i'm doing" * @param parameter A freeform string user input for your effect to interpret. * @since 4.11 - */ + **/ virtual QString debug(const QString ¶meter) const; /** @@ -642,13 +642,13 @@ * @param cfg configuration group to read value from * @param key configuration key to read value from * @param defaultTime default animation time in milliseconds - */ + **/ // return type is intentionally double so that one can divide using it without losing data static double animationTime(const KConfigGroup& cfg, const QString& key, int defaultTime); /** * @overload Use this variant if the animation time is hardcoded and not configurable * in the effect itself. - */ + **/ static double animationTime(int defaultTime); /** * @overload Use this variant if animation time is provided through a KConfigXT generated class @@ -689,7 +689,7 @@ /** * Prefer the KWIN_EFFECT_FACTORY macros. - */ + **/ class KWINEFFECTS_EXPORT EffectPluginFactory : public KPluginFactory { Q_OBJECT @@ -704,7 +704,7 @@ * If the current compositing backend is not supported it should return @c false. * * This method is optional, by default @c true is returned. - */ + **/ virtual bool isSupported() const; /** * Returns whether the Effect should get enabled by default. @@ -718,11 +718,11 @@ * and if X-KDE-PluginInfo-EnabledByDefault is set to true in the .desktop file. * * This method is optional, by default @c true is returned. - */ + **/ virtual bool enabledByDefault() const; /** * This method returns the created Effect. - */ + **/ virtual KWin::Effect *createEffect() const = 0; }; @@ -810,7 +810,7 @@ * animation speed. The actual value should be determined using animationTime(). * Note: The factor can be also 0, so make sure your code can cope with 0ms time * if used manually. - */ + **/ Q_PROPERTY(qreal animationTimeFactor READ animationTimeFactor) Q_PROPERTY(QList< KWin::EffectWindow* > stackingOrder READ stackingOrder) /** @@ -877,7 +877,7 @@ * * @param shortcut The global shortcut which should trigger the action * @param action The action which gets triggered when the shortcut matches - */ + **/ virtual void registerGlobalShortcut(const QKeySequence &shortcut, QAction *action) = 0; /** * @brief Registers a global pointer shortcut with the provided @p action. @@ -908,7 +908,7 @@ /** * Retrieve the proxy class for an effect if it has one. Will return NULL if * the effect isn't loaded or doesn't have a proxy class. - */ + **/ virtual void* getProxy(QString name) = 0; // Mouse polling @@ -948,95 +948,95 @@ /** * Moves the window to the specific desktop * Setting desktop to NET::OnAllDesktops will set the window on all desktops - */ + **/ Q_SCRIPTABLE virtual void windowToDesktop(KWin::EffectWindow* w, int desktop) = 0; /** * Moves a window to the given desktops * On X11, the window will end up on the last window in the list * Setting this to an empty list will set the window on all desktops * * @arg desktopIds a list of desktops the window should be placed on. NET::OnAllDesktops is not a valid desktop X11Id - */ + **/ Q_SCRIPTABLE virtual void windowToDesktops(KWin::EffectWindow* w, const QVector &desktopIds) = 0; Q_SCRIPTABLE virtual void windowToScreen(KWin::EffectWindow* w, int screen) = 0; virtual void setShowingDesktop(bool showing) = 0; // Activities /** * @returns The ID of the current activity. - */ + **/ virtual QString currentActivity() const = 0; // Desktops /** * @returns The ID of the current desktop. - */ + **/ virtual int currentDesktop() const = 0; /** * @returns Total number of desktops currently in existence. - */ + **/ virtual int numberOfDesktops() const = 0; /** * Set the current desktop to @a desktop. - */ + **/ virtual void setCurrentDesktop(int desktop) = 0; /** - * Sets the total number of desktops to @a desktops. - */ + * Sets the total number of desktops to @a desktops. + **/ virtual void setNumberOfDesktops(int desktops) = 0; /** * @returns The size of desktop layout in grid units. - */ + **/ virtual QSize desktopGridSize() const = 0; /** * @returns The width of desktop layout in grid units. - */ + **/ virtual int desktopGridWidth() const = 0; /** * @returns The height of desktop layout in grid units. - */ + **/ virtual int desktopGridHeight() const = 0; /** * @returns The width of desktop layout in pixels. - */ + **/ virtual int workspaceWidth() const = 0; /** * @returns The height of desktop layout in pixels. - */ + **/ virtual int workspaceHeight() const = 0; /** * @returns The ID of the desktop at the point @a coords or 0 if no desktop exists at that * point. @a coords is to be in grid units. - */ + **/ virtual int desktopAtCoords(QPoint coords) const = 0; /** * @returns The coords of desktop @a id in grid units. - */ + **/ virtual QPoint desktopGridCoords(int id) const = 0; /** * @returns The coords of the top-left corner of desktop @a id in pixels. - */ + **/ virtual QPoint desktopCoords(int id) const = 0; /** * @returns The ID of the desktop above desktop @a id. Wraps around to the bottom of * the layout if @a wrap is set. If @a id is not set use the current one. - */ + **/ Q_SCRIPTABLE virtual int desktopAbove(int desktop = 0, bool wrap = true) const = 0; /** * @returns The ID of the desktop to the right of desktop @a id. Wraps around to the * left of the layout if @a wrap is set. If @a id is not set use the current one. - */ + **/ Q_SCRIPTABLE virtual int desktopToRight(int desktop = 0, bool wrap = true) const = 0; /** * @returns The ID of the desktop below desktop @a id. Wraps around to the top of the * layout if @a wrap is set. If @a id is not set use the current one. - */ + **/ Q_SCRIPTABLE virtual int desktopBelow(int desktop = 0, bool wrap = true) const = 0; /** * @returns The ID of the desktop to the left of desktop @a id. Wraps around to the * right of the layout if @a wrap is set. If @a id is not set use the current one. - */ + **/ Q_SCRIPTABLE virtual int desktopToLeft(int desktop = 0, bool wrap = true) const = 0; Q_SCRIPTABLE virtual QString desktopName(int desktop) const = 0; virtual bool optionRollOverDesktops() const = 0; @@ -1072,7 +1072,7 @@ * animation speed. The actual value should be determined using animationTime(). * Note: The factor can be also 0, so make sure your code can cope with 0ms time * if used manually. - */ + **/ virtual double animationTimeFactor() const = 0; virtual WindowQuadType newWindowQuadType() = 0; @@ -1137,7 +1137,7 @@ * @c null is returned. * * @return QPainter* The Scene's QPainter or @c null. - */ + **/ virtual QPainter *scenePainter() = 0; virtual void reconfigure() = 0; @@ -1176,19 +1176,19 @@ /** * Returns @a true if the active window decoration has shadow API hooks. - */ + **/ virtual bool hasDecorationShadows() const = 0; /** * Returns @a true if the window decorations use the alpha channel, and @a false otherwise. * @since 4.5 - */ + **/ virtual bool decorationsHaveAlpha() const = 0; /** * Returns @a true if the window decorations support blurring behind the decoration, and @a false otherwise * @since 4.6 - */ + **/ virtual bool decorationSupportsBlurBehind() const = 0; /** @@ -1198,7 +1198,7 @@ * @returns A new @ref EffectFrame. It is the responsibility of the caller to delete the * EffectFrame. * @since 4.6 - */ + **/ virtual EffectFrame* effectFrame(EffectFrameStyle style, bool staticSize = true, const QPoint& position = QPoint(-1, -1), Qt::Alignment alignment = Qt::AlignCenter) const = 0; @@ -1230,16 +1230,16 @@ * If the compositing backend is not using OpenGL, this method returns @c false. * * @return bool @c true if the context became current, @c false otherwise. - */ + **/ virtual bool makeOpenGLContextCurrent() = 0; /** * @brief Makes a null OpenGL context current resulting in no context * being current. * * If the compositing backend is not OpenGL based, this method is a noop. * * There is normally no reason for an Effect to call this method. - */ + **/ virtual void doneOpenGLContextCurrent() = 0; virtual xcb_connection_t *xcbConnection() const = 0; @@ -1249,7 +1249,7 @@ * Interface to the Wayland display: this is relevant only * on Wayland, on X11 it will be nullptr * @since 5.5 - */ + **/ virtual KWayland::Server::Display *waylandDisplay() const = 0; /** @@ -1357,7 +1357,7 @@ /** * Returns if activeFullScreenEffect is set - */ + **/ virtual bool hasActiveFullScreenEffect() const = 0; Q_SIGNALS: @@ -1367,28 +1367,28 @@ * @param newDesktop The new current desktop * @param with The window which is taken over to the new desktop, can be NULL * @since 4.9 - */ + **/ void desktopChanged(int oldDesktop, int newDesktop, KWin::EffectWindow *with); /** * @since 4.7 * @deprecated - */ + **/ void desktopChanged(int oldDesktop, int newDesktop); /** * Signal emitted when a window moved to another desktop * NOTICE that this does NOT imply that the desktop has changed * The @param window which is moved to the new desktop * @param oldDesktop The previous desktop of the window * @param newDesktop The new desktop of the window * @since 4.11.4 - */ + **/ void desktopPresenceChanged(KWin::EffectWindow *window, int oldDesktop, int newDesktop); /** * Signal emitted when the number of currently existing desktops is changed. * @param old The previous number of desktops in used. * @see EffectsHandler::numberOfDesktops. * @since 4.7 - */ + **/ void numberDesktopsChanged(uint old); /** * Signal emitted when the number of screens changed. @@ -1539,7 +1539,7 @@ * @param w The window that became (un)responsive * @param unresponsive Whether the window is responsive or unresponsive * @since 5.10 - */ + **/ void windowUnresponsiveChanged(KWin::EffectWindow *w, bool unresponsive); /** * Signal emitted when an area of a window is scheduled for repainting. @@ -1611,7 +1611,7 @@ * Signal emitted when the cursor shape changed. * You'll likely want to query the current cursor as reaction: xcb_xfixes_get_cursor_image_unchecked * Connection to this signal is tracked, so if you don't need it anymore, disconnect from it to stop cursor event filtering - */ + **/ void cursorShapeChanged(); /** * Receives events registered for using registerPropertyType. @@ -1622,7 +1622,7 @@ * @param w The window whose property changed, is @c null if it is a root window property * @param atom The property * @since 4.7 - */ + **/ void propertyNotify(KWin::EffectWindow* w, long atom); /** @@ -1645,14 +1645,14 @@ * This signal is emitted when a new activity is added * @param id id of the new activity * @since 4.9 - */ + **/ void activityAdded(const QString &id); /** * This signal is emitted when the activity * is removed * @param id id of the removed activity * @since 4.9 - */ + **/ void activityRemoved(const QString &id); /** * This signal is emitted when the screen got locked or unlocked. @@ -1665,7 +1665,7 @@ * This signels is emitted when ever the stacking order is change, ie. a window is risen * or lowered * @since 4.10 - */ + **/ void stackingOrderChanged(); /** * This signal is emitted when the user starts to approach the @p border with the mouse. @@ -1821,85 +1821,85 @@ /** * Returns whether the window is a desktop background window (the one with wallpaper). * See _NET_WM_WINDOW_TYPE_DESKTOP at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html . - */ + **/ Q_PROPERTY(bool desktopWindow READ isDesktop) /** * Returns whether the window is a dock (i.e. a panel). * See _NET_WM_WINDOW_TYPE_DOCK at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html . - */ + **/ Q_PROPERTY(bool dock READ isDock) /** * Returns whether the window is a standalone (detached) toolbar window. * See _NET_WM_WINDOW_TYPE_TOOLBAR at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html . - */ + **/ Q_PROPERTY(bool toolbar READ isToolbar) /** * Returns whether the window is a torn-off menu. * See _NET_WM_WINDOW_TYPE_MENU at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html . - */ + **/ Q_PROPERTY(bool menu READ isMenu) /** * Returns whether the window is a "normal" window, i.e. an application or any other window * for which none of the specialized window types fit. * See _NET_WM_WINDOW_TYPE_NORMAL at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html . - */ + **/ Q_PROPERTY(bool normalWindow READ isNormalWindow) /** * Returns whether the window is a dialog window. * See _NET_WM_WINDOW_TYPE_DIALOG at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html . - */ + **/ Q_PROPERTY(bool dialog READ isDialog) /** * Returns whether the window is a splashscreen. Note that many (especially older) applications * do not support marking their splash windows with this type. * See _NET_WM_WINDOW_TYPE_SPLASH at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html . - */ + **/ Q_PROPERTY(bool splash READ isSplash) /** * Returns whether the window is a utility window, such as a tool window. * See _NET_WM_WINDOW_TYPE_UTILITY at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html . - */ + **/ Q_PROPERTY(bool utility READ isUtility) /** * Returns whether the window is a dropdown menu (i.e. a popup directly or indirectly open * from the applications menubar). * See _NET_WM_WINDOW_TYPE_DROPDOWN_MENU at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html . - */ + **/ Q_PROPERTY(bool dropdownMenu READ isDropdownMenu) /** * Returns whether the window is a popup menu (that is not a torn-off or dropdown menu). * See _NET_WM_WINDOW_TYPE_POPUP_MENU at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html . - */ + **/ Q_PROPERTY(bool popupMenu READ isPopupMenu) /** * Returns whether the window is a tooltip. * See _NET_WM_WINDOW_TYPE_TOOLTIP at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html . - */ + **/ Q_PROPERTY(bool tooltip READ isTooltip) /** * Returns whether the window is a window with a notification. * See _NET_WM_WINDOW_TYPE_NOTIFICATION at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html . - */ + **/ Q_PROPERTY(bool notification READ isNotification) /** * Returns whether the window is an on screen display window * using the non-standard _KDE_NET_WM_WINDOW_TYPE_ON_SCREEN_DISPLAY - */ + **/ Q_PROPERTY(bool onScreenDisplay READ isOnScreenDisplay) /** * Returns whether the window is a combobox popup. * See _NET_WM_WINDOW_TYPE_COMBO at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html . - */ + **/ Q_PROPERTY(bool comboBox READ isComboBox) /** * Returns whether the window is a Drag&Drop icon. * See _NET_WM_WINDOW_TYPE_DND at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html . - */ + **/ Q_PROPERTY(bool dndIcon READ isDNDIcon) /** * Returns the NETWM window type * See http://standards.freedesktop.org/wm-spec/wm-spec-latest.html . - */ + **/ Q_PROPERTY(int windowType READ windowType) /** * Whether this EffectWindow is managed by KWin (it has control over its placement and other @@ -1952,7 +1952,7 @@ /** * By how much the window wishes to grow/shrink at least. Usually QSize(1,1). * MAY BE DISOBEYED BY THE WM! It's only for information, do NOT rely on it at all. - */ + **/ Q_PROPERTY(QSize basicUnit READ basicUnit) /** * Whether the window is currently being moved by the user. @@ -1980,12 +1980,12 @@ Q_PROPERTY(bool skipSwitcher READ isSkipSwitcher) /** * Geometry of the actual window contents inside the whole (including decorations) window. - */ + **/ Q_PROPERTY(QRect contentsRect READ contentsRect) /** * Geometry of the transparent rect in the decoration. * May be different from contentsRect if the decoration is extended into the client area. - */ + **/ Q_PROPERTY(QRect decorationInnerRect READ decorationInnerRect) Q_PROPERTY(bool hasDecoration READ hasDecoration) Q_PROPERTY(QStringList activities READ activities) @@ -2017,7 +2017,7 @@ /** * Interface to the corresponding wayland surface. * relevant only in Wayland, on X11 it will be nullptr - */ + **/ Q_PROPERTY(KWayland::Server::SurfaceInterface *surface READ surface) /** @@ -2033,7 +2033,7 @@ * considered unresponsive. This usually indicates that the application froze or crashed. * * @since 5.10 - */ + **/ Q_PROPERTY(bool unresponsive READ isUnresponsive) /** @@ -2119,15 +2119,15 @@ * use desktops() instead. * @see desktops() * @deprecated - */ + **/ #ifndef KWIN_NO_DEPRECATED virtual int KWIN_DEPRECATED desktop() const = 0; // prefer isOnXXX() #endif /** * All the desktops by number that the window is in. On X11 this list will always have * a length of 1, on Wayland can be any subset. * If the list is empty it means the window is on all desktops - */ + **/ virtual QVector desktops() const = 0; virtual int x() const = 0; @@ -2137,14 +2137,14 @@ /** * By how much the window wishes to grow/shrink at least. Usually QSize(1,1). * MAY BE DISOBEYED BY THE WM! It's only for information, do NOT rely on it at all. - */ + **/ virtual QSize basicUnit() const = 0; virtual QRect geometry() const = 0; /** * Geometry of the window including decoration and potentially shadows. * May be different from geometry() if the window has a shadow. * @since 4.9 - */ + **/ virtual QRect expandedGeometry() const = 0; virtual QRegion shape() const = 0; virtual int screen() const = 0; @@ -2161,13 +2161,13 @@ /** * Geometry of the actual window contents inside the whole (including decorations) window. - */ + **/ virtual QRect contentsRect() const = 0; /** * Geometry of the transparent rect in the decoration. * May be different from contentsRect() if the decoration is extended into the client area. * @since 4.5 - */ + **/ virtual QRect decorationInnerRect() const = 0; bool hasDecoration() const; virtual bool decorationHasAlpha() const = 0; @@ -2183,123 +2183,123 @@ /** * Returns whether the window is a desktop background window (the one with wallpaper). * See _NET_WM_WINDOW_TYPE_DESKTOP at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html . - */ + **/ virtual bool isDesktop() const = 0; /** * Returns whether the window is a dock (i.e. a panel). * See _NET_WM_WINDOW_TYPE_DOCK at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html . - */ + **/ virtual bool isDock() const = 0; /** * Returns whether the window is a standalone (detached) toolbar window. * See _NET_WM_WINDOW_TYPE_TOOLBAR at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html . - */ + **/ virtual bool isToolbar() const = 0; /** * Returns whether the window is a torn-off menu. * See _NET_WM_WINDOW_TYPE_MENU at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html . - */ + **/ virtual bool isMenu() const = 0; /** * Returns whether the window is a "normal" window, i.e. an application or any other window * for which none of the specialized window types fit. * See _NET_WM_WINDOW_TYPE_NORMAL at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html . - */ + **/ virtual bool isNormalWindow() const = 0; // normal as in 'NET::Normal or NET::Unknown non-transient' /** * Returns whether the window is any of special windows types (desktop, dock, splash, ...), * i.e. window types that usually don't have a window frame and the user does not use window * management (moving, raising,...) on them. - */ + **/ virtual bool isSpecialWindow() const = 0; /** * Returns whether the window is a dialog window. * See _NET_WM_WINDOW_TYPE_DIALOG at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html . - */ + **/ virtual bool isDialog() const = 0; /** * Returns whether the window is a splashscreen. Note that many (especially older) applications * do not support marking their splash windows with this type. * See _NET_WM_WINDOW_TYPE_SPLASH at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html . - */ + **/ virtual bool isSplash() const = 0; /** * Returns whether the window is a utility window, such as a tool window. * See _NET_WM_WINDOW_TYPE_UTILITY at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html . - */ + **/ virtual bool isUtility() const = 0; /** * Returns whether the window is a dropdown menu (i.e. a popup directly or indirectly open * from the applications menubar). * See _NET_WM_WINDOW_TYPE_DROPDOWN_MENU at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html . - */ + **/ virtual bool isDropdownMenu() const = 0; /** * Returns whether the window is a popup menu (that is not a torn-off or dropdown menu). * See _NET_WM_WINDOW_TYPE_POPUP_MENU at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html . - */ + **/ virtual bool isPopupMenu() const = 0; // a context popup, not dropdown, not torn-off /** * Returns whether the window is a tooltip. * See _NET_WM_WINDOW_TYPE_TOOLTIP at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html . - */ + **/ virtual bool isTooltip() const = 0; /** * Returns whether the window is a window with a notification. * See _NET_WM_WINDOW_TYPE_NOTIFICATION at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html . - */ + **/ virtual bool isNotification() const = 0; /** * Returns whether the window is an on screen display window * using the non-standard _KDE_NET_WM_WINDOW_TYPE_ON_SCREEN_DISPLAY - */ + **/ virtual bool isOnScreenDisplay() const = 0; /** * Returns whether the window is a combobox popup. * See _NET_WM_WINDOW_TYPE_COMBO at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html . - */ + **/ virtual bool isComboBox() const = 0; /** * Returns whether the window is a Drag&Drop icon. * See _NET_WM_WINDOW_TYPE_DND at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html . - */ + **/ virtual bool isDNDIcon() const = 0; /** * Returns the NETWM window type * See http://standards.freedesktop.org/wm-spec/wm-spec-latest.html . - */ + **/ virtual NET::WindowType windowType() const = 0; /** * Returns whether the window is managed by KWin (it has control over its placement and other * aspects, as opposed to override-redirect windows that are entirely handled by the application). - */ + **/ virtual bool isManaged() const = 0; // whether it's managed or override-redirect /** * Returns whether or not the window can accept keyboard focus. - */ + **/ virtual bool acceptsFocus() const = 0; /** * Returns whether or not the window is kept above all other windows. - */ + **/ virtual bool keepAbove() const = 0; /** * Returns whether the window is kept below all other windows. - */ + **/ virtual bool keepBelow() const = 0; virtual bool isModal() const = 0; Q_SCRIPTABLE virtual KWin::EffectWindow* findModal() = 0; Q_SCRIPTABLE virtual QList mainWindows() const = 0; /** - * Returns whether the window should be excluded from window switching effects. - * @since 4.5 - */ + * Returns whether the window should be excluded from window switching effects. + * @since 4.5 + **/ virtual bool isSkipSwitcher() const = 0; /** * Returns the unmodified window quad list. Can also be used to force rebuilding. - */ + **/ virtual WindowQuadList buildQuads(bool force = false) const = 0; void setMinimized(bool minimize); @@ -2321,7 +2321,7 @@ /** * @since 5.5 - */ + **/ virtual KWayland::Server::SurfaceInterface *surface() const = 0; /** @@ -2331,7 +2331,7 @@ /** * @since 5.10 - */ + **/ virtual bool isUnresponsive() const = 0; /** @@ -2359,7 +2359,7 @@ * * Invoking this method will emit the signal EffectsHandler::windowDataChanged. * @see EffectsHandler::windowDataChanged - */ + **/ Q_SCRIPTABLE virtual void setData(int role, const QVariant &data) = 0; Q_SCRIPTABLE virtual QVariant data(int role) const = 0; @@ -2381,15 +2381,15 @@ * * @see unreferencePreviousWindowPixmap * @since 4.11 - */ + **/ virtual void referencePreviousWindowPixmap() = 0; /** * @brief Unreferences the previous window pixmap. Only relevant after referencePreviousWindowPixmap had * been called. * * @see referencePreviousWindowPixmap * @since 4.11 - */ + **/ virtual void unreferencePreviousWindowPixmap() = 0; private: @@ -2455,7 +2455,7 @@ * @short Class representing one area of a window. * * WindowQuads consists of four WindowVertex objects and represents one part of a window. - */ + **/ // NOTE: This class expects the (original) vertices to be in the clockwise order starting from topleft. class KWINEFFECTS_EXPORT WindowQuad { @@ -2521,7 +2521,7 @@ /** * Simple helper that sets data to say the window will be painted as non-opaque. * Takes also care of changing the regions. - */ + **/ void setTranslucent(); /** * Helper to mark that this window will be transformed @@ -2742,7 +2742,7 @@ * Window opacity, in range 0 = transparent to 1 = fully opaque * @see setOpacity * @since 4.10 - */ + **/ qreal opacity() const; /** * Sets the window opacity to the new @p opacity. @@ -2808,12 +2808,12 @@ * This affects color correction (different screens may need different * color correction lookup tables because they have different ICC profiles). * @return screen for which painting should be done - */ + **/ int screen() const; /** * @param screen New screen number * A value less than 0 will indicate that a default profile should be done. - */ + **/ void setScreen(int screen) const; /** * @brief Sets the cross fading @p factor to fade over with previously sized window. @@ -2824,51 +2824,51 @@ * * @param factor The cross fade factor between @c 0.0 (previous window) and @c 1.0 (current window) * @see crossFadeProgress - */ + **/ void setCrossFadeProgress(qreal factor); /** * @see setCrossFadeProgress - */ + **/ qreal crossFadeProgress() const; /** * Sets the projection matrix that will be used when painting the window. * * The default projection matrix can be overridden by setting this matrix * to a non-identity matrix. - */ + **/ void setProjectionMatrix(const QMatrix4x4 &matrix); /** * Returns the current projection matrix. * * The default value for this matrix is the identity matrix. - */ + **/ QMatrix4x4 projectionMatrix() const; /** * Returns a reference to the projection matrix. - */ + **/ QMatrix4x4 &rprojectionMatrix(); /** * Sets the model-view matrix that will be used when painting the window. * * The default model-view matrix can be overridden by setting this matrix * to a non-identity matrix. - */ + **/ void setModelViewMatrix(const QMatrix4x4 &matrix); /** * Returns the current model-view matrix. * * The default value for this matrix is the identity matrix. - */ + **/ QMatrix4x4 modelViewMatrix() const; /** * Returns a reference to the model-view matrix. - */ + **/ QMatrix4x4 &rmodelViewMatrix(); /** @@ -2883,7 +2883,7 @@ /** * Shader to be used for rendering, if any. - */ + **/ GLShader* shader; private: @@ -2976,35 +2976,35 @@ * and giving it the area that is allowed to be painted to. When the object * is destroyed, the restriction will be removed. * Note that all painting code must use paintArea() to actually perform the clipping. - */ + **/ class KWINEFFECTS_EXPORT PaintClipper { public: /** * Calls push(). - */ + **/ explicit PaintClipper(const QRegion& allowed_area); /** * Calls pop(). - */ + **/ ~PaintClipper(); /** * Allows painting only in the given area. When areas have been already * specified, painting is allowed only in the intersection of all areas. - */ + **/ static void push(const QRegion& allowed_area); /** * Removes the given area. It must match the top item in the stack. - */ + **/ static void pop(const QRegion& allowed_area); /** * Returns true if any clipping should be performed. - */ + **/ static bool clip(); /** * If clip() returns true, this function gives the resulting area in which * painting is allowed. It is usually simpler to use the helper Iterator class. - */ + **/ static QRegion paintArea(); /** * Helper class to perform the clipped painting. The usage is: @@ -3015,7 +3015,7 @@ * { // do the painting, possibly use iterator.boundingRect() * } * @endcode - */ + **/ class KWINEFFECTS_EXPORT Iterator { public: @@ -3035,7 +3035,7 @@ /** * @internal - */ + **/ template class KWINEFFECTS_EXPORT Motion { @@ -3045,12 +3045,12 @@ * acceleration that is applied to the object when the target * changes and "smoothness" relates to how fast the object * can change its direction and speed. - */ + **/ explicit Motion(T initial, double strength, double smoothness); /** * Creates an exact copy of another motion object, including * position, target and velocity. - */ + **/ Motion(const Motion &other); ~Motion(); @@ -3092,20 +3092,20 @@ /** * The distance between the current position and the target. - */ + **/ inline T distance() const { return m_target - m_value; } /** * Calculates the new position if not at the target. Called * once per frame only. - */ + **/ void calculate(const int msec); /** * Place the object on top of the target immediately, * bypassing all movement calculation. - */ + **/ void finish(); private: @@ -3123,7 +3123,7 @@ * This class represents a single object that can be moved around a * 1D space. Although it can be used directly by itself it is * recommended to use a motion manager instead. - */ + **/ class KWINEFFECTS_EXPORT Motion1D : public Motion { public: @@ -3138,7 +3138,7 @@ * This class represents a single object that can be moved around a * 2D space. Although it can be used directly by itself it is * recommended to use a motion manager instead. - */ + **/ class KWINEFFECTS_EXPORT Motion2D : public Motion { public: @@ -3158,77 +3158,77 @@ * transformedGeometry() method. As the manager knows if any windows * are moving at any given time it can also be used as a notifier as * to see whether the effect is active or not. - */ + **/ class KWINEFFECTS_EXPORT WindowMotionManager { public: /** * Creates a new window manager object. - */ + **/ explicit WindowMotionManager(bool useGlobalAnimationModifier = true); ~WindowMotionManager(); /** * Register a window for managing. - */ + **/ void manage(EffectWindow *w); /** * Register a list of windows for managing. - */ + **/ inline void manage(EffectWindowList list) { for (int i = 0; i < list.size(); i++) manage(list.at(i)); } /** * Deregister a window. All transformations applied to the * window will be permanently removed and cannot be recovered. - */ + **/ void unmanage(EffectWindow *w); /** * Deregister all windows, returning the manager to its * originally initiated state. - */ + **/ void unmanageAll(); /** * Determine the new positions for windows that have not * reached their target. Called once per frame, usually in * prePaintScreen(). Remember to set the * Effect::PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS flag. - */ + **/ void calculate(int time); /** * Modify a registered window's paint data to make it appear * at its real location on the screen. Usually called in * paintWindow(). Remember to flag the window as having been * transformed in prePaintWindow() by calling * WindowPrePaintData::setTransformed() - */ + **/ void apply(EffectWindow *w, WindowPaintData &data); /** * Set all motion targets and values back to where the * windows were before transformations. The same as * unmanaging then remanaging all windows. - */ + **/ void reset(); /** * Resets the motion target and current value of a single * window. - */ + **/ void reset(EffectWindow *w); /** * Ask the manager to move the window to the target position * with the specified scale. If `yScale` is not provided or * set to 0.0, `scale` will be used as the scale in the * vertical direction as well as in the horizontal direction. - */ + **/ void moveWindow(EffectWindow *w, QPoint target, double scale = 1.0, double yScale = 0.0); /** * This is an overloaded method, provided for convenience. * * Ask the manager to move the window to the target rectangle. * Automatically determines scale. - */ + **/ inline void moveWindow(EffectWindow *w, QRect target) { // TODO: Scale might be slightly different in the comparison due to rounding moveWindow(w, target.topLeft(), @@ -3238,59 +3238,59 @@ /** * Retrieve the current tranformed geometry of a registered * window. - */ + **/ QRectF transformedGeometry(EffectWindow *w) const; /** * Sets the current transformed geometry of a registered window to the given geometry. * @see transformedGeometry * @since 4.5 - */ + **/ void setTransformedGeometry(EffectWindow *w, const QRectF &geometry); /** * Retrieve the current target geometry of a registered * window. - */ + **/ QRectF targetGeometry(EffectWindow *w) const; /** * Return the window that has its transformed geometry under * the specified point. It is recommended to use the stacking * order as it's what the user sees, but it is slightly * slower to process. - */ + **/ EffectWindow* windowAtPoint(QPoint point, bool useStackingOrder = true) const; /** * Return a list of all currently registered windows. - */ + **/ inline EffectWindowList managedWindows() const { return m_managedWindows.keys(); } /** * Returns whether or not a specified window is being managed * by this manager object. - */ + **/ inline bool isManaging(EffectWindow *w) const { return m_managedWindows.contains(w); } /** * Returns whether or not this manager object is actually * managing any windows or not. - */ + **/ inline bool managingWindows() const { return !m_managedWindows.empty(); } /** * Returns whether all windows have reached their targets yet * or not. Can be used to see if an effect should be * processed and displayed or not. - */ + **/ inline bool areWindowsMoving() const { return !m_movingWindowsSet.isEmpty(); } /** * Returns whether a window has reached its targets yet * or not. - */ + **/ inline bool isWindowMoving(EffectWindow *w) const { return m_movingWindowsSet.contains(w); } @@ -3313,7 +3313,7 @@ * available frames includes one that follows the default Plasma theme and * another that doesn't. * It is recommended to use this class whenever displaying text. - */ + **/ class KWINEFFECTS_EXPORT EffectFrame { public: @@ -3323,19 +3323,19 @@ /** * Delete any existing textures to free up graphics memory. They will * be automatically recreated the next time they are required. - */ + **/ virtual void free() = 0; /** * Render the frame. - */ + **/ virtual void render(QRegion region = infiniteRegion(), double opacity = 1.0, double frameOpacity = 1.0) = 0; virtual void setPosition(const QPoint& point) = 0; /** * Set the text alignment for static frames and the position alignment * for non-static. - */ + **/ virtual void setAlignment(Qt::Alignment alignment) = 0; virtual Qt::Alignment alignment() const = 0; virtual void setGeometry(const QRect& geometry, bool force = false) = 0; @@ -3347,7 +3347,7 @@ virtual const QFont& font() const = 0; /** * Set the icon that will appear on the left-hand size of the frame. - */ + **/ virtual void setIcon(const QIcon& icon) = 0; virtual const QIcon& icon() const = 0; virtual void setIconSize(const QSize& size) = 0; diff --git a/libkwineffects/kwinglobals.h b/libkwineffects/kwinglobals.h --- a/libkwineffects/kwinglobals.h +++ b/libkwineffects/kwinglobals.h @@ -118,8 +118,7 @@ /** * @brief The direction in which a pointer axis is moved. - * - */ + **/ enum PointerAxisDirection { PointerAxisUp, PointerAxisDown, diff --git a/libkwineffects/kwinglplatform.h b/libkwineffects/kwinglplatform.h --- a/libkwineffects/kwinglplatform.h +++ b/libkwineffects/kwinglplatform.h @@ -42,16 +42,16 @@ * Set when a texture bound to a pixmap uses the same storage as the pixmap, * and thus doesn't need to be rebound when the contents of the pixmap * has changed. - */ + **/ LooseBinding, /** * Set if the driver supports the following extensions: * - GL_ARB_shader_objects * - GL_ARB_fragment_shader * - GL_ARB_vertex_shader * - GL_ARB_shading_language_100 - */ + **/ GLSL, /** @@ -64,12 +64,12 @@ * - No texture fetches in vertex shaders * - Max 32 texture fetches in fragment shaders * - Max 4 texture indirections - */ + **/ LimitedGLSL, /** * Set when the driver supports GL_ARB_texture_non_power_of_two. - */ + **/ TextureNPOT, /** @@ -81,7 +81,7 @@ * - GL_CLAMP * - GL_CLAMP_TO_EDGE * - GL_CLAMP_TO_BORDER - */ + **/ LimitedNPOT }; @@ -162,42 +162,42 @@ /** * Runs the detection code using the current OpenGL context. - */ + **/ void detect(OpenGLPlatformInterface platformInterface); /** * Prints the results of the detection code. - */ + **/ void printResults() const; /** * Returns a pointer to the GLPlatform instance. - */ + **/ static GLPlatform *instance(); /** * Returns true if the driver support the given feature, and false otherwise. - */ + **/ bool supports(GLFeature feature) const; /** * Returns the OpenGL version. - */ + **/ qint64 glVersion() const; /** * Returns the GLSL version if the driver supports GLSL, and 0 otherwise. - */ + **/ qint64 glslVersion() const; /** * Returns the Mesa version if the driver is a Mesa driver, and 0 otherwise. - */ + **/ qint64 mesaVersion() const; /** * Returns the Gallium version if the driver is a Gallium driver, and 0 otherwise. - */ + **/ qint64 galliumVersion() const; /** @@ -207,56 +207,56 @@ * following the doupling of the X server from the katamari. * * For non X.org servers, this method returns 0. - */ + **/ qint64 serverVersion() const; /** * Returns the Linux kernel version. * * If the kernel is not a Linux kernel, this method returns 0. - */ + **/ qint64 kernelVersion() const; /** * Returns the driver version. * * For Mesa drivers, this is the same as the Mesa version number. - */ + **/ qint64 driverVersion() const; /** * Returns the driver. - */ + **/ Driver driver() const; /** * Returns the chip class. - */ + **/ ChipClass chipClass() const; /** * Returns true if the driver is a Mesa driver, and false otherwise. - */ + **/ bool isMesaDriver() const; /** * Returns true if the driver is a Gallium driver, and false otherwise. - */ + **/ bool isGalliumDriver() const; /** * Returns true if the GPU is a Radeon GPU, and false otherwise. - */ + **/ bool isRadeon() const; /** * Returns true if the GPU is an NVIDIA GPU, and false otherwise. - */ + **/ bool isNvidia() const; /** * Returns true if the GPU is an Intel GPU, and false otherwise. - */ + **/ bool isIntel() const; /** @@ -317,7 +317,7 @@ bool isLooseBinding() const; /** * @returns Whether OpenGL ES is used - */ + **/ bool isGLES() const; /** @@ -331,7 +331,7 @@ * when updating an unused range of a buffer object, and false otherwise. * * @since 4.11 - */ + **/ bool preferBufferSubData() const; /** diff --git a/libkwineffects/kwingltexture.h b/libkwineffects/kwingltexture.h --- a/libkwineffects/kwingltexture.h +++ b/libkwineffects/kwingltexture.h @@ -84,15 +84,15 @@ * * @see swizzleSupported() * @since 5.2 - */ + **/ void setSwizzle(GLenum red, GLenum green, GLenum blue, GLenum alpha); /** * Returns a matrix that transforms texture coordinates of the given type, * taking the texture target and the y-inversion flag into account. * * @since 4.11 - */ + **/ QMatrix4x4 matrix(TextureCoordinateType type) const; void update(const QImage& image, const QPoint &offset = QPoint(0, 0), const QRect &src = QRect()); @@ -109,7 +109,7 @@ /** @short * Make the texture fully transparent * Warning: this clobbers the current framebuffer binding except on fglrx - */ + **/ void clear(); bool isDirty() const; void setFilter(GLenum filter); @@ -126,7 +126,7 @@ * Texture swizzle requires OpenGL 3.3, GL_ARB_texture_swizzle, or OpenGL ES 3.0. * * @since 5.2 - */ + **/ static bool supportsSwizzle(); /** diff --git a/libkwineffects/kwinglutils.h b/libkwineffects/kwinglutils.h --- a/libkwineffects/kwinglutils.h +++ b/libkwineffects/kwinglutils.h @@ -207,7 +207,7 @@ public: /** * Returns a shader with the given traits, creating it if necessary. - */ + **/ GLShader *shader(ShaderTraits traits); /** @@ -230,7 +230,7 @@ /** * Pushes the current shader onto the stack and binds a shader * with the given traits. - */ + **/ GLShader *pushShader(ShaderTraits traits); /** @@ -304,7 +304,7 @@ /** * Compiles and tests the dynamically generated shaders. * Returns true if successful and false otherwise. - */ + **/ bool selfTest(); /** @@ -535,7 +535,7 @@ * @returns the ratio between the virtual geometry space the rendering * system uses and the target * @since 5.10 - */ + **/ static void setVirtualScreenScale(qreal scale) { s_virtualScreenScale = scale; } @@ -578,7 +578,7 @@ * The attribute format consists of the attribute index, the number of * vector components, the data type, and the offset of the first element * relative to the start of the vertex data. - */ + **/ struct GLVertexAttrib { int index; /** The attribute index */ @@ -599,13 +599,13 @@ * * @author Martin Gräßlin * @since 4.6 - */ + **/ class KWINGLUTILS_EXPORT GLVertexBuffer { public: /** * Enum to define how often the vertex data in the buffer object changes. - */ + **/ enum UsageHint { Dynamic, ///< frequent changes, but used several times for rendering Static, ///< No changes to data @@ -639,17 +639,17 @@ * Vertex vertices[6]; * vbo->setAttribLayout(attribs, 2, sizeof(Vertex)); * vbo->setData(vertices, sizeof(vertices)); - */ + **/ void setAttribLayout(const GLVertexAttrib *attribs, int count, int stride); /** * Uploads data into the buffer object's data store. - */ + **/ void setData(const void *data, size_t sizeInBytes); /** * Sets the number of vertices that will be drawn by the render() method. - */ + **/ void setVertexCount(int count); /** @@ -659,7 +659,7 @@ * @param vertices The vertices, size must equal @a numberVertices * @a dim * @param texcoords The texture coordinates for each vertex. * Size must equal 2 * @a numberVertices. - */ + **/ void setData(int numberVertices, int dim, const float* vertices, const float* texcoords); /** @@ -679,45 +679,45 @@ * * It is assumed that the GL_ARRAY_BUFFER_BINDING will not be changed while * the buffer object is mapped. - */ + **/ GLvoid *map(size_t size); /** * Flushes the mapped buffer range and unmaps the buffer. - */ + **/ void unmap(); /** * Binds the vertex arrays to the context. - */ + **/ void bindArrays(); /** * Disables the vertex arrays. - */ + **/ void unbindArrays(); /** * Draws count vertices beginning with first. - */ + **/ void draw(GLenum primitiveMode, int first, int count); /** * Draws count vertices beginning with first. - */ + **/ void draw(const QRegion ®ion, GLenum primitiveMode, int first, int count, bool hardwareClipping = false); /** * Renders the vertex data in given @a primitiveMode. * Please refer to OpenGL documentation of glDrawArrays or glDrawElements for allowed * values for @a primitiveMode. Best is to use GL_TRIANGLES or similar to be future * compatible. - */ + **/ void render(GLenum primitiveMode); /** * Same as above restricting painting to @a region if @a hardwareClipping is true. * It's within the caller's responsibility to enable GL_SCISSOR_TEST. - */ + **/ void render(const QRegion& region, GLenum primitiveMode, bool hardwareClipping = false); /** * Sets the color the geometry will be rendered with. @@ -758,29 +758,29 @@ * Notifies the vertex buffer that we are done painting the frame. * * @internal - */ + **/ void endOfFrame(); /** * Notifies the vertex buffer that we have posted the frame. * * @internal - */ + **/ void framePosted(); /** * @internal - */ + **/ static void initStatic(); /** * @internal - */ + **/ static void cleanup(); /** * Returns true if indexed quad mode is supported, and false otherwise. - */ + **/ static bool supportsIndexedQuads(); /** @@ -805,7 +805,7 @@ * @returns the ratio between the virtual geometry space the rendering * system uses and the target * @since 5.11.3 - */ + **/ static void setVirtualScreenScale(qreal s) { s_virtualScreenScale = s; } diff --git a/libkwineffects/kwinxrenderutils.h b/libkwineffects/kwinxrenderutils.h --- a/libkwineffects/kwinxrenderutils.h +++ b/libkwineffects/kwinxrenderutils.h @@ -40,7 +40,7 @@ { /** * dumps a QColor into a xcb_render_color_t - */ + **/ KWINXRENDERUTILS_EXPORT xcb_render_color_t preMultiply(const QColor &c, float opacity = 1.0); /** @internal */ @@ -62,7 +62,7 @@ * This class wraps XRender's Picture, providing proper initialization, * convenience constructors and freeing of resources. * It should otherwise act exactly like the Picture type. - */ + **/ class KWINXRENDERUTILS_EXPORT XRenderPicture { public: @@ -119,48 +119,48 @@ /** * Static 1x1 picture used to deliver a black pixel with given opacity (for blending performance) * Call and Use, the PixelPicture will stay, but may change it's opacity meanwhile. It's NOT threadsafe either - */ + **/ KWINXRENDERUTILS_EXPORT XRenderPicture xRenderBlendPicture(double opacity); /** * Creates a 1x1 Picture filled with c - */ + **/ KWINXRENDERUTILS_EXPORT XRenderPicture xRenderFill(const xcb_render_color_t &c); KWINXRENDERUTILS_EXPORT XRenderPicture xRenderFill(const QColor &c); /** * Allows to render a window into a (transparent) pixmap * NOTICE: the result can be queried as xRenderWindowOffscreenTarget() * NOTICE: it may be 0 * NOTICE: when done call setXRenderWindowOffscreen(false) to continue normal render process - */ + **/ KWINXRENDERUTILS_EXPORT void setXRenderOffscreen(bool b); /** * Allows to define a persistent effect member as render target * The window (including shadows) is rendered into the top left corner * NOTICE: do NOT call setXRenderOffscreen(true) in addition! * NOTICE: do not forget to xRenderPopTarget once you're done to continue the normal render process - */ + **/ KWINXRENDERUTILS_EXPORT void xRenderPushTarget(XRenderPicture *pic); KWINXRENDERUTILS_EXPORT void xRenderPopTarget(); /** * Whether windows are currently rendered into an offscreen target buffer - */ + **/ KWINXRENDERUTILS_EXPORT bool xRenderOffscreen(); /** * The offscreen buffer as set by the renderer because of setXRenderWindowOffscreen(true) - */ + **/ KWINXRENDERUTILS_EXPORT xcb_render_picture_t xRenderOffscreenTarget(); /** * NOTICE: HANDS OFF!!! * scene_setXRenderWindowOffscreenTarget() is ONLY to be used by the renderer - DO NOT TOUCH! - */ + **/ KWINXRENDERUTILS_EXPORT void scene_setXRenderOffscreenTarget(xcb_render_picture_t pix); /** * scene_xRenderWindowOffscreenTarget() is used by the scene to figure the target set by an effect - */ + **/ KWINXRENDERUTILS_EXPORT XRenderPicture *scene_xRenderOffscreenTarget(); namespace XRenderUtils @@ -172,12 +172,12 @@ /** * Returns the Xrender format that corresponds to the given visual ID. - */ + **/ KWINXRENDERUTILS_EXPORT xcb_render_pictformat_t findPictFormat(xcb_visualid_t visual); /** * Returns the xcb_render_directformat_t for the given Xrender format. - */ + **/ KWINXRENDERUTILS_EXPORT const xcb_render_directformat_t *findPictFormatInfo(xcb_render_pictformat_t format); /** diff --git a/main.h b/main.h --- a/main.h +++ b/main.h @@ -59,19 +59,19 @@ Q_PROPERTY(KSharedConfigPtr inputConfig READ inputConfig WRITE setInputConfig) public: /** - * @brief This enum provides the various operation modes of KWin depending on the available - * Windowing Systems at startup. For example whether KWin only talks to X11 or also to a Wayland - * Compositor. - * - */ + * @brief This enum provides the various operation modes of KWin depending on the available + * Windowing Systems at startup. For example whether KWin only talks to X11 or also to a Wayland + * Compositor. + * + **/ enum OperationMode { /** - * @brief KWin uses only X11 for managing windows and compositing - */ + * @brief KWin uses only X11 for managing windows and compositing + **/ OperationModeX11, /** * @brief KWin uses only Wayland - */ + **/ OperationModeWaylandOnly, /** * @brief KWin uses Wayland and controls a nested Xwayland server. @@ -105,10 +105,10 @@ void start(); /** - * @brief The operation mode used by KWin. - * - * @return OperationMode - */ + * @brief The operation mode used by KWin. + * + * @return OperationMode + **/ OperationMode operationMode() const; void setOperationMode(OperationMode mode); bool shouldUseWaylandForCompositing() const; @@ -155,7 +155,7 @@ static bool isX11MultiHead(); /** * Sets whether this is a multi head setup on X11. - */ + **/ static void setX11MultiHead(bool multiHead); /** diff --git a/netinfo.h b/netinfo.h --- a/netinfo.h +++ b/netinfo.h @@ -37,7 +37,7 @@ /** * NET WM Protocol handler class - */ + **/ class RootInfo : public NETRootInfo { private: @@ -77,7 +77,7 @@ /** * NET WM Protocol handler class - */ + **/ class WinInfo : public NETWinInfo { private: diff --git a/options.h b/options.h --- a/options.h +++ b/options.h @@ -57,63 +57,63 @@ Q_PROPERTY(FocusPolicy focusPolicy READ focusPolicy WRITE setFocusPolicy NOTIFY focusPolicyChanged) Q_PROPERTY(bool nextFocusPrefersMouse READ isNextFocusPrefersMouse WRITE setNextFocusPrefersMouse NOTIFY nextFocusPrefersMouseChanged) /** - Whether clicking on a window raises it in FocusFollowsMouse - mode or not. - */ + * Whether clicking on a window raises it in FocusFollowsMouse + * mode or not. + **/ Q_PROPERTY(bool clickRaise READ isClickRaise WRITE setClickRaise NOTIFY clickRaiseChanged) /** - whether autoraise is enabled FocusFollowsMouse mode or not. - */ + * Whether autoraise is enabled FocusFollowsMouse mode or not. + **/ Q_PROPERTY(bool autoRaise READ isAutoRaise WRITE setAutoRaise NOTIFY autoRaiseChanged) /** - autoraise interval - */ + * Autoraise interval. + **/ Q_PROPERTY(int autoRaiseInterval READ autoRaiseInterval WRITE setAutoRaiseInterval NOTIFY autoRaiseIntervalChanged) /** - delayed focus interval - */ + * Delayed focus interval. + **/ Q_PROPERTY(int delayFocusInterval READ delayFocusInterval WRITE setDelayFocusInterval NOTIFY delayFocusIntervalChanged) /** - Whether shade hover is enabled or not - */ + * Whether shade hover is enabled or not. + **/ Q_PROPERTY(bool shadeHover READ isShadeHover WRITE setShadeHover NOTIFY shadeHoverChanged) /** - shade hover interval - */ + * Shade hover interval. + **/ Q_PROPERTY(int shadeHoverInterval READ shadeHoverInterval WRITE setShadeHoverInterval NOTIFY shadeHoverIntervalChanged) /** - * whether to see Xinerama screens separately for focus (in Alt+Tab, when activating next client) + * Whether to see Xinerama screens separately for focus (in Alt+Tab, when activating next client) **/ Q_PROPERTY(bool separateScreenFocus READ isSeparateScreenFocus WRITE setSeparateScreenFocus NOTIFY separateScreenFocusChanged) Q_PROPERTY(int placement READ placement WRITE setPlacement NOTIFY placementChanged) Q_PROPERTY(bool focusPolicyIsReasonable READ focusPolicyIsReasonable NOTIFY focusPolicyIsResonableChanged) /** - * the size of the zone that triggers snapping on desktop borders - */ + * The size of the zone that triggers snapping on desktop borders. + **/ Q_PROPERTY(int borderSnapZone READ borderSnapZone WRITE setBorderSnapZone NOTIFY borderSnapZoneChanged) /** - * the size of the zone that triggers snapping with other windows - */ + * The size of the zone that triggers snapping with other windows. + **/ Q_PROPERTY(int windowSnapZone READ windowSnapZone WRITE setWindowSnapZone NOTIFY windowSnapZoneChanged) /** - * the size of the zone that triggers snapping on the screen center - */ + * The size of the zone that triggers snapping on the screen center. + **/ Q_PROPERTY(int centerSnapZone READ centerSnapZone WRITE setCenterSnapZone NOTIFY centerSnapZoneChanged) /** - * snap only when windows will overlap - */ + * Snap only when windows will overlap. + **/ Q_PROPERTY(bool snapOnlyWhenOverlapping READ isSnapOnlyWhenOverlapping WRITE setSnapOnlyWhenOverlapping NOTIFY snapOnlyWhenOverlappingChanged) /** - * whether or not we roll over to the other edge when switching desktops past the edge - */ + * Whether or not we roll over to the other edge when switching desktops past the edge. + **/ Q_PROPERTY(bool rollOverDesktops READ isRollOverDesktops WRITE setRollOverDesktops NOTIFY rollOverDesktopsChanged) /** * 0 - 4 , see Workspace::allowClientActivation() **/ Q_PROPERTY(int focusStealingPreventionLevel READ focusStealingPreventionLevel WRITE setFocusStealingPreventionLevel NOTIFY focusStealingPreventionLevelChanged) /** - * support legacy fullscreen windows hack: borderless non-netwm windows with screen geometry - */ + * Support legacy fullscreen windows hack: borderless non-netwm windows with screen geometry. + **/ Q_PROPERTY(bool legacyFullscreenSupport READ isLegacyFullscreenSupport WRITE setLegacyFullscreenSupport NOTIFY legacyFullscreenSupportChanged) Q_PROPERTY(KWin::Options::WindowOperation operationTitlebarDblClick READ operationTitlebarDblClick WRITE setOperationTitlebarDblClick NOTIFY operationTitlebarDblClickChanged) Q_PROPERTY(KWin::Options::WindowOperation operationMaxButtonLeftClick READ operationMaxButtonLeftClick WRITE setOperationMaxButtonLeftClick NOTIFY operationMaxButtonLeftClickChanged) @@ -134,28 +134,28 @@ Q_PROPERTY(MouseCommand commandAll3 READ commandAll3 WRITE setCommandAll3 NOTIFY commandAll3Changed) Q_PROPERTY(uint keyCmdAllModKey READ keyCmdAllModKey WRITE setKeyCmdAllModKey NOTIFY keyCmdAllModKeyChanged) /** - * whether the Geometry Tip should be shown during a window move/resize. - */ + * Whether the Geometry Tip should be shown during a window move/resize. + **/ Q_PROPERTY(bool showGeometryTip READ showGeometryTip WRITE setShowGeometryTip NOTIFY showGeometryTipChanged) /** - * whether the visible name should be condensed - */ + * Whether the visible name should be condensed. + **/ Q_PROPERTY(bool condensedTitle READ condensedTitle WRITE setCondensedTitle NOTIFY condensedTitleChanged) /** - * Whether a window gets maximized when it reaches top screen edge while being moved. - */ + * Whether a window gets maximized when it reaches top screen edge while being moved. + **/ Q_PROPERTY(bool electricBorderMaximize READ electricBorderMaximize WRITE setElectricBorderMaximize NOTIFY electricBorderMaximizeChanged) /** - * Whether a window is tiled to half screen when reaching left or right screen edge while been moved - */ + * Whether a window is tiled to half screen when reaching left or right screen edge while been moved. + **/ Q_PROPERTY(bool electricBorderTiling READ electricBorderTiling WRITE setElectricBorderTiling NOTIFY electricBorderTilingChanged) /** - * Whether a window is tiled to half screen when reaching left or right screen edge while been moved - */ + * Whether a window is tiled to half screen when reaching left or right screen edge while been moved. + **/ Q_PROPERTY(float electricBorderCornerRatio READ electricBorderCornerRatio WRITE setElectricBorderCornerRatio NOTIFY electricBorderCornerRatioChanged) Q_PROPERTY(bool borderlessMaximizedWindows READ borderlessMaximizedWindows WRITE setBorderlessMaximizedWindows NOTIFY borderlessMaximizedWindowsChanged) /** - * timeout before non-responding application will be killed after attempt to close + * timeout before non-responding application will be killed after attempt to close. **/ Q_PROPERTY(int killPingTimeout READ killPingTimeout WRITE setKillPingTimeout NOTIFY killPingTimeoutChanged) /** @@ -197,89 +197,95 @@ void updateSettings(); - /*! - Different focus policies: -
    - -
  • ClickToFocus - Clicking into a window activates it. This is - also the default. - -
  • FocusFollowsMouse - Moving the mouse pointer actively onto a - normal window activates it. For convenience, the desktop and - windows on the dock are excluded. They require clicking. - -
  • FocusUnderMouse - The window that happens to be under the - mouse pointer becomes active. The invariant is: no window can - have focus that is not under the mouse. This also means that - Alt-Tab won't work properly and popup dialogs are usually - unsable with the keyboard. Note that the desktop and windows on - the dock are excluded for convenience. They get focus only when - clicking on it. - -
  • FocusStrictlyUnderMouse - this is even worse than - FocusUnderMouse. Only the window under the mouse pointer is - active. If the mouse points nowhere, nothing has the focus. If - the mouse points onto the desktop, the desktop has focus. The - same holds for windows on the dock. - - Note that FocusUnderMouse and FocusStrictlyUnderMouse are not - particulary useful. They are only provided for old-fashined - die-hard UNIX people ;-) - -
- */ - enum FocusPolicy { ClickToFocus, FocusFollowsMouse, FocusUnderMouse, FocusStrictlyUnderMouse }; + /** + * This enum type is used to specify the focus policy. + * + * Note that FocusUnderMouse and FocusStrictlyUnderMouse are not + * particulary useful. They are only provided for old-fashined + * die-hard UNIX people ;-) + **/ + enum FocusPolicy { + /** + * Clicking into a window activates it. This is also the default. + **/ + ClickToFocus, + /** + * Moving the mouse pointer actively onto a normal window activates it. + * For convenience, the desktop and windows on the dock are excluded. + * They require clicking. + **/ + FocusFollowsMouse, + /** + * The window that happens to be under the mouse pointer becomes active. + * The invariant is: no window can have focus that is not under the mouse. + * This also means that Alt-Tab won't work properly and popup dialogs are + * usually unsable with the keyboard. Note that the desktop and windows on + * the dock are excluded for convenience. They get focus only when clicking + * on it. + **/ + FocusUnderMouse, + /** + * This is even worse than FocusUnderMouse. Only the window under the mouse + * pointer is active. If the mouse points nowhere, nothing has the focus. If + * the mouse points onto the desktop, the desktop has focus. The same holds + * for windows on the dock. + **/ + FocusStrictlyUnderMouse + }; + FocusPolicy focusPolicy() const { return m_focusPolicy; } bool isNextFocusPrefersMouse() const { return m_nextFocusPrefersMouse; } /** - Whether clicking on a window raises it in FocusFollowsMouse - mode or not. - */ + * Whether clicking on a window raises it in FocusFollowsMouse + * mode or not. + **/ bool isClickRaise() const { return m_clickRaise; } /** - whether autoraise is enabled FocusFollowsMouse mode or not. - */ + * Whether autoraise is enabled FocusFollowsMouse mode or not. + **/ bool isAutoRaise() const { return m_autoRaise; } /** - autoraise interval - */ + * Autoraise interval + **/ int autoRaiseInterval() const { return m_autoRaiseInterval; } /** - delayed focus interval - */ + * Delayed focus interval. + **/ int delayFocusInterval() const { return m_delayFocusInterval; } /** - Whether shade hover is enabled or not - */ + * Whether shade hover is enabled or not. + **/ bool isShadeHover() const { return m_shadeHover; } /** - shade hover interval - */ + * Shade hover interval. + **/ int shadeHoverInterval() { return m_shadeHoverInterval; } - // whether to see Xinerama screens separately for focus (in Alt+Tab, when activating next client) + /** + * Whether to see Xinerama screens separately for focus (in Alt+Tab, when activating next client) + **/ bool isSeparateScreenFocus() const { return m_separateScreenFocus; } @@ -293,49 +299,53 @@ } /** - * the size of the zone that triggers snapping on desktop borders - */ + * The size of the zone that triggers snapping on desktop borders. + **/ int borderSnapZone() const { return m_borderSnapZone; } /** - * the size of the zone that triggers snapping with other windows - */ + * The size of the zone that triggers snapping with other windows. + **/ int windowSnapZone() const { return m_windowSnapZone; } /** - * the size of the zone that triggers snapping on the screen center - */ + * The size of the zone that triggers snapping on the screen center. + **/ int centerSnapZone() const { return m_centerSnapZone; } /** - * snap only when windows will overlap - */ + * Snap only when windows will overlap. + **/ bool isSnapOnlyWhenOverlapping() const { return m_snapOnlyWhenOverlapping; } /** - * whether or not we roll over to the other edge when switching desktops past the edge - */ + * Whether or not we roll over to the other edge when switching desktops past the edge. + **/ bool isRollOverDesktops() const { return m_rollOverDesktops; } - // 0 - 4 , see Workspace::allowClientActivation() + /** + * Returns the focus stealing prevention level. + * + * @see allowClientActivation + **/ int focusStealingPreventionLevel() const { return m_focusStealingPreventionLevel; } /** - * support legacy fullscreen windows hack: borderless non-netwm windows with screen geometry - */ + * Support legacy fullscreen windows hack: borderless non-netwm windows with screen geometry. + **/ bool isLegacyFullscreenSupport() const { return m_legacyFullscreenSupport; } @@ -474,46 +484,50 @@ static MouseWheelCommand mouseWheelCommand(const QString &name); /** - * @returns true if the Geometry Tip should be shown during a window move/resize. - */ + * @returns true if the Geometry Tip should be shown during a window move/resize. + **/ bool showGeometryTip() const; /** - * returns whether the user prefers his caption clean - */ + * Returns whether the user prefers his caption clean. + **/ bool condensedTitle() const; /** - * @returns true if a window gets maximized when it reaches top screen edge - * while being moved. - */ + * @returns true if a window gets maximized when it reaches top screen edge + * while being moved. + **/ bool electricBorderMaximize() const { return electric_border_maximize; } /** - * @returns true if window is tiled to half screen when reaching left or - * right screen edge while been moved - */ + * @returns true if window is tiled to half screen when reaching left or + * right screen edge while been moved. + **/ bool electricBorderTiling() const { return electric_border_tiling; } /** - * @returns the factor that determines the corner part of the edge (ie. 0.1 means tiny corner) - */ + * @returns the factor that determines the corner part of the edge (ie. 0.1 means tiny corner) + **/ float electricBorderCornerRatio() const { return electric_border_corner_ratio; } bool borderlessMaximizedWindows() const { return borderless_maximized_windows; } - // timeout before non-responding application will be killed after attempt to close + /** + * Timeout before non-responding application will be killed after attempt to close. + **/ int killPingTimeout() const { return m_killPingTimeout; } - // Whether to hide utility windows for inactive applications. + /** + * Whether to hide utility windows for inactive applications. + **/ bool isHideUtilityWindowsForInactive() const { return m_hideUtilityWindowsForInactive; } @@ -528,7 +542,9 @@ return m_autogroupInForeground; } - // Desktop effects + /** + * Returns the animation time factor for desktop effects. + **/ double animationTimeFactor() const; //---------------------- diff --git a/outline.h b/outline.h --- a/outline.h +++ b/outline.h @@ -42,7 +42,7 @@ * * @author Arthur Arlt * @since 4.7 - */ + **/ class Outline : public QObject { Q_OBJECT Q_PROPERTY(QRect geometry READ geometry NOTIFY geometryChanged) @@ -57,31 +57,31 @@ * To show the outline use showOutline. * @param outlineGeometry The geometry of the outline to be shown * @see showOutline - */ + **/ void setGeometry(const QRect &outlineGeometry); /** * Set the visual parent geometry. * This is the geometry from which the will emerge. * @param visualParentGeometry The visual geometry of the visual parent * @see showOutline - */ + **/ void setVisualParentGeometry(const QRect &visualParentGeometry); /** * Shows the outline of a window using either an effect or the X implementation. * To stop the outline process use hideOutline. * @see hideOutline - */ + **/ void show(); /** * Shows the outline for the given @p outlineGeometry. * This is the same as setOutlineGeometry followed by showOutline directly. * To stop the outline process use hideOutline. * @param outlineGeometry The geometry of the outline to be shown * @see hideOutline - */ + **/ void show(const QRect &outlineGeometry); /** @@ -93,13 +93,13 @@ * @param visualParentGeometry The geometry from where the outline should emerge * @see hideOutline * @since 5.10 - */ + **/ void show(const QRect &outlineGeometry, const QRect &visualParentGeometry); /** * Hides shown outline. * @see showOutline - */ + **/ void hide(); const QRect &geometry() const; diff --git a/placement.h b/placement.h --- a/placement.h +++ b/placement.h @@ -47,7 +47,7 @@ * on the screen. The better the policy, the heavier the resource use. * Normally you don't have to worry. What the WM adds to the startup time * is nil compared to the creation of the window itself in the memory - */ + **/ enum Policy { NoPlacement, // not really a placement Default, // special, means to use the global default diff --git a/placement.cpp b/placement.cpp --- a/placement.cpp +++ b/placement.cpp @@ -53,9 +53,9 @@ s_self = NULL; } -/*! - Places the client \a c according to the workspace's layout policy - */ +/** + * Places the client \a c according to the workspace's layout policy + **/ void Placement::place(AbstractClient* c, QRect& area) { Policy policy = c->rules()->checkPlacement(Default); @@ -130,9 +130,9 @@ } } -/*! - Place the client \a c according to a simply "random" placement algorithm. - */ +/** + * Place the client \a c according to a simply "random" placement algorithm. + **/ void Placement::placeAtRandom(AbstractClient* c, const QRect& area, Policy /*next*/) { const int step = 24; @@ -191,9 +191,9 @@ return false; } -/*! - Place the client \a c according to a really smart placement algorithm :-) -*/ +/** + * Place the client \a c according to a really smart placement algorithm :-) + **/ void Placement::placeSmart(AbstractClient* c, const QRect& area, Policy /*next*/) { /* @@ -371,9 +371,9 @@ return QPoint(area.width()/48, area.height()/48); } -/*! - Place windows in a cascading order, remembering positions for each desktop -*/ +/** + * Place windows in a cascading order, remembering positions for each desktop + **/ void Placement::placeCascaded(AbstractClient* c, QRect& area, Policy nextPlacement) { /* cascadePlacement by Cristian Tibirna (tibirna@kde.org) (30Jan98) @@ -452,9 +452,9 @@ cci[dn].pos = QPoint(xp + delta.x(), yp + delta.y()); } -/*! - Place windows centered, on top of all others -*/ +/** + * Place windows centered, on top of all others + **/ void Placement::placeCentered(AbstractClient* c, const QRect& area, Policy /*next*/) { @@ -468,9 +468,9 @@ c->move(QPoint(xp, yp)); } -/*! - Place windows in the (0,0) corner, on top of all others -*/ +/** + * Place windows in the (0,0) corner, on top of all others + **/ void Placement::placeZeroCornered(AbstractClient* c, const QRect& area, Policy /*next*/) { // get the maximum allowed windows space and desk's origin @@ -696,9 +696,9 @@ } } -/*! - Moves active window left until in bumps into another window or workarea edge. - */ +/** + * Moves active window left until in bumps into another window or workarea edge. + **/ void Workspace::slotWindowPackLeft() { if (active_client && active_client->isMovable()) diff --git a/platform.h b/platform.h --- a/platform.h +++ b/platform.h @@ -174,7 +174,7 @@ * * Base implementation warns that the current backend does not implement this * functionality. - */ + **/ virtual void configurationChangeRequested(KWayland::Server::OutputConfigurationInterface *config); /** @@ -421,13 +421,13 @@ return Outputs(); } - /* + /** * A string of information to include in kwin debug output * It should not be translated. * * The base implementation prints the name. * @since 5.12 - */ + **/ virtual QString supportInformation() const; public Q_SLOTS: diff --git a/platformsupport/scenes/opengl/backend.h b/platformsupport/scenes/opengl/backend.h --- a/platformsupport/scenes/opengl/backend.h +++ b/platformsupport/scenes/opengl/backend.h @@ -168,12 +168,12 @@ /** * Returns the damage that has accumulated since a buffer of the given age was presented. - */ + **/ QRegion accumulatedDamageHistory(int bufferAge) const; /** * Saves the given region to damage history. - */ + **/ void addToDamageHistory(const QRegion ®ion); /** @@ -194,7 +194,7 @@ /** * Copy a region of pixels from the current read to the current draw buffer - */ + **/ void copyPixels(const QRegion ®ion); protected: @@ -297,7 +297,7 @@ bool m_directRendering; /** * @brief Whether the backend supports GLX_EXT_buffer_age / EGL_EXT_buffer_age. - */ + **/ bool m_haveBufferAge; /** * @brief Whether the initialization failed, of course default to @c false. @@ -309,7 +309,7 @@ QRegion m_lastDamage; /** * @brief The damage history for the past 10 frames. - */ + **/ QList m_damageHistory; /** * @brief Timer to measure how long a frame renders. diff --git a/platformsupport/scenes/qpainter/backend.h b/platformsupport/scenes/qpainter/backend.h --- a/platformsupport/scenes/qpainter/backend.h +++ b/platformsupport/scenes/qpainter/backend.h @@ -50,15 +50,15 @@ * @brief Shows the Overlay Window * * Default implementation does nothing. - */ + **/ virtual void showOverlay(); /** * @brief React on screen geometry changes. * * Default implementation does nothing. Override if specific functionality is required. * * @param size The new screen size - */ + **/ virtual void screenGeometryChanged(const QSize &size); /** * @brief Whether the creation of the Backend failed. diff --git a/plugins/kdecorations/aurorae/src/colorhelper.h b/plugins/kdecorations/aurorae/src/colorhelper.h --- a/plugins/kdecorations/aurorae/src/colorhelper.h +++ b/plugins/kdecorations/aurorae/src/colorhelper.h @@ -45,29 +45,29 @@ * Color shades are used to draw "3d" elements, such as frames and bevels. * They are neither foreground nor background colors. Text should not be * painted over a shade, and shades should not be used to draw text. - */ + **/ enum ShadeRole { /** * The light color is lighter than dark() or shadow() and contrasts * with the base color. - */ + **/ LightShade, /** * The midlight color is in between base() and light(). - */ + **/ MidlightShade, /** * The mid color is in between base() and dark(). - */ + **/ MidShade, /** * The dark color is in between mid() and shadow(). - */ + **/ DarkShade, /** * The shadow color is darker than light() or midlight() and contrasts * the base color. - */ + **/ ShadowShade }; /** @@ -78,18 +78,18 @@ * be used to draw text. In combination with one of the overloads of * KColorScheme::shade, they may be used to generate colors for drawing * frames, bevels, and similar decorations. - */ + **/ enum BackgroundRole { /** * Normal background. - */ + **/ NormalBackground = 0, /** * Alternate background; for example, for use in lists. * * This color may be the same as BackgroundNormal, especially in sets * other than View and Window. - */ + **/ AlternateBackground = 1, /** * Third color; for example, items which are new, active, requesting @@ -99,36 +99,36 @@ * good usage (although NegativeBackground could be used to the same * effect, depending on what you are trying to achieve). Unlike * ActiveText, this should not be used for mouseover effects. - */ + **/ ActiveBackground = 2, /** * Fourth color; corresponds to (unvisited) links. * * Exactly what this might be used for is somewhat harder to qualify; * it might be used for bookmarks, as a 'you can click here' indicator, * or to highlight recent content (i.e. in a most-recently-accessed * list). - */ + **/ LinkBackground = 3, /** * Fifth color; corresponds to visited links. * * This can also be used to indicate "not recent" content, especially * when a color is needed to denote content which is "old" or * "archival". - */ + **/ VisitedBackground = 4, /** * Sixth color; for example, errors, untrusted content, etc. - */ + **/ NegativeBackground = 5, /** * Seventh color; for example, warnings, secure/encrypted content. - */ + **/ NeutralBackground = 6, /** * Eigth color; for example, success messages, trusted content. - */ + **/ PositiveBackground = 7 }; @@ -147,51 +147,51 @@ * @li Close - NegativeText * @li WhatsThis - LinkText * @li Sticky - ActiveText - */ + **/ enum ForegroundRole { /** * Normal foreground. - */ + **/ NormalText = 0, /** * Second color; for example, comments, items which are old, inactive * or disabled. Generally used for things that are meant to be "less * important". InactiveText is not the same role as NormalText in the * inactive state. - */ + **/ InactiveText = 1, /** * Third color; for example items which are new, active, requesting * attention, etc. May be used as a hover color for clickable items. - */ + **/ ActiveText = 2, /** * Fourth color; use for (unvisited) links. May also be used for other * clickable items or content that indicates relationships, items that * indicate somewhere the user can visit, etc. - */ + **/ LinkText = 3, /** * Fifth color; used for (visited) links. As with LinkText, may be used * for items that have already been "visited" or accessed. May also be * used to indicate "historical" (i.e. "old") items or information, * especially if InactiveText is being used in the same context to * express something different. - */ + **/ VisitedText = 4, /** * Sixth color; for example, errors, untrusted content, deletions, * etc. - */ + **/ NegativeText = 5, /** * Seventh color; for example, warnings, secure/encrypted content. - */ + **/ NeutralText = 6, /** * Eigth color; for example, additions, success messages, trusted * content. - */ + **/ PositiveText = 7 }; /** @@ -203,9 +203,10 @@ * be lighter than the base color, with midlight() == shadow(). * Conversely, if the base color is very light, the 'light' shades will be * darker than the base color, with light() == mid(). - */ + **/ Q_INVOKABLE QColor shade(const QColor& color, ShadeRole role); - Q_INVOKABLE QColor shade(const QColor& color, ShadeRole role, qreal contrast); /** + Q_INVOKABLE QColor shade(const QColor& color, ShadeRole role, qreal contrast); + /** * Retrieve the requested shade color, using the specified color as the * base color and the specified contrast. * @@ -220,18 +221,18 @@ * darker than the base color, with light() == mid(). * * @see KColorUtils::shade - */ + **/ Q_INVOKABLE QColor multiplyAlpha(const QColor& color, qreal alpha); /** * Retrieve the requested background brush's color for the @p active button. * @param active Whether the active or inactive palette should be used. - */ + **/ Q_INVOKABLE QColor background(bool active, BackgroundRole role = NormalBackground) const; /** * Retrieve the requested foreground brush's color for the @p active button. * @param active Whether the active or inactive palette should be used. - */ + **/ Q_INVOKABLE QColor foreground(bool active, ForegroundRole role = NormalText) const; qreal contrast() const; diff --git a/plugins/kdecorations/aurorae/src/decorationoptions.h b/plugins/kdecorations/aurorae/src/decorationoptions.h --- a/plugins/kdecorations/aurorae/src/decorationoptions.h +++ b/plugins/kdecorations/aurorae/src/decorationoptions.h @@ -190,12 +190,12 @@ * Enum values to identify the decorations buttons which should be used * by the decoration. * - */ + **/ enum DecorationButton { /** * Invalid button value. A decoration should not create a button for * this type. - */ + **/ DecorationButtonNone, DecorationButtonMenu, DecorationButtonApplicationMenu, @@ -211,7 +211,7 @@ /** * The decoration should create an empty spacer instead of a button for * this type. - */ + **/ DecorationButtonExplicitSpacer }; explicit DecorationOptions(QObject *parent = nullptr); diff --git a/plugins/kdecorations/aurorae/src/lib/auroraetheme.h b/plugins/kdecorations/aurorae/src/lib/auroraetheme.h --- a/plugins/kdecorations/aurorae/src/lib/auroraetheme.h +++ b/plugins/kdecorations/aurorae/src/lib/auroraetheme.h @@ -173,23 +173,23 @@ Qt::Alignment alignment() const; Qt::Alignment verticalAlignment() const; /** - * Sets the title edges according to maximized state. - * Title edges are global to all windows. - */ + * Sets the title edges according to maximized state. + * Title edges are global to all windows. + **/ void titleEdges(int &left, int &top, int &right, int &bottom, bool maximized) const; void setCompositingActive(bool active); bool isCompositingActive() const; /** - * @returns true if the theme contains a FrameSvg for specified button. - */ + * @returns true if the theme contains a FrameSvg for specified button. + **/ bool hasButton(AuroraeButtonType button) const; void setBorderSize(KDecoration2::BorderSize size); /** - * Sets the size of the buttons. - * The available sizes are identical to border sizes, therefore BorderSize is used. - * @param size The buttons size - */ + * Sets the size of the buttons. + * The available sizes are identical to border sizes, therefore BorderSize is used. + * @param size The buttons size + **/ void setButtonSize(KDecoration2::BorderSize size); qreal buttonSizeFactor() const; @@ -211,14 +211,14 @@ private: /** - * Sets the borders according to maximized state. - * Borders are global to all windows. - */ + * Sets the borders according to maximized state. + * Borders are global to all windows. + **/ void borders(int &left, int &top, int &right, int &bottom, bool maximized) const; /** - * Sets the padding according. - * Padding is global to all windows. - */ + * Sets the padding according. + * Padding is global to all windows. + **/ void padding(int &left, int &top, int &right, int &bottom) const; AuroraeThemePrivate* const d; diff --git a/plugins/kdecorations/aurorae/themes/plastik/code/plastikbutton.h b/plugins/kdecorations/aurorae/themes/plastik/code/plastikbutton.h --- a/plugins/kdecorations/aurorae/themes/plastik/code/plastikbutton.h +++ b/plugins/kdecorations/aurorae/themes/plastik/code/plastikbutton.h @@ -56,7 +56,7 @@ /** * Invalid button value. A decoration should not create a button for * this type. - */ + **/ DecorationButtonNone, DecorationButtonMenu, DecorationButtonApplicationMenu, @@ -72,7 +72,7 @@ /** * The decoration should create an empty spacer instead of a button for * this type. - */ + **/ DecorationButtonExplicitSpacer }; QPixmap icon(ButtonIcon icon, int size, bool active, bool shadow); diff --git a/plugins/platforms/drm/drm_backend.h b/plugins/platforms/drm/drm_backend.h --- a/plugins/platforms/drm/drm_backend.h +++ b/plugins/platforms/drm/drm_backend.h @@ -135,11 +135,11 @@ Q_SIGNALS: /** * Emitted whenever an output is removed/disabled - */ + **/ void outputRemoved(KWin::DrmOutput *output); /** * Emitted whenever an output is added/enabled - */ + **/ void outputAdded(KWin::DrmOutput *output); protected: diff --git a/plugins/platforms/drm/egl_gbm_backend.h b/plugins/platforms/drm/egl_gbm_backend.h --- a/plugins/platforms/drm/egl_gbm_backend.h +++ b/plugins/platforms/drm/egl_gbm_backend.h @@ -68,8 +68,8 @@ EGLSurface eglSurface = EGL_NO_SURFACE; int bufferAge = 0; /** - * @brief The damage history for the past 10 frames. - */ + * @brief The damage history for the past 10 frames. + **/ QList damageHistory; }; bool resetOutput(Output &output, DrmOutput *drmOutput); diff --git a/plugins/platforms/wayland/wayland_backend.h b/plugins/platforms/wayland/wayland_backend.h --- a/plugins/platforms/wayland/wayland_backend.h +++ b/plugins/platforms/wayland/wayland_backend.h @@ -115,11 +115,11 @@ }; /** -* @brief Class encapsulating all Wayland data structures needed by the Egl backend. -* -* It creates the connection to the Wayland Compositor, sets up the registry and creates -* the Wayland surface and its shell mapping. -*/ + * @brief Class encapsulating all Wayland data structures needed by the Egl backend. + * + * It creates the connection to the Wayland Compositor, sets up the registry and creates + * the Wayland surface and its shell mapping. + **/ class KWIN_EXPORT WaylandBackend : public Platform { Q_OBJECT diff --git a/plugins/platforms/x11/standalone/x11cursor.h b/plugins/platforms/x11/standalone/x11cursor.h --- a/plugins/platforms/x11/standalone/x11cursor.h +++ b/plugins/platforms/x11/standalone/x11cursor.h @@ -42,7 +42,7 @@ * @internal * * Called from X11 event handler. - */ + **/ void notifyCursorChanged(); protected: @@ -57,10 +57,10 @@ private Q_SLOTS: /** - * Because of QTimer's and the impossibility to get events for all mouse - * movements (at least I haven't figured out how) the position needs - * to be also refetched after each return to the event loop. - */ + * Because of QTimer's and the impossibility to get events for all mouse + * movements (at least I haven't figured out how) the position needs + * to be also refetched after each return to the event loop. + **/ void resetTimeStamp(); void mousePolled(); void aboutToBlock(); diff --git a/plugins/scenes/opengl/scene_opengl.cpp b/plugins/scenes/opengl/scene_opengl.cpp --- a/plugins/scenes/opengl/scene_opengl.cpp +++ b/plugins/scenes/opengl/scene_opengl.cpp @@ -90,7 +90,7 @@ /** * SyncObject represents a fence used to synchronize operations in * the kwin command stream with operations in the X command stream. - */ + **/ class SyncObject { public: @@ -237,7 +237,7 @@ /** * SyncManager manages a set of fences used for explicit synchronization * with the X command stream. - */ + **/ class SyncManager { public: @@ -593,7 +593,7 @@ /** * Render cursor texture in case hardware cursor is disabled. * Useful for screen recording apps or backends that can't do planes. - */ + **/ void SceneOpenGL2::paintCursor() { // don't paint if we use hardware cursor diff --git a/plugins/scenes/xrender/scene_xrender.h b/plugins/scenes/xrender/scene_xrender.h --- a/plugins/scenes/xrender/scene_xrender.h +++ b/plugins/scenes/xrender/scene_xrender.h @@ -41,8 +41,7 @@ * * This class is intended as a small abstraction to support multiple compositing backends in the * SceneXRender. - * - */ + **/ class XRenderBackend { public: @@ -64,23 +63,23 @@ * @brief Shows the Overlay Window * * Default implementation does nothing. - */ + **/ virtual void showOverlay(); /** * @brief React on screen geometry changes. * * Default implementation does nothing. Override if specific functionality is required. * * @param size The new screen size - */ + **/ virtual void screenGeometryChanged(const QSize &size); /** * @brief The compositing buffer hold by this backend. * * The Scene composites the new frame into this buffer. * * @return xcb_render_picture_t - */ + **/ xcb_render_picture_t buffer() const { return m_buffer; } @@ -103,7 +102,7 @@ * * @param buffer The buffer to use for compositing * @return void - */ + **/ void setBuffer(xcb_render_picture_t buffer); /** * @brief Sets the backend initialization to failed. @@ -124,8 +123,7 @@ /** * @brief XRenderBackend using an X11 Overlay Window as compositing target. - * - */ + **/ class X11XRenderBackend : public XRenderBackend { public: @@ -282,7 +280,6 @@ * This class extends Shadow by the elements required for XRender rendering. * @author Jacopo De Simoi **/ - class SceneXRenderShadow : public Shadow { diff --git a/pointer_input.h b/pointer_input.h --- a/pointer_input.h +++ b/pointer_input.h @@ -97,51 +97,51 @@ /** * @internal - */ + **/ void processMotion(const QPointF &pos, uint32_t time, LibInput::Device *device = nullptr); /** * @internal **/ void processMotion(const QPointF &pos, const QSizeF &delta, const QSizeF &deltaNonAccelerated, uint32_t time, quint64 timeUsec, LibInput::Device *device); /** * @internal - */ + **/ void processButton(uint32_t button, InputRedirection::PointerButtonState state, uint32_t time, LibInput::Device *device = nullptr); /** * @internal - */ + **/ void processAxis(InputRedirection::PointerAxis axis, qreal delta, uint32_t time, LibInput::Device *device = nullptr); /** * @internal - */ + **/ void processSwipeGestureBegin(int fingerCount, quint32 time, KWin::LibInput::Device *device = nullptr); /** * @internal - */ + **/ void processSwipeGestureUpdate(const QSizeF &delta, quint32 time, KWin::LibInput::Device *device = nullptr); /** * @internal - */ + **/ void processSwipeGestureEnd(quint32 time, KWin::LibInput::Device *device = nullptr); /** * @internal - */ + **/ void processSwipeGestureCancelled(quint32 time, KWin::LibInput::Device *device = nullptr); /** * @internal - */ + **/ void processPinchGestureBegin(int fingerCount, quint32 time, KWin::LibInput::Device *device = nullptr); /** * @internal - */ + **/ void processPinchGestureUpdate(qreal scale, qreal angleDelta, const QSizeF &delta, quint32 time, KWin::LibInput::Device *device = nullptr); /** * @internal - */ + **/ void processPinchGestureEnd(quint32 time, KWin::LibInput::Device *device = nullptr); /** * @internal - */ + **/ void processPinchGestureCancelled(quint32 time, KWin::LibInput::Device *device = nullptr); private: diff --git a/scene.h b/scene.h --- a/scene.h +++ b/scene.h @@ -87,16 +87,16 @@ * @brief Creates the Scene backend of an EffectFrame. * * @param frame The EffectFrame this Scene::EffectFrame belongs to. - */ + **/ virtual Scene::EffectFrame *createEffectFrame(EffectFrameImpl *frame) = 0; /** * @brief Creates the Scene specific Shadow subclass. * * An implementing class has to create a proper instance. It is not allowed to * return @c null. * * @param toplevel The Toplevel for which the Shadow needs to be created. - */ + **/ virtual Shadow *createShadow(Toplevel *toplevel) = 0; /** * Method invoked when the screen geometry is changed. @@ -142,7 +142,7 @@ /** * Whether the Scene uses an X11 overlay window to perform compositing. - */ + **/ virtual bool usesOverlayWindow() const = 0; virtual void triggerFence(); @@ -348,15 +348,15 @@ * need to know the actual WindowPixmap subclass used by the concrete Scene implementations. * * @return The WindowPixmap casted to T* or @c NULL if there is no valid window pixmap. - */ + **/ template T *windowPixmap(); template T *previousWindowPixmap(); /** * @brief Factory method to create a WindowPixmap. * * The inheriting classes need to implement this method to create a new instance of their WindowPixmap subclass. * @note Do not use WindowPixmap::create on the created instance. The Scene will take care of that. - */ + **/ virtual WindowPixmap *createWindowPixmap() = 0; Toplevel* toplevel; ImageFilterType filter; @@ -387,7 +387,7 @@ * * This class is intended to be inherited for the needs of the compositor backends which need further mapping from * the native pixmap to the respective rendering format. - */ + **/ class KWIN_EXPORT WindowPixmap { public: @@ -400,15 +400,15 @@ * * Inheriting classes should re-implement this method in case they need to add further functionality for mapping the * native pixmap to the rendering format. - */ + **/ virtual void create(); /** * @return @c true if the pixmap has been created and is valid, @c false otherwise - */ + **/ virtual bool isValid() const; /** * @return The native X11 pixmap handle - */ + **/ xcb_pixmap_t pixmap() const; /** * @return The Wayland BufferInterface for this WindowPixmap. @@ -421,29 +421,29 @@ * * @return @c true if this WindowPixmap is considered as discarded, @c false otherwise. * @see markAsDiscarded - */ + **/ bool isDiscarded() const; /** * @brief Marks this WindowPixmap as discarded. From now on isDiscarded will return @c true. This method should * only be used by the Window when it changes in a way that a new pixmap is required. * * @see isDiscarded - */ + **/ void markAsDiscarded(); /** * The size of the pixmap. - */ + **/ const QSize &size() const; /** * The geometry of the Client's content inside the pixmap. In case of a decorated Client the * pixmap also contains the decoration which is not rendered into this pixmap, though. This * contentsRect tells where inside the complete pixmap the real content is. - */ + **/ const QRect &contentsRect() const; /** * @brief Returns the Toplevel this WindowPixmap belongs to. * Note: the Toplevel can change over the lifetime of the WindowPixmap in case the Toplevel is copied to Deleted. - */ + **/ Toplevel *toplevel() const; /** @@ -478,7 +478,7 @@ virtual WindowPixmap *createChild(const QPointer &subSurface); /** * @return The Window this WindowPixmap belongs to - */ + **/ Scene::Window *window(); /** diff --git a/screenedge.h b/screenedge.h --- a/screenedge.h +++ b/screenedge.h @@ -198,7 +198,7 @@ * These checks are performed in @ref Edge * * @todo change way how Effects/Scripts can reserve an edge and are notified. - */ + **/ class KWIN_EXPORT ScreenEdges : public QObject { Q_OBJECT @@ -224,19 +224,19 @@ /** * Initialize the screen edges. * @internal - */ + **/ void init(); /** * Check, if a screen edge is entered and trigger the appropriate action * if one is enabled for the current region and the timeout is satisfied * @param pos the position of the mouse pointer * @param now the time when the function is called * @param forceNoPushBack needs to be called to workaround some DnD clients, don't use unless you want to chek on a DnD event - */ + **/ void check(const QPoint& pos, const QDateTime &now, bool forceNoPushBack = false); /** * The (dpi dependent) length, reserved for the active corners of each edge - 1/3" - */ + **/ int cornerOffset() const; /** * Mark the specified screen edge as reserved. This method is provided for external activation @@ -247,7 +247,7 @@ * @param callback The method name to be invoked - uses QMetaObject::invokeMethod * @see unreserve * @todo: add pointer to script/effect - */ + **/ void reserve(ElectricBorder border, QObject *object, const char *callback); /** * Mark the specified screen edge as unreserved. This method is provided for external activation @@ -258,7 +258,7 @@ * @param object the object on which the callback had been invoked * @see reserve * @todo: add pointer to script/effect - */ + **/ void unreserve(ElectricBorder border, QObject *object); /** * Reserves an edge for the @p client. The idea behind this is to show the @p client if the @@ -306,19 +306,19 @@ * Reserve desktop switching for screen edges, if @p isToReserve is @c true. Unreserve otherwise. * @param isToReserve indicated whether desktop switching should be reserved or unreseved * @param o Qt orientations - */ + **/ void reserveDesktopSwitching(bool isToReserve, Qt::Orientations o); /** * Raise electric border windows to the real top of the screen. We only need * to do this if an effect input window is active. - */ + **/ void ensureOnTop(); bool isEntered(QMouseEvent *event); /** * Returns a QVector of all existing screen edge windows * @return all existing screen edge windows in a QVector - */ + **/ QVector< xcb_window_t > windows() const; bool isDesktopSwitching() const; diff --git a/screens.h b/screens.h --- a/screens.h +++ b/screens.h @@ -54,14 +54,14 @@ int current() const; void setCurrent(int current); /** - * Called e.g. when a user clicks on a window, set current screen to be the screen - * where the click occurred - */ + * Called e.g. when a user clicks on a window, set current screen to be the screen + * where the click occurred + **/ void setCurrent(const QPoint &pos); /** - * Check whether a client moved completely out of what's considered the current screen, - * if yes, set a new active screen. - */ + * Check whether a client moved completely out of what's considered the current screen, + * if yes, set a new active screen. + **/ void setCurrent(const AbstractClient *c); bool isCurrentFollowsMouse() const; void setCurrentFollowsMouse(bool follows); @@ -74,7 +74,7 @@ QRect geometry() const; /** * The output name of the screen (usually eg. LVDS-1, VGA-0 or DVI-I-1 etc.) - */ + **/ virtual QString name(int screen) const; /** * @returns current refreshrate of the @p screen. @@ -93,12 +93,12 @@ * for use when deciding what scale to load global assets at * Similar to QGuiApplication::scale * @see scale - */ + **/ qreal maxScale() const; - /* + /** * The output scale for this display, for use by high DPI displays - */ + **/ virtual qreal scale(int screen) const; /** * The bounding size of all screens combined. Overlapping areas @@ -182,7 +182,7 @@ /** * Emitted when the maximum scale of all attached screens changes * @see maxScale - */ + **/ void maxScaleChanged(); protected Q_SLOTS: diff --git a/scripting/dbuscall.h b/scripting/dbuscall.h --- a/scripting/dbuscall.h +++ b/scripting/dbuscall.h @@ -71,7 +71,7 @@ * onFinished: console.log(returnValue[0]) * } * @endcode - */ + **/ class DBusCall : public QObject { Q_OBJECT diff --git a/scripting/meta.h b/scripting/meta.h --- a/scripting/meta.h +++ b/scripting/meta.h @@ -44,31 +44,31 @@ /** - * The toScriptValue and fromScriptValue functions used in qScriptRegisterMetaType. - * Conversion functions for QPoint - */ + * The toScriptValue and fromScriptValue functions used in qScriptRegisterMetaType. + * Conversion functions for QPoint + **/ namespace Point { QScriptValue toScriptValue(QScriptEngine*, const QPoint&); void fromScriptValue(const QScriptValue&, QPoint&); } /** - * The toScriptValue and fromScriptValue functions used in qScriptRegisterMetaType. - * Conversion functions for QSize - */ + * The toScriptValue and fromScriptValue functions used in qScriptRegisterMetaType. + * Conversion functions for QSize + **/ namespace Size { QScriptValue toScriptValue(QScriptEngine*, const QSize&); void fromScriptValue(const QScriptValue&, QSize&); } /** - * The toScriptValue and fromScriptValue functions used in qScriptRegisterMetaType. - * Conversion functions for QRect - * TODO: QRect conversions have to be linked from plasma as they provide a lot more - * features. As for QSize and QPoint, I don't really plan any such thing. - */ + * The toScriptValue and fromScriptValue functions used in qScriptRegisterMetaType. + * Conversion functions for QRect + * TODO: QRect conversions have to be linked from plasma as they provide a lot more + * features. As for QSize and QPoint, I don't really plan any such thing. + **/ namespace Rect { QScriptValue toScriptValue(QScriptEngine*, const QRect&); @@ -88,40 +88,40 @@ } /** - * Merges the second QScriptValue in the first one. - */ + * Merges the second QScriptValue in the first one. + **/ void valueMerge(QScriptValue&, QScriptValue); /** - * Registers all the meta conversion to the provided QScriptEngine - */ + * Registers all the meta conversion to the provided QScriptEngine + **/ void registration(QScriptEngine* eng); /** - * Functions for the JS function objects, config.exists and config.get. - * Read scripting/IMPLIST for details on how they work - */ + * Functions for the JS function objects, config.exists and config.get. + * Read scripting/IMPLIST for details on how they work + **/ QScriptValue configExists(QScriptContext*, QScriptEngine*); QScriptValue getConfigValue(QScriptContext*, QScriptEngine*); /** - * Provide a config object to the given QScriptEngine depending - * on the keys provided in the QVariant. The provided QVariant - * MUST returns (true) on isHash() - */ + * Provide a config object to the given QScriptEngine depending + * on the keys provided in the QVariant. The provided QVariant + * MUST returns (true) on isHash() + **/ void supplyConfig(QScriptEngine*, const QVariant&); /** - * For engines whose scripts have no associated configuration. - */ + * For engines whose scripts have no associated configuration. + **/ void supplyConfig(QScriptEngine*); } } /** - * Code linked from plasma for QTimer. - */ + * Code linked from plasma for QTimer. + **/ QScriptValue constructTimerClass(QScriptEngine *eng); #endif diff --git a/scripting/screenedgeitem.h b/scripting/screenedgeitem.h --- a/scripting/screenedgeitem.h +++ b/scripting/screenedgeitem.h @@ -42,22 +42,19 @@ * onActivated: doSomething() * } * @endcode - * - */ + **/ class ScreenEdgeItem : public QObject { Q_OBJECT Q_ENUMS(Edge) Q_ENUMS(Mode) /** * @brief Whether the edge is currently enabled, that is reserved. Default value is @c true. - * - */ + **/ Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged) /** * @brief Which of the screen edges is to be reserved. Default value is @c NoEdge. - * - */ + **/ Q_PROPERTY(Edge edge READ edge WRITE setEdge NOTIFY edgeChanged) /** * @brief The operation mode for this edge. Default value is @c Mode::Pointer diff --git a/scripting/scriptedeffect.h b/scripting/scriptedeffect.h --- a/scripting/scriptedeffect.h +++ b/scripting/scriptedeffect.h @@ -40,7 +40,7 @@ Q_ENUMS(EasingCurve) /** * True if we are the active fullscreen effect - */ + **/ Q_PROPERTY(bool isActiveFullScreenEffect READ isActiveFullScreenEffect NOTIFY isActiveFullScreenEffectChanged) public: // copied from kwineffects.h diff --git a/scripting/scripting.h b/scripting/scripting.h --- a/scripting/scripting.h +++ b/scripting/scripting.h @@ -237,9 +237,9 @@ private Q_SLOTS: /** - * A nice clean way to handle exceptions in scripting. - * TODO: Log to file, show from notifier.. - */ + * A nice clean way to handle exceptions in scripting. + * TODO: Log to file, show from notifier.. + **/ void sigException(const QScriptValue &exception); /** * Callback for when loadScriptFromFile has finished. @@ -327,8 +327,8 @@ }; /** - * The heart of KWin::Scripting. Infinite power lies beyond - */ + * The heart of KWin::Scripting. Infinite power lies beyond + **/ class KWIN_EXPORT Scripting : public QObject { Q_OBJECT diff --git a/scripting/scripting_model.h b/scripting/scripting_model.h --- a/scripting/scripting_model.h +++ b/scripting/scripting_model.h @@ -124,8 +124,7 @@ * Each element of the tree has a unique id which can be used by the QAbstractItemModel as the * internal id for its QModelIndex. Note: the ids have no ordering, if trying to get a specific element * the tree performs a depth-first search. - * - */ + **/ class AbstractLevel : public QObject { Q_OBJECT @@ -210,7 +209,7 @@ * * The Clients in this group are not sorted in any particular way. It's a simple list which only * gets added to. If some sorting should be applied, use a QSortFilterProxyModel. - */ + **/ class ClientLevel : public AbstractLevel { Q_OBJECT @@ -270,8 +269,7 @@ /** * @brief Custom QSortFilterProxyModel to filter on Client caption, role and class. - * - */ + **/ class ClientFilterModel : public QSortFilterProxyModel { Q_OBJECT diff --git a/scripting/workspace_wrapper.h b/scripting/workspace_wrapper.h --- a/scripting/workspace_wrapper.h +++ b/scripting/workspace_wrapper.h @@ -143,13 +143,13 @@ /** * This signal is emitted when a new activity is added * @param id id of the new activity - */ + **/ void activityAdded(const QString &id); /** * This signal is emitted when the activity * is removed * @param id id of the removed activity - */ + **/ void activityRemoved(const QString &id); /** * Emitted whenever the virtualScreenSize changes. diff --git a/shell_client.h b/shell_client.h --- a/shell_client.h +++ b/shell_client.h @@ -42,7 +42,7 @@ /** * @brief The reason for which the server pinged a client surface - */ + **/ enum class PingReason { CloseWindow = 0, FocusWindow diff --git a/sm.cpp b/sm.cpp --- a/sm.cpp +++ b/sm.cpp @@ -95,11 +95,11 @@ // Workspace -/*! - Stores the current session in the config file - - \sa loadSessionInfo() - */ +/** + * Stores the current session in the config file + * + * @see loadSessionInfo + **/ void Workspace::storeSession(KConfig* config, SMSavePhase phase) { KConfigGroup cg(config, "Session"); @@ -213,11 +213,11 @@ //cg.writeEntry( "desktop", currentDesktop()); } -/*! - Loads the session information from the config file. - - \sa storeSession() - */ +/** + * Loads the session information from the config file. + * + * @see storeSession + **/ void Workspace::loadSessionInfo(const QString &key) { // NOTICE: qApp->sessionKey() is outdated when this gets invoked @@ -273,15 +273,15 @@ addSessionInfo(cg); } -/*! - Returns a SessionInfo for client \a c. The returned session - info is removed from the storage. It's up to the caller to delete it. - - This function is called when a new window is mapped and must be managed. - We try to find a matching entry in the session. - - May return 0 if there's no session info for the client. - */ +/** + * Returns a SessionInfo for client \a c. The returned session + * info is removed from the storage. It's up to the caller to delete it. + * + * This function is called when a new window is mapped and must be managed. + * We try to find a matching entry in the session. + * + * May return 0 if there's no session info for the client. + **/ SessionInfo* Workspace::takeSessionInfo(Client* c) { SessionInfo *realInfo = 0; diff --git a/tabbox/clientmodel.h b/tabbox/clientmodel.h --- a/tabbox/clientmodel.h +++ b/tabbox/clientmodel.h @@ -24,25 +24,25 @@ #include /** -* @file -* This file defines the class ClientModel, the model for TabBoxClients. -* -* @author Martin Gräßlin -* @since 4.4 -*/ + * @file + * This file defines the class ClientModel, the model for TabBoxClients. + * + * @author Martin Gräßlin + * @since 4.4 + **/ namespace KWin { namespace TabBox { /** -* The model for TabBoxClients used in TabBox. -* -* @author Martin Gräßlin -* @since 4.4 -*/ + * The model for TabBoxClients used in TabBox. + * + * @author Martin Gräßlin + * @since 4.4 + **/ class ClientModel : public QAbstractItemModel { @@ -67,30 +67,30 @@ Q_INVOKABLE QString longestCaption() const; /** - * @param client The TabBoxClient whose index should be returned - * @return Returns the ModelIndex of given TabBoxClient or an invalid ModelIndex - * if the model does not contain the given TabBoxClient. - */ + * @param client The TabBoxClient whose index should be returned + * @return Returns the ModelIndex of given TabBoxClient or an invalid ModelIndex + * if the model does not contain the given TabBoxClient. + **/ QModelIndex index(QWeakPointer client) const; /** - * Generates a new list of TabBoxClients based on the current config. - * Calling this method will reset the model. If partialReset is true - * the top of the list is kept as a starting point. If not the - * current active client is used as the starting point to generate the - * list. - * @param desktop The desktop for which the list should be created - * @param partialReset Keep the currently selected client or regenerate everything - */ + * Generates a new list of TabBoxClients based on the current config. + * Calling this method will reset the model. If partialReset is true + * the top of the list is kept as a starting point. If not the + * current active client is used as the starting point to generate the + * list. + * @param desktop The desktop for which the list should be created + * @param partialReset Keep the currently selected client or regenerate everything + **/ void createClientList(int desktop, bool partialReset = false); /** - * This method is provided as a overload for current desktop - * @see createClientList - */ + * This method is provided as a overload for current desktop + * @see createClientList + **/ void createClientList(bool partialReset = false); /** - * @return Returns the current list of TabBoxClients. - */ + * @return Returns the current list of TabBoxClients. + **/ TabBoxClientList clientList() const { return m_clientList; } diff --git a/tabbox/desktopmodel.h b/tabbox/desktopmodel.h --- a/tabbox/desktopmodel.h +++ b/tabbox/desktopmodel.h @@ -23,25 +23,25 @@ #include /** -* @file -* This file defines the class DesktopModel, the model for desktops. -* -* @author Martin Gräßlin -* @since 4.4 -*/ + * @file + * This file defines the class DesktopModel, the model for desktops. + * + * @author Martin Gräßlin + * @since 4.4 + **/ namespace KWin { namespace TabBox { class ClientModel; /** -* The model for desktops used in TabBox. -* -* @author Martin Gräßlin -* @since 4.4 -*/ + * The model for desktops used in TabBox. + * + * @author Martin Gräßlin + * @since 4.4 + **/ class DesktopModel : public QAbstractItemModel { @@ -62,21 +62,21 @@ Q_INVOKABLE QString longestCaption() const; /** - * Generates a new list of desktops based on the current config. - * Calling this method will reset the model. - */ + * Generates a new list of desktops based on the current config. + * Calling this method will reset the model. + **/ void createDesktopList(); /** - * @return The current list of desktops. - */ + * @return The current list of desktops. + **/ QList< int > desktopList() const { return m_desktopList; } /** - * @param desktop The desktop whose ModelIndex should be retrieved - * @return The ModelIndex of given desktop or an invalid ModelIndex if - * the desktop is not in the model. - */ + * @param desktop The desktop whose ModelIndex should be retrieved + * @return The ModelIndex of given desktop or an invalid ModelIndex if + * the desktop is not in the model. + **/ QModelIndex desktopIndex(int desktop) const; private: diff --git a/tabbox/switcheritem.h b/tabbox/switcheritem.h --- a/tabbox/switcheritem.h +++ b/tabbox/switcheritem.h @@ -42,7 +42,7 @@ /** * The main QML item that will be displayed in the Dialog - */ + **/ Q_PROPERTY(QObject *item READ item WRITE setItem NOTIFY itemChanged) Q_CLASSINFO("DefaultProperty", "item") diff --git a/tabbox/tabbox.h b/tabbox/tabbox.h --- a/tabbox/tabbox.h +++ b/tabbox/tabbox.h @@ -119,46 +119,114 @@ public: ~TabBox(); + /** + * Returns the currently displayed client ( only works in TabBoxWindowsMode ). + * Returns 0 if no client is displayed. + **/ AbstractClient *currentClient(); + + /** + * Returns the list of clients potentially displayed ( only works in + * TabBoxWindowsMode ). + * Returns an empty list if no clients are available. + **/ QList currentClientList(); + + /** + * Returns the currently displayed virtual desktop ( only works in + * TabBoxDesktopListMode ) + * Returns -1 if no desktop is displayed. + **/ int currentDesktop(); + + /** + * Returns the list of desktops potentially displayed ( only works in + * TabBoxDesktopListMode ) + * Returns an empty list if no are available. + **/ QList< int > currentDesktopList(); + /** + * Change the currently selected client, and notify the effects. + * + * @see setCurrentDesktop + **/ void setCurrentClient(AbstractClient *newClient); + + /** + * Change the currently selected desktop, and notify the effects. + * + * @see setCurrentClient + **/ void setCurrentDesktop(int newDesktop); + /** + * Sets the current mode to \a mode, either TabBoxDesktopListMode or TabBoxWindowsMode + * + * @see mode + **/ void setMode(TabBoxMode mode); TabBoxMode mode() const { return m_tabBoxMode; } + /** + * Resets the tab box to display the active client in TabBoxWindowsMode, or the + * current desktop in TabBoxDesktopListMode + **/ void reset(bool partial_reset = false); + + /** + * Shows the next or previous item, depending on \a next + **/ void nextPrev(bool next = true); + /** + * Shows the tab box after some delay. + * + * If the 'ShowDelay' setting is false, show() is simply called. + * + * Otherwise, we start a timer for the delay given in the settings and only + * do a show() when it times out. + * + * This means that you can alt-tab between windows and you don't see the + * tab box immediately. Not only does this make alt-tabbing faster, it gives + * less 'flicker' to the eyes. You don't need to see the tab box if you're + * just quickly switching between 2 or 3 windows. It seems to work quite + * nicely. + **/ void delayedShow(); - void hide(bool abort = false); - /*! - Increase the reference count, preventing the default tabbox from showing. + /** + * Notify effects that the tab box is being hidden. + **/ + void hide(bool abort = false); - \sa unreference(), isDisplayed() - */ + /** + * Increases the reference count, preventing the default tabbox from showing. + * + * @see unreference + * @see isDisplayed + **/ void reference() { ++m_displayRefcount; } - /*! - Decrease the reference count. Only when the reference count is 0 will - the default tab box be shown. - */ + + /** + * Decreases the reference count. Only when the reference count is 0 will + * the default tab box be shown. + **/ void unreference() { --m_displayRefcount; } - /*! - Returns whether the tab box is being displayed, either natively or by an - effect. - \sa reference(), unreference() - */ + /** + * Returns whether the tab box is being displayed, either natively or by an + * effect. + * + * @see reference + * @see unreference + **/ bool isDisplayed() const { return m_displayRefcount > 0; } @@ -200,6 +268,10 @@ static TabBox *create(QObject *parent); public Q_SLOTS: + /** + * Notify effects that the tab box is being shown, and only display the + * default tab box QFrame if no effect has referenced the tab box. + **/ void show(); void close(bool abort = false); void accept(bool closeTabBox = true); diff --git a/tabbox/tabbox.cpp b/tabbox/tabbox.cpp --- a/tabbox/tabbox.cpp +++ b/tabbox/tabbox.cpp @@ -598,11 +598,6 @@ } } -/*! - Sets the current mode to \a mode, either TabBoxDesktopListMode or TabBoxWindowsMode - - \sa mode() - */ void TabBox::setMode(TabBoxMode mode) { m_tabBoxMode = mode; @@ -628,10 +623,6 @@ } } -/*! - Resets the tab box to display the active client in TabBoxWindowsMode, or the - current desktop in TabBoxDesktopListMode - */ void TabBox::reset(bool partial_reset) { switch(m_tabBox->config().tabBoxMode()) { @@ -660,19 +651,12 @@ emit tabBoxUpdated(); } -/*! - Shows the next or previous item, depending on \a next - */ void TabBox::nextPrev(bool next) { setCurrentIndex(m_tabBox->nextPrev(next), false); emit tabBoxUpdated(); } -/*! - Returns the currently displayed client ( only works in TabBoxWindowsMode ). - Returns 0 if no client is displayed. - */ AbstractClient* TabBox::currentClient() { if (TabBoxClientImpl* client = static_cast< TabBoxClientImpl* >(m_tabBox->client(m_tabBox->currentIndex()))) { @@ -683,11 +667,6 @@ return nullptr; } -/*! - Returns the list of clients potentially displayed ( only works in - TabBoxWindowsMode ). - Returns an empty list if no clients are available. - */ QList TabBox::currentClientList() { TabBoxClientList list = m_tabBox->clientList(); @@ -702,41 +681,21 @@ return ret; } -/*! - Returns the currently displayed virtual desktop ( only works in - TabBoxDesktopListMode ) - Returns -1 if no desktop is displayed. - */ int TabBox::currentDesktop() { return m_tabBox->desktop(m_tabBox->currentIndex()); } -/*! - Returns the list of desktops potentially displayed ( only works in - TabBoxDesktopListMode ) - Returns an empty list if no are available. - */ QList< int > TabBox::currentDesktopList() { return m_tabBox->desktopList(); } -/*! - Change the currently selected client, and notify the effects. - - \sa setCurrentDesktop() - */ void TabBox::setCurrentClient(AbstractClient *newClient) { setCurrentIndex(m_tabBox->index(newClient->tabBoxClient())); } -/*! - Change the currently selected desktop, and notify the effects. - - \sa setCurrentClient() - */ void TabBox::setCurrentDesktop(int newDesktop) { setCurrentIndex(m_tabBox->desktopIndex(newDesktop)); @@ -752,10 +711,6 @@ } } -/*! - Notify effects that the tab box is being shown, and only display the - default tab box QFrame if no effect has referenced the tab box. -*/ void TabBox::show() { emit tabBoxAdded(m_tabBoxMode); @@ -769,9 +724,6 @@ m_tabBox->show(); } -/*! - Notify effects that the tab box is being hidden. -*/ void TabBox::hide(bool abort) { m_delayedShowTimer.stop(); @@ -879,24 +831,6 @@ tabBoxConfig.setLayoutName(config.readEntry("LayoutName", TabBoxConfig::defaultLayoutName())); } -/*! - Rikkus: please document! (Matthias) - - Ok, here's the docs :) - - You call delayedShow() instead of show() directly. - - If the 'ShowDelay' setting is false, show() is simply called. - - Otherwise, we start a timer for the delay given in the settings and only - do a show() when it times out. - - This means that you can alt-tab between windows and you don't see the - tab box immediately. Not only does this make alt-tabbing faster, it gives - less 'flicker' to the eyes. You don't need to see the tab box if you're - just quickly switching between 2 or 3 windows. It seems to work quite - nicely. - */ void TabBox::delayedShow() { if (isDisplayed() || m_delayedShowTimer.isActive()) @@ -984,9 +918,9 @@ } }; -/*! - Handles alt-tab / control-tab - */ +/** + * Handles alt-tab / control-tab + **/ static bool areKeySymXsDepressed(bool bAll, const uint keySyms[], int nKeySyms) { qCDebug(KWIN_TABBOX) << "areKeySymXsDepressed: " << (bAll ? "all of " : "any of ") << nKeySyms; @@ -1369,9 +1303,6 @@ oneStepThroughDesktops(forward, TabBoxDesktopListMode); } -/*! - Handles holding alt-tab / control-tab - */ void TabBox::keyPress(int keyQt) { enum Direction { Backward = -1, Steady = 0, Forward = 1 }; @@ -1542,10 +1473,10 @@ return functor(iDesktop, true); } -/*! - auxiliary functions to travers all clients according to the static - order. Useful for the CDE-style Alt-tab feature. -*/ +/** + * Auxiliary functions to travers all clients according to the static + * order. Useful for the CDE-style Alt-tab feature. + **/ AbstractClient* TabBox::nextClientStatic(AbstractClient* c) const { const auto &list = Workspace::self()->allClientList(); @@ -1560,10 +1491,10 @@ return list.at(pos); } -/*! - auxiliary functions to travers all clients according to the static - order. Useful for the CDE-style Alt-tab feature. -*/ +/** + * Auxiliary functions to travers all clients according to the static + * order. Useful for the CDE-style Alt-tab feature. + **/ AbstractClient* TabBox::previousClientStatic(AbstractClient* c) const { const auto &list = Workspace::self()->allClientList(); diff --git a/tabbox/tabboxconfig.h b/tabbox/tabboxconfig.h --- a/tabbox/tabboxconfig.h +++ b/tabbox/tabboxconfig.h @@ -24,106 +24,106 @@ #include /** -* @file -* This file defines the class TabBoxConfig. -* -* @author Martin Gräßlin -* @since 4.4 -*/ + * @file + * This file defines the class TabBoxConfig. + * + * @author Martin Gräßlin + * @since 4.4 + **/ namespace KWin { namespace TabBox { class TabBoxConfigPrivate; /** -* The TabBoxConfig class holds all configuration options for the TabBox. -* The TabBoxHandler contains a pointer to an object of this class and is -* used by all classes of TabBox. The config defines what kind of data the -* TabBox is displaying and how the layout looks like. There can be different -* Config sets and by setting a new config in the TabBoxHandler the behaviour -* of the TabBox is changed immediately. -* -* @author Martin Gräßlin -* @since 4.4 -*/ + * The TabBoxConfig class holds all configuration options for the TabBox. + * The TabBoxHandler contains a pointer to an object of this class and is + * used by all classes of TabBox. The config defines what kind of data the + * TabBox is displaying and how the layout looks like. There can be different + * Config sets and by setting a new config in the TabBoxHandler the behaviour + * of the TabBox is changed immediately. + * + * @author Martin Gräßlin + * @since 4.4 + **/ class TabBoxConfig { public: /** - * ClientDesktopMode defines whether windows from the current desktop or from all - * desktops are included in the TabBoxClient List in the TabBoxClientModel - */ + * ClientDesktopMode defines whether windows from the current desktop or from all + * desktops are included in the TabBoxClient List in the TabBoxClientModel + **/ enum ClientDesktopMode { AllDesktopsClients, ///< TabBoxClients from all desktops are included. OnlyCurrentDesktopClients, ///< Only TabBoxClients on current desktop are included ExcludeCurrentDesktopClients ///< Exclude TabBoxClients on current desktop }; /** - * ClientActivitiesMode defines whether windows from the current activity or from all - * activities are included in the TabBoxClient List in the TabBoxClientModel - */ + * ClientActivitiesMode defines whether windows from the current activity or from all + * activities are included in the TabBoxClient List in the TabBoxClientModel + **/ enum ClientActivitiesMode { AllActivitiesClients, ///< TabBoxClients from all Activities are included. OnlyCurrentActivityClients, ///< Only TabBoxClients on current activity are included ExcludeCurrentActivityClients ///< Exclude TabBoxClients on current activity }; /** - * ClientApplicationsMode defines which windows from the current application or from all - * applications are included in the TabBoxClient List in the TabBoxClientModel - */ + * ClientApplicationsMode defines which windows from the current application or from all + * applications are included in the TabBoxClient List in the TabBoxClientModel + **/ enum ClientApplicationsMode { AllWindowsAllApplications, ///< TabBoxClients from all applications are included OneWindowPerApplication, ///< Only one TabBoxClient for each application is included AllWindowsCurrentApplication ///< Only TabBoxClients for the current application are included }; /** - * ClientMinimizedMode defines which windows are included in the TabBoxClient List - * in the TabBoxClientModel based on whether they are minimized or not - */ + * ClientMinimizedMode defines which windows are included in the TabBoxClient List + * in the TabBoxClientModel based on whether they are minimized or not + **/ enum ClientMinimizedMode { IgnoreMinimizedStatus, ///< TabBoxClients are included no matter they are minimized or not ExcludeMinimizedClients, ///< Exclude minimized TabBoxClients OnlyMinimizedClients ///< Only minimized TabBoxClients are included }; /** - * ShowDesktopMode defines whether a TabBoxClient representing the desktop - * is included in the TabBoxClient List in the TabBoxClientModel - */ + * ShowDesktopMode defines whether a TabBoxClient representing the desktop + * is included in the TabBoxClient List in the TabBoxClientModel + **/ enum ShowDesktopMode { DoNotShowDesktopClient, ///< A TabBoxClient representing the desktop is not included ShowDesktopClient ///< A TabBoxClient representing the desktop is included }; /** - * ClientActivitiesMode defines whether windows from the current activity or from all - * activities are included in the TabBoxClient List in the TabBoxClientModel - */ + * ClientActivitiesMode defines whether windows from the current activity or from all + * activities are included in the TabBoxClient List in the TabBoxClientModel + **/ enum ClientMultiScreenMode { IgnoreMultiScreen, ///< TabBoxClients are included independently of the screen they are on OnlyCurrentScreenClients, ///< Only TabBoxClients on current screen are included ExcludeCurrentScreenClients ///< Exclude TabBoxClients from the current screen }; /** - * ClientSwitchingMode defines the sorting of the TabBoxClients in the - * TabBoxClientModel. - */ + * ClientSwitchingMode defines the sorting of the TabBoxClients in the + * TabBoxClientModel. + **/ enum ClientSwitchingMode { FocusChainSwitching, ///< Sort by recently used. Most recently used TabBoxClient is the first StackingOrderSwitching ///< Sort by current stacking order }; /** - * DesktopSwitchingMode defines the sorting of the desktops in the - * TabBoxDesktopModel. - */ + * DesktopSwitchingMode defines the sorting of the desktops in the + * TabBoxDesktopModel. + **/ enum DesktopSwitchingMode { MostRecentlyUsedDesktopSwitching,///< Sort by recently used. Most recently used desktop is the first StaticDesktopSwitching///< Static sorting in numerical ascending order }; /** - * TabBoxMode defines what kind of items the TabBox is displaying and which - * Model is used - */ + * TabBoxMode defines what kind of items the TabBox is displaying and which + * Model is used + **/ enum TabBoxMode { ClientTabBox,///< TabBox uses TabBoxClientModel DesktopTabBox///< TabBox uses TabBoxDesktopModel @@ -134,155 +134,155 @@ // getters /** - * @return If the TabBox should be shown or not - * This option does not apply for TabBoxMode DesktopTabBox. - * @see setShowTabBox - * @see defaultShowTabBox - */ + * @return If the TabBox should be shown or not + * This option does not apply for TabBoxMode DesktopTabBox. + * @see setShowTabBox + * @see defaultShowTabBox + **/ bool isShowTabBox() const; /** - * @return If Highlight Window effect should be used. - * This option does not apply for TabBoxMode DesktopTabBox. - * @see setHighlightWindows - * @see defaultHighlightWindows - */ + * @return If Highlight Window effect should be used. + * This option does not apply for TabBoxMode DesktopTabBox. + * @see setHighlightWindows + * @see defaultHighlightWindows + **/ bool isHighlightWindows() const; /** - * @return The current TabBoxMode - * @see setTabBoxMode - */ + * @return The current TabBoxMode + * @see setTabBoxMode + **/ TabBoxMode tabBoxMode() const; /** - * @return The current ClientDesktopMode - * This option only applies for TabBoxMode ClientTabBox. - * @see setClientDesktopMode - * @see defaultDesktopMode - */ + * @return The current ClientDesktopMode + * This option only applies for TabBoxMode ClientTabBox. + * @see setClientDesktopMode + * @see defaultDesktopMode + **/ ClientDesktopMode clientDesktopMode() const; /** - * @return The current ClientActivitiesMode - * This option only applies for TabBoxMode ClientTabBox. - * @see setClientActivitiesMode - * @see defaultActivitiesMode - */ + * @return The current ClientActivitiesMode + * This option only applies for TabBoxMode ClientTabBox. + * @see setClientActivitiesMode + * @see defaultActivitiesMode + **/ ClientActivitiesMode clientActivitiesMode() const; /** - * @return The current ClientApplicationsMode - * This option only applies for TabBoxMode ClientTabBox. - * @see setClientApplicationsMode - * @see defaultApplicationsMode - */ + * @return The current ClientApplicationsMode + * This option only applies for TabBoxMode ClientTabBox. + * @see setClientApplicationsMode + * @see defaultApplicationsMode + **/ ClientApplicationsMode clientApplicationsMode() const; /** - * @return The current ClientMinimizedMode - * This option only applies for TabBoxMode ClientTabBox. - * @see setClientMinimizedMode - * @see defaultMinimizedMode - */ + * @return The current ClientMinimizedMode + * This option only applies for TabBoxMode ClientTabBox. + * @see setClientMinimizedMode + * @see defaultMinimizedMode + **/ ClientMinimizedMode clientMinimizedMode() const; /** - * @return The current ShowDesktopMode - * This option only applies for TabBoxMode ClientTabBox. - * @see setShowDesktopMode - * @see defaultShowDesktopMode - */ + * @return The current ShowDesktopMode + * This option only applies for TabBoxMode ClientTabBox. + * @see setShowDesktopMode + * @see defaultShowDesktopMode + **/ ShowDesktopMode showDesktopMode() const; /** - * @return The current ClientMultiScreenMode - * This option only applies for TabBoxMode ClientTabBox. - * @see setClientMultiScreenMode - * @see defaultMultiScreenMode - */ + * @return The current ClientMultiScreenMode + * This option only applies for TabBoxMode ClientTabBox. + * @see setClientMultiScreenMode + * @see defaultMultiScreenMode + **/ ClientMultiScreenMode clientMultiScreenMode() const; /** - * @return The current ClientSwitchingMode. - * This option only applies for TabBoxMode ClientTabBox. - * @see setClientSwitchingMode - * @see defaultSwitchingMode - */ + * @return The current ClientSwitchingMode. + * This option only applies for TabBoxMode ClientTabBox. + * @see setClientSwitchingMode + * @see defaultSwitchingMode + **/ ClientSwitchingMode clientSwitchingMode() const; /** - * @return The current DesktopSwitchingMode - * This option only applies for TabBoxMode DesktopTabBox. - * @see setDesktopSwitchingMode - */ + * @return The current DesktopSwitchingMode + * This option only applies for TabBoxMode DesktopTabBox. + * @see setDesktopSwitchingMode + **/ DesktopSwitchingMode desktopSwitchingMode() const; /** - * @return Then name of the current ItemLayout - * @see setlayoutName - */ + * @return Then name of the current ItemLayout + * @see setlayoutName + **/ QString& layoutName() const; // setters /** - * @param show The tabbox should be shown or not. - * This option does not apply for TabBoxMode DesktopTabBox. - * @see isShowTabBox - */ + * @param show The tabbox should be shown or not. + * This option does not apply for TabBoxMode DesktopTabBox. + * @see isShowTabBox + **/ void setShowTabBox(bool show); /** - * @param highlight Highlight Windows effect should be used or not. - * This option does not apply for TabBoxMode DesktopTabBox. - * @see isHighlightWindows - */ + * @param highlight Highlight Windows effect should be used or not. + * This option does not apply for TabBoxMode DesktopTabBox. + * @see isHighlightWindows + **/ void setHighlightWindows(bool highlight); /** - * @param mode The new TabBoxMode to be used. - * @see tabBoxMode - */ + * @param mode The new TabBoxMode to be used. + * @see tabBoxMode + **/ void setTabBoxMode(TabBoxMode mode); /** - * @param desktopMode The new ClientDesktopMode to be used. - * This option only applies for TabBoxMode ClientTabBox. - * @see clientDesktopMode - */ + * @param desktopMode The new ClientDesktopMode to be used. + * This option only applies for TabBoxMode ClientTabBox. + * @see clientDesktopMode + **/ void setClientDesktopMode(ClientDesktopMode desktopMode); /** - * @param activitiesMode The new ClientActivitiesMode to be used. - * This option only applies for TabBoxMode ClientTabBox. - * @see clientActivitiesMode - */ + * @param activitiesMode The new ClientActivitiesMode to be used. + * This option only applies for TabBoxMode ClientTabBox. + * @see clientActivitiesMode + **/ void setClientActivitiesMode(ClientActivitiesMode activitiesMode); /** - * @param applicationsMode The new ClientApplicationsMode to be used. - * This option only applies for TabBoxMode ClientTabBox. - * @see clientApplicationsMode - */ + * @param applicationsMode The new ClientApplicationsMode to be used. + * This option only applies for TabBoxMode ClientTabBox. + * @see clientApplicationsMode + **/ void setClientApplicationsMode(ClientApplicationsMode applicationsMode); /** - * @param minimizedMode The new ClientMinimizedMode to be used. - * This option only applies for TabBoxMode ClientTabBox. - * @see clientMinimizedMode - */ + * @param minimizedMode The new ClientMinimizedMode to be used. + * This option only applies for TabBoxMode ClientTabBox. + * @see clientMinimizedMode + **/ void setClientMinimizedMode(ClientMinimizedMode minimizedMode); /** - * @param showDesktopMode The new ShowDesktopMode to be used. - * This option only applies for TabBoxMode ClientTabBox. - * @see showDesktopMode - */ + * @param showDesktopMode The new ShowDesktopMode to be used. + * This option only applies for TabBoxMode ClientTabBox. + * @see showDesktopMode + **/ void setShowDesktopMode(ShowDesktopMode showDesktopMode); /** - * @param multiScreenMode The new ClientMultiScreenMode to be used. - * This option only applies for TabBoxMode ClientTabBox. - * @see clientMultiScreenMode - */ + * @param multiScreenMode The new ClientMultiScreenMode to be used. + * This option only applies for TabBoxMode ClientTabBox. + * @see clientMultiScreenMode + **/ void setClientMultiScreenMode(ClientMultiScreenMode multiScreenMode); /** - * @param switchingMode The new ClientSwitchingMode to be used. - * This option only applies for TabBoxMode ClientTabBox. - * @see clientSwitchingMode - */ + * @param switchingMode The new ClientSwitchingMode to be used. + * This option only applies for TabBoxMode ClientTabBox. + * @see clientSwitchingMode + **/ void setClientSwitchingMode(ClientSwitchingMode switchingMode); /** - * @param switchingMode The new DesktopSwitchingMode to be used. - * This option only applies for TabBoxMode DesktopTabBox. - * @see desktopSwitchingMode - */ + * @param switchingMode The new DesktopSwitchingMode to be used. + * This option only applies for TabBoxMode DesktopTabBox. + * @see desktopSwitchingMode + **/ void setDesktopSwitchingMode(DesktopSwitchingMode switchingMode); /** - * @param name The new ItemLayout config name - * @see layoutName - */ + * @param name The new ItemLayout config name + * @see layoutName + **/ void setLayoutName(const QString& name); // some static methods to access default values diff --git a/tabbox/tabboxhandler.h b/tabbox/tabboxhandler.h --- a/tabbox/tabboxhandler.h +++ b/tabbox/tabboxhandler.h @@ -31,50 +31,50 @@ #include /** -* @file -* This file contains the classes which hide KWin core from tabbox. -* It defines the pure virtual classes TabBoxHandler and TabBoxClient. -* The classes have to be implemented in KWin Core. -* -* @author Martin Gräßlin -* @since 4.4 -*/ + * @file + * This file contains the classes which hide KWin core from tabbox. + * It defines the pure virtual classes TabBoxHandler and TabBoxClient. + * The classes have to be implemented in KWin Core. + * + * @author Martin Gräßlin + * @since 4.4 + **/ class QKeyEvent; namespace KWin { /** -* The TabBox is a model based view for displaying a list while switching windows or desktops. -* This functionality is mostly referred to as Alt+Tab. TabBox itself does not provide support for -* switching windows or desktops. This has to be done outside of TabBox inside an independent controller. -* -* The main entrance point to TabBox is the class TabBoxHandler, which has to be subclassed and implemented. -* The class TabBoxClient, which represents a window client inside TabBox, has to be implemented as well. -* -* The behavior of the TabBox is defined by the TabBoxConfig and has to be set in the TabBoxHandler. -* If the TabBox should be used to switch desktops as well as clients it is sufficient to just provide -* different TabBoxConfig objects instead of creating an own handler for each mode. -* -* In order to use the TabBox the TabBoxConfig has to be set. This defines if the model for desktops or for -* clients will be used. The model has to be initialized by calling TabBoxHandler::createModel(), as the -* model is undefined when the TabBox is not active. The TabBox is activated by TabBoxHandler::show(). -* Depending on the current set TabBoxConfig it is possible that the -* highlight windows effect activated and that the view is not displayed at all. As already mentioned -* the TabBox does not handle any updating of the selected item. This has to be done by invoking -* TabBoxHandler::setCurrentIndex(). Nevertheless the TabBoxHandler provides methods to query for the -* model index or the next or previous item, for a cursor position or for a given item (that is -* TabBoxClient or desktop). By invoking TabBoxHandler::hide() the view, the -* optional highlight windows effect are removed. The model is invalidated immediately. So if it is -* necessary to retrieve the last selected item this has to be done before calling the hide method. -* -* The layout of the TabBox View and the items is completely customizable. Therefore TabBox provides -* a widget LayoutConfig which includes a live preview (in kcmkwin/kwintabbox). The layout of items -* can be defined by an xml document. That way the user is able to define own custom layouts. The view -* itself is made up of two widgets: one to show the complete list and one to show only the selected -* item. This way it is possible to have a view which shows for example a list containing only small -* icons and nevertheless show the title of the currently selected client. -*/ + * The TabBox is a model based view for displaying a list while switching windows or desktops. + * This functionality is mostly referred to as Alt+Tab. TabBox itself does not provide support for + * switching windows or desktops. This has to be done outside of TabBox inside an independent controller. + * + * The main entrance point to TabBox is the class TabBoxHandler, which has to be subclassed and implemented. + * The class TabBoxClient, which represents a window client inside TabBox, has to be implemented as well. + * + * The behavior of the TabBox is defined by the TabBoxConfig and has to be set in the TabBoxHandler. + * If the TabBox should be used to switch desktops as well as clients it is sufficient to just provide + * different TabBoxConfig objects instead of creating an own handler for each mode. + * + * In order to use the TabBox the TabBoxConfig has to be set. This defines if the model for desktops or for + * clients will be used. The model has to be initialized by calling TabBoxHandler::createModel(), as the + * model is undefined when the TabBox is not active. The TabBox is activated by TabBoxHandler::show(). + * Depending on the current set TabBoxConfig it is possible that the + * highlight windows effect activated and that the view is not displayed at all. As already mentioned + * the TabBox does not handle any updating of the selected item. This has to be done by invoking + * TabBoxHandler::setCurrentIndex(). Nevertheless the TabBoxHandler provides methods to query for the + * model index or the next or previous item, for a cursor position or for a given item (that is + * TabBoxClient or desktop). By invoking TabBoxHandler::hide() the view, the + * optional highlight windows effect are removed. The model is invalidated immediately. So if it is + * necessary to retrieve the last selected item this has to be done before calling the hide method. + * + * The layout of the TabBox View and the items is completely customizable. Therefore TabBox provides + * a widget LayoutConfig which includes a live preview (in kcmkwin/kwintabbox). The layout of items + * can be defined by an xml document. That way the user is able to define own custom layouts. The view + * itself is made up of two widgets: one to show the complete list and one to show only the selected + * item. This way it is possible to have a view which shows for example a list containing only small + * icons and nevertheless show the title of the currently selected client. + **/ namespace TabBox { class DesktopModel; @@ -85,32 +85,32 @@ typedef QList< QWeakPointer< TabBoxClient > > TabBoxClientList; /** -* This class is a wrapper around KWin Workspace. It is used for accessing the -* required core methods from inside TabBox and has to be implemented in KWin core. -* -* @author Martin Gräßlin -* @since 4.4 -*/ + * This class is a wrapper around KWin Workspace. It is used for accessing the + * required core methods from inside TabBox and has to be implemented in KWin core. + * + * @author Martin Gräßlin + * @since 4.4 + **/ class TabBoxHandler : public QObject { Q_OBJECT public: TabBoxHandler(QObject *parent); virtual ~TabBoxHandler(); /** - * @return The id of the active screen - */ + * @return The id of the active screen + **/ virtual int activeScreen() const = 0; /** - * @return The current active TabBoxClient or NULL - * if there is no active client. - */ + * @return The current active TabBoxClient or NULL + * if there is no active client. + **/ virtual QWeakPointer activeClient() const = 0; /** - * @param client The client which is starting point to find the next client - * @return The next TabBoxClient in focus chain - */ + * @param client The client which is starting point to find the next client + * @return The next TabBoxClient in focus chain + **/ virtual QWeakPointer nextClientFocusChain(TabBoxClient* client) const = 0; /** * This method is used by the ClientModel to find an entrance into the focus chain in case @@ -135,203 +135,203 @@ **/ virtual bool isInFocusChain(TabBoxClient* client) const = 0; /** - * @param client The client whose desktop name should be retrieved - * @return The desktop name of the given TabBoxClient. If the client is - * on all desktops the name of current desktop will be returned. - */ + * @param client The client whose desktop name should be retrieved + * @return The desktop name of the given TabBoxClient. If the client is + * on all desktops the name of current desktop will be returned. + **/ virtual QString desktopName(TabBoxClient* client) const = 0; /** - * @param desktop The desktop whose name should be retrieved - * @return The desktop name of given desktop - */ + * @param desktop The desktop whose name should be retrieved + * @return The desktop name of given desktop + **/ virtual QString desktopName(int desktop) const = 0; /** - * @return The number of current desktop - */ + * @return The number of current desktop + **/ virtual int currentDesktop() const = 0; /** - * @return The number of virtual desktops - */ + * @return The number of virtual desktops + **/ virtual int numberOfDesktops() const = 0; /** - * @param desktop The desktop which is the starting point to find the next desktop - * @return The next desktop in the current focus chain. - */ + * @param desktop The desktop which is the starting point to find the next desktop + * @return The next desktop in the current focus chain. + **/ virtual int nextDesktopFocusChain(int desktop) const = 0; /** * whether KWin is currently compositing and it's related features (elevating) can be used - */ + **/ virtual bool isKWinCompositing() const = 0; /** - * De-/Elevate a client using the compositor (if enabled) - */ + * De-/Elevate a client using the compositor (if enabled) + **/ virtual void elevateClient(TabBoxClient* c, QWindow *tabbox, bool elevate) const = 0; /** - * Raise a client (w/o activating it) - */ + * Raise a client (w/o activating it) + **/ virtual void raiseClient(TabBoxClient* c) const = 0; /** * @param c The client to be restacked * @param under The client the other one will be placed below - */ + **/ virtual void restack(TabBoxClient *c, TabBoxClient *under) = 0; /** * Toggle between ShadeHover and ShadeNormal - not shaded windows are unaffected * @param c The client to be shaded * @param b Whether to un- or shade - */ + **/ virtual void shadeClient(TabBoxClient *c, bool b) const = 0; virtual void highlightWindows(TabBoxClient *window = nullptr, QWindow *controller = nullptr) = 0; /** - * @return The current stacking order of TabBoxClients - */ + * @return The current stacking order of TabBoxClients + **/ virtual TabBoxClientList stackingOrder() const = 0; /** - * Determines if given client will be added to the list: - *
    - *
  • Depends on desktop
  • - *
  • if the client wants to have tab focus.
  • - *
  • The client won't be added if it has modal dialogs
  • - *
  • In that case the modal dialog will be returned if it isn't already - * included
  • - *
  • Won't be added if it isn't on active screen when using separate - * screen focus
  • - *
- * @param client The client to be checked for inclusion - * @param desktop The desktop the client should be on. This is irrelevant if allDesktops is set - * @param allDesktops Add clients from all desktops or only from current - * @return The client to be included in the list or NULL if it isn't to be included - */ + * Determines if given client will be added to the list: + *
    + *
  • Depends on desktop
  • + *
  • if the client wants to have tab focus.
  • + *
  • The client won't be added if it has modal dialogs
  • + *
  • In that case the modal dialog will be returned if it isn't already + * included
  • + *
  • Won't be added if it isn't on active screen when using separate + * screen focus
  • + *
+ * @param client The client to be checked for inclusion + * @param desktop The desktop the client should be on. This is irrelevant if allDesktops is set + * @param allDesktops Add clients from all desktops or only from current + * @return The client to be included in the list or NULL if it isn't to be included + **/ virtual QWeakPointer clientToAddToList(TabBoxClient* client, int desktop) const = 0; /** - * @return The first desktop window in the stacking order. - */ + * @return The first desktop window in the stacking order. + **/ virtual QWeakPointer desktopClient() const = 0; /** * Activates the currently selected client and closes the TabBox. **/ virtual void activateAndClose() = 0; /** - * @return The currently used TabBoxConfig - */ + * @return The currently used TabBoxConfig + **/ const TabBoxConfig& config() const; /** - * Call this method when you want to change the currently used TabBoxConfig. - * It fires the signal configChanged. - * @param config Updates the currently used TabBoxConfig to config - */ + * Call this method when you want to change the currently used TabBoxConfig. + * It fires the signal configChanged. + * @param config Updates the currently used TabBoxConfig to config + **/ void setConfig(const TabBoxConfig& config); /** - * Call this method to show the TabBoxView. Depending on current - * configuration this method might not do anything. - * If highlight windows effect is to be used it will be activated. - * Highlight windows and outline are not shown if - * TabBoxConfig::TabBoxMode is TabBoxConfig::DesktopTabBox. - * @see TabBoxConfig::isShowTabBox - * @see TabBoxConfig::isHighlightWindows - */ + * Call this method to show the TabBoxView. Depending on current + * configuration this method might not do anything. + * If highlight windows effect is to be used it will be activated. + * Highlight windows and outline are not shown if + * TabBoxConfig::TabBoxMode is TabBoxConfig::DesktopTabBox. + * @see TabBoxConfig::isShowTabBox + * @see TabBoxConfig::isHighlightWindows + **/ void show(); /** - * Hides the TabBoxView if shown. - * Deactivates highlight windows effect if active. - * @see show - */ + * Hides the TabBoxView if shown. + * Deactivates highlight windows effect if active. + * @see show + **/ void hide(bool abort = false); /** - * Sets the current model index in the view and updates - * highlight windows if active. - * @param index The current Model index - */ + * Sets the current model index in the view and updates + * highlight windows if active. + * @param index The current Model index + **/ void setCurrentIndex(const QModelIndex& index); /** * @returns the current index **/ const QModelIndex ¤tIndex() const; /** - * Retrieves the next or previous item of the current item. - * @param forward next or previous item - * @return The next or previous item. If there is no matching item - * the current item will be returned. - */ + * Retrieves the next or previous item of the current item. + * @param forward next or previous item + * @return The next or previous item. If there is no matching item + * the current item will be returned. + **/ QModelIndex nextPrev(bool forward) const; /** - * Initializes the model based on the current config. - * This method has to be invoked before showing the TabBox. - * It can also be invoked when clients are added or removed. - * In that case partialReset has to be true. - * - * @param partialReset Keep the currently selected item or regenerate everything - */ + * Initializes the model based on the current config. + * This method has to be invoked before showing the TabBox. + * It can also be invoked when clients are added or removed. + * In that case partialReset has to be true. + * + * @param partialReset Keep the currently selected item or regenerate everything + **/ void createModel(bool partialReset = false); /** - * @param desktop The desktop whose index should be retrieved - * @return The model index of given desktop. If TabBoxMode is not - * TabBoxConfig::DesktopTabBox an invalid model index will be returned. - */ + * @param desktop The desktop whose index should be retrieved + * @return The model index of given desktop. If TabBoxMode is not + * TabBoxConfig::DesktopTabBox an invalid model index will be returned. + **/ QModelIndex desktopIndex(int desktop) const; /** - * @return The current list of desktops. - * If TabBoxMode is not TabBoxConfig::DesktopTabBox an empty list will - * be returned. - * @see DesktopModel::desktopList - */ + * @return The current list of desktops. + * If TabBoxMode is not TabBoxConfig::DesktopTabBox an empty list will + * be returned. + * @see DesktopModel::desktopList + **/ QList< int > desktopList() const; /** - * @return The desktop for given model index. If the index is not valid - * or TabBoxMode is not TabBoxConfig::DesktopTabBox -1 will be returned. - * @see DesktopModel::desktopIndex - */ + * @return The desktop for given model index. If the index is not valid + * or TabBoxMode is not TabBoxConfig::DesktopTabBox -1 will be returned. + * @see DesktopModel::desktopIndex + **/ int desktop(const QModelIndex& index) const; /** - * Handles additional grabbed key events by the TabBox controller. - * @param event The key event which has been grabbed - */ + * Handles additional grabbed key events by the TabBox controller. + * @param event The key event which has been grabbed + **/ virtual void grabbedKeyEvent(QKeyEvent* event) const; /** - * @param pos The position to be tested in global coordinates - * @return True if the view contains the point, otherwise false. - */ + * @param pos The position to be tested in global coordinates + * @return True if the view contains the point, otherwise false. + **/ bool containsPos(const QPoint& pos) const; /** - * @param client The TabBoxClient whose index should be returned - * @return Returns the ModelIndex of given TabBoxClient or an invalid ModelIndex - * if the model does not contain the given TabBoxClient. - * @see ClientModel::index - */ + * @param client The TabBoxClient whose index should be returned + * @return Returns the ModelIndex of given TabBoxClient or an invalid ModelIndex + * if the model does not contain the given TabBoxClient. + * @see ClientModel::index + **/ QModelIndex index(QWeakPointer client) const; /** - * @return Returns the current list of TabBoxClients. - * If TabBoxMode is not TabBoxConfig::ClientTabBox an empty list will - * be returned. - * @see ClientModel::clientList - */ + * @return Returns the current list of TabBoxClients. + * If TabBoxMode is not TabBoxConfig::ClientTabBox an empty list will + * be returned. + * @see ClientModel::clientList + **/ TabBoxClientList clientList() const; /** - * @param index The index of the client to be returned - * @return Returns the TabBoxClient at given model index. If - * the index is invalid, does not point to a Client or the list - * is empty, NULL will be returned. - */ + * @param index The index of the client to be returned + * @return Returns the TabBoxClient at given model index. If + * the index is invalid, does not point to a Client or the list + * is empty, NULL will be returned. + **/ TabBoxClient* client(const QModelIndex& index) const; /** - * @return The first model index. That is the model index at position 0, 0. - * It is valid, as desktop has at least one desktop and if there are no - * clients an empty item is created. - */ + * @return The first model index. That is the model index at position 0, 0. + * It is valid, as desktop has at least one desktop and if there are no + * clients an empty item is created. + **/ QModelIndex first() const; bool eventFilter(QObject *watcher, QEvent *event) override; @@ -344,9 +344,9 @@ Q_SIGNALS: /** - * This signal is fired when the TabBoxConfig changes - * @see setConfig - */ + * This signal is fired when the TabBoxConfig changes + * @see setConfig + **/ void configChanged(); void selectedIndexChanged(); @@ -359,34 +359,34 @@ }; /** -* This class is a wrapper around a KWin Client. It is used for accessing the -* required client methods from inside TabBox and has to be implemented in KWin core. -* -* @author Martin Gräßlin -* @since 4.4 -*/ + * This class is a wrapper around a KWin Client. It is used for accessing the + * required client methods from inside TabBox and has to be implemented in KWin core. + * + * @author Martin Gräßlin + * @since 4.4 + **/ class TabBoxClient { public: TabBoxClient(); virtual ~TabBoxClient(); /** - * @return The caption of the client - */ + * @return The caption of the client + **/ virtual QString caption() const = 0; /** - * @param size Requested size of the icon - * @return The icon of the client - */ + * @param size Requested size of the icon + * @return The icon of the client + **/ virtual QIcon icon() const = 0; /** - * @return The window Id of the client - */ + * @return The window Id of the client + **/ virtual WId window() const = 0; /** - * @return Minimized state of the client - */ + * @return Minimized state of the client + **/ virtual bool isMinimized() const = 0; virtual int x() const = 0; virtual int y() const = 0; diff --git a/tabbox/tabboxhandler.cpp b/tabbox/tabboxhandler.cpp --- a/tabbox/tabboxhandler.cpp +++ b/tabbox/tabboxhandler.cpp @@ -62,12 +62,12 @@ ~TabBoxHandlerPrivate(); /** - * Updates the current highlight window state - */ + * Updates the current highlight window state + **/ void updateHighlightWindows(); /** - * Ends window highlighting - */ + * Ends window highlighting + **/ void endHighlightWindows(bool abort = false); void show(); @@ -89,8 +89,8 @@ DesktopModel* m_desktopModel; QModelIndex index; /** - * Indicates if the tabbox is shown. - */ + * Indicates if the tabbox is shown. + **/ bool isShown; TabBoxClient *lastRaisedClient, *lastRaisedClientSucc; int wheelAngleDelta = 0; diff --git a/tabgroup.h b/tabgroup.h --- a/tabgroup.h +++ b/tabgroup.h @@ -45,13 +45,13 @@ * * If a group contains multiple clients then only one will ever be mapped at * any given time. - */ + **/ class TabGroup { public: /** * Creates a new group containing \p c. - */ + **/ explicit TabGroup(AbstractClient* c); ~TabGroup(); @@ -64,85 +64,85 @@ /** * Activate next tab (flips) - */ + **/ void activateNext(); /** * Activate previous tab (flips) - */ + **/ void activatePrev(); /** * Allows to alter several attributes in random order and trigger a general update at the end * (must still be explicitly called) * this is to prevent side effects, mostly for geometry adjustments during maximization and QuickTiling - */ + **/ void blockStateUpdates(bool); /** * Close all clients in this group. - */ + **/ void closeAll(); /** * Whether client \p c is member of this group - */ + **/ bool contains(AbstractClient* c) const; /** * The amount of clients in this group - */ + **/ int count() const; /** * Returns whether or not this group contains the active client. - */ + **/ bool isActive() const; /** * Returns whether this group is empty (used by workspace to remove it) - */ + **/ bool isEmpty() const; /** * Returns the list of all the clients contained in this group in their current order. - */ + **/ const QVector &clients() const; /** * Returns the currently visible client. - */ + **/ AbstractClient* current() const; /** * Makes \p c the visible client in the group - force is only used when the window becomes ready for painting. * Any other usage just causes pointless action - */ + **/ void setCurrent(AbstractClient* c, bool force = false); /** * Alignes the dynamic Qt @param property of all clients to the one of @param c - */ + **/ void sync(const char *property, AbstractClient *c); /** * Returns combined minimum size of all clients in the group. - */ + **/ QSize minSize() const; /** * Returns combined maximum size of all clients in the group. - */ + **/ QSize maxSize() const; /** * Ensures that all the clients in the group have identical geometries and states using * \p main as the primary client to copy the settings off. If \p only is set then only * that client is updated to match \p main. - */ + **/ void updateStates(AbstractClient* main, States states, AbstractClient* only = NULL); /** * updates geometry restrictions of this group, basically called from Client::getWmNormalHints(), otherwise rather private - */ + **/ void updateMinMaxSize(); Q_SIGNALS: diff --git a/toplevel.h b/toplevel.h --- a/toplevel.h +++ b/toplevel.h @@ -62,7 +62,7 @@ /** * Enum to describe the reason why a Toplevel has to be released. - */ + **/ enum class ReleaseReason { Release, ///< Normal Release after e.g. an Unmap notify event (window still valid) Destroyed, ///< Release after an Destroy notify event (window no longer valid) @@ -100,84 +100,84 @@ /** * Returns whether the window is a desktop background window (the one with wallpaper). * See _NET_WM_WINDOW_TYPE_DESKTOP at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html . - */ + **/ Q_PROPERTY(bool desktopWindow READ isDesktop) /** * Returns whether the window is a dock (i.e. a panel). * See _NET_WM_WINDOW_TYPE_DOCK at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html . - */ + **/ Q_PROPERTY(bool dock READ isDock) /** * Returns whether the window is a standalone (detached) toolbar window. * See _NET_WM_WINDOW_TYPE_TOOLBAR at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html . - */ + **/ Q_PROPERTY(bool toolbar READ isToolbar) /** * Returns whether the window is a torn-off menu. * See _NET_WM_WINDOW_TYPE_MENU at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html . - */ + **/ Q_PROPERTY(bool menu READ isMenu) /** * Returns whether the window is a "normal" window, i.e. an application or any other window * for which none of the specialized window types fit. * See _NET_WM_WINDOW_TYPE_NORMAL at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html . - */ + **/ Q_PROPERTY(bool normalWindow READ isNormalWindow) /** * Returns whether the window is a dialog window. * See _NET_WM_WINDOW_TYPE_DIALOG at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html . - */ + **/ Q_PROPERTY(bool dialog READ isDialog) /** * Returns whether the window is a splashscreen. Note that many (especially older) applications * do not support marking their splash windows with this type. * See _NET_WM_WINDOW_TYPE_SPLASH at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html . - */ + **/ Q_PROPERTY(bool splash READ isSplash) /** * Returns whether the window is a utility window, such as a tool window. * See _NET_WM_WINDOW_TYPE_UTILITY at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html . - */ + **/ Q_PROPERTY(bool utility READ isUtility) /** * Returns whether the window is a dropdown menu (i.e. a popup directly or indirectly open * from the applications menubar). * See _NET_WM_WINDOW_TYPE_DROPDOWN_MENU at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html . - */ + **/ Q_PROPERTY(bool dropdownMenu READ isDropdownMenu) /** * Returns whether the window is a popup menu (that is not a torn-off or dropdown menu). * See _NET_WM_WINDOW_TYPE_POPUP_MENU at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html . - */ + **/ Q_PROPERTY(bool popupMenu READ isPopupMenu) /** * Returns whether the window is a tooltip. * See _NET_WM_WINDOW_TYPE_TOOLTIP at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html . - */ + **/ Q_PROPERTY(bool tooltip READ isTooltip) /** * Returns whether the window is a window with a notification. * See _NET_WM_WINDOW_TYPE_NOTIFICATION at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html . - */ + **/ Q_PROPERTY(bool notification READ isNotification) /** * Returns whether the window is an On Screen Display. - */ + **/ Q_PROPERTY(bool onScreenDisplay READ isOnScreenDisplay) /** * Returns whether the window is a combobox popup. * See _NET_WM_WINDOW_TYPE_COMBO at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html . - */ + **/ Q_PROPERTY(bool comboBox READ isComboBox) /** * Returns whether the window is a Drag&Drop icon. * See _NET_WM_WINDOW_TYPE_DND at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html . - */ + **/ Q_PROPERTY(bool dndIcon READ isDNDIcon) /** * Returns the NETWM window type * See http://standards.freedesktop.org/wm-spec/wm-spec-latest.html . - */ + **/ Q_PROPERTY(int windowType READ windowType) Q_PROPERTY(QStringList activities READ activities NOTIFY activitiesChanged) /** @@ -208,7 +208,7 @@ /** * Interface to the Wayland Surface. * Relevant only in Wayland, in X11 it will be nullptr - */ + **/ Q_PROPERTY(KWayland::Server::SurfaceInterface *surface READ surface) /** @@ -246,7 +246,7 @@ * The scale of the screen this window is currently on * @note The buffer scale can be different. * @since 5.12 - */ + **/ qreal screenScale() const; // virtual QPoint clientPos() const = 0; // inside of geometry() /** @@ -289,7 +289,7 @@ * is located in, 0 if it isn't located on any special desktop (not mapped yet), * or NET::OnAllDesktops. Do not use desktop() directly, use * isOnDesktop() instead. - */ + **/ virtual int desktop() const = 0; virtual QVector desktops() const = 0; virtual QStringList activities() const = 0; @@ -385,14 +385,14 @@ * or the reply will be leaked. * * Returns true if the window was damaged, and false otherwise. - */ + **/ bool resetAndFetchDamage(); /** * Gets the reply from a previous call to resetAndFetchDamage(). * Calling this function is a no-op if there is no pending reply. * Call damage() to return the fetched region. - */ + **/ void getDamageRegionReply(); bool skipsCloseAnimation() const; @@ -447,7 +447,7 @@ * @param list The list to search in * @param func The condition function (compare std::find_if) * @return T* The found Toplevel or @c null if there is no matching Toplevel - */ + **/ template static T *findInList(const QList &list, std::function func); @@ -525,7 +525,7 @@ * Emitted when the client's screen changes onto a screen of a different scale * or the screen we're on changes * @since 5.12 - */ + **/ void screenScaleChanged(); /** diff --git a/toplevel.cpp b/toplevel.cpp --- a/toplevel.cpp +++ b/toplevel.cpp @@ -166,22 +166,22 @@ readWmClientLeader(prop); } -/*! - Returns sessionId for this client, - taken either from its window or from the leader window. - */ +/** + * Returns sessionId for this client, + * taken either from its window or from the leader window. + **/ QByteArray Toplevel::sessionId() const { QByteArray result = Xcb::StringProperty(window(), atoms->sm_client_id); if (result.isEmpty() && wmClientLeaderWin && wmClientLeaderWin != window()) result = Xcb::StringProperty(wmClientLeaderWin, atoms->sm_client_id); return result; } -/*! - Returns command property for this client, - taken either from its window or from the leader window. - */ +/** + * Returns command property for this client, + * taken either from its window or from the leader window. + **/ QByteArray Toplevel::wmCommand() { QByteArray result = Xcb::StringProperty(window(), XCB_ATOM_WM_COMMAND); @@ -196,10 +196,10 @@ m_clientMachine->resolve(window(), wmClientLeader()); } -/*! - Returns client machine for this client, - taken either from its window or from the leader window. -*/ +/** + * Returns client machine for this client, + * taken either from its window or from the leader window. + **/ QByteArray Toplevel::wmClientMachine(bool use_localhost) const { if (!m_clientMachine) { @@ -213,10 +213,10 @@ return m_clientMachine->hostName(); } -/*! - Returns client leader window for this client. - Returns the client window itself if no leader window is defined. -*/ +/** + * Returns client leader window for this client. + * Returns the client window itself if no leader window is defined. + **/ Window Toplevel::wmClientLeader() const { if (wmClientLeaderWin) diff --git a/useractions.cpp b/useractions.cpp --- a/useractions.cpp +++ b/useractions.cpp @@ -602,7 +602,7 @@ void UserActionsMenu::initDesktopPopup() { if (kwinApp()->operationMode() == Application::OperationModeWaylandOnly || - kwinApp()->operationMode() == Application::OperationModeXwayland) { + kwinApp()->operationMode() == Application::OperationModeXwayland) { if (m_multipleDesktopsMenu) { return; } @@ -1105,9 +1105,9 @@ input()->registerShortcut(shortcut, a, receiver, slot); } -/*! - Create the global accel object \c keys. - */ +/** + * Creates the global accel object \c keys. + **/ void Workspace::initShortcuts() { #define IN_KWIN @@ -1289,7 +1289,7 @@ /** * Called by the decoration in the new API to determine what buttons the user has configured for * window tab dragging and the operations menu. - */ + **/ Options::WindowOperation Client::mouseButtonToWindowOperation(Qt::MouseButtons button) { Options::MouseCommand com = Options::MouseNothing; @@ -1312,9 +1312,9 @@ return Options::NoOp; } -/*! - Performs a mouse command on this client (see options.h) - */ +/** + * Performs a mouse command on this client (see options.h) + **/ bool Client::performMouseCommand(Options::MouseCommand command, const QPoint &globalPos) { bool replay = false; @@ -1425,64 +1425,64 @@ sendClientToScreen(active_client, (active_client->screen() + screens()->count() - 1) % screens()->count()); } -/*! - Maximizes the popup client - */ +/** + * Maximizes the active client. + **/ void Workspace::slotWindowMaximize() { if (USABLE_ACTIVE_CLIENT) performWindowOperation(active_client, Options::MaximizeOp); } -/*! - Maximizes the popup client vertically - */ +/** + * Maximizes the active client vertically. + **/ void Workspace::slotWindowMaximizeVertical() { if (USABLE_ACTIVE_CLIENT) performWindowOperation(active_client, Options::VMaximizeOp); } -/*! - Maximizes the popup client horiozontally - */ +/** + * Maximizes the active client horiozontally. + **/ void Workspace::slotWindowMaximizeHorizontal() { if (USABLE_ACTIVE_CLIENT) performWindowOperation(active_client, Options::HMaximizeOp); } -/*! - Minimizes the popup client - */ +/** + * Minimizes the active client. + **/ void Workspace::slotWindowMinimize() { if (USABLE_ACTIVE_CLIENT) performWindowOperation(active_client, Options::MinimizeOp); } -/*! - Shades/unshades the popup client respectively - */ +/** + * Shades/unshades the active client respectively. + **/ void Workspace::slotWindowShade() { if (USABLE_ACTIVE_CLIENT) performWindowOperation(active_client, Options::ShadeOp); } -/*! - Raises the popup client - */ +/** + * Raises the active client. + **/ void Workspace::slotWindowRaise() { if (USABLE_ACTIVE_CLIENT) raiseClient(active_client); } -/*! - Lowers the popup client - */ +/** + * Lowers the active client. + **/ void Workspace::slotWindowLower() { if (USABLE_ACTIVE_CLIENT) { @@ -1502,9 +1502,9 @@ } } -/*! - Does a toggle-raise-and-lower on the popup client; - */ +/** + * Does a toggle-raise-and-lower on the active client. + **/ void Workspace::slotWindowRaiseOrLower() { if (USABLE_ACTIVE_CLIENT) @@ -1546,9 +1546,9 @@ performWindowOperation(active_client, Options::SetupWindowShortcutOp); } -/*! - Toggles show desktop - */ +/** + * Toggles show desktop. + **/ void Workspace::slotToggleShowDesktop() { setShowingDesktop(!showingDesktop()); @@ -1570,9 +1570,9 @@ } } -/*! - Move window to next desktop - */ +/** + * Moves the active client to the next desktop. + **/ void Workspace::slotWindowToNextDesktop() { if (USABLE_ACTIVE_CLIENT) @@ -1584,9 +1584,9 @@ windowToDesktop(c); } -/*! - Move window to previous desktop - */ +/** + * Moves the active client to the previous desktop. + **/ void Workspace::slotWindowToPreviousDesktop() { if (USABLE_ACTIVE_CLIENT) @@ -1660,20 +1660,20 @@ active_client->untab(active_client->geometry().translated(cascadeOffset(active_client))); } -/*! - Kill Window feature, similar to xkill - */ +/** + * Kill Window feature, similar to xkill. + **/ void Workspace::slotKillWindow() { if (m_windowKiller.isNull()) { m_windowKiller.reset(new KillWindow()); } m_windowKiller->start(); } -/*! - Switches to the nearest window in given direction - */ +/** + * Switches to the nearest window in given direction. + **/ void Workspace::switchWindow(Direction direction) { if (!active_client) @@ -1765,9 +1765,9 @@ return switchTo; } -/*! - Shows the window operations popup menu for the activeClient() - */ +/** + * Shows the window operations popup menu for the active client. + **/ void Workspace::slotWindowOperations() { if (!active_client) @@ -1786,9 +1786,9 @@ ApplicationMenu::self()->showApplicationMenu(c->geometry().topLeft() + pos.bottomLeft(), c, actionId); } -/*! - Closes the popup client - */ +/** + * Closes the active client. + **/ void Workspace::slotWindowClose() { // TODO: why? @@ -1798,18 +1798,18 @@ performWindowOperation(active_client, Options::CloseOp); } -/*! - Starts keyboard move mode for the popup client - */ +/** + * Starts keyboard move mode for the active client. + **/ void Workspace::slotWindowMove() { if (USABLE_ACTIVE_CLIENT) performWindowOperation(active_client, Options::UnrestrictedMoveOp); } -/*! - Starts keyboard resize mode for the popup client - */ +/** + * Starts keyboard resize mode for the active client. + **/ void Workspace::slotWindowResize() { if (USABLE_ACTIVE_CLIENT) diff --git a/utils.h b/utils.h --- a/utils.h +++ b/utils.h @@ -126,8 +126,9 @@ /** * Maximize mode. These values specify how a window is maximized. - */ -// these values are written to session files, don't change the order + * + * @note these values are written to session files, don't change the order + **/ enum MaximizeMode { MaximizeRestore = 0, ///< The window is not maximized in any direction. MaximizeVertical = 1, ///< The window is maximized vertically. @@ -195,7 +196,7 @@ /** * Separate the concept of an unet QPoint and 0,0 - */ + **/ class ClearablePoint { public: diff --git a/virtualdesktops.h b/virtualdesktops.h --- a/virtualdesktops.h +++ b/virtualdesktops.h @@ -102,16 +102,16 @@ void update(const QSize &size, Qt::Orientation orientation, const QVector &desktops); /** * @returns The coords of desktop @a id in grid units. - */ + **/ QPoint gridCoords(uint id) const; /** * @returns The coords of desktop @a vd in grid units. - */ + **/ QPoint gridCoords(VirtualDesktop *vd) const; /** * @returns The desktop at the point @a coords or 0 if no desktop exists at that * point. @a coords is to be in grid units. - */ + **/ VirtualDesktop *at(const QPoint &coords) const; int width() const; int height() const; @@ -173,19 +173,19 @@ * @returns Total number of desktops currently in existence. * @see setCount * @see countChanged - */ + **/ uint count() const; /** * @returns the number of rows the layout has. * @see setRows * @see rowsChanged - */ + **/ uint rows() const; /** * @returns The ID of the current desktop. * @see setCurrent * @see currentChanged - */ + **/ uint current() const; /** * @returns The current desktop @@ -221,42 +221,42 @@ /** * @returns The ID of the desktop above desktop @a id. Wraps around to the bottom of * the layout if @a wrap is set. If @a id is not set use the current one. - */ + **/ uint above(uint id = 0, bool wrap = true) const; /** * @returns The desktop above desktop @a desktop. Wraps around to the bottom of * the layout if @a wrap is set. If @a desktop is @c null use the current one. - */ + **/ VirtualDesktop *above(VirtualDesktop *desktop, bool wrap = true) const; /** * @returns The ID of the desktop to the right of desktop @a id. Wraps around to the * left of the layout if @a wrap is set. If @a id is not set use the current one. - */ + **/ uint toRight(uint id = 0, bool wrap = true) const; /** * @returns The desktop to the right of desktop @a desktop. Wraps around to the * left of the layout if @a wrap is set. If @a desktop is @c null use the current one. - */ + **/ VirtualDesktop *toRight(VirtualDesktop *desktop, bool wrap = true) const; /** * @returns The ID of the desktop below desktop @a id. Wraps around to the top of the * layout if @a wrap is set. If @a id is not set use the current one. - */ + **/ uint below(uint id = 0, bool wrap = true) const; /** * @returns The desktop below desktop @a desktop. Wraps around to the top of the * layout if @a wrap is set. If @a desktop is @c null use the current one. - */ + **/ VirtualDesktop *below(VirtualDesktop *desktop, bool wrap = true) const; /** * @returns The ID of the desktop to the left of desktop @a id. Wraps around to the * right of the layout if @a wrap is set. If @a id is not set use the current one. - */ + **/ uint toLeft(uint id = 0, bool wrap = true) const; /** * @returns The desktop to the left of desktop @a desktop. Wraps around to the * right of the layout if @a wrap is set. If @a desktop is @c null use the current one. - */ + **/ VirtualDesktop *toLeft(VirtualDesktop *desktop, bool wrap = true) const; /** * @returns The desktop after the desktop @a desktop. Wraps around to the first @@ -294,15 +294,15 @@ * @param position The position of the desktop. It should be in range [0, count]. * @param name The name for the new desktop, if empty the default name will be used. * @returns the new VirtualDesktop, nullptr if we reached the maximum number of desktops - */ + **/ VirtualDesktop *createVirtualDesktop(uint position, const QString &name = QString()); /** * Remove the virtual desktop identified by id, if it exists * difference with setCount is that is possible to remove an arbitrary desktop, * not only the last one. * @param id the string id of the desktop to remove - */ + **/ void removeVirtualDesktop(const QByteArray &id); /** @@ -312,7 +312,7 @@ /** * @returns The maximum number of desktops that KWin supports. - */ + **/ static uint maximum(); public Q_SLOTS: @@ -333,15 +333,15 @@ * @see countChanged * @see desktopCreated * @see desktopRemoved - */ + **/ void setCount(uint count); /** * Set the current desktop to @a current. * @returns True on success, false otherwise. * @see current * @see currentChanged * @see moveTo - */ + **/ bool setCurrent(uint current); /** * Set the current desktop to @a current. @@ -353,11 +353,11 @@ bool setCurrent(VirtualDesktop *current); /** * Updates the layout to a new number of rows. The number of columns will be calculated accordingly - */ + **/ void setRows(uint rows); /** * Called from within setCount() to ensure the desktop layout is still valid. - */ + **/ void updateLayout(); /** * @param enabled wrapping around borders for navigation in desktop layout @@ -385,21 +385,21 @@ /** * Signal when the number of rows in the layout changes * @param rows number of rows - */ + **/ void rowsChanged(uint rows); /** * A new desktop has been created * @param desktop the new just crated desktop - */ + **/ void desktopCreated(KWin::VirtualDesktop *desktop); /** * A desktop has been removed and is about to be deleted * @param desktop the desktop that has been removed. * It's guaranteed to stil la valid pointer when the signal arrives, * but it's about to be deleted. - */ + **/ void desktopRemoved(KWin::VirtualDesktop *desktop); /** @@ -454,7 +454,7 @@ private: /** * Generate a desktop layout from EWMH _NET_DESKTOP_LAYOUT property parameters. - */ + **/ void setNETDesktopLayout(Qt::Orientation orientation, uint width, uint height, int startingCorner); /** * @returns A default name for the given @p desktop diff --git a/wayland_server.h b/wayland_server.h --- a/wayland_server.h +++ b/wayland_server.h @@ -128,8 +128,8 @@ ShellClient *findClient(QWindow *w) const; /** - * return a transient parent of a surface imported with the foreign protocol, if any - */ + * @returns a transient parent of a surface imported with the foreign protocol, if any + **/ KWayland::Server::SurfaceInterface *findForeignTransientForSurface(KWayland::Server::SurfaceInterface *surface); /** diff --git a/workspace.h b/workspace.h --- a/workspace.h +++ b/workspace.h @@ -105,7 +105,7 @@ * This can either be a function pointer or a function object. * @return KWin::Client* The found Client or @c null * @see findClient(Predicate, xcb_window_t) - */ + **/ Client *findClient(std::function func) const; AbstractClient *findAbstractClient(std::function func) const; /** @@ -115,7 +115,7 @@ * @param w The window id to test against * @return KWin::Client* The found Client or @c null * @see findClient(std::function) - */ + **/ Client *findClient(Predicate predicate, xcb_window_t w) const; void forEachClient(std::function func); void forEachAbstractClient(std::function func); @@ -125,7 +125,7 @@ * * @param w The window id to search for * @return KWin::Unmanaged* Found Unmanaged or @c null if there is no Unmanaged with given Id. - */ + **/ Unmanaged *findUnmanaged(xcb_window_t w) const; void forEachUnmanaged(std::function func); Toplevel *findToplevel(std::function func) const; @@ -155,13 +155,13 @@ /** * Returns the active client, i.e. the client that has the focus (or None * if no client has the focus) - */ + **/ AbstractClient* activeClient() const; /** * Client that was activated, but it's not yet really activeClient(), because * we didn't process yet the matching FocusIn event. Used mostly in focus * stealing prevention code. - */ + **/ AbstractClient* mostRecentlyActivatedClient() const; AbstractClient* clientUnderMouse(int screen) const; @@ -187,7 +187,7 @@ /** * Indicates that the client c is being moved around by the user. - */ + **/ void setClientIsMoving(AbstractClient* c); QPoint adjustClientPosition(AbstractClient* c, QPoint pos, bool unrestricted, double snapAdjust = 1.0); @@ -264,7 +264,7 @@ /** * Returns the list of clients sorted in stacking order, with topmost client * at the last position - */ + **/ const ToplevelList& stackingOrder() const; ToplevelList xStackingOrder() const; ClientList ensureStackingOrder(const ClientList& clients) const; @@ -281,7 +281,7 @@ /** * Shows the menu operations menu for the client and makes it active if * it's not already. - */ + **/ void showWindowMenu(const QRect& pos, AbstractClient* cl); const UserActionsMenu *userActionsMenu() const { return m_userActionsMenu; @@ -345,12 +345,12 @@ void requestDelayFocus(AbstractClient*); /** - * updates the mouse position to track whether a focus follow mouse focus change was caused by - * an actual mouse move - * is esp. called on enter/motion events of inactive windows - * since an active window doesn't receive mouse events, it must also be invoked if a (potentially) - * active window might be moved/resize away from the cursor (causing a leave event) - */ + * updates the mouse position to track whether a focus follow mouse focus change was caused by + * an actual mouse move + * is esp. called on enter/motion events of inactive windows + * since an active window doesn't receive mouse events, it must also be invoked if a (potentially) + * active window might be moved/resize away from the cursor (causing a leave event) + **/ void updateFocusMousePosition(const QPoint& pos); QPoint focusMousePosition() const; @@ -489,7 +489,7 @@ /** * This signels is emitted when ever the stacking order is change, ie. a window is risen * or lowered - */ + **/ void stackingOrderChanged(); private: @@ -634,7 +634,7 @@ /** * Helper for Workspace::blockStackingUpdates() being called in pairs (True/false) - */ + **/ class StackingUpdatesBlocker { public: diff --git a/workspace.cpp b/workspace.cpp --- a/workspace.cpp +++ b/workspace.cpp @@ -661,7 +661,7 @@ /** * Destroys the client \a c - */ + **/ void Workspace::removeClient(Client* c) { if (c == active_popup_client) @@ -867,7 +867,7 @@ /** * Reread settings - */ + **/ void Workspace::slotReconfigure() { @@ -1014,7 +1014,7 @@ * do *not* call this directly; it does not set the activity. * * Shows/Hides windows according to the stacking order - */ + **/ void Workspace::updateCurrentActivity(const QString &new_activity) { @@ -1148,7 +1148,7 @@ * Sends client \a c to desktop \a desk. * * Takes care of transients as well. - */ + **/ void Workspace::sendClientToDesktop(AbstractClient* c, int desk, bool dont_activate) { if ((desk < 1 && desk != NET::OnAllDesktops) || desk > static_cast(VirtualDesktopManager::self()->count())) @@ -1187,7 +1187,7 @@ * * this is NOT in any way related to XRandR multiscreen * - */ + **/ extern bool is_multihead; // main.cpp bool Workspace::isOnCurrentHead() { @@ -1222,7 +1222,7 @@ /** * Delayed focus functions - */ + **/ void Workspace::delayFocus() { requestFocus(delayfocus_client); @@ -1253,7 +1253,7 @@ /** * Puts the focus on a dummy window * Just using XSetInputFocus() with None would block keyboard input - */ + **/ void Workspace::focusToNull() { if (m_nullFocus) { diff --git a/x11eventfilter.h b/x11eventfilter.h --- a/x11eventfilter.h +++ b/x11eventfilter.h @@ -35,40 +35,40 @@ public: /** * Creates an event filter for the given event type. - */ + **/ X11EventFilter(int eventType, int opcode = 0, int genericEventType = 0); X11EventFilter(int eventType, int opcode, const QVector &genericEventTypes); X11EventFilter(const QVector &eventTypes); /** * Destroys the event filter. - */ + **/ virtual ~X11EventFilter(); /** * Returns the type of events to filter. - */ + **/ QVector eventTypes() const { return m_eventTypes; } /** * Returns the major opcode of the extension. * * Only used when the event type is XCB_GE_GENERIC. - */ + **/ int extension() const { return m_extension; } /** * Returns the types of generic events to filter. * * Only used when the event type is XCB_GE_GENERIC. - */ + **/ QVector genericEventTypes() const { return m_genericEventTypes; } /** * This method is called for every event of the filtered type. * * Return true to accept the event and stop further processing, and false otherwise. - */ + **/ virtual bool event(xcb_generic_event_t *event) = 0; /** diff --git a/xcbutils.h b/xcbutils.h --- a/xcbutils.h +++ b/xcbutils.h @@ -53,160 +53,160 @@ static void selectInput(xcb_window_t window, uint32_t events); /** -* @brief Variadic template to wrap an xcb request. -* -* This struct is part of the generic implementation to wrap xcb requests -* and fetching their reply. Each request is represented by two templated -* elements: WrapperData and Wrapper. -* -* The WrapperData defines the following types: -* @li reply_type of the xcb request -* @li cookie_type of the xcb request -* @li function pointer type for the xcb request -* @li function pointer type for the reply -* This uses variadic template arguments thus it can be used to specify any -* xcb request. -* -* As the WrapperData does not specify the actual function pointers one needs -* to derive another struct which specifies the function pointer requestFunc and -* the function pointer replyFunc as static constexpr of type reply_func and -* reply_type respectively. E.g. for the command xcb_get_geometry: -* @code -* struct GeometryData : public WrapperData< xcb_get_geometry_reply_t, xcb_get_geometry_cookie_t, xcb_drawable_t > -* { -* static constexpr request_func requestFunc = &xcb_get_geometry_unchecked; -* static constexpr reply_func replyFunc = &xcb_get_geometry_reply; -* }; -* @endcode -* -* To simplify this definition the macro XCB_WRAPPER_DATA is provided. -* For the same xcb command this looks like this: -* @code -* XCB_WRAPPER_DATA(GeometryData, xcb_get_geometry, xcb_drawable_t) -* @endcode -* -* The derived WrapperData has to be passed as first template argument to Wrapper. The other -* template arguments of Wrapper are the same variadic template arguments as passed into -* WrapperData. This is ensured at compile time and will cause a compile error in case there -* is a mismatch of the variadic template arguments passed to WrapperData and Wrapper. -* Passing another type than a struct derived from WrapperData to Wrapper will result in a -* compile error. The following code snippets won't compile: -* @code -* XCB_WRAPPER_DATA(GeometryData, xcb_get_geometry, xcb_drawable_t) -* // fails with "static assertion failed: Argument miss-match between Wrapper and WrapperData" -* class IncorrectArguments : public Wrapper -* { -* public: -* IncorrectArguments() = default; -* IncorrectArguments(xcb_window_t window) : Wrapper(window) {} -* }; -* -* // fails with "static assertion failed: Data template argument must be derived from WrapperData" -* class WrapperDataDirectly : public Wrapper, xcb_drawable_t> -* { -* public: -* WrapperDataDirectly() = default; -* WrapperDataDirectly(xcb_window_t window) : Wrapper, xcb_drawable_t>(window) {} -* }; -* -* // fails with "static assertion failed: Data template argument must be derived from WrapperData" -* struct FakeWrapperData -* { -* typedef xcb_get_geometry_reply_t reply_type; -* typedef xcb_get_geometry_cookie_t cookie_type; -* typedef std::tuple argument_types; -* typedef cookie_type (*request_func)(xcb_connection_t*, xcb_drawable_t); -* typedef reply_type *(*reply_func)(xcb_connection_t*, cookie_type, xcb_generic_error_t**); -* static constexpr std::size_t argumentCount = 1; -* static constexpr request_func requestFunc = &xcb_get_geometry_unchecked; -* static constexpr reply_func replyFunc = &xcb_get_geometry_reply; -* }; -* class NotDerivedFromWrapperData : public Wrapper -* { -* public: -* NotDerivedFromWrapperData() = default; -* NotDerivedFromWrapperData(xcb_window_t window) : Wrapper(window) {} -* }; -* @endcode -* -* The Wrapper provides an easy to use RAII API which calls the WrapperData's requestFunc in -* the ctor and fetches the reply the first time it is used. In addition the dtor takes care -* of freeing the reply if it got fetched, otherwise it discards the reply. The Wrapper can -* be used as if it were the reply_type directly. -* -* There are several command wrappers defined which either subclass Wrapper to add methods to -* simplify the usage of the result_type or use a typedef. To add a new typedef one can use the -* macro XCB_WRAPPER which creates the WrapperData struct as XCB_WRAPPER_DATA does and the -* typedef. E.g: -* @code -* XCB_WRAPPER(Geometry, xcb_get_geometry, xcb_drawable_t) -* @endcode -* -* creates a typedef Geometry and the struct GeometryData. -* -* Overall this allows to simplify the Xcb usage. For example consider the -* following xcb code snippet: -* @code -* xcb_window_t w; // some window -* xcb_connection_t *c = connection(); -* const xcb_get_geometry_cookie_t cookie = xcb_get_geometry_unchecked(c, w); -* // do other stuff -* xcb_get_geometry_reply_t *reply = xcb_get_geometry_reply(c, cookie, nullptr); -* if (reply) { -* reply->x; // do something with the geometry -* } -* free(reply); -* @endcode -* -* With the help of the Wrapper class this can be simplified to: -* @code -* xcb_window_t w; // some window -* Xcb::Geometry geo(w); -* if (!geo.isNull()) { -* geo->x; // do something with the geometry -* } -* @endcode -* -* @see XCB_WRAPPER_DATA -* @see XCB_WRAPPER -* @see Wrapper -* @see WindowAttributes -* @see OverlayWindow -* @see WindowGeometry -* @see Tree -* @see CurrentInput -* @see TransientFor -*/ + * @brief Variadic template to wrap an xcb request. + * + * This struct is part of the generic implementation to wrap xcb requests + * and fetching their reply. Each request is represented by two templated + * elements: WrapperData and Wrapper. + * + * The WrapperData defines the following types: + * @li reply_type of the xcb request + * @li cookie_type of the xcb request + * @li function pointer type for the xcb request + * @li function pointer type for the reply + * This uses variadic template arguments thus it can be used to specify any + * xcb request. + * + * As the WrapperData does not specify the actual function pointers one needs + * to derive another struct which specifies the function pointer requestFunc and + * the function pointer replyFunc as static constexpr of type reply_func and + * reply_type respectively. E.g. for the command xcb_get_geometry: + * @code + * struct GeometryData : public WrapperData< xcb_get_geometry_reply_t, xcb_get_geometry_cookie_t, xcb_drawable_t > + * { + * static constexpr request_func requestFunc = &xcb_get_geometry_unchecked; + * static constexpr reply_func replyFunc = &xcb_get_geometry_reply; + * }; + * @endcode + * + * To simplify this definition the macro XCB_WRAPPER_DATA is provided. + * For the same xcb command this looks like this: + * @code + * XCB_WRAPPER_DATA(GeometryData, xcb_get_geometry, xcb_drawable_t) + * @endcode + * + * The derived WrapperData has to be passed as first template argument to Wrapper. The other + * template arguments of Wrapper are the same variadic template arguments as passed into + * WrapperData. This is ensured at compile time and will cause a compile error in case there + * is a mismatch of the variadic template arguments passed to WrapperData and Wrapper. + * Passing another type than a struct derived from WrapperData to Wrapper will result in a + * compile error. The following code snippets won't compile: + * @code + * XCB_WRAPPER_DATA(GeometryData, xcb_get_geometry, xcb_drawable_t) + * // fails with "static assertion failed: Argument miss-match between Wrapper and WrapperData" + * class IncorrectArguments : public Wrapper + * { + * public: + * IncorrectArguments() = default; + * IncorrectArguments(xcb_window_t window) : Wrapper(window) {} + * }; + * + * // fails with "static assertion failed: Data template argument must be derived from WrapperData" + * class WrapperDataDirectly : public Wrapper, xcb_drawable_t> + * { + * public: + * WrapperDataDirectly() = default; + * WrapperDataDirectly(xcb_window_t window) : Wrapper, xcb_drawable_t>(window) {} + * }; + * + * // fails with "static assertion failed: Data template argument must be derived from WrapperData" + * struct FakeWrapperData + * { + * typedef xcb_get_geometry_reply_t reply_type; + * typedef xcb_get_geometry_cookie_t cookie_type; + * typedef std::tuple argument_types; + * typedef cookie_type (*request_func)(xcb_connection_t*, xcb_drawable_t); + * typedef reply_type *(*reply_func)(xcb_connection_t*, cookie_type, xcb_generic_error_t**); + * static constexpr std::size_t argumentCount = 1; + * static constexpr request_func requestFunc = &xcb_get_geometry_unchecked; + * static constexpr reply_func replyFunc = &xcb_get_geometry_reply; + * }; + * class NotDerivedFromWrapperData : public Wrapper + * { + * public: + * NotDerivedFromWrapperData() = default; + * NotDerivedFromWrapperData(xcb_window_t window) : Wrapper(window) {} + * }; + * @endcode + * + * The Wrapper provides an easy to use RAII API which calls the WrapperData's requestFunc in + * the ctor and fetches the reply the first time it is used. In addition the dtor takes care + * of freeing the reply if it got fetched, otherwise it discards the reply. The Wrapper can + * be used as if it were the reply_type directly. + * + * There are several command wrappers defined which either subclass Wrapper to add methods to + * simplify the usage of the result_type or use a typedef. To add a new typedef one can use the + * macro XCB_WRAPPER which creates the WrapperData struct as XCB_WRAPPER_DATA does and the + * typedef. E.g: + * @code + * XCB_WRAPPER(Geometry, xcb_get_geometry, xcb_drawable_t) + * @endcode + * + * creates a typedef Geometry and the struct GeometryData. + * + * Overall this allows to simplify the Xcb usage. For example consider the + * following xcb code snippet: + * @code + * xcb_window_t w; // some window + * xcb_connection_t *c = connection(); + * const xcb_get_geometry_cookie_t cookie = xcb_get_geometry_unchecked(c, w); + * // do other stuff + * xcb_get_geometry_reply_t *reply = xcb_get_geometry_reply(c, cookie, nullptr); + * if (reply) { + * reply->x; // do something with the geometry + * } + * free(reply); + * @endcode + * + * With the help of the Wrapper class this can be simplified to: + * @code + * xcb_window_t w; // some window + * Xcb::Geometry geo(w); + * if (!geo.isNull()) { + * geo->x; // do something with the geometry + * } + * @endcode + * + * @see XCB_WRAPPER_DATA + * @see XCB_WRAPPER + * @see Wrapper + * @see WindowAttributes + * @see OverlayWindow + * @see WindowGeometry + * @see Tree + * @see CurrentInput + * @see TransientFor + **/ template struct WrapperData { /** * @brief The type returned by the xcb reply function. - */ + **/ typedef Reply reply_type; /** * @brief The type returned by the xcb request function. - */ + **/ typedef Cookie cookie_type; /** * @brief Variadic arguments combined as a std::tuple. * @internal Used for verifying the arguments. - */ + **/ typedef std::tuple argument_types; /** * @brief The function pointer definition for the xcb request function. - */ + **/ typedef Cookie (*request_func)(xcb_connection_t*, Args...); /** * @brief The function pointer definition for the xcb reply function. - */ + **/ typedef Reply *(*reply_func)(xcb_connection_t*, Cookie, xcb_generic_error_t**); /** * @brief Number of variadic arguments. * @internal Used for verifying the arguments. - */ + **/ static constexpr std::size_t argumentCount = sizeof...(Args); }; @@ -232,7 +232,7 @@ * * This class contains the complete functionality of the Wrapper. It's only an abstract * base class to provide partial template specialization for more specific constructors. - */ + **/ template class AbstractWrapper { @@ -362,22 +362,21 @@ * @brief Template to compare the arguments of two std::tuple. * * @internal Used by static_assert in Wrapper - */ + **/ template struct tupleCompare { typedef typename std::tuple_element::type tuple1Type; typedef typename std::tuple_element::type tuple2Type; /** * @c true if both tuple have the same arguments, @c false otherwise. - * - */ + **/ static constexpr bool value = std::is_same< tuple1Type, tuple2Type >::value && tupleCompare::value; }; /** * @brief Recursive template case for first tuple element. - */ + **/ template struct tupleCompare { @@ -388,7 +387,7 @@ /** * @brief Wrapper taking a WrapperData as first template argument and xcb request args as variadic args. - */ + **/ template class Wrapper : public AbstractWrapper { @@ -681,7 +680,7 @@ * @param defaultValue The default value to return in case of error * @param ok Set to @c false in case of error, @c true in case of success * @return The read value or @p defaultValue in error case - */ + **/ template inline typename std::enable_if::value, T>::type value(T defaultValue = T(), bool *ok = nullptr) { return value(sizeof(T) * 8, m_type, defaultValue, ok); @@ -719,7 +718,7 @@ * @param defaultValue The default value to return in case of error * @param ok Set to @c false in case of error, @c true in case of success * @return The read value or @p defaultValue in error case - */ + **/ template inline typename std::enable_if::value, T>::type value(T defaultValue = nullptr, bool *ok = nullptr) { return value(sizeof(typename std::remove_pointer::type) * 8, m_type, defaultValue, ok); @@ -807,7 +806,7 @@ * @param ok Set to @c false in case of error, @c true in case of success * @return bool The first element interpreted as a boolean value or @c false in error case * @see value - */ + **/ inline bool toBool(uint8_t format = 32, xcb_atom_t type = XCB_ATOM_CARDINAL, bool *ok = nullptr) { bool *reply = value(format, type, nullptr, ok); if (!reply) { @@ -1830,8 +1829,7 @@ /** * @brief Small helper class to encapsulate SHM related functionality. - * - */ + **/ class Shm { public: