1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
3 * Copyright (C) 2002 Dave Camp
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.
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 General Public License for more details.
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,
18 * Boston, MA 02110-1301, USA.
20 * Author: Dave Camp <dave@ximian.com>
23 #ifndef PROJECT_MODEL_H
24 #define PROJECT_MODEL_H
26 #include <glib-object.h>
28 #include <libanjuta/anjuta-project.h>
29 #include "tree-data.h"
31 #define GBF_TYPE_PROJECT_MODEL (gbf_project_model_get_type ())
32 #define GBF_PROJECT_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GBF_TYPE_PROJECT_MODEL, GbfProjectModel))
33 #define GBF_PROJECT_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GBF_TYPE_PROJECT_MODEL, GbfProjectModelClass))
34 #define GBF_IS_PROJECT_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GBF_TYPE_PROJECT_MODEL))
35 #define GBF_IS_PROJECT_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GBF_TYPE_PROJECT_MODEL))
37 typedef struct _GbfProjectModel GbfProjectModel
;
38 typedef struct _GbfProjectModelClass GbfProjectModelClass
;
39 typedef struct _GbfProjectModelPrivate GbfProjectModelPrivate
;
42 GBF_PROJECT_MODEL_COLUMN_DATA
,
43 GBF_PROJECT_MODEL_NUM_COLUMNS
46 struct _GbfProjectModel
{
48 GbfProjectModelPrivate
*priv
;
51 struct _GbfProjectModelClass
{
52 GtkTreeStoreClass parent_class
;
55 typedef struct _AnjutaPmProject AnjutaPmProject
;
57 GType
gbf_project_model_get_type (void);
58 GbfProjectModel
*gbf_project_model_new (AnjutaPmProject
*project
);
60 void gbf_project_model_set_project (GbfProjectModel
*model
,
61 AnjutaPmProject
*project
);
62 AnjutaPmProject
*gbf_project_model_get_project (GbfProjectModel
*model
);
64 GtkTreePath
*gbf_project_model_get_project_root (GbfProjectModel
*model
);
65 GtkTreePath
*gbf_project_model_get_project_root_group (GbfProjectModel
*model
);
66 gboolean
gbf_project_model_remove (GbfProjectModel
*model
,
68 gboolean
gbf_project_model_find_tree_data (GbfProjectModel
*model
,
71 gboolean
gbf_project_model_find_file (GbfProjectModel
*model
,
74 AnjutaProjectNodeType type
,
76 gboolean
gbf_project_model_find_node (GbfProjectModel
*model
,
79 AnjutaProjectNode
*node
);
80 gboolean
gbf_project_model_find_child_name (GbfProjectModel
*model
,
84 AnjutaProjectNode
*gbf_project_model_get_node (GbfProjectModel
*model
,
87 void gbf_project_model_add_node (GbfProjectModel
*model
,
88 AnjutaProjectNode
*package
,
90 AnjutaProjectNodeType only_type
);
92 void gbf_project_model_add_target_shortcut (GbfProjectModel
*model
,
93 GtkTreeIter
*shortcut
,
95 GtkTreePath
*before_path
,
97 void gbf_project_model_move_target_shortcut (GbfProjectModel
*model
,
99 GbfTreeData
*shortcut
,
100 GtkTreePath
*before_path
);
101 void gbf_project_model_set_default_shortcut (GbfProjectModel
*model
, gboolean enable
);
103 void gbf_project_model_sort_shortcuts (GbfProjectModel
*model
);