Port notifications_manager_linux to cppgir

This commit is contained in:
Ilya Fedin 2024-03-09 11:15:37 +04:00 committed by John Preston
parent bf1b3dc8f6
commit 886847f457
4 changed files with 436 additions and 595 deletions

View File

@ -1681,6 +1681,7 @@ else()
include(${cmake_helpers_loc}/external/glib/generate_dbus.cmake)
generate_dbus(Telegram org.freedesktop.portal. XdpBackground ${third_party_loc}/xdg-desktop-portal/data/org.freedesktop.portal.Background.xml)
generate_dbus(Telegram org.freedesktop. XdgNotifications ${src_loc}/platform/linux/org.freedesktop.Notifications.xml)
if (NOT DESKTOP_APP_DISABLE_X11_INTEGRATION)
target_link_libraries(Telegram

View File

@ -38,6 +38,7 @@ protected:
void doMaybeFlashBounce(Fn<void()> flashBounce) override;
private:
friend void Create(Window::Notifications::System *system);
class Private;
const std::unique_ptr<Private> _private;

View File

@ -0,0 +1,59 @@
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.freedesktop.Notifications">
<signal name="NotificationClosed">
<arg direction="out" type="u" name="id"/>
<arg direction="out" type="u" name="reason"/>
</signal>
<signal name="ActionInvoked">
<arg direction="out" type="u" name="id"/>
<arg direction="out" type="s" name="action_key"/>
</signal>
<signal name="NotificationReplied">
<arg direction="out" type="u" name="id"/>
<arg direction="out" type="s" name="text"/>
</signal>
<signal name="ActivationToken">
<arg direction="out" type="u" name="id"/>
<arg direction="out" type="s" name="activation_token"/>
</signal>
<method name="Notify">
<annotation value="QVariantMap" name="org.qtproject.QtDBus.QtTypeName.In6"/>
<arg direction="out" type="u"/>
<arg direction="in" type="s" name="app_name"/>
<arg direction="in" type="u" name="replaces_id"/>
<arg direction="in" type="s" name="app_icon"/>
<arg direction="in" type="s" name="summary"/>
<arg direction="in" type="s" name="body"/>
<arg direction="in" type="as" name="actions"/>
<arg direction="in" type="a{sv}" name="hints"/>
<arg direction="in" type="i" name="timeout"/>
</method>
<method name="CloseNotification">
<arg direction="in" type="u" name="id"/>
</method>
<method name="GetCapabilities">
<arg direction="out" type="as" name="caps"/>
</method>
<method name="GetServerInformation">
<arg direction="out" type="s" name="name"/>
<arg direction="out" type="s" name="vendor"/>
<arg direction="out" type="s" name="version"/>
<arg direction="out" type="s" name="spec_version"/>
</method>
<method name="Inhibit">
<annotation value="QVariantMap" name="org.qtproject.QtDBus.QtTypeName.In2"/>
<arg direction="out" type="u"/>
<arg direction="in" type="s" name="desktop_entry"/>
<arg direction="in" type="s" name="reason"/>
<arg direction="in" type="a{sv}" name="hints"/>
</method>
<method name="UnInhibit">
<arg direction="in" type="u"/>
</method>
<property access="read" type="b" name="Inhibited">
<annotation value="true" name="org.freedesktop.DBus.Property.EmitsChangedSignal"/>
</property>
</interface>
</node>