aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/FilePicker.h
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpeseng@src.gnome.org>2002-12-31 03:29:24 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2002-12-31 03:29:24 +0800
commit6876ede98282c7db318089bfefb292aa59e55d48 (patch)
tree76b23252d04da232d0ebf22e53bfe3e022686af9 /embed/mozilla/FilePicker.h
downloadgsoc2013-epiphany-6876ede98282c7db318089bfefb292aa59e55d48.tar
gsoc2013-epiphany-6876ede98282c7db318089bfefb292aa59e55d48.tar.gz
gsoc2013-epiphany-6876ede98282c7db318089bfefb292aa59e55d48.tar.bz2
gsoc2013-epiphany-6876ede98282c7db318089bfefb292aa59e55d48.tar.lz
gsoc2013-epiphany-6876ede98282c7db318089bfefb292aa59e55d48.tar.xz
gsoc2013-epiphany-6876ede98282c7db318089bfefb292aa59e55d48.tar.zst
gsoc2013-epiphany-6876ede98282c7db318089bfefb292aa59e55d48.zip
Initial revision
Diffstat (limited to 'embed/mozilla/FilePicker.h')
-rw-r--r--embed/mozilla/FilePicker.h94
1 files changed, 94 insertions, 0 deletions
diff --git a/embed/mozilla/FilePicker.h b/embed/mozilla/FilePicker.h
new file mode 100644
index 000000000..93c025637
--- /dev/null
+++ b/embed/mozilla/FilePicker.h
@@ -0,0 +1,94 @@
+/*
+ * Copyright (C) 2001 Philip Langdale
+ *
+ * This program 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, 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.
+ */
+
+#ifndef FILE_PICKER_H
+#define FILE_PICKER_H
+
+#include "nsIFilePicker.h"
+#include "nsError.h"
+#include "nsIDOMWindow.h"
+#include "nsIDOMWindowInternal.h"
+#include "nsCOMPtr.h"
+#include "nsString.h"
+#include "nsILocalFile.h"
+#include <gtk/gtktogglebutton.h>
+#include "ephy-embed-shell.h"
+
+#define G_FILEPICKER_CID \
+{ /* 3636dc79-0b42-4bad-8a3f-ae15d3671d17 */ \
+ 0x3636dc79, \
+ 0x0b42, \
+ 0x4bad, \
+ {0x8a, 0x3f, 0xae, 0x15, 0xd3, 0x67, 0x1d, 0x17} \
+}
+
+#define G_FILEPICKER_CONTRACTID "@mozilla.org/filepicker;1"
+#define G_FILEPICKER_CLASSNAME "Galeon's File Picker Implementation"
+
+class nsIFactory;
+
+extern nsresult NS_NewFilePickerFactory(nsIFactory** aFactory);
+
+/* Header file */
+class GFilePicker : public nsIFilePicker
+{
+ friend void filePicker_save_content_cb(GtkToggleButton *aButton,
+ GFilePicker *aFilePicker);
+ public:
+ NS_DECL_ISUPPORTS
+ NS_DECL_NSIFILEPICKER
+ enum { returnOK = nsIFilePicker::returnOK,
+ returnCancel = nsIFilePicker::returnCancel,
+ returnReplace = nsIFilePicker::returnReplace,
+ returnOKSaveContent = 256 };
+
+ GFilePicker(PRBool aShowContentCheck = PR_FALSE, FileFormat *aFileFormats = NULL);
+ virtual ~GFilePicker();
+
+ /* additional members */
+ NS_METHOD InitWithGtkWidget(GtkWidget *aParentWidget,
+ const char *aTitle, PRInt16 aMode);
+ NS_METHOD SanityCheck(PRBool *retIsSane);
+
+ PRInt16 mSelectedFileFormat;
+
+ private:
+ NS_METHOD HandleFilePickerResult(PRInt16 *retval);
+
+ nsCOMPtr<nsIDOMWindow> mParent;
+
+ nsCString mTitle;
+ nsCString mFilter;
+ nsCString mDefaultString;
+
+ nsCOMPtr<nsILocalFile> mFile;
+ nsCOMPtr<nsILocalFile> mDisplayDirectory;
+
+ PRInt16 mMode;
+
+ PRBool mShowContentCheck;
+ PRBool mSaveContent;
+
+ GtkWidget *mParentWidget;
+ GtkWidget *mFileSelector;
+ GtkWidget *mFormatChooser;
+
+ FileFormat *mFileFormats;
+};
+
+#endif