Updated Spanish translation
[anjuta-git-plugin.git] / plugins / sourceview / anjuta-document-loader.h
blobce95019efe87d93c6ed07bb27ed4dd7443713056
1 /*
2 * anjuta-document-loader.h
3 * This file is part of anjuta
5 * Copyright (C) 2005 - Paolo Maggi
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 * Boston, MA 02110-1301, USA.
24 * Modified by the anjuta Team, 2005. See the AUTHORS file for a
25 * list of people on the anjuta Team.
26 * See the ChangeLog files for a list of changes.
28 * $Id$
31 #ifndef __ANJUTA_DOCUMENT_LOADER_H__
32 #define __ANJUTA_DOCUMENT_LOADER_H__
34 #include "anjuta-document.h"
35 #include <libgnomevfs/gnome-vfs-file-size.h>
37 G_BEGIN_DECLS
40 * Type checking and casting macros
42 #define ANJUTA_TYPE_DOCUMENT_LOADER (anjuta_document_loader_get_type())
43 #define ANJUTA_DOCUMENT_LOADER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), ANJUTA_TYPE_DOCUMENT_LOADER, AnjutaDocumentLoader))
44 #define ANJUTA_DOCUMENT_LOADER_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), ANJUTA_TYPE_DOCUMENT_LOADER, AnjutaDocumentLoader const))
45 #define ANJUTA_DOCUMENT_LOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), ANJUTA_TYPE_DOCUMENT_LOADER, AnjutaDocumentLoaderClass))
46 #define ANJUTA_IS_DOCUMENT_LOADER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), ANJUTA_TYPE_DOCUMENT_LOADER))
47 #define ANJUTA_IS_DOCUMENT_LOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ANJUTA_TYPE_DOCUMENT_LOADER))
48 #define ANJUTA_DOCUMENT_LOADER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), ANJUTA_TYPE_DOCUMENT_LOADER, AnjutaDocumentLoaderClass))
50 /* Private structure type */
51 typedef struct _AnjutaDocumentLoaderPrivate AnjutaDocumentLoaderPrivate;
54 * Main object structure
56 typedef struct _AnjutaDocumentLoader AnjutaDocumentLoader;
58 struct _AnjutaDocumentLoader
60 GObject object;
62 /*< private > */
63 AnjutaDocumentLoaderPrivate *priv;
67 * Class definition
69 typedef struct _AnjutaDocumentLoaderClass AnjutaDocumentLoaderClass;
71 struct _AnjutaDocumentLoaderClass
73 GObjectClass parent_class;
75 void (* loading) (AnjutaDocumentLoader *loader,
76 gboolean completed,
77 const GError *error);
81 * Public methods
83 GType anjuta_document_loader_get_type (void) G_GNUC_CONST;
85 AnjutaDocumentLoader *anjuta_document_loader_new (AnjutaDocument *doc);
87 /* If enconding == NULL, the encoding will be autodetected */
88 void anjuta_document_loader_load (AnjutaDocumentLoader *loader,
89 const gchar *uri,
90 const AnjutaEncoding *encoding);
91 #if 0
92 gboolean anjuta_document_loader_load_from_stdin (AnjutaDocumentLoader *loader);
93 #endif
94 gboolean anjuta_document_loader_cancel (AnjutaDocumentLoader *loader);
97 /* Returns STDIN_URI if loading from stdin */
98 #define STDIN_URI "stdin:"
99 const gchar *anjuta_document_loader_get_uri (AnjutaDocumentLoader *loader);
101 const gchar *anjuta_document_loader_get_mime_type (AnjutaDocumentLoader *loader);
103 time_t anjuta_document_loader_get_mtime (AnjutaDocumentLoader *loader);
105 /* In the case the loader does not know if the file is readonly, for example for most
106 remote files, the function returns FALSE */
107 gboolean anjuta_document_loader_get_readonly (AnjutaDocumentLoader *loader);
109 const AnjutaEncoding *anjuta_document_loader_get_encoding (AnjutaDocumentLoader *loader);
111 /* Returns 0 if file size is unknown */
112 GnomeVFSFileSize anjuta_document_loader_get_file_size (AnjutaDocumentLoader *loader);
114 GnomeVFSFileSize anjuta_document_loader_get_bytes_read (AnjutaDocumentLoader *loader);
117 G_END_DECLS
119 #endif /* __ANJUTA_DOCUMENT_LOADER_H__ */