diff options
Diffstat (limited to 'interfaces')
-rw-r--r-- | interfaces/CMakeLists.txt | 45 | ||||
-rw-r--r-- | interfaces/filechooser.xml | 32 | ||||
-rw-r--r-- | interfaces/org.freedesktop.impl.portal.desktop.tde.service.cmake | 3 | ||||
-rw-r--r-- | interfaces/tde.portal | 4 | ||||
-rw-r--r-- | interfaces/xdg-desktop-portal-tde.desktop.cmake | 5 |
5 files changed, 89 insertions, 0 deletions
diff --git a/interfaces/CMakeLists.txt b/interfaces/CMakeLists.txt new file mode 100644 index 0000000..df05b75 --- /dev/null +++ b/interfaces/CMakeLists.txt @@ -0,0 +1,45 @@ +################################################################################ +# XDG Desktop Portal implementation for TDE # +# Copyright (C) 2024 Mavridis Philippe <mavridisf@gmail.com> # +# # +# Improvements and feedback are welcome! # +# This software is licensed under the terms of the GNU GPL v3 license. # +################################################################################ + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${DBUS_TQT_INCLUDE_DIRS} +) + +link_directories( + ${DBUS_TQT_LIBRARY_DIRS} +) + +set(filechooser_HDRS filechooserInterface.h filechooserProxy.h introspectableInterface.h) +set(filechooser_SRCS filechooserInterface.cpp filechooserProxy.cpp introspectableInterface.cpp) + +add_custom_command( + OUTPUT ${filechooser_HDRS} ${filechooser_SRCS} + COMMAND ${DBUSXML2QT3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/filechooser.xml + DEPENDS filechooser.xml + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} +) + +tde_add_library(portalinterfaces STATIC_PIC AUTOMOC + SOURCES ${filechooser_SRCS} + LINK ${DBUS_TQT_LIBRARIES} +) + +configure_file(org.freedesktop.impl.portal.desktop.tde.service.cmake + org.freedesktop.impl.portal.desktop.tde.service @ONLY) + +configure_file(xdg-desktop-portal-tde.desktop.cmake + xdg-desktop-portal-tde.desktop @ONLY) + +install(FILES tde.portal DESTINATION ${SHARE_INSTALL_PREFIX}/xdg-desktop-portal/portals) + +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.freedesktop.impl.portal.desktop.tde.service + DESTINATION ${DBUS_SESSION_DIRECTORY}) + +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/xdg-desktop-portal-tde.desktop + DESTINATION ${SHARE_INSTALL_PREFIX}/applications)
\ No newline at end of file diff --git a/interfaces/filechooser.xml b/interfaces/filechooser.xml new file mode 100644 index 0000000..da6bed2 --- /dev/null +++ b/interfaces/filechooser.xml @@ -0,0 +1,32 @@ +<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> +<node name="/"> + <interface name="org.freedesktop.impl.portal.FileChooser"> + <method name="OpenFile"> + <arg name="handle" type="o" direction="in" /> + <arg name="app_id" type="s" direction="in" /> + <arg name="parent_window" type="s" direction="in" /> + <arg name="title" type="s" direction="in" /> + <arg name="options" type="a{sv}" direction="in" /> + <arg name="response" type="u" direction="out" /> + <arg name="results" type="a{sv}" direction="out" /> + </method> + <method name="SaveFile"> + <arg name="handle" type="o" direction="in" /> + <arg name="app_id" type="s" direction="in" /> + <arg name="parent_window" type="s" direction="in" /> + <arg name="title" type="s" direction="in" /> + <arg name="options" type="a{sv}" direction="in" /> + <arg name="response" type="u" direction="out" /> + <arg name="results" type="a{sv}" direction="out" /> + </method> + <method name="SaveFiles"> + <arg name="handle" type="o" direction="in" /> + <arg name="app_id" type="s" direction="in" /> + <arg name="parent_window" type="s" direction="in" /> + <arg name="title" type="s" direction="in" /> + <arg name="options" type="a{sv}" direction="in" /> + <arg name="response" type="u" direction="out" /> + <arg name="results" type="a{sv}" direction="out" /> + </method> + </interface> +</node>
\ No newline at end of file diff --git a/interfaces/org.freedesktop.impl.portal.desktop.tde.service.cmake b/interfaces/org.freedesktop.impl.portal.desktop.tde.service.cmake new file mode 100644 index 0000000..eb697a1 --- /dev/null +++ b/interfaces/org.freedesktop.impl.portal.desktop.tde.service.cmake @@ -0,0 +1,3 @@ +[D-BUS Service] +Name=org.freedesktop.impl.portal.desktop.tde +Exec=@LIBEXEC_INSTALL_DIR@/xdg-desktop-portal-tde
\ No newline at end of file diff --git a/interfaces/tde.portal b/interfaces/tde.portal new file mode 100644 index 0000000..5bcf81a --- /dev/null +++ b/interfaces/tde.portal @@ -0,0 +1,4 @@ +[portal] +DBusName=org.freedesktop.impl.portal.desktop.tde +Interfaces=org.freedesktop.impl.portal.FileChooser +UseIn=Trinity diff --git a/interfaces/xdg-desktop-portal-tde.desktop.cmake b/interfaces/xdg-desktop-portal-tde.desktop.cmake new file mode 100644 index 0000000..267f91d --- /dev/null +++ b/interfaces/xdg-desktop-portal-tde.desktop.cmake @@ -0,0 +1,5 @@ +[Desktop Entry] +Type=Application +Name=Portal +NoDisplay=true +Exec=@LIBEXEC_INSTALL_DIR@/xdg-desktop-portal-tde
\ No newline at end of file |