~elementary-apps/pantheon-files/trunk

« back to all changes in this revision

Viewing changes to src/gof-directory-async.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 GOF_DIRECTORY_ASYNC_H
 
22
#define GOF_DIRECTORY_ASYNC_H
 
23
 
 
24
#include <gtk/gtk.h>
 
25
//#include "fm-list-model.h"
 
26
#include "gof-file.h"
 
27
 
 
28
G_BEGIN_DECLS
 
29
 
 
30
#define GOF_TYPE_DIRECTORY_ASYNC gof_directory_async_get_type()
 
31
#define GOF_DIRECTORY_ASYNC(obj) \
 
32
  (G_TYPE_CHECK_INSTANCE_CAST ((obj), GOF_TYPE_DIRECTORY_ASYNC, GOFDirectoryAsync))
 
33
#define GOF_DIRECTORY_ASYNC_CLASS(klass) \
 
34
  (G_TYPE_CHECK_CLASS_CAST ((klass), GOF_TYPE_DIRECTORY_ASYNC, GOFDirectoryAsyncClass))
 
35
#define GOF_IS_DIRECTORY_ASYNC(obj) \
 
36
  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GOF_TYPE_DIRECTORY_ASYNC))
 
37
#define GOF_IS_DIRECTORY_ASYNC_CLASS(klass) \
 
38
  (G_TYPE_CHECK_CLASS_TYPE ((klass), GOF_TYPE_DIRECTORY_ASYNC))
 
39
#define GOF_DIRECTORY_ASYNC_GET_CLASS(obj) \
 
40
  (G_TYPE_INSTANCE_GET_CLASS ((obj), GOF_TYPE_DIRECTORY_ASYNC, GOFDirectoryAsyncClass))
 
41
 
 
42
/*
 
43
#define GIO_SUCKLESS_DEFAULT_ATTRIBUTES                                \
 
44
        "standard::type,standard::is-hidden,standard::name,standard::display-name,standard::edit-name,standard::copy-name,standard::fast-content-type,standard::size,standard::allocated-size,access::*,mountable::*,time::*,unix::*,owner::*,selinux::*,thumbnail::*,id::filesystem,trash::orig-path,trash::deletion-date,metadata::*"
 
45
*/
 
46
 
 
47
#define GOF_GIO_DEFAULT_ATTRIBUTES "standard::is-hidden,standard::is-symlink,standard::type,standard::name,standard::fast-content-type,standard::size,access::*,time::*"
 
48
#define FILES_PER_QUERY 100
 
49
 
 
50
//typedef struct GOFDirectoryAsyncDetails GOFDirectoryAsyncDetails;
 
51
typedef struct GOFDirectoryAsyncPrivate GOFDirectoryAsyncPrivate;
 
52
 
 
53
typedef struct {
 
54
        //GtkWindow parent_instance;
 
55
        //ASyncGIOSamplePrivate * priv;
 
56
        //GOFDirectoryAsyncDetails *details;
 
57
        GObject parent;
 
58
        GOFDirectoryAsyncPrivate *priv;
 
59
} GOFDirectoryAsync;
 
60
 
 
61
typedef struct {
 
62
        GObjectClass parent_class;
 
63
 
 
64
        /* The files_added signal is emitted as the directory model 
 
65
         * discovers new files.
 
66
         */
 
67
        void     (* file_added)         (GOFDirectoryAsync *directory, GOFFile *file);
 
68
#if 0
 
69
        void     (* files_changed)       (NautilusDirectory         *directory,
 
70
                                          GList                     *changed_files);
 
71
                                          GList                      *added_files);
 
72
#endif
 
73
        void     (* done_loading)        (GOFDirectoryAsync         *directory);
 
74
 
 
75
} GOFDirectoryAsyncClass;
 
76
        
 
77
GType                   gof_directory_async_get_type (void);
 
78
 
 
79
//GOFDirectoryAsync       *gof_directory_async_new(gchar *);
 
80
GOFDirectoryAsync       *gof_directory_async_new(GFile *location);
 
81
GOFDirectoryAsync       *gof_directory_async_get_for_file(GOFFile *file);
 
82
GOFDirectoryAsync       *gof_directory_async_get_parent(GOFDirectoryAsync *dir);
 
83
//GtkWidget               *get_tree_view(GOFDirectoryAsync *dir);
 
84
void                    load_dir_async (GOFDirectoryAsync *dir);
 
85
void                    load_dir_async_cancel (GOFDirectoryAsync *dir);
 
86
char                    *gof_directory_async_get_uri (GOFDirectoryAsync *directory);
 
87
 
 
88
/*GOFDirectoryAsync       *gof_directory_ref (GOFDirectoryAsync *directory);
 
89
void                    gof_directory_unref (GOFDirectoryAsync *directory);*/
 
90
 
 
91
G_END_DECLS
 
92
 
 
93
#endif /* GOF_DIRECTORY_ASYNC_H */