summaryrefslogtreecommitdiff
path: root/libcaja-private/caja-autorun.h
diff options
context:
space:
mode:
authorPerberos <[email protected]>2011-12-01 22:24:23 -0300
committerPerberos <[email protected]>2011-12-01 22:24:23 -0300
commit0e004c696b0e68b2cff37a4c3315b022a35eaf43 (patch)
tree43261e815529cb9518ed7be37af13b846af8b26b /libcaja-private/caja-autorun.h
downloadcaja-0e004c696b0e68b2cff37a4c3315b022a35eaf43.tar.bz2
caja-0e004c696b0e68b2cff37a4c3315b022a35eaf43.tar.xz
moving from https://github.com/perberos/mate-desktop-environment
Diffstat (limited to 'libcaja-private/caja-autorun.h')
-rw-r--r--libcaja-private/caja-autorun.h81
1 files changed, 81 insertions, 0 deletions
diff --git a/libcaja-private/caja-autorun.h b/libcaja-private/caja-autorun.h
new file mode 100644
index 00000000..cafecd7a
--- /dev/null
+++ b/libcaja-private/caja-autorun.h
@@ -0,0 +1,81 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+
+/*
+ * Caja
+ *
+ * Copyright (C) 2008 Red Hat, Inc.
+ *
+ * Caja is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Author: David Zeuthen <[email protected]>
+ */
+
+/* TODO:
+ *
+ * - automount all user-visible media on startup
+ * - but avoid doing autorun for these
+ * - unmount all the media we've automounted on shutdown
+ * - finish x-content / * types
+ * - finalize the semi-spec
+ * - add probing/sniffing code
+ * - clean up code
+ * - implement missing features
+ * - "Open Folder when mounted"
+ * - Autorun spec (e.g. $ROOT/.autostart)
+ *
+ */
+
+#ifndef CAJA_AUTORUN_H
+#define CAJA_AUTORUN_H
+
+#include <gtk/gtk.h>
+#include <eel/eel-background.h>
+#include <libcaja-private/caja-file.h>
+
+typedef void (*CajaAutorunComboBoxChanged) (gboolean selected_ask,
+ gboolean selected_ignore,
+ gboolean selected_open_folder,
+ GAppInfo *selected_app,
+ gpointer user_data);
+
+typedef void (*CajaAutorunOpenWindow) (GMount *mount, gpointer user_data);
+typedef void (*CajaAutorunGetContent) (char **content, gpointer user_data);
+
+void caja_autorun_prepare_combo_box (GtkWidget *combo_box,
+ const char *x_content_type,
+ gboolean include_ask,
+ gboolean include_open_with_other_app,
+ gboolean update_settings,
+ CajaAutorunComboBoxChanged changed_cb,
+ gpointer user_data);
+
+void caja_autorun_set_preferences (const char *x_content_type, gboolean pref_ask, gboolean pref_ignore, gboolean pref_open_folder);
+void caja_autorun_get_preferences (const char *x_content_type, gboolean *pref_ask, gboolean *pref_ignore, gboolean *pref_open_folder);
+
+void caja_autorun (GMount *mount, CajaAutorunOpenWindow open_window_func, gpointer user_data);
+
+char **caja_autorun_get_cached_x_content_types_for_mount (GMount *mount);
+
+void caja_autorun_get_x_content_types_for_mount_async (GMount *mount,
+ CajaAutorunGetContent callback,
+ GCancellable *cancellable,
+ gpointer user_data);
+
+void caja_autorun_launch_for_mount (GMount *mount, GAppInfo *app_info);
+
+void caja_allow_autorun_for_volume (GVolume *volume);
+void caja_allow_autorun_for_volume_finish (GVolume *volume);
+
+#endif /* CAJA_AUTORUN_H */