added get_file_list func
[geanyprj.git] / geanyprj.h
blobac6dd355d9636a1dd7941e16e378e2579368b2c4
1 /*
2 * Copyright 2008 Yura Siamashka <yurand2@gmail.com>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program 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 General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 #ifndef __GEANYPRJ_H__
20 #define __GEANYPRJ_H__
22 #define DEBUG
24 #ifdef DEBUG
25 #define debug printf
26 #else
27 #define debug
28 #endif
30 #define PROJECT_TYPE 1
32 struct GeanyProject
34 gchar *path; ///< path to disk file
36 gchar *name;
37 gchar *description;
38 gchar *base_path;
39 gchar *run_cmd;
41 GHashTable *tags; ///< project tags
44 // project.c
45 struct GeanyProject * geany_project_new(const gchar *path);
46 void geany_project_free(struct GeanyProject *prj);
47 gboolean geany_project_add_file(struct GeanyProject *prj, const gchar *path);
48 gboolean geany_project_remove_file(struct GeanyProject *prj, const gchar *path);
49 void geany_project_save(struct GeanyProject *prj);
52 // sidebar.c
53 void create_sidebar();
54 void destroy_sidebar();
56 void sidebar_refresh();
59 // xproject.c
60 void xproject_init();
61 gboolean xproject_add_file(const gchar *path);
62 gboolean xproject_remove_file(const gchar * path);
63 void xproject_update_tag(const gchar *filename);
64 void xproject_cleanup();
65 void xproject_close();
68 // utils.c
69 gchar * find_file_path(const gchar * dir, const gchar * filename);
70 gchar * normpath(const gchar * filename);
71 gchar * get_full_path(const gchar * location, const gchar * base_dir, const gchar * path);
72 gchar * get_relative_path(const gchar * location, const gchar * base_dir, const gchar * path);
74 gint config_length(GKeyFile *config, const gchar *section, const gchar* name);
75 void save_config(GKeyFile *config, const gchar* path);
76 GSList *get_file_list(const gchar *path, guint *length, GError **error);
79 extern struct GeanyProject *g_current_project;
81 #endif