~elementary-apps/pantheon-files/trunk

« back to all changes in this revision

Viewing changes to src/marlin-window-columns.h

  • Committer: am.monkeyd at gmail
  • Date: 2010-11-08 13:17:02 UTC
  • Revision ID: am.monkeyd@gmail.com-20101108131702-rqeywh4r5pyx2ycz
let's roll

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
 
2
/*
 
3
 * Copyright (C) 2010 ammonkey
 
4
 *
 
5
 * This library is free software; you can redistribute it and/or modify
 
6
 * it under the terms of the GNU Lesser General Public License
 
7
 * version 3.0 as published by the Free Software Foundation.
 
8
 *
 
9
 * This library is distributed in the hope that it will be useful,
 
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
 * GNU Lesser General Public License version 3.0 for more details.
 
13
 *
 
14
 * You should have received a copy of the GNU Lesser General Public
 
15
 * License along with this library. If not, see
 
16
 * <http://www.gnu.org/licenses/>.
 
17
 *
 
18
 * Author: ammonkey <am.monkeyd@gmail.com>
 
19
 */
 
20
 
 
21
#ifndef MARLIN_WINDOW_COLUMNS_H
 
22
#define MARLIN_WINDOW_COLUMNS_H
 
23
 
 
24
#include <gtk/gtk.h>
 
25
//#include <glib/gi18n.h>
 
26
//#include "fm-list-view.h"
 
27
#include "gof-directory-async.h"
 
28
//#include "gof-window-slot.h"
 
29
#include "marlin-view-window.h"
 
30
 
 
31
#define MARLIN_TYPE_WINDOW_COLUMNS       (marlin_window_columns_get_type())
 
32
#define MARLIN_WINDOW_COLUMNS_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), MARLIN_TYPE_WINDOW_COLUMNS, MarlinWindowColumnsClass))
 
33
#define MARLIN_WINDOW_COLUMNS(obj)       (G_TYPE_CHECK_INSTANCE_CAST ((obj), MARLIN_TYPE_WINDOW_COLUMNS, MarlinWindowColumns))
 
34
#define MARLIN_IS_WINDOW_SLOT(obj)      (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MARLIN_TYPE_WINDOW_COLUMNS))
 
35
#define MARLIN_IS_WINDOW_SLOT_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), MARLIN_TYPE_WINDOW_COLUMNS))
 
36
#define MARLIN_WINDOW_COLUMNS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), MARLIN_TYPE_WINDOW_COLUMNS, MarlinWindowColumnsClass))
 
37
 
 
38
typedef enum {
 
39
        GOF_LOCATION_CHANGE_STANDARD,
 
40
        GOF_LOCATION_CHANGE_BACK,
 
41
        GOF_LOCATION_CHANGE_FORWARD,
 
42
        GOF_LOCATION_CHANGE_RELOAD,
 
43
        GOF_LOCATION_CHANGE_REDIRECT,
 
44
        GOF_LOCATION_CHANGE_FALLBACK
 
45
} GOFLocationChangeType;
 
46
 
 
47
typedef struct {
 
48
        GObject parent;
 
49
 
 
50
        /* content_box contains
 
51
         *  1) an event box containing extra_location_widgets
 
52
         *  2) the view box for the content view
 
53
         */
 
54
        GtkWidget *content_box;
 
55
        /*GtkWidget *extra_location_event_box;
 
56
        GtkWidget *extra_location_widgets;
 
57
        GtkWidget *extra_location_separator;*/
 
58
        GtkWidget *view_box;
 
59
        GtkWidget *colpane;
 
60
 
 
61
        /* Current location. */
 
62
        GFile *location;
 
63
        char *title;
 
64
        char *status_text;
 
65
 
 
66
        GtkWidget *window;
 
67
        GOFDirectoryAsync *directory;
 
68
 
 
69
        GList *slot;
 
70
        GOFWindowSlot *active_slot;
 
71
 
 
72
        /*NautilusFile *viewed_file;
 
73
        gboolean viewed_file_seen;
 
74
        gboolean viewed_file_in_trash;*/
 
75
 
 
76
        gboolean allow_stop;
 
77
 
 
78
        //NautilusQueryEditor *query_editor;
 
79
 
 
80
        /* New location. */
 
81
        GOFLocationChangeType location_change_type;
 
82
        /*guint location_change_distance;
 
83
        GFile *pending_location;
 
84
        char *pending_scroll_to;
 
85
        GList *pending_selection;
 
86
        NautilusFile *determine_view_file;
 
87
        GCancellable *mount_cancellable;
 
88
        GError *mount_error;
 
89
        gboolean tried_mount;
 
90
 
 
91
        GCancellable *find_mount_cancellable;
 
92
 
 
93
        gboolean visible;*/
 
94
} MarlinWindowColumns;
 
95
 
 
96
typedef struct {
 
97
        GObjectClass parent_class;
 
98
 
 
99
        /* wrapped GOFWindowInfo signals, for overloading */
 
100
        /*void (* active)   (NautilusWindowSlot *slot);
 
101
        void (* inactive) (NautilusWindowSlot *slot);*/
 
102
 
 
103
        //void (* update_query_editor) (NautilusWindowSlot *slot);
 
104
} MarlinWindowColumnsClass;
 
105
 
 
106
 
 
107
GType   marlin_window_columns_get_type (void);
 
108
 
 
109
MarlinWindowColumns     *marlin_window_columns_new (GFile *, GtkWidget *);
 
110
//MarlinWindowColumns     *marlin_window_columns_column_new (GFile *location);
 
111
//void                    marlin_window_columns_change_location (GOFWindowSlot *slot, GFile *location);
 
112
 
 
113
void            marlin_window_columns_add (MarlinWindowColumns *mwcols, GFile *location);
 
114
GFile           *marlin_window_columns_get_location (MarlinWindowColumns *mwcol);
 
115
//GOFWindowSlot   *marlin_window_columns_get_active_slot (MarlinWindowColumns *mwcols);
 
116
void            marlin_window_columns_change_location (GOFWindowSlot *slot, GFile *location);
 
117
 
 
118
#endif /* MARLIN_WINDOW_COLUMNS_H */