forked from quickshell/quickshell
service/tray: mostly complete StatusNotifierItem implementation
Notably missing dbusmenu which makes it actually useful.
This commit is contained in:
parent
d47a7f2cff
commit
6214ac1002
25 changed files with 1321 additions and 4 deletions
35
src/services/status_notifier/dbus_item_types.hpp
Normal file
35
src/services/status_notifier/dbus_item_types.hpp
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
#pragma once
|
||||
|
||||
#include <qdbusargument.h>
|
||||
#include <qdbusextratypes.h>
|
||||
#include <qdebug.h>
|
||||
#include <qlist.h>
|
||||
|
||||
struct DBusSniIconPixmap {
|
||||
qint32 width = 0;
|
||||
qint32 height = 0;
|
||||
QByteArray data;
|
||||
|
||||
// valid only for the lifetime of the pixmap
|
||||
[[nodiscard]] QImage createImage() const;
|
||||
};
|
||||
|
||||
using DBusSniIconPixmapList = QList<DBusSniIconPixmap>;
|
||||
|
||||
struct DBusSniTooltip {
|
||||
QString icon;
|
||||
DBusSniIconPixmapList iconPixmaps;
|
||||
QString title;
|
||||
QString description;
|
||||
};
|
||||
|
||||
const QDBusArgument& operator>>(const QDBusArgument& argument, DBusSniIconPixmap& pixmap);
|
||||
const QDBusArgument& operator<<(QDBusArgument& argument, const DBusSniIconPixmap& pixmap);
|
||||
const QDBusArgument& operator>>(const QDBusArgument& argument, DBusSniIconPixmapList& pixmaps);
|
||||
const QDBusArgument& operator<<(QDBusArgument& argument, const DBusSniIconPixmapList& pixmaps);
|
||||
const QDBusArgument& operator>>(const QDBusArgument& argument, DBusSniTooltip& tooltip);
|
||||
const QDBusArgument& operator<<(QDBusArgument& argument, const DBusSniTooltip& tooltip);
|
||||
|
||||
QDebug operator<<(QDebug debug, const DBusSniIconPixmap& pixmap);
|
||||
QDebug operator<<(QDebug debug, const DBusSniTooltip& tooltip);
|
||||
QDebug operator<<(QDebug debug, const QDBusObjectPath& path);
|
||||
Loading…
Add table
Add a link
Reference in a new issue