summaryrefslogtreecommitdiff
path: root/src/nautilus-file-name-widget-controller.h
blob: 1331c5644c6ca8085c68731da601f8aa27ba1d81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/* nautilus-file-name-widget-controller.h
 *
 * Copyright (C) 2016 the Nautilus developers
 *
 * 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 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, see <http://www.gnu.org/licenses/>.
 *
 */

#ifndef NAUTILUS_FILE_NAME_WIDGET_CONTROLLER_H
#define NAUTILUS_FILE_NAME_WIDGET_CONTROLLER_H

#include <glib.h>
#include <gtk/gtk.h>

#include "nautilus-file.h"
#include "nautilus-directory.h"

#define NAUTILUS_TYPE_FILE_NAME_WIDGET_CONTROLLER nautilus_file_name_widget_controller_get_type ()
G_DECLARE_DERIVABLE_TYPE (NautilusFileNameWidgetController, nautilus_file_name_widget_controller, NAUTILUS, FILE_NAME_WIDGET_CONTROLLER, GObject)

struct _NautilusFileNameWidgetControllerClass
{
        GObjectClass parent_class;

        gchar *  (*get_new_name)         (NautilusFileNameWidgetController *controller);

        gboolean (*name_is_valid)        (NautilusFileNameWidgetController  *controller,
                                          gchar                             *name,
                                          gchar                            **error_message);

        gboolean (*ignore_existing_file) (NautilusFileNameWidgetController *controller,
                                          NautilusFile                     *existing_file);

        void     (*name_accepted)        (NautilusFileNameWidgetController *controller);
};

gchar * nautilus_file_name_widget_controller_get_new_name (NautilusFileNameWidgetController *controller);


#endif /* NAUTILUS_FILE_NAME_WIDGET_CONTROLLER_H */