⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 kwm.h

📁 一种效率高
💻 H
📖 第 1 页 / 共 2 页
字号:
   * Returns the window which has the focus   */  static Window activeWindow();  /**   * Switches to the specified virtual desktop   */  static void switchToDesktop(int desk);  /**   *Window region define the rectangle where windows can appear. A   * window which can be fully maximized will exactly fill this   * region. The regions are settable withing kwm to allow desktop   * panels like kpanel to stay visible even if a window becomes maximized.   * kwm will store the regions in the kwmrc when exiting.   */  static void setWindowRegion(int desk, const QRect &region);  /**    * Returns the window region of the specified virtual desktop.    */  static QRect getWindowRegion(int desk);  /**   * At present the maximium number of desktops is limited to 32   *   * As with the window regions, kwm will store the following properties in   * the kwmrc when exiting   */  /**    * Returns the number of virtual desktops.    */  static int numberOfDesktops();  /**    * Sets the number of virtual desktops. Modules like kpanel are informed.    */  static void setNumberOfDesktops(int num);  /**    * Changes a name of a virtual desktop. Modules like kpanel are informed.    */  static void setDesktopName(int desk, const QString &name);  /**    * Returns the name of the specified virtual desktop.    */  static QString getDesktopName(int desk);  /**   * low level kwm communication. This can also be used for a one-way   * communication with modules, since kwm sends messages, which it   * does not understand, to all modules. You module should declare a   * short unque praefix for this task.   *   * Note: the length of a command is limited to 20 character. This   * stems from the limitations of an ordinary X11 client messages.   */  static void sendKWMCommand(const QString &command);  /**   * The standard window title. If kwm runs, title() will return the   * title kwm uses. These titles are always unique.   */  static QString title(Window w);  /**   *titleWithState is aequivalent to title(), but inside round brackets   * for iconified window   */  static QString titleWithState(Window w);  /**   * if no miniicon is set, miniIcon() will return the standard   * icon. The result will be scaled to (width, height) if it is   * larger. Otherwise it will not be modified. If you do not specify   * width or height, the result will be returned in its native   * size. Returns a null pixmap in the case no   * icon is defined.   */  static QPixmap miniIcon(Window w, int width=0, int height=0);  /**    * Same as miniIcon() above, but for the full icon.    */  static QPixmap icon(Window w, int width=0, int height=0);  /**   ***** GET WINDOW PROPERTIES *****   */  /**    * Returns the virtual desktop on which the window is located.    */  static int desktop(Window w);  /**    * Returns the geometry of a window. If including_frame is set,    * then the geometry of kwm's decoration frame is returned. This    * functions tries to work even for non-KDE-compliant window    * managers. Anyway, since this is a bit weird in X the result    * cannot be guaranteed to be correct then.    */  static QRect geometry(Window w, bool including_frame = FALSE);  /**   * geometry restore is only defined for maximized window. It is the   * geometry a window will get when it is unmaximized.   */  static QRect geometryRestore(Window w);  /**   *  Returns the icon geometry of a window. This is either the defined icon   * geometry from a setIconGeometry() call, or the center of the window in case   * there was no geometry or an empty geometry defined.    */  static QRect iconGeometry(Window w);  /**   * Is the window iconified?   */  static bool isIconified(Window w);  /**   * Is the window maximized?   */  static bool isMaximized(Window w);  /**   * Shall the window be maximized?   */  static bool isDoMaximize(Window w);  enum {horizontal = 1, vertical = 2, fullscreen = 3};  /**   * The maximize mode, either horizontal, vertical or fullscreen   */  static int maximizeMode(Window w);  /**   * The doMaximize mode, either horizontal, vertical or fullscreen   */  static int doMaximizeMode(Window w);  /**   * Is the window sticky?   */  static bool isSticky(Window w);  /**   * Returns the KDE decoration hints of the window.   */  static long getDecoration(Window w);  /**   * Is the window sticky?   */  static bool fixedSize(Window w);  /**   * Does the window contain unsaved data? (KDE hint)   */  static bool containsUnsavedData(Window w);  /**   * Does the window define the KDE unsaved data hint at all?   */  static bool unsavedDataHintDefined(Window w);  /**   * Does the window have the focus?   */  static bool isActive(Window w);  /**   * ***** SET WINDOW PROPERTIES *****   *   * Note: The functions for some general properties (decoration,   * icons) are in the general section at the beginning of this   * document.   */  /**   * Move the  window to another virutal desktop   */  static void moveToDesktop(Window w, int desk);  /**   * Set the geometry of a window   */  static void setGeometry(Window w, const QRect &geom);  /**   * Set the restore geometry (before maximize) of a window   */  static void setGeometryRestore(Window w, const QRect &geom);  /**   * Set the icon geometry of a window.   */  static void setIconGeometry(Window w, const QRect &geom);  /**   * Move a window to another geometric position   */  static void move(Window w, const QPoint &pos);  /**   * Maximize/Unmaximize a window according to value.  If the window   *  is not mapped yet, this function only sets the _state_ of the   *  maximize button, it does _not_ change the geometry. See   * doMaximize below.   *   * The mode can either be horizontal or vertical or ( the default) fullscreen   */  static void setMaximize(Window w, bool value, int mode );    /**     * for binary compatibility, the above with default argument mode = horitzonal|vertical     */  static void setMaximize(Window w, bool value);  /**     Maximize a window (changing the geometry to fill the entire screen).   */  static void doMaximize(Window w, bool value, int mode);    /**     * for binary compatibility, the above with default argument mode = horitzonal|vertical     */  static void doMaximize(Window w, bool value);  /**   * Iconify/UnIconify a window according to value   */  static void setIconify(Window w, bool value);  /**   * Sticky/UnSticky a window according to value   */  static void setSticky(Window w, bool value);  /**   * close will send a WM_DELETE_WINDOW message to the window, if this window   * requested for this protocol. Otherwise it will simply be destroyed.   */  static void close(Window w);  /**   *activate will deiconify the window, if is is iconified, or switch to   * another desktop, if the window is there. Then the window is raised   * and activated with activateInteral (see below)   */  static void activate(Window w);  /**   * activateInternal will simply activate the window. Be carefull: you might   * run into trouble if the window is iconified or on another desktop!   * You probably prefer activate (see above).   */  static void activateInternal(Window w);  /**   * raise the specified window. Should work with any windowmanager   */  static void raise(Window w);  /**   * lower the specified window. Should work with any windowmanager   */  static void lower(Window w);  /**   * if you like to swallow a mapped window ( == XReparentWindow)   * you should call prepareForSwallowing before. This will set the   * window to WithDrawnState (and also wait until the window achieved   * this state), what usually let the windowmanager remove all its   * decorations and re-reparent the window to the root window.   *   * You do not need to call prepareForSwallowing if you are sure that   * the window is already in withdrawn state and unmanaged   * (i.e. still a child of the root window). This is usually the case   * if the window was never shown, but not always. Some   * windowmanagers may even manage newly created unmapped windows,   * although this is not a good idea to do. If the window is not in   * withdrawn state but managed by the windowmanager, then the   * windowmanager may react on the synthetic unmapNotify event   * created from XReparentWindow by reparenting the window back to   * the root window. Since this happen after your XReparentWindow,   * you did not swallow it but put it onto the desktop without any   * decoration frame instead!  prepareForSwallowing helps to avoid   * this case.   *   * Note: You _never_ need to call prepareForSwallowing if you are   * using kwm, since kwm is very clever regarding unmapNotify   * events. If you like to ensure that your software works with other   * windowmanager though, you should better do it. Please keep in   * mind that taking windows away from windowmanagers is a sensitive   * topic. That means: Even prepareForSwallowing may fail with   * certain non-standard windowmanagers.   *   * Also note that all this stuff only affects toplevel   * windows. Reparenting subwindows is no problem at all, since a   * windowmanager does not care about them.  */  static void prepareForSwallowing(Window w);  /**    * doNotManage(...) allows to define the first 20 character of a      window title (or a regular expression) that should not be      managed by the windowmanager. This is useful    * to avoid flickering when a panel swallows legacy applications.    * doNotManage(...) applies only for the first window which meets the    * criteria.    *    * Note: May have no effect with other windowmanagers.    */  static void doNotManage(const QString&);  /**   * ***** CURRENT NAMES OF WINDOW OPERATION COMMANDS *****   *   * For 100% consitancy of the desktop, clients which do window operations   * should use these strings.   */  /**   * An i18n'ed string for maximize.   */  static QString getMaximizeString();  /**   * An i18n'ed string for unmaximize   */  static QString getUnMaximizeString();  /**   * An i18n'ed string for iconify   */  static QString getIconifyString();  /**   * An i18n'ed string for uniconify   */  static QString getUnIconifyString();  /**   * An i18n'ed string for sticky   */  static QString getStickyString();  /**   * An i18n'ed string for unsticky.   */  static QString getUnStickyString();  /**   * An i18n'ed string for move.   */  static QString getMoveString();  /**   * An i18n'ed string for resize.   */  static QString getResizeString();  /**   * An i18n'ed string for close.   */  static QString getCloseString();  /**   * An i18n'ed string for "toDesktop".   */  static QString getToDesktopString();  /**   * An i18n'ed string for "ontoCurrentDesktop".   */  static QString getOntoCurrentDesktopString();  /**   * ***** MORE OR LESS ONLY USEFULL FOR INTERNAL PURPOSES OR THE   *       WINDOWMANAGER ITSELF *****   */  /**   * Is the window a docking window?   */  static bool isDockWindow(Window w);  /**   * Returns the X window state of the specified winodw   */  static int getWindowState(Window w);};#endif // KWM_H

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -