Changeset View
Changeset View
Standalone View
Standalone View
src/client/plasmawindowmanagement.h
Show All 31 Lines | |||||
32 | namespace KWayland | 32 | namespace KWayland | ||
33 | { | 33 | { | ||
34 | namespace Client | 34 | namespace Client | ||
35 | { | 35 | { | ||
36 | class EventQueue; | 36 | class EventQueue; | ||
37 | class PlasmaWindow; | 37 | class PlasmaWindow; | ||
38 | class PlasmaWindowModel; | 38 | class PlasmaWindowModel; | ||
39 | class Surface; | 39 | class Surface; | ||
40 | class PlasmaVirtualDesktop; | ||||
40 | 41 | | |||
41 | /** | 42 | /** | ||
42 | * @short Wrapper for the org_kde_plasma_window_management interface. | 43 | * @short Wrapper for the org_kde_plasma_window_management interface. | ||
43 | * | 44 | * | ||
44 | * PlasmaWindowManagement is a privileged interface. A Wayland compositor is allowed to ignore | 45 | * PlasmaWindowManagement is a privileged interface. A Wayland compositor is allowed to ignore | ||
45 | * any requests. The PlasmaWindowManagement allows to get information about the overall windowing | 46 | * any requests. The PlasmaWindowManagement allows to get information about the overall windowing | ||
46 | * system. It allows to see which windows are currently available and thus is the base to implement | 47 | * system. It allows to see which windows are currently available and thus is the base to implement | ||
47 | * e.g. a task manager. | 48 | * e.g. a task manager. | ||
▲ Show 20 Lines • Show All 219 Lines • ▼ Show 20 Line(s) | 231 | public: | |||
267 | **/ | 268 | **/ | ||
268 | QString title() const; | 269 | QString title() const; | ||
269 | /** | 270 | /** | ||
270 | * @returns the application id which should reflect the name of a desktop file. | 271 | * @returns the application id which should reflect the name of a desktop file. | ||
271 | * @see appIdChanged | 272 | * @see appIdChanged | ||
272 | **/ | 273 | **/ | ||
273 | QString appId() const; | 274 | QString appId() const; | ||
274 | /** | 275 | /** | ||
276 | * @deprecated: use plasmaVirtualDesktops instead | ||||
277 | * @see plasmaVirtualDesktops | ||||
275 | * @returns the id of the virtual desktop this PlasmaWindow is on | 278 | * @returns the id of the virtual desktop this PlasmaWindow is on | ||
276 | * @see virtualDesktopChanged | 279 | * @see virtualDesktopChanged | ||
277 | **/ | 280 | **/ | ||
278 | quint32 virtualDesktop() const; | 281 | quint32 virtualDesktop() const; | ||
279 | /** | 282 | /** | ||
280 | * @returns Whether the window is currently the active Window. | 283 | * @returns Whether the window is currently the active Window. | ||
281 | * @see activeChanged | 284 | * @see activeChanged | ||
282 | **/ | 285 | **/ | ||
▲ Show 20 Lines • Show All 121 Lines • ▼ Show 20 Line(s) | |||||
404 | */ | 407 | */ | ||
405 | void requestMove(); | 408 | void requestMove(); | ||
406 | /** | 409 | /** | ||
407 | * Requests to start an interactive resize operation. | 410 | * Requests to start an interactive resize operation. | ||
408 | * @since 5.22 | 411 | * @since 5.22 | ||
409 | */ | 412 | */ | ||
410 | void requestResize(); | 413 | void requestResize(); | ||
411 | /** | 414 | /** | ||
415 | * @deprecated: use requestEnterVirtualDesktop instead | ||||
412 | * Requests to send the window to virtual @p desktop. | 416 | * Requests to send the window to virtual @p desktop. | ||
413 | **/ | 417 | **/ | ||
414 | void requestVirtualDesktop(quint32 desktop); | 418 | void requestVirtualDesktop(quint32 desktop); | ||
415 | 419 | | |||
416 | /** | 420 | /** | ||
417 | * Requests the window at this model row index have its keep above state toggled. | 421 | * Requests the window at this model row index have its keep above state toggled. | ||
418 | * @since 5.35 | 422 | * @since 5.35 | ||
419 | */ | 423 | */ | ||
▲ Show 20 Lines • Show All 55 Lines • ▼ Show 20 Line(s) | |||||
475 | 479 | | |||
476 | /** | 480 | /** | ||
477 | * @returns The window geometry in absolute coordinates. | 481 | * @returns The window geometry in absolute coordinates. | ||
478 | * @see geometryChanged | 482 | * @see geometryChanged | ||
479 | * @since 5.25 | 483 | * @since 5.25 | ||
480 | **/ | 484 | **/ | ||
481 | QRect geometry() const; | 485 | QRect geometry() const; | ||
482 | 486 | | |||
487 | /** | ||||
488 | * Ask the server to make the window enter a virtual desktop. | ||||
489 | * The server may or may not consent. | ||||
490 | * A window can enter more than one virtual desktop. | ||||
491 | * | ||||
492 | * @since 5.46 | ||||
493 | */ | ||||
494 | void requestEnterVirtualDesktop(const QString &id); | ||||
495 | | ||||
496 | /** | ||||
497 | * RFC: do this with an empty id to request_enter_virtual_desktop? | ||||
498 | * Make the window enter a new virtual desktop. If the server consents the request, | ||||
499 | * it will create a new virtual desktop and assign the window to it. | ||||
500 | */ | ||||
501 | void requestEnterNewVirtualDesktop(); | ||||
502 | | ||||
503 | /** | ||||
504 | * Ask the server to make the window the window exit a virtual desktop. | ||||
505 | * The server may or may not consent. | ||||
506 | * If it exits all desktops it will be considered on all of them. | ||||
507 | * | ||||
508 | * @since 5.46 | ||||
509 | */ | ||||
510 | void requestLeaveVirtualDesktop(const QString &id); | ||||
511 | | ||||
512 | /** | ||||
513 | * Return all the virtual desktop ids this window is associated to. | ||||
514 | * When a desktop gets deleted, it will be automatically removed from this list. | ||||
515 | * If this list is empty, assume it's on all desktops. | ||||
516 | * | ||||
517 | * @since 5.46 | ||||
518 | */ | ||||
519 | QStringList plasmaVirtualDesktops() const; | ||||
520 | | ||||
483 | Q_SIGNALS: | 521 | Q_SIGNALS: | ||
484 | /** | 522 | /** | ||
485 | * The window title changed. | 523 | * The window title changed. | ||
486 | * @see title | 524 | * @see title | ||
487 | **/ | 525 | **/ | ||
488 | void titleChanged(); | 526 | void titleChanged(); | ||
489 | /** | 527 | /** | ||
490 | * The application id changed. | 528 | * The application id changed. | ||
491 | * @see appId | 529 | * @see appId | ||
492 | **/ | 530 | **/ | ||
493 | void appIdChanged(); | 531 | void appIdChanged(); | ||
494 | /** | 532 | /** | ||
533 | * @deprecated use plasmaVirtualDesktopEntered and plasmaVirtualDesktopLeft instead | ||||
495 | * The virtual desktop changed. | 534 | * The virtual desktop changed. | ||
496 | * @see virtualDesktop | | |||
497 | **/ | 535 | **/ | ||
498 | void virtualDesktopChanged(); | 536 | void virtualDesktopChanged(); | ||
499 | /** | 537 | /** | ||
500 | * The window became active or inactive. | 538 | * The window became active or inactive. | ||
501 | * @see isActive | 539 | * @see isActive | ||
502 | **/ | 540 | **/ | ||
503 | void activeChanged(); | 541 | void activeChanged(); | ||
504 | /** | 542 | /** | ||
▲ Show 20 Lines • Show All 110 Lines • ▼ Show 20 Line(s) | |||||
615 | void parentWindowChanged(); | 653 | void parentWindowChanged(); | ||
616 | /** | 654 | /** | ||
617 | * This signal is emitted whenever the window geometry changes. | 655 | * This signal is emitted whenever the window geometry changes. | ||
618 | * @see geometry | 656 | * @see geometry | ||
619 | * @since 5.25 | 657 | * @since 5.25 | ||
620 | **/ | 658 | **/ | ||
621 | void geometryChanged(); | 659 | void geometryChanged(); | ||
622 | 660 | | |||
661 | /** | ||||
662 | * This signal is emitted when the window has entered a new virtual desktop. | ||||
663 | * The window can be on more than one desktop, or none: then is considered on all of them. | ||||
664 | * @since 5.46 | ||||
665 | */ | ||||
666 | void plasmaVirtualDesktopEntered(const QString &id); | ||||
667 | | ||||
668 | /** | ||||
669 | * This signal is emitted when the window left a virtual desktop. | ||||
670 | * If the window leaves all desktops, it can be considered on all. | ||||
671 | * | ||||
672 | * @since 5.46 | ||||
673 | */ | ||||
674 | void plasmaVirtualDesktopLeft(const QString &id); | ||||
675 | | ||||
623 | private: | 676 | private: | ||
624 | friend class PlasmaWindowManagement; | 677 | friend class PlasmaWindowManagement; | ||
625 | explicit PlasmaWindow(PlasmaWindowManagement *parent, org_kde_plasma_window *dataOffer, quint32 internalId); | 678 | explicit PlasmaWindow(PlasmaWindowManagement *parent, org_kde_plasma_window *dataOffer, quint32 internalId); | ||
626 | class Private; | 679 | class Private; | ||
627 | QScopedPointer<Private> d; | 680 | QScopedPointer<Private> d; | ||
628 | }; | 681 | }; | ||
629 | 682 | | |||
630 | } | 683 | } | ||
631 | } | 684 | } | ||
632 | 685 | | |||
633 | Q_DECLARE_METATYPE(KWayland::Client::PlasmaWindow*) | 686 | Q_DECLARE_METATYPE(KWayland::Client::PlasmaWindow*) | ||
634 | 687 | | |||
635 | #endif | 688 | #endif |