2006-04-13 05:02:33 -05:00
|
|
|
/*
|
2007-06-24 12:56:20 -05:00
|
|
|
* moofiledialog.h
|
2006-04-13 05:02:33 -05:00
|
|
|
*
|
2010-12-21 20:15:45 -08:00
|
|
|
* Copyright (C) 2004-2010 by Yevgen Muntyan <emuntyan@users.sourceforge.net>
|
2006-04-13 05:02:33 -05:00
|
|
|
*
|
2008-09-05 17:20:50 -05:00
|
|
|
* This file is part of medit. medit is free software; you can
|
|
|
|
* redistribute it and/or modify it under the terms of the
|
|
|
|
* GNU Lesser General Public License as published by the
|
|
|
|
* Free Software Foundation; either version 2.1 of the License,
|
|
|
|
* or (at your option) any later version.
|
2006-04-13 05:02:33 -05:00
|
|
|
*
|
2008-09-05 17:20:50 -05:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with medit. If not, see <http://www.gnu.org/licenses/>.
|
2006-04-13 05:02:33 -05:00
|
|
|
*/
|
|
|
|
|
2007-04-12 10:31:28 -05:00
|
|
|
#ifndef MOO_FILE_DIALOG_H
|
|
|
|
#define MOO_FILE_DIALOG_H
|
2006-04-13 05:02:33 -05:00
|
|
|
|
2011-09-26 00:41:51 -07:00
|
|
|
#include <gtk/gtk.h>
|
2010-11-23 21:54:39 -08:00
|
|
|
#include <mooutils/mooutils-file.h>
|
2006-04-13 05:02:33 -05:00
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
|
|
|
|
#define MOO_TYPE_FILE_DIALOG (moo_file_dialog_get_type ())
|
|
|
|
#define MOO_FILE_DIALOG(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), MOO_TYPE_FILE_DIALOG, MooFileDialog))
|
|
|
|
#define MOO_FILE_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MOO_TYPE_FILE_DIALOG, MooFileDialogClass))
|
|
|
|
#define MOO_IS_FILE_DIALOG(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), MOO_TYPE_FILE_DIALOG))
|
|
|
|
#define MOO_IS_FILE_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MOO_TYPE_FILE_DIALOG))
|
|
|
|
#define MOO_FILE_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MOO_TYPE_FILE_DIALOG, MooFileDialogClass))
|
|
|
|
|
2010-12-08 01:25:34 -08:00
|
|
|
typedef struct _MooFileDialog MooFileDialog;
|
|
|
|
typedef struct _MooFileDialogPrivate MooFileDialogPrivate;
|
|
|
|
typedef struct _MooFileDialogClass MooFileDialogClass;
|
2006-04-13 05:02:33 -05:00
|
|
|
|
|
|
|
typedef enum {
|
2006-06-08 10:50:18 -05:00
|
|
|
MOO_FILE_DIALOG_OPEN,
|
|
|
|
MOO_FILE_DIALOG_OPEN_ANY,
|
|
|
|
MOO_FILE_DIALOG_SAVE,
|
|
|
|
MOO_FILE_DIALOG_OPEN_DIR
|
2006-04-13 05:02:33 -05:00
|
|
|
/* MOO_DIALOG_FILE_CREATE,*/
|
|
|
|
/* MOO_DIALOG_DIR_NEW,*/
|
|
|
|
} MooFileDialogType;
|
|
|
|
|
2010-12-08 01:25:34 -08:00
|
|
|
struct _MooFileDialog
|
2006-04-13 05:02:33 -05:00
|
|
|
{
|
|
|
|
GObject parent;
|
|
|
|
MooFileDialogPrivate *priv;
|
|
|
|
};
|
|
|
|
|
2010-12-08 01:25:34 -08:00
|
|
|
struct _MooFileDialogClass
|
2006-04-13 05:02:33 -05:00
|
|
|
{
|
|
|
|
GObjectClass parent_class;
|
|
|
|
};
|
|
|
|
|
2008-05-21 15:37:57 -05:00
|
|
|
typedef char *(*MooFileDialogCheckNameFunc) (MooFileDialog *dialog,
|
|
|
|
const char *uri,
|
|
|
|
gpointer data);
|
|
|
|
|
|
|
|
GType moo_file_dialog_get_type (void) G_GNUC_CONST;
|
|
|
|
|
|
|
|
MooFileDialog *moo_file_dialog_new (MooFileDialogType type,
|
|
|
|
GtkWidget *parent,
|
|
|
|
gboolean multiple,
|
|
|
|
const char *title,
|
2010-11-23 21:54:39 -08:00
|
|
|
GFile *start_loc,
|
2008-05-21 15:37:57 -05:00
|
|
|
const char *start_name);
|
2008-08-26 13:35:55 -05:00
|
|
|
void moo_file_dialog_set_filter_mgr_id (MooFileDialog *dialog,
|
2008-05-21 15:37:57 -05:00
|
|
|
const char *id);
|
|
|
|
|
|
|
|
gboolean moo_file_dialog_run (MooFileDialog *dialog);
|
2010-11-23 21:54:39 -08:00
|
|
|
GFile *moo_file_dialog_get_file (MooFileDialog *dialog);
|
|
|
|
MooFileArray *moo_file_dialog_get_files (MooFileDialog *dialog);
|
2008-08-29 05:44:30 -05:00
|
|
|
char *moo_file_dialog_get_uri (MooFileDialog *dialog);
|
2008-05-21 15:37:57 -05:00
|
|
|
char **moo_file_dialog_get_uris (MooFileDialog *dialog);
|
|
|
|
|
|
|
|
void moo_file_dialog_set_current_folder_uri (MooFileDialog *dialog,
|
|
|
|
const char *uri);
|
|
|
|
const char *moo_file_dialog_get_current_folder_uri (MooFileDialog *dialog);
|
|
|
|
|
|
|
|
void moo_file_dialog_set_remember_size (MooFileDialog *dialog,
|
|
|
|
const char *prefs_key);
|
|
|
|
|
|
|
|
void moo_file_dialog_set_check_name_func (MooFileDialog *dialog,
|
|
|
|
MooFileDialogCheckNameFunc func,
|
|
|
|
gpointer data,
|
|
|
|
GDestroyNotify notify);
|
|
|
|
void moo_file_dialog_set_extra_widget (MooFileDialog *dialog,
|
|
|
|
GtkWidget *widget);
|
|
|
|
|
|
|
|
void moo_file_dialog_set_encoding (MooFileDialog *dialog,
|
|
|
|
const char *encoding);
|
|
|
|
const char *moo_file_dialog_get_encoding (MooFileDialog *dialog);
|
|
|
|
|
|
|
|
void moo_file_dialog_set_help_id (MooFileDialog *dialog,
|
|
|
|
const char *id);
|
|
|
|
|
|
|
|
const char *moo_file_dialog (GtkWidget *parent,
|
|
|
|
MooFileDialogType type,
|
|
|
|
const char *basename_utf8,
|
|
|
|
const char *title,
|
|
|
|
const char *start_dir);
|
|
|
|
const char *moo_file_dialogp (GtkWidget *parent,
|
|
|
|
MooFileDialogType type,
|
|
|
|
const char *basename_utf8,
|
|
|
|
const char *title,
|
|
|
|
const char *prefs_key,
|
|
|
|
const char *alternate_prefs_key);
|
2006-04-13 05:02:33 -05:00
|
|
|
|
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|
2007-04-12 10:31:28 -05:00
|
|
|
#endif /* MOO_FILE_DIALOG_H */
|