summaryrefslogtreecommitdiffstats
path: root/src/nautilus-dbus-launcher.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/nautilus-dbus-launcher.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/nautilus-dbus-launcher.h b/src/nautilus-dbus-launcher.h
new file mode 100644
index 0000000..0e55337
--- /dev/null
+++ b/src/nautilus-dbus-launcher.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2022 Corey Berla <corey@berla.me>
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#pragma once
+
+#include <glib.h>
+#include <gtk/gtk.h>
+
+#include "nautilus-file.h"
+
+#define NAUTILUS_TYPE_DBUS_LAUNCHER (nautilus_dbus_launcher_get_type())
+
+G_DECLARE_FINAL_TYPE (NautilusDBusLauncher, nautilus_dbus_launcher, NAUTILUS, DBUS_LAUNCHER, GObject)
+
+
+typedef enum {
+ NAUTILUS_DBUS_APP_0,
+ NAUTILUS_DBUS_LAUNCHER_SETTINGS,
+ NAUTILUS_DBUS_LAUNCHER_DISKS,
+ NAUTILUS_DBUS_LAUNCHER_CONSOLE,
+ NAUTILUS_DBUS_LAUNCHER_N_APPS
+} NautilusDBusLauncherApp;
+
+NautilusDBusLauncher * nautilus_dbus_launcher_new (void); //to be called on `NautilusApplication::startup` only
+
+NautilusDBusLauncher * nautilus_dbus_launcher_get (void); //to be called by consumers; doesn't change reference count.
+
+gboolean nautilus_dbus_launcher_is_available (NautilusDBusLauncher *self,
+ NautilusDBusLauncherApp app);
+
+void nautilus_dbus_launcher_call (NautilusDBusLauncher *self,
+ NautilusDBusLauncherApp app,
+ const gchar *method_name,
+ GVariant *parameters,
+ GtkWindow *window);
+