1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
2 /*
3  *  ianjuta-document-manager.h -- Autogenerated from libanjuta.idl
4  *
5  *  This program is free software; you can redistribute it and/or modify
6  *  it under the terms of the GNU General Public License as published by
7  *  the Free Software Foundation; either version 2 of the License, or
8  *  (at your option) any later version.
9  *
10  *  This program is distributed in the hope that it will be useful,
11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  *  GNU Library General Public License for more details.
14  *
15  *  You should have received a copy of the GNU General Public License
16  *  along with this program; if not, write to the Free Software
17  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18  */
19 
20 #ifndef _IANJUTA_DOCUMENT_MANAGER_H_
21 #define _IANJUTA_DOCUMENT_MANAGER_H_
22 
23 #include <glib-object.h>
24 #include <libanjuta/interfaces/ianjuta-document.h>
25 #include <libanjuta/interfaces/ianjuta-editor.h>
26 #include <gio/gio.h>
27 
28 G_BEGIN_DECLS
29 
30 #define IANJUTA_TYPE_DOCUMENT_MANAGER (ianjuta_document_manager_get_type ())
31 #define IANJUTA_DOCUMENT_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), IANJUTA_TYPE_DOCUMENT_MANAGER, IAnjutaDocumentManager))
32 #define IANJUTA_IS_DOCUMENT_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IANJUTA_TYPE_DOCUMENT_MANAGER))
33 #define IANJUTA_DOCUMENT_MANAGER_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), IANJUTA_TYPE_DOCUMENT_MANAGER, IAnjutaDocumentManagerIface))
34 
35 #define IANJUTA_TYPE_DOCUMENT_MANAGER_ERROR (ianjuta_document_manager_error_get_type())
36 
37 #define IANJUTA_DOCUMENT_MANAGER_ERROR ianjuta_document_manager_error_quark()
38 
39 /**
40 * IANJUTA_DOCUMENT_MANAGER_CURRENT_DOCUMENT:
41 *
42 * Anjuta shell value set by document manager to the current document
43 */
44 #define	IANJUTA_DOCUMENT_MANAGER_CURRENT_DOCUMENT	"document_manager_current_document"
45 
46 
47 typedef struct _IAnjutaDocumentManager IAnjutaDocumentManager;
48 typedef struct _IAnjutaDocumentManagerIface IAnjutaDocumentManagerIface;
49 
50 typedef enum {
51 	IANJUTA_DOCUMENT_MANAGER_DOESNT_EXIST
52 } IAnjutaDocumentManagerError;
53 
54 
55 struct _IAnjutaDocumentManagerIface {
56 	GTypeInterface g_iface;
57 
58 	/* Signal */
59 	void (*document_added) (IAnjutaDocumentManager *obj, IAnjutaDocument* doc);
60 	/* Signal */
61 	void (*document_removed) (IAnjutaDocumentManager *obj, IAnjutaDocument* doc);
62 
63 	void (*add_bookmark) (IAnjutaDocumentManager *obj, GFile* file,  gint line, GError **err);
64 	IAnjutaEditor* (*add_buffer) (IAnjutaDocumentManager *obj, const gchar *name,  const gchar* content, GError **err);
65 	void (*add_document) (IAnjutaDocumentManager *obj, IAnjutaDocument* document, GError **err);
66 	IAnjutaDocument* (*find_document_with_file) (IAnjutaDocumentManager *obj, GFile* file, GError **err);
67 	IAnjutaDocument* (*get_current_document) (IAnjutaDocumentManager *obj, GError **err);
68 	GList* (*get_doc_widgets) (IAnjutaDocumentManager *obj, GError **err);
69 	GFile* (*get_file) (IAnjutaDocumentManager *obj, const gchar *filename, GError **err);
70 	IAnjutaEditor* (*goto_file_line) (IAnjutaDocumentManager *obj, GFile* file,  gint lineno, GError **err);
71 	IAnjutaEditor* (*goto_file_line_mark) (IAnjutaDocumentManager *obj, GFile* file,  gint lineno,  gboolean mark, GError **err);
72 	gboolean (*remove_document) (IAnjutaDocumentManager *obj, IAnjutaDocument *document,  gboolean save_before, GError **err);
73 	void (*set_current_document) (IAnjutaDocumentManager *obj, IAnjutaDocument *document, GError **err);
74 
75 };
76 
77 GType ianjuta_document_manager_error_get_type (void);
78 
79 GQuark ianjuta_document_manager_error_quark     (void);
80 GType  ianjuta_document_manager_get_type        (void);
81 
82 void ianjuta_document_manager_add_bookmark (IAnjutaDocumentManager *obj, GFile* file,  gint line, GError **err);
83 
84 IAnjutaEditor* ianjuta_document_manager_add_buffer (IAnjutaDocumentManager *obj, const gchar *name,  const gchar* content, GError **err);
85 
86 void ianjuta_document_manager_add_document (IAnjutaDocumentManager *obj, IAnjutaDocument* document, GError **err);
87 
88 IAnjutaDocument* ianjuta_document_manager_find_document_with_file (IAnjutaDocumentManager *obj, GFile* file, GError **err);
89 
90 IAnjutaDocument* ianjuta_document_manager_get_current_document (IAnjutaDocumentManager *obj, GError **err);
91 
92 GList* ianjuta_document_manager_get_doc_widgets (IAnjutaDocumentManager *obj, GError **err);
93 
94 GFile* ianjuta_document_manager_get_file (IAnjutaDocumentManager *obj, const gchar *filename, GError **err);
95 
96 IAnjutaEditor* ianjuta_document_manager_goto_file_line (IAnjutaDocumentManager *obj, GFile* file,  gint lineno, GError **err);
97 
98 IAnjutaEditor* ianjuta_document_manager_goto_file_line_mark (IAnjutaDocumentManager *obj, GFile* file,  gint lineno,  gboolean mark, GError **err);
99 
100 gboolean ianjuta_document_manager_remove_document (IAnjutaDocumentManager *obj, IAnjutaDocument *document,  gboolean save_before, GError **err);
101 
102 void ianjuta_document_manager_set_current_document (IAnjutaDocumentManager *obj, IAnjutaDocument *document, GError **err);
103 
104 
105 G_END_DECLS
106 
107 #endif
108